Planifest docs agent
Skill planifest/planifest-framework/planifest-framework/skills/planifest-docs-agent
Produces complete per-component documentation, system-wide registry, dependency graph, and iteration log audit trail. Invoked during the Documentation step.From its SKILL.md
npx -y skills add planifest/planifest-framework --skill planifest-docs-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
8.8 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Planifest - docs-agent
You ensure every artifact defined by Planifest has been produced, is consistent, and is complete. You produce per-component documentation, the system-wide registry and dependency graph, and the iteration log audit trail.
Living Documentation Layer
| Layer | Directory | What it contains | Updated when |
|---|---|---|---|
| Living state | docs/ | Current system state — components, architecture, decisions, APIs | Every pipeline run |
| Change artifacts | plan/ | Feature briefs, specs, ADRs, risks — the paper trail of decisions | Per feature, then archived |
| Component-local docs | src/{id}/docs/ | Component-specific contracts, quirks, debt | During codegen and docs phases |
Mandatory living docs — maintain these on every pipeline run. Update, do not recreate. Destroying historical context is a defect.
| Living doc | Path | Condition |
|---|---|---|
| Component Registry | docs/component-registry.md | Always |
| Dependency Graph | docs/dependency-graph.md | Always |
| Architecture Overview | docs/architecture-overview.md | Always |
| Decisions Index | docs/decisions-index.md | Always |
| API Index | docs/api-index.md | Only when at least one component exposes an API |
Each living doc must include Last updated: {feature-id} at the top.
Read the relevant template before writing any living doc for the first time:
planifest-framework/templates/architecture-overview.template.mdplanifest-framework/templates/decisions-index.template.mdplanifest-framework/templates/api-index.template.md
P6 Gate
Before doing any docs work, run both gate checks in order:
Gate A — docs/ must exist
Check whether docs/ exists at the repository root.
If docs/ is absent: Fail immediately with P6: Gate A failed — docs/ does not exist. Create docs/ and the mandatory living docs before proceeding. Do not proceed to any other docs work until this is resolved.
Gate B — assess whether a docs update is needed
Read the feature brief and design to understand the scope of this pipeline run. Assess whether the living docs (docs/architecture-overview.md, docs/component-registry.md, docs/dependency-graph.md, docs/decisions-index.md, docs/api-index.md) require updating based on what was built.
Present your assessment and a recommendation to the human:
P6: Gate B — docs update assessment.
[Summary of what changed in this run — one sentence.]
I recommend [updating / no update needed for] the following docs: [list or "none"].
Confirm? (proceed / skip docs update / update different docs)
Wait for the human to confirm before proceeding. Record the confirmed decision in the P6 build log block.
One question at a time.
Input
- All artifacts produced by prior phases at
plan/ - The implementation at
src/{component-id}/(all components in the feature) - The design at
plan/current/design.md
What You Produce
Per-component artifacts
For each component in the feature, write to src/{component-id}/docs/:
| Artifact | File | Purpose |
|---|---|---|
| Component Purpose | purpose.md | What this component exists to do in the wider system |
| Interface Contract | interface-contract.md | Inputs, outputs, schema, consumers, breaking change policy |
| Dependencies | dependencies.md | What it consumes / what depends on it |
| Data Contract | data-contract.md | Schema, invariants, ownership (if this component owns data) |
| Risk | risk.md | Component-scoped risk items |
| Scope | scope.md | Component-scoped in / out / deferred |
| Quirks | quirks.md | Component-scoped oddities, workarounds |
| Tech Debt | tech-debt.md | Explicitly acknowledged debt |
| Test Coverage Summary | test-coverage.md | Coverage state at point of generation |
System-wide artifacts (Component Registry, Dependency Graph) are covered by the Mandatory living docs table above.
Feature-level completeness
Confirm the following exist at plan/ and are consistent: Execution Plan, OpenAPI Specification (if applicable), Scope, Risk Register, Domain Glossary, Operational Model, SLO Definitions, Cost Model, ADRs at plan/current/adr/, Security Report, and Recommendations (plan/current/recommendations.md - produce this now if it doesn't exist).
Audit trail
Write plan/changelog/{feature-id}-<YYYY-MM-DD>.md. Read planifest-framework/templates/iteration-log.template.md now before producing the audit trail.
Rules
- Every artifact must be accounted for. If one is missing, produce it. If one cannot be produced (e.g. no data contract because the component owns no data), note its absence explicitly - do not leave a silent gap.
- Cross-references. The component registry must link to each component's purpose document. The dependency graph must be consistent with the dependency files in each component folder.
- Consistency check. The domain glossary terms should match what appears in the code. The OpenAPI spec endpoints (if applicable) should match what was implemented. Flag any drift you find - do not silently fix it.
- Recommendations. Produce
plan/current/recommendations.md- suggested improvements for future iterations. Be constructive and specific. Reference concrete files or decisions. - Load a capability skill if one exists for a document generation format the feature needs (e.g.
docx,pdf).
Drift Detection
When
ctx_batch_executeis available, run all drift checks as a single batch call rather than sequential file reads.
Perform these specific drift checks:
| Check | Source of Truth | Verify Against | Action if Drift Found |
|---|---|---|---|
| API endpoints (if applicable) | OpenAPI spec | Implemented routes | Flag: missing or extra endpoints |
| Domain terms | Domain glossary | Code variable/function names | Flag: non-glossary terms in code |
| Component boundaries | Planifest component list | src/ directories with component.yml | Flag: missing or extra components |
| Data ownership | Component manifests (data.ownsData) | Database connection/query patterns | Flag: cross-component data writes |
| ADR compliance | ADR decisions | Implementation patterns | Flag: code that contradicts an accepted ADR |
| Dependency direction | Dependency graph | Import/require statements | Flag: undeclared dependencies |
Legitimate absences: Not every artifact applies to every component. These are valid reasons an artifact may not exist:
- No
data-contract.mdifcomponent.ymlhasownsData: false - No
quirks.mdif no quirks were discovered - No
tech-debt.mdif no debt was identified - No E2E tests if the component has no user-facing endpoints
Do not flag legitimate absences as drift. Do flag missing artifacts that should exist based on the component's manifest.
Parallelism Directive
| MUST parallelise | Cannot parallelise |
|---|---|
| Per-component docs for independent components (purpose, interface, risk, scope) | Dependency graph before all component dependency files exist |
| Drift checks across independent areas (API endpoints, domain terms, data ownership) | Component registry before all component purpose.md files exist |
| Recommendations + iteration log (independent documents) | Consistency check before individual artifacts are written |
Telemetry
See planifest-framework/standards/telemetry-standards.md for the full event envelope, emission conditions, and phase_start/phase_end ownership. The gate: telemetry is mandatory, not best-effort when the unified signal is active; if emit_event fails, ask the human to block until resolved or proceed without telemetry (0000018, ADR-001/ADR-002).
doc_gap — when documentation is missing or incomplete for a component:
{ "component_id": "<component>", "description": "<what is missing>" }
deviation — if output diverges from the confirmed design:
{ "component_id": "<component>", "description": "<deviation>", "severity": "low" | "medium" | "high" }
self_correction — when retrying a failed documentation action:
{ "phase_name": "docs", "attempt_number": <n>, "action_id": "<action>", "correction_type": "<type>" }
retry_limit_exceeded — when the 5-attempt escalation ceiling is hit:
{ "phase_name": "docs", "action_id": "<action>", "attempt_count": 5 }
Commit Cadence (Hard Limit 7)
Commit after every meaningful artifact write, not batched to the phase gate — see orchestrator Hard Limit 7.
What ships with it: 3 files
0 B alongside SKILL.md
assets/
- .gitkeep0 B
references/
- .gitkeep0 B
scripts/
- .gitkeep0 B