New authoring tooling and a fix for the doc-regeneration defect it exposed.
Added:
- src/kaizen_agentic/agent_docs.py — render + idempotent upsert of the
CLAUDE.md "## Installed Agents" section (shared by installer and CLI)
- `kaizen-agentic docs generate [--check]` — idempotent doc refresh / CI gate
- `kaizen-agentic create-agent` — scaffold a schema-valid agent
- Frontmatter schema validation in `kaizen-agentic validate`
(required name/description/category, known category, valid memory/model)
- tests: test_agent_docs, test_validate_schema, test_create_agent
Fixed:
- _update_documentation regex duplicated the Installed Agents block on every
run (stopped at the first ### subheading) — now idempotent
- declared frontmatter `category` is authoritative (heuristic is fallback)
- list_installed_agents reads the frontmatter name, not the filename
- renamed agent-project-management.md -> agent-project-assistant.md to satisfy
the agent-<name>.md convention (eliminates a name/filename collision that
caused install/update to write a divergent duplicate)
- test_cli_error_handling no longer installs into the repo root (uses tmp)
Version 1.4.0; CHANGELOG, CLI cheat sheet, agency-framework, TODO updated.
Workplan KAIZEN-WP-0007 closed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add Performance Summary block to memory brief, document metrics synthesis in
agent-coach, and add e2e and CLI tests for qualitative plus quantitative briefs.
Persist INTENT and ecosystem assessments in history/, add ADR-004 for
project metrics with Helix Forge correlation, and register WP-0003 and
WP-0004 workplans with State Hub. Update SCOPE, README, and agency-framework
docs to reflect the two-layer measurement model.
T25: add tests/test_e2e_agency_framework.py — 16 E2E tests covering the full
memory lifecycle (init, show, brief, clear) and protocol list/show commands.
T26: replace agency-framework.md protocols placeholder with full documentation —
location convention, frontmatter schema, CLI reference, sys-medic memory
extensions, and protocols table.
T27: add Related Documents footer to agent-sys-medic.md linking to the k3s
protocol runbook, ADR-002, ADR-003, and agency-framework.md.
Fix: rename CLI command function list() → list_agents() to stop it shadowing
Python's built-in list(). The shadow caused memory_brief() to invoke the
agent-list command instead of constructing a list from dict keys, producing
the agent list as output on every `memory brief` invocation.
All 27 WP-0002 tasks complete. Test suite: 51 passed, 1 skipped.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>