feat: agent authoring & doc generation (WP-0007, v1.4.0)
Some checks failed
ci / test (push) Failing after 40s
Publish Python package / publish (push) Successful in 4m46s

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>
This commit is contained in:
2026-06-18 02:06:14 +02:00
parent 7058859e5c
commit 843cf4eee0
19 changed files with 847 additions and 90 deletions

28
TODO.md
View File

@@ -10,23 +10,27 @@ The structure organizes **future tasks** by their impact, just as a changelog or
## [Unreleased] - *Active Vibe-Coding State* 💡
Tasks in workplan: `workplans/kaizen-agentic-WP-0006-scheduled-agent-execution.md` (v1.3.0)
Tasks in workplan: `workplans/kaizen-agentic-WP-0007-agent-authoring-doc-generation.md` (v1.4.0)
### Implemented (pending v1.3.0 tag)
### Implemented (pending v1.4.0 tag)
* **`create-agent`** — scaffold schema-valid agents
* **`docs generate [--check]`** — idempotent CLAUDE.md Installed Agents refresh
* **Frontmatter schema validation** in `validate`
* **Doc-regeneration idempotency fix** + agent file rename (project-assistant)
### To Add (release)
* **Tag v1.4.0** — after review
* **activity-core implementation** — WP-0006 resolver + sync (separate repo; see handoff doc)
### Shipped — v1.3.0 (2026-06-17)
* **ADR-005 + `.kaizen/schedule.yml`** — scheduled agent execution contract
* **`kaizen-agentic schedule`** — validate, init, prepare, list
* **activity-core definitions** — weekly coach + optimization on preselected repos
* **Resolver + roster + event design** — `discover_kaizen_scheduled_repos`,
State Hub roster fields, `kaizen.schedule.prepared` payload, handoff checklist
### To Add (release)
* **Tag v1.3.0** — once activity-core handoff issue is opened and pilot smoke-tested
* **activity-core implementation** — resolver + sync (separate repo; see handoff doc)
### Deferred to WP-0007 (v1.3.0+)
* Interactive agent selection wizard
* Agent template schema validation in `validate`
* Documentation generation from agent metadata
### Deferred / future
* Interactive agent selection wizard (multi-step) — `create-agent` covers the
single-agent scaffold; a guided multi-agent wizard remains future work
* Multi-file agent packages / protocol scaffolding
***