agent-manifesto-kit 0.0.0-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -0
  3. package/collection/NOTICE.md +36 -0
  4. package/collection/agents/code-reviewer.md +103 -0
  5. package/collection/agents/docs-manager.md +127 -0
  6. package/collection/bundles/kit-adopt/README.md +36 -0
  7. package/collection/bundles/kit-adopt/conventions/recommended-companions.md +43 -0
  8. package/collection/bundles/kit-adopt/pipelines/kit-adopt.md +52 -0
  9. package/collection/bundles/kit-adopt/skills/kit-adopt/SKILL.md +72 -0
  10. package/collection/bundles/sdd/README.md +50 -0
  11. package/collection/bundles/sdd/RECOMMENDS.md +21 -0
  12. package/collection/bundles/sdd/agents/sdd-gap-analyzer.md +79 -0
  13. package/collection/bundles/sdd/agents/sdd-spec-reviewer.md +75 -0
  14. package/collection/bundles/sdd/conventions/sdd-doc-set.md +136 -0
  15. package/collection/bundles/sdd/pipelines/sdd-adopt.md +60 -0
  16. package/collection/bundles/sdd/pipelines/sdd-bootstrap.md +60 -0
  17. package/collection/bundles/sdd/skills/sdd-doc-author/SKILL.md +69 -0
  18. package/collection/bundles/sdd/skills/sdd-feature-author/SKILL.md +71 -0
  19. package/collection/bundles/sdd/skills/sdd-index-sync/SKILL.md +61 -0
  20. package/collection/bundles/sdd/templates/docs/INDEX.md +35 -0
  21. package/collection/bundles/sdd/templates/docs/api.md +23 -0
  22. package/collection/bundles/sdd/templates/docs/architecture.md +42 -0
  23. package/collection/bundles/sdd/templates/docs/db.md +22 -0
  24. package/collection/bundles/sdd/templates/docs/decisions/ADR-template.md +24 -0
  25. package/collection/bundles/sdd/templates/docs/design.md +43 -0
  26. package/collection/bundles/sdd/templates/docs/idea.md +46 -0
  27. package/collection/bundles/sdd/templates/docs/operations.md +28 -0
  28. package/collection/bundles/sdd/templates/docs/roadmap.md +26 -0
  29. package/collection/bundles/sdd/templates/docs/security.md +24 -0
  30. package/collection/bundles/sdd/templates/docs/testing.md +34 -0
  31. package/collection/bundles/sdd/templates/features/F000_template/requirements.md +38 -0
  32. package/collection/bundles/sdd/templates/features/F000_template/scenarios.md +26 -0
  33. package/collection/bundles/sdd/templates/features/F000_template/tasks.md +11 -0
  34. package/collection/skills/brainstorm/SKILL.md +46 -0
  35. package/collection/skills/business-analyst/SKILL.md +58 -0
  36. package/collection/skills/documentation-maintenance/SKILL.md +60 -0
  37. package/collection/skills/explain-code/SKILL.md +81 -0
  38. package/collection/skills/frontend-audit/SKILL.md +135 -0
  39. package/collection/skills/frontend-impeccable-design/SKILL.md +135 -0
  40. package/collection/skills/frontend-impeccable-polish/SKILL.md +118 -0
  41. package/collection/skills/implement-feature/SKILL.md +99 -0
  42. package/collection/skills/memory-management/SKILL.md +75 -0
  43. package/collection/skills/meta-tags-optimizer/SKILL.md +73 -0
  44. package/collection/skills/pencil-design/SKILL.md +83 -0
  45. package/collection/skills/playwright-cli/SKILL.md +104 -0
  46. package/collection/skills/prepare-release-notes/SKILL.md +109 -0
  47. package/collection/skills/refactor-code/SKILL.md +104 -0
  48. package/collection/skills/review-code/SKILL.md +98 -0
  49. package/collection/skills/schema-markup-generator/SKILL.md +80 -0
  50. package/collection/skills/task-complete/SKILL.md +79 -0
  51. package/collection/skills/task-discovery/SKILL.md +69 -0
  52. package/collection/skills/task-validation/SKILL.md +71 -0
  53. package/collection/skills/test-review/SKILL.md +72 -0
  54. package/collection/skills/test-writer/SKILL.md +78 -0
  55. package/collection/skills/work-with-git/SKILL.md +154 -0
  56. package/dist/catalog.js +146 -0
  57. package/dist/cli.js +108 -0
  58. package/dist/commands/adopt.js +100 -0
  59. package/dist/commands/lint.js +26 -0
  60. package/dist/commands/list.js +30 -0
  61. package/dist/portability.js +41 -0
  62. package/dist/providers.js +37 -0
  63. package/package.json +49 -0
@@ -0,0 +1,42 @@
1
+ # Architecture
2
+
3
+ <!-- Owns: technical structure. Keep product/UX in design.md and the decision log in
4
+ decisions/. Link to ADRs for the "why" behind a choice. -->
5
+
6
+ ## System Context
7
+
8
+ <!-- What the system is, its boundaries, and the external actors/systems it talks to. -->
9
+
10
+ ## Components
11
+
12
+ <!-- The major parts and their responsibilities. A diagram or table is welcome. -->
13
+
14
+ | Component | Responsibility | Notes |
15
+ | --- | --- | --- |
16
+ | <name> | <what it does> | <tech / location> |
17
+
18
+ ## Data Model
19
+
20
+ <!-- Key entities, their relationships, and where state lives. -->
21
+
22
+ ## Tech Stack
23
+
24
+ <!-- Languages, frameworks, datastores, infra. Note versions where they matter. -->
25
+
26
+ ## Integrations
27
+
28
+ <!-- External services, APIs, and how the system depends on them. -->
29
+
30
+ ## Constraints
31
+
32
+ <!-- Performance, security, compliance, cost, or platform constraints. -->
33
+
34
+ ## Cross-Cutting Concerns
35
+
36
+ <!-- Auth, logging, error handling, config, observability, i18n. -->
37
+
38
+ ## Key Decisions
39
+
40
+ <!-- Link to the ADRs that shaped this architecture. -->
41
+
42
+ - See `decisions/ADR-<NNN>-<slug>.md` — <one-line summary>
@@ -0,0 +1,22 @@
1
+ # Database
2
+
3
+ <!-- Optional extension doc. Owns persistence: data model, schema, migrations.
4
+ Leave a summary + link in architecture.md. Register this doc in INDEX.md. -->
5
+
6
+ ## Storage
7
+
8
+ <!-- Engine(s), where data lives, key configuration. -->
9
+
10
+ ## Entities
11
+
12
+ | Entity | Purpose | Key fields | Relationships |
13
+ | --- | --- | --- | --- |
14
+ | <name> | <what it represents> | <fields> | <links to other entities> |
15
+
16
+ ## Schema Notes
17
+
18
+ <!-- Indexes, constraints, derived/computed data, retention. -->
19
+
20
+ ## Migrations
21
+
22
+ <!-- How schema changes are managed, tooling, and ordering rules. -->
@@ -0,0 +1,24 @@
1
+ # ADR-<NNN>: <title>
2
+
3
+ <!-- One architectural decision per file. Copy this template to
4
+ decisions/ADR-<NNN>-<slug>.md and fill it in. IDs are stable once assigned. -->
5
+
6
+ - **Status:** <proposed | accepted | superseded by ADR-<NNN> | deprecated>
7
+ - **Date:** <YYYY-MM-DD>
8
+ - **Deciders:** <who decided>
9
+
10
+ ## Context
11
+
12
+ <!-- The forces at play: the problem, constraints, and why a decision is needed now. -->
13
+
14
+ ## Decision
15
+
16
+ <!-- The choice made, stated plainly. -->
17
+
18
+ ## Consequences
19
+
20
+ <!-- What becomes easier or harder as a result. Include trade-offs accepted. -->
21
+
22
+ ## Alternatives Considered
23
+
24
+ - **<alternative>** — <why it was not chosen>
@@ -0,0 +1,43 @@
1
+ # Design
2
+
3
+ <!-- Owns: product/UX design. Keep technical structure in architecture.md.
4
+ Omit this file entirely on the Lean tier. -->
5
+
6
+ ## UX Principles
7
+
8
+ <!-- Experience principles that guide design trade-offs. -->
9
+
10
+ - <principle>
11
+
12
+ ## User Flows
13
+
14
+ <!-- The primary paths a user takes to accomplish a goal. One subsection per flow. -->
15
+
16
+ ### <flow name>
17
+
18
+ 1. <step>
19
+ 2. <step>
20
+
21
+ ## Key Screens / Views
22
+
23
+ <!-- The important screens or views and their purpose. -->
24
+
25
+ | Screen / View | Purpose | Entry point |
26
+ | --- | --- | --- |
27
+ | <name> | <what the user does here> | <how they get here> |
28
+
29
+ ## States
30
+
31
+ <!-- For each key view, the non-happy states. -->
32
+
33
+ - **Empty** — <what the user sees with no data>
34
+ - **Loading** — <loading treatment>
35
+ - **Error** — <error treatment and recovery>
36
+
37
+ ## Interaction Patterns
38
+
39
+ <!-- Reusable patterns: forms, navigation, feedback, confirmation, etc. -->
40
+
41
+ ## Accessibility
42
+
43
+ <!-- Accessibility commitments and notable considerations. -->
@@ -0,0 +1,46 @@
1
+ # Idea
2
+
3
+ <!-- Owns: problem, users, value, scope, non-goals, principles, success signals.
4
+ Keep technical structure in architecture.md and UX detail in design.md. -->
5
+
6
+ ## Problem
7
+
8
+ <!-- The problem this project solves, and why it matters now. -->
9
+
10
+ ## Users
11
+
12
+ <!-- Who uses this and what they are trying to accomplish. List personas if helpful. -->
13
+
14
+ - **<persona>** — <goal / context>
15
+
16
+ ## Value Proposition
17
+
18
+ <!-- The core value delivered. One or two sentences. -->
19
+
20
+ ## Scope
21
+
22
+ ### In scope
23
+
24
+ - <capability or outcome included>
25
+
26
+ ### Out of scope
27
+
28
+ - <capability or outcome explicitly excluded>
29
+
30
+ ## Non-Goals
31
+
32
+ <!-- Things this project deliberately will not become or do. -->
33
+
34
+ - <non-goal>
35
+
36
+ ## Principles
37
+
38
+ <!-- Guiding principles that resolve trade-offs when requirements conflict. -->
39
+
40
+ - <principle>
41
+
42
+ ## Success Signals
43
+
44
+ <!-- How we will know this is working. Prefer observable signals over vanity metrics. -->
45
+
46
+ - <signal>
@@ -0,0 +1,28 @@
1
+ # Operations
2
+
3
+ <!-- Optional extension doc. Owns deployment, runtime, observability, runbooks.
4
+ Leave a summary + link in architecture.md. Register this doc in INDEX.md. -->
5
+
6
+ ## Environments
7
+
8
+ <!-- The environments (local, staging, production) and how they differ. -->
9
+
10
+ ## Deployment
11
+
12
+ <!-- How code reaches each environment: pipeline, triggers, rollback. -->
13
+
14
+ ## Configuration
15
+
16
+ <!-- Required config and secrets per environment; how they are supplied. -->
17
+
18
+ ## Observability
19
+
20
+ <!-- Logs, metrics, traces, alerts: what exists and where to find it. -->
21
+
22
+ ## Runbooks
23
+
24
+ <!-- Step-by-step responses to common operational situations. -->
25
+
26
+ ### <situation>
27
+
28
+ 1. <step>
@@ -0,0 +1,26 @@
1
+ # Roadmap
2
+
3
+ <!-- Owns: phases, milestones, release stance, sequencing, non-goals over time.
4
+ Per-feature task breakdown lives in features/F<NNN>/tasks.md. -->
5
+
6
+ ## Release Stance
7
+
8
+ <!-- Versioning approach and what a release means for this project. -->
9
+
10
+ ## Phases
11
+
12
+ ### <Phase name / version>
13
+
14
+ - **Goal:** <what this phase delivers>
15
+ - **Features:** <links to features/F<NNN>_<short-name>/>
16
+ - **Milestone / exit criteria:** <how we know the phase is done>
17
+
18
+ ## Sequencing & Dependencies
19
+
20
+ <!-- Order constraints between phases or features. -->
21
+
22
+ ## Non-Goals (Over Time)
23
+
24
+ <!-- Things deliberately deferred or excluded from the current horizon. -->
25
+
26
+ - <deferred item> — <until when / why>
@@ -0,0 +1,24 @@
1
+ # Security
2
+
3
+ <!-- Optional extension doc. Owns threat model, authn/authz, secrets handling.
4
+ Leave a summary + link in architecture.md. Register this doc in INDEX.md. -->
5
+
6
+ ## Threat Model
7
+
8
+ <!-- Assets to protect, trust boundaries, and the main threats considered. -->
9
+
10
+ ## Authentication
11
+
12
+ <!-- How identity is established. Mechanisms, providers, session handling. -->
13
+
14
+ ## Authorization
15
+
16
+ <!-- How access is granted. Roles, scopes, ownership rules. -->
17
+
18
+ ## Secrets & Sensitive Data
19
+
20
+ <!-- Where secrets live, how they are injected, what data is sensitive and how it is handled. -->
21
+
22
+ ## Practices
23
+
24
+ <!-- Input validation, transport security, dependency hygiene, audit logging. -->
@@ -0,0 +1,34 @@
1
+ # Testing
2
+
3
+ <!-- Owns: test strategy and how feature scenarios/checklists are executed.
4
+ Per-feature scenario content lives in features/F<NNN>/scenarios.md.
5
+ Omit this file entirely on the Lean tier. -->
6
+
7
+ ## Strategy
8
+
9
+ <!-- The overall approach to quality and what "tested" means for this project. -->
10
+
11
+ ## Test Levels
12
+
13
+ | Level | Scope | Tooling |
14
+ | --- | --- | --- |
15
+ | Unit | <what> | <framework> |
16
+ | Integration | <what> | <framework> |
17
+ | End-to-end | <what> | <framework> |
18
+
19
+ ## Running Feature Scenarios
20
+
21
+ <!-- How the Given/When/Then scenarios in features/F<NNN>/scenarios.md are executed:
22
+ automated (which runner) and/or manual (who runs the checklist and when). -->
23
+
24
+ ## Coverage Expectations
25
+
26
+ <!-- What must be covered before a feature is considered done. -->
27
+
28
+ ## Environments
29
+
30
+ <!-- Where tests run: local, CI, staging. Required setup or data. -->
31
+
32
+ ## Quality Gates
33
+
34
+ <!-- Conditions that block release: passing suites, no critical scenarios failing, etc. -->
@@ -0,0 +1,38 @@
1
+ # F<NNN> <Feature Name> — Requirements
2
+
3
+ <!-- Copy the F000_template/ folder to features/F<NNN>_<short-name>/ and fill it in.
4
+ IDs are stable once assigned. -->
5
+
6
+ ## Summary
7
+
8
+ <!-- One paragraph: what this feature is and the user value it delivers. -->
9
+
10
+ ## Serves
11
+
12
+ <!-- Trace up: which idea.md scope item and/or roadmap.md phase this feature serves. -->
13
+
14
+ - <idea scope item or roadmap phase>
15
+
16
+ ## Functional Requirements
17
+
18
+ <!-- Each requirement gets a stable ID F<NNN>-R<n> and a verifiable statement. -->
19
+
20
+ | ID | Requirement | Priority |
21
+ | --- | --- | --- |
22
+ | F<NNN>-R1 | <the system shall ...> | <must/should/could> |
23
+
24
+ ## Acceptance Criteria
25
+
26
+ <!-- Observable conditions that confirm the feature is done. Link each to a requirement. -->
27
+
28
+ - **F<NNN>-R1:** <observable condition that proves R1 is met>
29
+
30
+ ## Constraints
31
+
32
+ <!-- Technical, UX, or policy constraints from architecture.md / design.md that apply. -->
33
+
34
+ ## Out of Scope
35
+
36
+ <!-- What this feature explicitly does not cover. -->
37
+
38
+ - <excluded item>
@@ -0,0 +1,26 @@
1
+ # F<NNN> <Feature Name> — Scenarios
2
+
3
+ <!-- Behavior verification for the feature: Gherkin scenarios + a manual checklist.
4
+ Each scenario traces to one or more requirement IDs. -->
5
+
6
+ ## Scenarios
7
+
8
+ ### F<NNN>-S1: <scenario name>
9
+
10
+ Covers: F<NNN>-R1
11
+
12
+ ```gherkin
13
+ Scenario: <scenario name>
14
+ Given <initial context>
15
+ And <additional context>
16
+ When <action>
17
+ Then <expected outcome>
18
+ And <additional outcome>
19
+ ```
20
+
21
+ ## Manual Verification Checklist
22
+
23
+ <!-- For checks not easily automated. Each item should be observable and link to a requirement. -->
24
+
25
+ - [ ] (F<NNN>-R1) <observable check>
26
+ - [ ] <accessibility / error-state / edge-case check>
@@ -0,0 +1,11 @@
1
+ # F<NNN> <Feature Name> — Tasks
2
+
3
+ <!-- Task breakdown for the feature. Each task traces to one or more requirement IDs. -->
4
+
5
+ | ID | Task | Implements | Status | Depends on |
6
+ | --- | --- | --- | --- | --- |
7
+ | F<NNN>-T1 | <concrete unit of work> | F<NNN>-R1 | <todo/doing/done> | <F<NNN>-T0 or —> |
8
+
9
+ ## Notes
10
+
11
+ <!-- Sequencing, risks, or open questions about the work. -->
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: brainstorm
3
+ description: Resolves high-impact design or setup decisions one question at a time before execution begins.
4
+ ---
5
+
6
+ ## Scope
7
+
8
+ - Resolve open decisions that materially affect routing, structure, validation, reusable documentation, or capability design.
9
+ - Use when a setup or design choice has multiple valid paths, clarification requires evaluating trade-offs, or the user must choose before implementation can proceed safely.
10
+
11
+ ## Safety Constraints
12
+
13
+ - Do not edit files during brainstorming.
14
+ - Do not present options as equally valid when user requirements, framework constraints, risk, or feasibility make one option materially stronger.
15
+
16
+ ## Procedure
17
+
18
+ 1. Confirm no prior decision summary already covers the choice.
19
+ 2. Ask exactly one question per turn, with two or three concrete, comparable options and the trade-off, risk, or constraint for each.
20
+ 3. For setup or profile choices, include a free-form correction path when the listed options may be incomplete or inaccurate.
21
+ 4. Stop and wait for the user's answer before asking the next question.
22
+ 5. If the user's answer is ambiguous or non-committal, state your interpretation explicitly ("I'll treat this as option X — correct me if wrong") and wait for confirmation before recording the decision.
23
+ 6. End with a decision summary and wait for user confirmation before execution begins.
24
+
25
+ ## Verification
26
+
27
+ Before emitting the decision summary, verify that every recorded decision includes the selected option and any user-stated caveat, and that no unresolved high-impact decision remains in the brainstorming scope.
28
+
29
+ ## Output Contract
30
+
31
+ When all decisions are made, emit:
32
+
33
+ `Skill: brainstorm - output below`
34
+
35
+ Include:
36
+
37
+ `Status: completed | blocked`
38
+
39
+ `Scope: <decisions covered>`
40
+
41
+ `Blockers: none | <blocker>`
42
+
43
+ | Decision | Selected Option | Caveat |
44
+ | --- | --- | --- |
45
+
46
+ Execution may begin only after the user confirms the summary.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: business-analyst
3
+ description: Analyzes a task through a business lens during discovery to clarify requirements, acceptance criteria, and business rules before implementation begins.
4
+ ---
5
+
6
+ ## Scope
7
+
8
+ - Examine the business intent behind a task during discovery. Ensure requirements are clear, measurable, and agreed upon before any code is written.
9
+ - Use when business intent, acceptance criteria, affected flows, or requirements alignment are unclear enough to affect implementation.
10
+
11
+ ## Safety Constraints
12
+
13
+ - Do not invent stakeholder priorities, business rules, regulatory requirements, or acceptance criteria.
14
+ - Mark inferred requirements as assumptions unless they are directly supported by user input or repository evidence.
15
+ - Do not resolve conflicting business requirements without user input.
16
+
17
+ ## Stop Conditions
18
+
19
+ Stop and mark the analysis blocked when:
20
+ - The business goal cannot be identified from available context.
21
+ - Acceptance criteria cannot be made verifiable.
22
+ - Requirements conflict.
23
+ - A decision would require choosing between stakeholder priorities not stated by the user.
24
+
25
+ ## Procedure
26
+
27
+ 1. Identify the underlying problem and its beneficiaries.
28
+ 2. Define measurable acceptance criteria that confirm completion.
29
+ 3. Map which user flows or system processes are impacted.
30
+ 4. Flag any gaps or conflicting requirements. When two stated requirements directly contradict each other, list both explicitly and block — do not attempt to resolve or prioritize them without user input.
31
+ 5. Report findings and block implementation if open questions are unresolved.
32
+
33
+ ## Verification
34
+
35
+ Before emitting the final analysis, verify:
36
+ - Each acceptance criterion is observable or testable.
37
+ - Each affected flow is specific enough to guide implementation.
38
+ - Open questions contain only unresolved gaps that affect scope, correctness, or acceptance.
39
+
40
+ ## Output Contract
41
+
42
+ Emit:
43
+
44
+ `Skill: business-analysis - output below`
45
+
46
+ Then include:
47
+
48
+ | Field | Content |
49
+ | --- | --- |
50
+ | Status | `completed`, `blocked`, or `skipped` |
51
+ | Scope | Task, feature, flow, or decision analyzed |
52
+ | Goal | Business outcome sought |
53
+ | Acceptance criteria | Verifiable completion conditions |
54
+ | Affected flows | Impacted processes |
55
+ | Assumptions | Inferences used, or `none` |
56
+ | Open questions | Clarifications needed before work begins |
57
+
58
+ If `Open questions` is not `none`, `Status` must be `blocked`. Do not proceed to implementation when open questions remain unresolved.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: documentation-maintenance
3
+ description: Checks whether completed changes require documentation updates and applies narrow, accurate updates when safe. Use after non-trivial implementation or refactoring.
4
+ ---
5
+
6
+ ## Scope
7
+
8
+ - Keep project documentation synchronized with completed changes.
9
+ - Run after non-trivial work that changes: project behavior visible to users or developers; public interfaces, APIs, or key abstractions; commands documented in README or guides; architecture, layer responsibilities, or domain facts; documented workflows or capability contracts; established conventions or project structure.
10
+
11
+ ## Safety Constraints
12
+
13
+ - Update, do not rewrite surrounding content.
14
+ - Do not add new doc sections unless the change introduces a genuinely new concept with no existing home.
15
+ - Verify that any commands, paths, or behaviors in updated docs still match the current codebase.
16
+ - Documentation records facts. Do not add behavioral rules to docs — behavioral rules belong in skills, conventions, or root contracts.
17
+ - Do not move, reorganize, or create documentation roots unless the user explicitly requested that structural change.
18
+ - Do not silently rewrite documentation to hide a code-doc contract conflict; report the conflict as blocked.
19
+
20
+ ## Stop Conditions
21
+
22
+ - If the diff or executed steps cannot be identified, stop and ask the user to describe what changed before proceeding.
23
+ - If no recognized documentation roots exist, such as `docs/`, documentation directories, README files, or project-declared doc roots, stop and report — do not create documentation structure speculatively.
24
+ - Stop and report `documentation update needed but blocked` when the needed update is unclear, risky, outside the approved task scope, unsupported by an authoritative source, or would require resolving a conflict between documentation and implementation.
25
+ - Blocked reports must name the affected doc area, why the update could not be made safely, and what decision or source is needed.
26
+
27
+ ## Procedure
28
+
29
+ 1. Identify what changed from the actual diff or executed steps.
30
+ 2. Locate the project's authoritative documentation roots (e.g., `docs/`, `README.md`, or wherever the project records its docs — check the project profile or root contract).
31
+ 3. For each changed area, identify which docs reference or describe it.
32
+ 4. Load only the docs that reference the changed surface — do not load unrelated docs.
33
+ 5. Update only sections that are now inaccurate or incomplete.
34
+ 6. If a needed update is unclear or risky, report the gap instead of guessing.
35
+ 7. Before deciding no update is needed, re-check the surfaces listed in `Scope`. If none apply, report `documentation checked and no update needed`.
36
+
37
+ ## Verification
38
+
39
+ Before emitting the output, verify:
40
+ - Updated documentation facts are supported by the actual diff, executed steps, or user-provided source.
41
+ - Changed commands, paths, public names, anchors, and cross-references still resolve.
42
+ - Any docs index or README affected by created, removed, renamed, or moved docs was updated.
43
+
44
+ ## Output Contract
45
+
46
+ Emit:
47
+
48
+ `Skill: documentation-maintenance - output below`
49
+
50
+ Include:
51
+
52
+ | Status | Changed Surface | Docs Checked | Docs Updated | Blockers |
53
+ | --- | --- | --- | --- | --- |
54
+
55
+ Status must be one of:
56
+ - `documentation updated`
57
+ - `documentation checked and no update needed`
58
+ - `documentation update needed but blocked`
59
+
60
+ `Docs Updated` may be `none`. `Blockers` must be `none` unless status is `documentation update needed but blocked`; when blocked, it must include the decision, source, or scope approval needed.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: explain-code
3
+ description: Explains how code works by tracing actual implementations and execution paths. Use when teaching the codebase or answering "how does this work?" questions about implemented code.
4
+ ---
5
+
6
+ ## Scope
7
+
8
+ - Explain how code actually works by tracing flow, understanding data transformations, or mapping component relationships.
9
+
10
+ ## Prerequisites
11
+
12
+ Before explaining code, confirm:
13
+ - The question identifies a module, behavior, entry point, file, symbol, or flow to inspect.
14
+ - The relevant implementation files can be read.
15
+ - The explanation can be grounded in implementation evidence, not only names, docs, tests, or assumptions.
16
+
17
+ If the target is unclear, ask the smallest clarifying question or state the chosen scope before explaining.
18
+
19
+ ## Safety Constraints
20
+
21
+ - Do not present design intent, documentation, test expectations, or naming conventions as implemented behavior unless the implementation confirms it.
22
+ - Do not invent missing control flow, data transformations, defaults, side effects, or error handling.
23
+ - Do not reveal secrets, credentials, private keys, or sensitive environment values discovered while reading code.
24
+
25
+ ## Stop Conditions
26
+
27
+ Stop and report the explanation as blocked when:
28
+ - The target implementation cannot be located or read.
29
+ - The behavior depends on missing generated code, runtime configuration, external service behavior, or unavailable files.
30
+ - Multiple plausible flows exist and choosing one would materially change the answer.
31
+ - Documentation and code conflict, and the implementation cannot be verified.
32
+
33
+ ## Procedure
34
+
35
+ 1. Start from the code that matters most to the question.
36
+ 2. Trace the real control flow, data flow, and state transitions before discussing abstractions.
37
+ 3. When code is incomplete or missing, use design docs to explain intended behavior and label it clearly as design intent, not implementation fact.
38
+ 4. Include a small ASCII diagram when it clarifies ownership, lifecycle, or call flow.
39
+ 5. Call out assumptions, extension points, or failure modes when relevant.
40
+ 6. When several entry points or flows could answer the question, choose the one most directly matching the user's wording and state that scope. If two or more are equally plausible and would produce different explanations, stop and ask for clarification.
41
+
42
+ ## Verification
43
+
44
+ Before emitting the explanation, verify:
45
+ - Each behavior claim is supported by a code reference or clearly labeled as an inference.
46
+ - Entry points, terminal effects, and key state changes are included when relevant.
47
+ - Any docs-based explanation is labeled as design intent when implementation evidence is absent or conflicting.
48
+
49
+ ## Output Contract
50
+
51
+ Emit:
52
+
53
+ `Skill: explain-code - output below`
54
+
55
+ Then include:
56
+
57
+ | Field | Content |
58
+ | --- | --- |
59
+ | Status | `completed`, `skipped`, or `blocked` |
60
+ | Scope | Code area, symbol, flow, or behavior explained |
61
+ | Sources Read | Files, symbols, docs, or runtime evidence inspected |
62
+ | Assumptions | Inferences used, or `none` |
63
+ | Unknowns | Missing or unverified areas, or `none` |
64
+
65
+ Use `blocked` when important behavior cannot be verified from implementation evidence. Record narrower verified scope in `Scope` and missing areas in `Unknowns` when only part of the requested behavior can be explained.
66
+
67
+ ## Default Structure
68
+
69
+ 1. **What it is** — one or two sentences describing the module, component, or subsystem role.
70
+ 2. **Entry points** — which route, command, function, or event starts the behavior.
71
+ 3. **How it flows** — step-by-step execution path with file references.
72
+ 4. **Key collaborators** — which modules, stores, or boundaries it depends on.
73
+ 5. **Gotchas** — common misunderstandings, hidden state, lifecycle rules, or failure modes.
74
+
75
+ ## Style Rules
76
+
77
+ - Use analogies only when they simplify the explanation; do not force them.
78
+ - Do not invent behavior not visible in the code. Label inferences as inferences.
79
+ - Prefer concrete file, function, and symbol references over generic commentary.
80
+ - Keep ASCII diagrams compact.
81
+ - Separate implemented behavior from design-doc behavior when they differ.