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

View File

@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.4.0] - 2026-06-18
### Added
- **Agent authoring & doc generation (WP-0007)** — `kaizen-agentic create-agent`
scaffolds a schema-valid agent; `kaizen-agentic docs generate [--check]`
refreshes the CLAUDE.md `## Installed Agents` section idempotently
- **Frontmatter schema validation** — `kaizen-agentic validate` now enforces
required `name`/`description`/`category`, a known category, and valid
`memory`/`model` values with actionable errors
### Fixed
- **Idempotent doc regeneration** — `_update_documentation` no longer duplicates
the `## Installed Agents` block on each run (regex stopped at the first `###`
subheading); rendering is now a shared, idempotent helper
- **Declared category honoured** — agent frontmatter `category` is authoritative
when valid (name/content heuristic is fallback only)
- **Installed-agent resolution** — `list_installed_agents` reads the frontmatter
name, so agents whose filename differs from their name resolve correctly
### Changed
- **Renamed `agent-project-management.md``agent-project-assistant.md`** to
satisfy the `agent-<name>.md` convention (frontmatter `name: project-assistant`);
eliminates a registry name/filename collision
## [1.3.0] - 2026-06-17
### Added