feat: semantic wiki layer with dedicated wiki-keeper sub-agent#2
feat: semantic wiki layer with dedicated wiki-keeper sub-agent#2workingfm wants to merge 1 commit intoLarens94:mainfrom
Conversation
- Add `codedna wiki` subcommand — explicit, idempotent wiki scaffold - Add `codedna_tool/wiki.py` — scaffold helper for 3 wiki assets - Add `.agents/skills/create-wiki/SKILL.md` — cross-runtime skill with model hints (haiku/o4-mini/gemini-flash) for token-efficient execution - Add `.claude/agents/codedna-wiki-keeper.md` — Claude Code sub-agent (model: haiku) that isolates wiki reads from main agent context - Add `codedna-wiki.md` — semantic companion to .codedna (L0) - Wire wiki scaffold into `codedna init` (idempotent, non-destructive) - Add AGENTS.md for Codex runtime integration - Update .gitignore: exclude .planning/ and .claude/settings.local.json - Add 6 new tests (scaffold, haiku model, sub-agent ref, dry-run, idempotent) AI-Agent: claude-opus-4-7 AI-Provider: anthropic AI-Session: s_20260419_001 AI-Visited: .codedna,codedna_tool/cli.py,codedna_tool/wiki.py,tests/test_cli.py,.agents/skills/create-wiki/SKILL.md,.claude/agents/codedna-wiki-keeper.md,codedna-wiki.md,AGENTS.md,.gitignore AI-Message: wiki scaffold is standalone (no GSD/plugin dep); haiku enforced in CC, advisory via model-hint in other runtimes
|
Ciao @workingfm , grazie per questa PR, l'ho studiata a fondo nelle ultime ore e volevo aggiornarti. Ho preso il tuo lavoro, l'ho adattato al nostro protocollo v0.9 e l'ho messo su un branch sperimentale: experiment/wiki-field. Cosa ho integrato dalla tua PR: Il template narrativo a 7 sezioni del codedna-wiki.md → ora in docs/codedna-wiki.md, generato via codedna wiki sync Il sub-agent codedna-wiki-keeper e la skill create-wiki/SKILL.md. Motivo: il progetto ha già pre/post-commit hooks come meccanismo di enforcement, e sui nostri benchmark SWE-bench gli agenti dimenticano spesso le istruzioni scritte in markdown. Gli hooks sono hard-enforced, non dipendono dalla memoria dell'agente. Per questo ho preferito un codedna wiki sync deterministico che si aggancia al post-commit hook. Un nuovo campo opzionale wiki: nel docstring v0.9 — punta a un markdown curato per quel file specifico. Quando presente nel docstring, il vault Obsidian mostra un arco esplicito verso la pagina curata (il tuo approccio diventa opt-in per file). Se sei ok con l'adattamento, posso mergiare experiment/wiki-field in main e chiudere questa PR citandoti nel changelog.
Grazie davvero per il lavoro iniziale Fabrizio |
…dated to v0.9) workingfm's original PR #2 contributed AGENTS.md as a Codex-compatible counterpart to CLAUDE.md. We bring it in here but synchronized with the current v0.9 protocol: - includes the `related:` field (v0.9 addition for cross-cutting semantic links) - includes the `wiki:` optional field (experimental v0.9, from this branch) - includes the inline `# Rules:` / `# message:` annotation patterns - includes the session_end protocol with AI git trailers - mirror of CLAUDE.md — only the top header differs, so Codex/OpenCode/Aider users get the same guidance Claude Code users get via CLAUDE.md Keep the two files in sync when the protocol evolves. Easiest: edit CLAUDE.md then `diff CLAUDE.md AGENTS.md` and patch the header back. Co-authored-by: workingfm <workingfm@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…GENTS.md Merges experiment/wiki-field (8 commits) into main. Changes: - codedna wiki bootstrap generates a nested Obsidian vault under docs/wiki/ (mirrors source tree, [[wikilinks]] from used_by:/related: graphs) - codedna wiki sync regenerates docs/codedna-wiki.md (7-section narrative wiki, template by @workingfm PR #2) - New opt-in wiki: field in docstrings — auto-generated pages render a "📖 Extended documentation" callout with a clickable [[wikilink]] to the curated page; the arc is visible in the Obsidian graph - fix(validator): _parse_fields now recognises optional fields (wiki:/related:/ message:) — previously they were silently folded into the previous field - fix(wiki): escape numeric hashtags (#1072-1077) to prevent Obsidian tag nodes - fix(wiki): drop phantom nodes from placeholder values (none/n/a/tbd) and literal [[wikilink]] text in Rules/agent entries - AGENTS.md added at repo root for Codex/OpenCode/Aider runtimes (from PR #2, updated to v0.9 — includes related:, wiki:, session-end protocol) Co-authored-by: workingfm <workingfm@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Mergiato in main con e83534b. Grazie @workingfm — il tuo contributo è integrato con co-authorship. Se hai feedback sul branch o vuoi contribuire altro, apri una nuova PR. |
Grazie mille Fabrizio! @Larens94 gentilissimo!🤟 |


Summary
codedna wiki— explicit CLI subcommand to scaffold the semantic wiki layer, independent ofcodedna initand any external plugin (GSD, OpenCode, etc.)codedna_tool/wiki.py— scaffold helper that creates 3 assets idempotently: skill, wiki, and Claude Code sub-agent.agents/skills/create-wiki/SKILL.md— cross-runtime skill withmodel: haiku/preferred-model: haiku/model-hintfields for token-efficient execution on Claude Code, Codex, OpenCode, and Gemini.claude/agents/codedna-wiki-keeper.md— Claude Code sub-agent (model: haiku) that isolates all wiki reads/writes from the main agent context windowcodedna-wiki.md— semantic companion to.codedna(L0), following the Karpathy llm-wiki pattern: persistent compiled knowledge, not a cache rebuilt every sessioncodedna init(idempotent, never overwrites existing files)AGENTS.mdfor Codex runtime integration.gitignore: excludes.planning/and.claude/settings.local.jsonDesign decisions
Standalone autonomy:
codedna wikihas zero dependency on GSD or any other plugin. Works with.codedna, pure Python stdlib, and text templates only.Context isolation: In Claude Code,
create-wikiskill instructs the orchestrator to spawncodedna-wiki-keepervia the Agent tool. The keeper runs on Haiku, reads only what.codednasays is relevant, and returns a compact summary. Main agent context stays clean.Cross-runtime model hints: The skill frontmatter carries
model: haiku,preferred-model: haiku, and amodel-hintstring with per-runtime equivalents (o4-mini for Codex, gemini-flash for Gemini). Claude Code is the only runtime that enforces the model; others read it as advisory.Idempotency: Every scaffold path checks existence before writing. Re-running
codedna wikiorcodedna initreports "Reused" and never overwrites user-authored content.Test plan
codedna wikicreates all 3 assets from scratchcodedna wiki --dry-runreports without writingcodedna wikiis idempotent on re-run.claude/agents/codedna-wiki-keeper.mdcontainsmodel: haikucreate-wiki/SKILL.mdreferencescodedna-wiki-keeperand haikucodedna initstill scaffolds wiki assets (existing tests pass)🤖 Generated with Claude Code