Compare commits
No commits in common. "6d1151fa5a55937a4afc39e808fed98b20f232a5" and "13d34b49067b6c95851a0f0c42612d0ad4901a50" have entirely different histories.
6d1151fa5a
...
13d34b4906
3 changed files with 6 additions and 59 deletions
|
|
@ -39,17 +39,9 @@ which matters on a small local model.
|
|||
5. On a real contradiction with an existing claim, follow `AGENTS.md` §Conflict: create
|
||||
`wiki/queries/conflict-<concept>-<YYYY-MM-DD>.md`. Never overwrite the existing page.
|
||||
|
||||
**Naming — you are the sole author of these names; nothing renames your files.** Use
|
||||
minimal kebab-case: lowercase letters, digits and hyphens only — no spaces, no underscores,
|
||||
no capitals. Pick stable names so the same entity is never created twice (always `acme`,
|
||||
never also `acme-corp`). The path you write a file to MUST be byte-for-byte the path you
|
||||
list in the manifest.
|
||||
|
||||
**Deciding create-vs-update and spotting contradictions — mind the context budget.** Use
|
||||
`wiki/index.md` to locate existing pages, then read **only** the handful that _this source
|
||||
actually names_ — the entities and concepts in the source's title and opening paragraphs —
|
||||
not everything the index lists. When in doubt, read fewer: a missed cross-link is far
|
||||
cheaper than a saturated context. Never scan whole directories.
|
||||
Name files in kebab-case and pick stable names. Read `wiki/index.md` (and the specific
|
||||
pages it points to) to decide create-vs-update and to spot contradictions. Do not scan
|
||||
whole directories.
|
||||
|
||||
## Finish: write the manifest, then STOP
|
||||
|
||||
|
|
@ -60,6 +52,7 @@ append to the log/index, or open anything.
|
|||
```json
|
||||
{
|
||||
"raw_source": "raw/articles/foo.md",
|
||||
"model": "<the model you are running as>",
|
||||
"reasoning": "One sentence for the log: what changed and why.",
|
||||
"pr_summary": "One or two sentences describing this ingest for the PR.",
|
||||
"contradictions": "None (or: 1 conflict file created — <concept>)",
|
||||
|
|
@ -73,6 +66,7 @@ append to the log/index, or open anything.
|
|||
{
|
||||
"path": "wiki/entities/acme.md",
|
||||
"summary": "Acme — vendor.",
|
||||
"maturity": "draft",
|
||||
"status": "modified"
|
||||
}
|
||||
]
|
||||
|
|
@ -84,10 +78,6 @@ Manifest rules:
|
|||
- List every page you created or modified, with `status` `created` or `modified`.
|
||||
- `summary` is the one-line index description (≈12 words max). For conflict pages the
|
||||
summary is ignored — the index lists conflicts by slug only.
|
||||
- `maturity` is required only on `created` pages (it seeds the new index entry). It is
|
||||
ignored for `modified` pages, so omit it there.
|
||||
- Do NOT add a `model` field — the orchestrator records which model produced this run; you
|
||||
cannot know your own model name reliably, so do not guess one.
|
||||
- Do not invent a `run_id`, branch, commit, or PR — those belong to the post-processor.
|
||||
|
||||
One source per session. After writing the manifest, stop.
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ command -v python3 >/dev/null 2>&1 || fail "deps" "python3 missing (needed by in
|
|||
|
||||
# --- read manifest scalars ---
|
||||
raw_source="$(jq -r '.raw_source' "$manifest")"
|
||||
# model name comes from the orchestrator/wrapper (INGEST_MODEL); the agent cannot know its
|
||||
# own tag, so we do not trust a self-reported manifest field. Fall back only if unset.
|
||||
model="${INGEST_MODEL:-$(jq -r '.model // "unknown"' "$manifest")}"
|
||||
model="$(jq -r '.model // "unknown"' "$manifest")"
|
||||
reasoning="$(jq -r '.reasoning // "Ingest."' "$manifest")"
|
||||
pr_summary="$(jq -r '.pr_summary // "Ingest."' "$manifest")"
|
||||
contradictions="$(jq -r '.contradictions // "None"' "$manifest")"
|
||||
|
|
|
|||
|
|
@ -91,44 +91,3 @@ EOF
|
|||
# listed by slug under the Conflicts section
|
||||
grep -q 'queries/conflict-pricing-2026-06-03' wiki/index.md
|
||||
}
|
||||
|
||||
@test "run-ingest: records INGEST_MODEL in the log (manifest carries no model field)" {
|
||||
command -v jq >/dev/null 2>&1 || skip "jq not installed"
|
||||
|
||||
G="$(make_fixture_genome)"; cd "$G"
|
||||
|
||||
cat > wiki/sources/test-source.md <<'EOF'
|
||||
---
|
||||
title: "Test Source"
|
||||
type: source
|
||||
domain: genome-test
|
||||
tags: [t]
|
||||
maturity: draft
|
||||
last_updated: 2026-06-04
|
||||
private: false
|
||||
---
|
||||
body
|
||||
EOF
|
||||
|
||||
# New contract: NO "model" field — the orchestrator supplies it via INGEST_MODEL.
|
||||
cat > .ingest-manifest.json <<'EOF'
|
||||
{
|
||||
"raw_source": "raw/articles/test.md",
|
||||
"reasoning": "Ingested the test source.",
|
||||
"pr_summary": "Ingest of test: 1 source page.",
|
||||
"contradictions": "None",
|
||||
"pages": [
|
||||
{"path": "wiki/sources/test-source.md", "summary": "A smoke-test source.", "maturity": "draft", "status": "created"}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
export KG_LIB_DIR="$LIB_DIR"
|
||||
export FORGEJO_URL="http://forgejo.local" FORGEJO_USER="u" FORGEJO_TOKEN="t" DRY_RUN=1
|
||||
export INGEST_MODEL="qwen-test-tag"
|
||||
|
||||
run bash "$SKILL_SCRIPTS/run-ingest.sh" genome-test
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *'"status":"ok"'* ]]
|
||||
grep -q 'qwen-test-tag' wiki/log.md
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue