agent-method 1.5.12

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 (108) hide show
  1. package/README.md +343 -0
  2. package/bin/wwa.js +115 -0
  3. package/docs/internal/cli-commands.yaml +259 -0
  4. package/docs/internal/doc-tokens.yaml +1103 -0
  5. package/docs/internal/feature-registry.yaml +1643 -0
  6. package/lib/boundaries.js +247 -0
  7. package/lib/cli/add.js +170 -0
  8. package/lib/cli/casestudy.js +1000 -0
  9. package/lib/cli/check.js +323 -0
  10. package/lib/cli/close.js +838 -0
  11. package/lib/cli/completion.js +735 -0
  12. package/lib/cli/deps.js +234 -0
  13. package/lib/cli/digest.js +73 -0
  14. package/lib/cli/doc-review.js +486 -0
  15. package/lib/cli/docs.js +315 -0
  16. package/lib/cli/helpers.js +198 -0
  17. package/lib/cli/implement.js +169 -0
  18. package/lib/cli/init.js +280 -0
  19. package/lib/cli/pipeline.js +206 -0
  20. package/lib/cli/plan.js +140 -0
  21. package/lib/cli/record.js +98 -0
  22. package/lib/cli/refine.js +202 -0
  23. package/lib/cli/report-helpers.js +113 -0
  24. package/lib/cli/review.js +76 -0
  25. package/lib/cli/routable.js +109 -0
  26. package/lib/cli/route.js +101 -0
  27. package/lib/cli/scan.js +133 -0
  28. package/lib/cli/serve.js +23 -0
  29. package/lib/cli/status.js +65 -0
  30. package/lib/cli/update-docs.js +574 -0
  31. package/lib/cli/upgrade.js +222 -0
  32. package/lib/cli/watch.js +32 -0
  33. package/lib/dependencies.js +196 -0
  34. package/lib/init.js +692 -0
  35. package/lib/mcp-server.js +612 -0
  36. package/lib/pipeline.js +907 -0
  37. package/lib/registry.js +132 -0
  38. package/lib/watcher.js +165 -0
  39. package/package.json +54 -0
  40. package/templates/README.md +363 -0
  41. package/templates/entry-points/.cursorrules +90 -0
  42. package/templates/entry-points/AGENT.md +90 -0
  43. package/templates/entry-points/CLAUDE.md +88 -0
  44. package/templates/extensions/MANIFEST.md +110 -0
  45. package/templates/extensions/analytical-system.md +96 -0
  46. package/templates/extensions/code-project.md +77 -0
  47. package/templates/extensions/data-exploration.md +117 -0
  48. package/templates/full/.context/BASE.md +101 -0
  49. package/templates/full/.context/COMPOSITION.md +47 -0
  50. package/templates/full/.context/INDEX.yaml +56 -0
  51. package/templates/full/.context/METHODOLOGY.md +246 -0
  52. package/templates/full/.context/PROTOCOL.yaml +169 -0
  53. package/templates/full/.context/REGISTRY.md +75 -0
  54. package/templates/full/.cursorrules +90 -0
  55. package/templates/full/AGENT.md +90 -0
  56. package/templates/full/CLAUDE.md +90 -0
  57. package/templates/full/Management/DIGEST.md +23 -0
  58. package/templates/full/Management/STATUS.md +46 -0
  59. package/templates/full/PLAN.md +67 -0
  60. package/templates/full/PROJECT-PROFILE.md +61 -0
  61. package/templates/full/PROJECT.md +80 -0
  62. package/templates/full/REQUIREMENTS.md +30 -0
  63. package/templates/full/ROADMAP.md +39 -0
  64. package/templates/full/Reviews/INDEX.md +41 -0
  65. package/templates/full/Reviews/backlog.md +52 -0
  66. package/templates/full/Reviews/plan.md +43 -0
  67. package/templates/full/Reviews/project.md +41 -0
  68. package/templates/full/Reviews/requirements.md +42 -0
  69. package/templates/full/Reviews/roadmap.md +41 -0
  70. package/templates/full/Reviews/state.md +56 -0
  71. package/templates/full/SESSION-LOG.md +102 -0
  72. package/templates/full/STATE.md +42 -0
  73. package/templates/full/SUMMARY.md +27 -0
  74. package/templates/full/agentWorkflows/INDEX.md +42 -0
  75. package/templates/full/agentWorkflows/observations.md +65 -0
  76. package/templates/full/agentWorkflows/patterns.md +68 -0
  77. package/templates/full/agentWorkflows/sessions.md +92 -0
  78. package/templates/full/intro/README.md +39 -0
  79. package/templates/full/registry/feature-registry.yaml +25 -0
  80. package/templates/full/registry/features/catalog.yaml +743 -0
  81. package/templates/full/registry/features/protocol.yaml +121 -0
  82. package/templates/full/registry/features/routing.yaml +358 -0
  83. package/templates/full/registry/features/workflows.yaml +404 -0
  84. package/templates/full/todos/backlog.md +19 -0
  85. package/templates/starter/.context/BASE.md +66 -0
  86. package/templates/starter/.context/INDEX.yaml +51 -0
  87. package/templates/starter/.context/METHODOLOGY.md +228 -0
  88. package/templates/starter/.context/PROTOCOL.yaml +165 -0
  89. package/templates/starter/.cursorrules +90 -0
  90. package/templates/starter/AGENT.md +90 -0
  91. package/templates/starter/CLAUDE.md +90 -0
  92. package/templates/starter/Management/DIGEST.md +23 -0
  93. package/templates/starter/Management/STATUS.md +46 -0
  94. package/templates/starter/PLAN.md +67 -0
  95. package/templates/starter/PROJECT-PROFILE.md +44 -0
  96. package/templates/starter/PROJECT.md +80 -0
  97. package/templates/starter/ROADMAP.md +39 -0
  98. package/templates/starter/Reviews/INDEX.md +75 -0
  99. package/templates/starter/SESSION-LOG.md +102 -0
  100. package/templates/starter/STATE.md +42 -0
  101. package/templates/starter/SUMMARY.md +27 -0
  102. package/templates/starter/agentWorkflows/INDEX.md +61 -0
  103. package/templates/starter/intro/README.md +37 -0
  104. package/templates/starter/registry/feature-registry.yaml +25 -0
  105. package/templates/starter/registry/features/catalog.yaml +743 -0
  106. package/templates/starter/registry/features/protocol.yaml +121 -0
  107. package/templates/starter/registry/features/routing.yaml +358 -0
  108. package/templates/starter/registry/features/workflows.yaml +404 -0
@@ -0,0 +1,228 @@
1
+ # Methodology Reference
2
+
3
+ Pair with: entry point (CLAUDE.md / .cursorrules / AGENT.md) + `.context/PROTOCOL.yaml`
4
+ Use when: agent needs onboarding protocol, format specs, or operational depth beyond PROTOCOL.yaml
5
+
6
+ Rules (scoping, cascade, conventions) live in `.context/PROTOCOL.yaml`. This file provides onboarding flows, format specifications, and operational details loaded on-demand.
7
+
8
+ ## First session protocol
9
+
10
+ <!-- AGENT: Follow this protocol when PROJECT.md contains {placeholder} text. -->
11
+
12
+ When PROJECT.md still contains `{placeholder}` text, this is a first session. Guide the user through onboarding — ask questions, show what you'll write, get confirmation before writing each file.
13
+
14
+ ### Greenfield onboarding (no existing codebase)
15
+
16
+ **Stage 1 — Project vision** → populates PROJECT.md
17
+ Ask the user:
18
+ 1. What is your project about? (1-2 sentences)
19
+ 2. Who is it for?
20
+ 3. What problem does it solve?
21
+ 4. What technologies, languages, or frameworks will you use?
22
+ 5. What are 2-3 guiding principles for this project?
23
+
24
+ CHECKPOINT: Draft PROJECT.md from the answers. Show the user the draft. Wait for approval before writing.
25
+
26
+ **Stage 2 — Architecture** → populates .context/BASE.md, PROJECT-PROFILE.md, .context/DOCS-MAP.md
27
+ Ask the user:
28
+ 1. What are the main components or modules?
29
+ 2. How do they connect? (data flow, API calls, event-driven, etc.)
30
+ 3. What is the directory structure? (or what will it be?)
31
+ 4. What are the key dependencies?
32
+
33
+ CHECKPOINT: Draft .context/BASE.md, PROJECT-PROFILE.md, and .context/DOCS-MAP.md. Show the user. Wait for approval.
34
+
35
+ **Stage 3 — Goals** → populates ROADMAP.md, PLAN.md
36
+ Ask the user:
37
+ 1. What are your immediate goals? (next 1-3 sessions)
38
+ 2. What does "done" look like for this project?
39
+ 3. Can you break this into 2-4 phases?
40
+
41
+ CHECKPOINT: Draft ROADMAP.md and PLAN.md (first task). Show the user. Wait for approval.
42
+
43
+ **Stage 4 — Starting state** → populates STATE.md
44
+ Ask the user:
45
+ 1. Any decisions already made? (tech choices, architecture, constraints)
46
+ 2. Any known blockers or risks?
47
+ 3. Any open questions you want tracked?
48
+
49
+ CHECKPOINT: Draft STATE.md. Show the user. Wait for approval. Then begin normal work.
50
+
51
+ ### Brownfield onboarding (existing codebase)
52
+
53
+ Brownfield onboarding uses **segmented stages** driven by `registry/doc-tokens.yaml` categories. Each segment has a bounded context budget, scans only what it needs, asks 1-3 questions maximum, and checkpoints before the next. This prevents context overload and ensures the agent populates registries incrementally.
54
+
55
+ **Segment 1 — Identity** (~500 tokens) → populates PROJECT-PROFILE.md, `registry/doc-tokens.yaml` (project section)
56
+ Scan: package.json/config files, README, top-level directory listing only.
57
+ Discover: project type (code/data/analytical/mixed), lifecycle stage, key tech stack.
58
+ Ask (only what scan couldn't determine):
59
+ 1. What's the current state — active development, maintenance, exploration?
60
+
61
+ CHECKPOINT: Present identity summary. Draft PROJECT-PROFILE.md + doc-tokens.yaml `project:` values. Wait for approval.
62
+
63
+ **Segment 2 — Architecture** (~1500 tokens) → populates .context/BASE.md, PROJECT.md, .context/DOCS-MAP.md, doc-tokens.yaml `doc_graph`
64
+ Scan: key source files (entry points, main modules), import graph, config files.
65
+ Discover: system model, codebase map, component relationships, dependencies.
66
+ **Doc structure scan** — also scan `docs/` directory (if present):
67
+ - List all files in `docs/` — add each as a `doc_graph` node with category `docs`
68
+ - Check for cross-references between docs (markdown links, .context/ references)
69
+ - Create `reads_from` edges for discovered dependencies between documents
70
+ - Create `cascades_to` edges where PROTOCOL.yaml cascade patterns apply
71
+ - Write discovered graph to `doc-tokens.yaml` `doc_graph` section
72
+ Ask (only what scan couldn't determine):
73
+ 1. Any architectural decisions not documented in code? (key patterns, constraints)
74
+ 2. Are there areas I should understand deeply vs. ignore?
75
+
76
+ **Boundaries configuration** — if project has non-standard paths (e.g. registry not in .context/):
77
+ - Uncomment `boundaries:` section in PROTOCOL.yaml
78
+ - Set `registries.tokens` to actual token registry path
79
+ - Set `visibility.internal` / `visibility.release` to match project structure
80
+ - Set `distribution` rules to match .gitignore / .npmignore patterns
81
+
82
+ CHECKPOINT: Draft .context/BASE.md (codebase map), PROJECT.md (vision), .context/DOCS-MAP.md, doc_graph edges. Show user. Wait for approval.
83
+
84
+ **Segment 3 — Workflow alignment** (~500 tokens) → populates PROTOCOL.yaml customizations
85
+ Read: `registry/feature-registry.yaml` (workflows, query patterns), discovered project type from Segment 1.
86
+ Discover: which workflows apply (WF-01 through WF-08), which scoping query types are relevant.
87
+ Ask:
88
+ 1. What are the most common types of changes you make? (maps to query types)
89
+
90
+ CHECKPOINT: Show proposed PROTOCOL.yaml `scoping:` additions and workflow selection. Wait for approval.
91
+
92
+ **Segment 4 — Convention alignment** (~500 tokens) → populates `registry/doc-tokens.yaml` names + `project_names`, PROTOCOL.yaml conventions
93
+ Read: linting configs, CI/CD files, existing coding standards, doc-tokens.yaml `names:` section.
94
+ Discover: naming patterns, existing conventions, project-specific terminology.
95
+ **Terminology capture** — populate `doc-tokens.yaml` `project_names:`:
96
+ For code projects: modules = services/libraries/components; apis = endpoints/routes; entities = models/schemas; conventions = naming/patterns.
97
+ For data projects: modules = data sources/pipelines; apis = query interfaces; entities = schemas/dimensions/measures; conventions = validation rules.
98
+ For analytical projects: modules = chains/evaluators; apis = prompt templates/tool interfaces; entities = domain concepts/evaluation criteria; conventions = composition patterns.
99
+ - Scan source code for module/class/service names → add to `project_names.modules`
100
+ - Scan API routes or endpoints → add to `project_names.apis`
101
+ - Scan database schemas or data models → add to `project_names.entities`
102
+ - Note naming conventions discovered → add to `project_names.conventions`
103
+ Ask:
104
+ 1. Any conventions not captured in config? (naming, review process, etc.)
105
+
106
+ CHECKPOINT: Show proposed doc-tokens.yaml `names:` additions, `project_names` entries, and PROTOCOL.yaml `conventions:` customizations. Wait for approval.
107
+
108
+ **Segment 5 — State initialization** (~500 tokens) → populates STATE.md, ROADMAP.md
109
+ Read: decisions discovered in Segments 1-4, open questions accumulated.
110
+ Propose initial state:
111
+ 1. Decisions already implicit in the codebase (document them)
112
+ 2. Current position (lifecycle stage confirmed)
113
+ 3. Immediate goals (ask: what are your next 1-3 priorities?)
114
+
115
+ CHECKPOINT: Draft STATE.md and ROADMAP.md. Show user. Wait for approval. Then begin normal work.
116
+
117
+ ### Post-onboarding: registry-driven documentation
118
+
119
+ After brownfield onboarding completes, the agent uses the populated registries for all subsequent work:
120
+ - **doc-tokens.yaml `names:`** — Reference after every query to ensure consistent terminology in documentation updates
121
+ - **doc-tokens.yaml `tokens:`** — Reference for project-specific values (counts, versions, paths) when writing docs
122
+ - **feature-registry.yaml** — Reference to identify which features were activated and which workflows apply to the current query
123
+ - **doc-tokens.yaml `propagation_targets:`** — After changing any token value, check listed files for stale references
124
+
125
+ ### Checkpoint rules
126
+
127
+ - NEVER write to a methodology file without showing the user what you will write first
128
+ - At each CHECKPOINT, present the draft as a code block the user can review
129
+ - If the user says "looks good" or similar, write the file
130
+ - If the user edits or corrects, incorporate changes and show the updated draft
131
+ - If the user says "skip", leave the file as template placeholder
132
+ - After all stages complete, summarize what was populated and begin normal work
133
+ - For brownfield: `.context/REGISTRY.md` is deferred — not created during onboarding
134
+
135
+ ## Interaction level
136
+
137
+ The entry point's `mode` setting controls checkpoint density:
138
+
139
+ | Level | Behavior |
140
+ |-------|----------|
141
+ | autonomous | Execute full plan, report at completion |
142
+ | checkpoint | Propose plan, wait for approval, report at completion (default) |
143
+ | collaborative | Back-and-forth at each step |
144
+ | supervised | Explain intent before every file change |
145
+
146
+ ## Write obligation format specs
147
+
148
+ These formats are referenced by `.context/PROTOCOL.yaml` cascade triggers.
149
+
150
+ ### SESSION-LOG.md metrics entry
151
+
152
+ Each entry is a compact block with these fields:
153
+ - **effort**: low | medium | high
154
+ - **ambiguity**: low | medium | high
155
+ - **context**: minimal | moderate | deep
156
+ - **tokens**: estimated token count
157
+ - **time**: session duration
158
+ - **response**: accepted | edited | revised | rejected | redirected
159
+ - **refinement delta** (medium/high effort only): revision count, magnitude (none/minor/moderate/major/rework), delta categories, survival rate
160
+ - **workflow**: WF-XX workflow ID
161
+ - **features**: comma-separated feature IDs used
162
+ - **cascades**: number of cascade updates triggered
163
+ - **friction**: description or "none"
164
+ - **findings**: methodology-relevant observations or "none"
165
+
166
+ ### Management/DIGEST.md row
167
+
168
+ | Date | Task | Query | Outcome | Key changes | Decisions | Effort | Time |
169
+
170
+ Only high-effort tasks: 3+ files, architectural decisions, phase completions, complex multi-step queries, new feature implementations.
171
+
172
+ ### Management/STATUS.md update
173
+
174
+ Update after milestones: current phase, active work, recent decisions (last 5), blockers, health indicators.
175
+
176
+ ## Safety invariants
177
+
178
+ These rules are absolute — they hold regardless of profile, project type, or lifecycle stage:
179
+
180
+ - **Never modify project source code** through methodology operations — only create/modify methodology files
181
+ - **Never delete existing project files** — methodology integration is purely additive
182
+ - **Never overwrite existing entry point content** — only append methodology sections
183
+
184
+ ## File scale management
185
+
186
+ When any intelligence layer file exceeds 300 lines (~3,750 tokens):
187
+ 1. Split into index file (original path) + components subdirectory
188
+ 2. Index keeps active content + navigation table
189
+ 3. Components hold archived sections grouped by semantic boundary
190
+ 4. Update .context/REGISTRY.md (if it exists) with new file entries
191
+
192
+ ## Reporting layers
193
+
194
+ Three directories separate reporting concerns from operational files:
195
+
196
+ ### Management/
197
+
198
+ Management-facing project oversight. Managers read this, not STATE.md or SESSION-LOG.md.
199
+
200
+ - **DIGEST.md** — Append a row for every high-effort task (see format spec above)
201
+ - **STATUS.md** — Update after milestones (see format spec above)
202
+
203
+ ### Reviews/
204
+
205
+ Synthesized views of intelligence layer files. Updated when doing a "project review" query.
206
+
207
+ When doing project review or self-review (4-phase) sessions, use the **collection checklist** for consistent capture of usage, practice, issues, and improvements: see `docs/internal/review/collection-checklist.md` (if present in this repo).
208
+
209
+ - **INDEX.md** — Dashboard with key metrics and links to drill-down files (full tier) or self-contained sections (starter tier).
210
+
211
+ ### agentWorkflows/
212
+
213
+ Agent workflow performance analysis. Updated after high-effort sessions.
214
+
215
+ - **INDEX.md** — Workflow summary, quick stats, links to analysis files (full tier) or self-contained sections (starter tier).
216
+
217
+ ### Audit trail format
218
+
219
+ SUMMARY.md is the session audit trail. Each entry follows this structure:
220
+ ```
221
+ ### {date} — {brief description}
222
+ **Plan**: {what was planned}
223
+ **Outcome**: {what was done}
224
+ **Files created**: {list}
225
+ **Files updated**: {list}
226
+ **Decisions**: {key decisions made}
227
+ **Next**: {what should happen next session}
228
+ ```
@@ -0,0 +1,165 @@
1
+ # Agent Protocol — scoping, cascade, obligations, conventions
2
+ # Read on: every session (entry point directs here)
3
+ # Updated by: wwa upgrade | Validated by: wwa check
4
+ # Close-stage: read close_check before ending any file-modifying response
5
+
6
+ version: v1.6
7
+ last_verified: "{date}"
8
+
9
+ # === SCOPING: query type → file sets ===
10
+ scoping:
11
+ planning:
12
+ reads: [REQUIREMENTS.md, ROADMAP.md]
13
+ writes: [STATE.md, PLAN.md]
14
+ context_refresh:
15
+ reads: [".context/*", "registry/doc-tokens.yaml", project structure]
16
+ writes: [".context/*", "registry/doc-tokens.yaml", "entry point if scoping affected"]
17
+ project_discovery:
18
+ reads: [project structure, package files, key source files, "registry/feature-registry.yaml", "registry/doc-tokens.yaml"]
19
+ writes: [.context/BASE.md, ".context/ specialists", "registry/doc-tokens.yaml", STATE.md]
20
+ methodology_guidance:
21
+ reads: [this file]
22
+ writes: []
23
+ phase_completion:
24
+ reads: [SUMMARY.md]
25
+ writes: [SUMMARY.md, STATE.md, ROADMAP.md]
26
+ backlog:
27
+ reads: [todos/backlog.md]
28
+ writes: [todos/backlog.md]
29
+ management_overview:
30
+ reads: [Management/DIGEST.md, Management/STATUS.md, STATE.md]
31
+ writes: [Management/STATUS.md, Management/DIGEST.md]
32
+ project_review:
33
+ reads: [Reviews/INDEX.md, "relevant source files"]
34
+ writes: ["Reviews/"]
35
+ workflow_analysis:
36
+ reads: [agentWorkflows/INDEX.md, SESSION-LOG.md]
37
+ writes: ["agentWorkflows/"]
38
+ docs_update:
39
+ reads: [.context/DOCS-MAP.md, "registry/doc-tokens.yaml", "relevant docs/"]
40
+ writes: ["docs/", .context/DOCS-MAP.md]
41
+ # CUSTOMIZE: add project-specific query types below
42
+ # Each should pair .context/BASE.md with one specialist.
43
+ # "{domain}":
44
+ # reads: [.context/BASE.md, ".context/{SPECIALIST}.md"]
45
+ # writes: ["{working files}"]
46
+
47
+ # === CASCADE: change → propagation targets ===
48
+ cascade:
49
+ decision_made:
50
+ target: STATE.md
51
+ section: decisions table
52
+ timing: same-response
53
+ directive: P-02
54
+ file_changed:
55
+ action: check this cascade section
56
+ timing: same-response
57
+ directive: P-03
58
+ phase_complete:
59
+ targets: [SUMMARY.md, STATE.md, ROADMAP.md]
60
+ actions: [append entry, update position, mark done]
61
+ timing: non-negotiable
62
+ requirements_change:
63
+ targets: [REQUIREMENTS.md, ROADMAP.md, PLAN.md]
64
+ condition: if current task affected
65
+ question_resolved:
66
+ target: STATE.md
67
+ action: "mark resolved with text — don't delete"
68
+ structure_changed:
69
+ targets: [.context/BASE.md]
70
+ condition: file created, deleted, renamed, or split
71
+ file_exceeds_300_lines:
72
+ action: split into index + components subdirectory
73
+ new_domain_area:
74
+ targets: [.context/BASE.md, entry point]
75
+ consider: new .context/ specialist file
76
+ lifecycle_stage_change:
77
+ targets: [PROJECT-PROFILE.md, STATE.md]
78
+ high_effort_task:
79
+ targets: [SESSION-LOG.md, Management/DIGEST.md]
80
+ condition: "materiality >= medium (3+ files, architectural decisions, phase completions)"
81
+ session_log_fields: [effort, ambiguity, context, tokens, time, response,
82
+ refinement_delta, workflow, features, cascades, friction, findings]
83
+ digest_fields: [date, task, query, outcome, key_changes, decisions, effort, time]
84
+ milestone:
85
+ targets: [Management/STATUS.md]
86
+ fields: [current_state, recent_decisions, health_indicators]
87
+ new_component:
88
+ targets: [.context/DOCS-MAP.md]
89
+ check: scaffolding rules for new docs/ proposals
90
+ docs_changed:
91
+ targets: [.context/DOCS-MAP.md, docs/index.md]
92
+ terminology_established:
93
+ target: "registry/doc-tokens.yaml"
94
+ action: "populate tokens (project identity, counts) and names (project-specific terms)"
95
+ timing: during brownfield onboarding and when new patterns are discovered
96
+ registry_values_changed:
97
+ target: "files using changed values"
98
+ action: "check doc-tokens.yaml propagation_targets for stale values"
99
+ condition: "only files that reference the changed token"
100
+ doc_graph_changed:
101
+ target: "registry/doc-tokens.yaml"
102
+ section: doc_graph
103
+ timing: same-response
104
+ condition: "new file discovered, dependency link identified, or document structure changed"
105
+ # CUSTOMIZE: add project-specific cascade rules below
106
+
107
+ # === WORKFLOWS: task pattern selection (Phase 7q-3: all standard workflows) ===
108
+ workflows:
109
+ general_task: [Review, Plan, Implement, Document, Update]
110
+ code_change: [Review, Plan, Implement, Context-sync, Update]
111
+ context_refresh: [Scan, Compare, Update-context, Cascade, Record]
112
+ bootstrap: [Detect, Create-context, Populate, Validate]
113
+ greenfield_onboarding: [Ask, Populate, Confirm]
114
+ brownfield_onboarding: [Identity, Architecture, Workflow-align, Convention-align, State-init]
115
+ analytical_system: [Discover, Map-chains, Build-context, Compose, Evaluate, Refine]
116
+ specification_project: [Scope, Draft, Review, Align, Update]
117
+ discovery: [Scan, Identify, Map, Document, Cascade]
118
+ # Each segment: scan relevant subset → ask 1-3 questions → populate → checkpoint
119
+ # Driven by doc-tokens.yaml categories — see METHODOLOGY.md for full protocol
120
+
121
+ # === CONVENTIONS (Phase 7q-3: P-01 … P-07, P-10 in numerical order) ===
122
+ conventions:
123
+ - "Every code change is also a context change — update codebase map (P-01)"
124
+ - "Record decisions in STATE.md in the SAME response — never defer (P-02)"
125
+ - "After every file change, check cascade section above (P-03)"
126
+ - "Load .context/BASE.md + one specialist per query — never all .context/ files (P-04)"
127
+ - "Surface uncertainty as open questions in STATE.md (P-05)"
128
+ - "Propose plans and wait for approval — human controls direction (P-06)"
129
+ - "Keep intelligence layer files under 300 lines — split when exceeded (P-07)"
130
+ - "Document proportionally — low-effort: no STATE.md/SESSION-LOG; high-effort: full (P-10)"
131
+ - "After completing work, reference registry/doc-tokens.yaml names for consistent terminology"
132
+ - "Use registry/feature-registry.yaml to identify activated features and applicable workflows"
133
+
134
+ # === CLOSE CHECK: scan before ending any file-modifying response ===
135
+ close_check:
136
+ - "Decision made? → STATE.md decisions table"
137
+ - "File changed? → check cascade section above"
138
+ - "Phase complete? → SUMMARY.md + STATE.md + ROADMAP.md"
139
+ - "High effort? → SESSION-LOG.md + Management/DIGEST.md"
140
+ - "Structure changed? → .context/BASE.md"
141
+ - "Milestone? → Management/STATUS.md"
142
+ - "Docs changed? → .context/DOCS-MAP.md + docs/index.md"
143
+ - "New terminology or values? → registry/doc-tokens.yaml"
144
+
145
+ # === BOUNDARIES: path resolution, visibility, distribution (Phase 7q-3: active by default) ===
146
+ boundaries:
147
+ registries:
148
+ tokens: "registry/doc-tokens.yaml"
149
+ feature_registry: "registry/feature-registry.yaml"
150
+ docs_map: ".context/DOCS-MAP.md"
151
+ output: "docs/internal/"
152
+ visibility:
153
+ internal: [".context/", "research/", "todos/", "docs/internal/"]
154
+ release: ["docs/architecture/", "docs/workflow/", "docs/guides/", "templates/"]
155
+ scan:
156
+ include: ["docs/", ".context/", "templates/"]
157
+ exclude: ["node_modules/", ".git/"]
158
+ distribution:
159
+ git:
160
+ exclude: ["STATE.md", "PLAN.md", ".context/", "research/", "todos/"]
161
+ npm:
162
+ include: ["bin/", "lib/", "templates/"]
163
+ exclude: [".context/", "docs/internal/"]
164
+
165
+ # A response that modifies files but skips triggered obligations is INCOMPLETE.
@@ -0,0 +1,90 @@
1
+ # {Project Name} — Agent Entry Point
2
+
3
+ <!-- INSTRUCTION: Replace {Project Name} and write a 1-2 sentence project description below -->
4
+ {Describe what your project does, its architecture, and key technologies.}
5
+
6
+ ## On every query
7
+
8
+ 1. This file is auto-loaded — read it first
9
+ 2. Read `STATE.md` for current position, decisions, blockers
10
+ 3. Read `.context/PROTOCOL.yaml` for scoping, cascade, and conventions
11
+ 4. Scope query against PROTOCOL.yaml `scoping:` section
12
+ 5. After work, check PROTOCOL.yaml `close_check` before ending response
13
+
14
+ ## Settings
15
+
16
+ mode: checkpoint
17
+ <!-- autonomous | checkpoint | collaborative | supervised -->
18
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
19
+
20
+ tier: standard
21
+ <!-- lite | standard | full -->
22
+ <!-- lite: minimal rules, STATE.md only — for Haiku or simple projects -->
23
+ <!-- standard: core rules + context pairing — for Sonnet (default) -->
24
+ <!-- full: all rules, all intelligence layer files — for Opus or complex projects -->
25
+
26
+ method_version: 1.6
27
+ <!-- Use `wwa status` to compare against latest -->
28
+
29
+ ## CLI tools (optional)
30
+
31
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
32
+
33
+ | When you want to... | Run |
34
+ |---------------------|-----|
35
+ | Validate this entry point | `wwa check` |
36
+ | See what type of project this is | `wwa scan` |
37
+ | Test how a query routes | `wwa route "your question"` |
38
+ | See current plan status | `wwa plan` |
39
+ | Get implementation guidance | `wwa implement` |
40
+ | View project review dashboard | `wwa review` |
41
+ | Show management digest | `wwa digest` |
42
+ | Session close + project snapshot | `wwa close` |
43
+ | Extract a refinement report | `wwa refine` |
44
+ | Extract a case study (with project tokens) | `wwa casestudy` |
45
+ | Check docs coverage | `wwa docs` |
46
+ | Show dependency graph | `wwa deps` |
47
+ | Generate document registry | `wwa doc-review` |
48
+ | Check methodology version | `wwa status` |
49
+ | Update methodology files | `wwa upgrade` |
50
+ | Set up a new project | `wwa init` |
51
+ | Run project discovery workflow | `wwa project-discovery` |
52
+ | Run context refresh workflow | `wwa context-refresh` |
53
+ | Run phase completion workflow | `wwa phase-complete` |
54
+ | Show routing for backlog | `wwa backlog` |
55
+ | Run planning workflow | `wwa plan-create` |
56
+ | Run dependency analysis workflow | `wwa dependency-analysis` |
57
+ | Run debt assessment workflow | `wwa debt-assessment` |
58
+ | Run docs update workflow | `wwa docs-update` |
59
+ | Run cross-reference workflow | `wwa cross-reference` |
60
+ | Append to backlog / decision / finding / session / summary | `wwa add <type> [content]` |
61
+
62
+ When doing **project review** or **self-review** sessions, use the collection checklist for capture format: `docs/internal/review/collection-checklist.md` (if present).
63
+
64
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
65
+ project setup, or methodology updates. All commands auto-detect project type and find
66
+ entry points automatically. Add --json for machine-readable output. -->
67
+
68
+ ## Do not
69
+
70
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
71
+ - Delete existing project files during brownfield integration — methodology is additive only
72
+ - Load files not in PROTOCOL.yaml scoping read-set for the current query type
73
+ - Defer STATE.md decision recording to end of session
74
+ - Skip cascade checks after file changes
75
+ - Load multiple specialist .context/ files for a single query
76
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
77
+
78
+ <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
79
+
80
+ ## First session
81
+
82
+ <!-- AGENT: If PROJECT.md contains {placeholder} text, this is a first session. -->
83
+ Follow the onboarding protocol in `.context/METHODOLOGY.md` — it guides you through
84
+ greenfield (4 stages) or brownfield (5 stages) setup with checkpoints at each step.
85
+
86
+ ## Before ending this response
87
+
88
+ Read `.context/PROTOCOL.yaml` `close_check`. For each triggered item,
89
+ update the target file now. A response that modifies files but skips
90
+ triggered obligations is incomplete.
@@ -0,0 +1,90 @@
1
+ # {Project Name} — Agent Entry Point
2
+
3
+ <!-- INSTRUCTION: Replace {Project Name} and write a 1-2 sentence project description below -->
4
+ {Describe what your project does, its architecture, and key technologies.}
5
+
6
+ ## On every query
7
+
8
+ 1. This file is auto-loaded — read it first
9
+ 2. Read `STATE.md` for current position, decisions, blockers
10
+ 3. Read `.context/PROTOCOL.yaml` for scoping, cascade, and conventions
11
+ 4. Scope query against PROTOCOL.yaml `scoping:` section
12
+ 5. After work, check PROTOCOL.yaml `close_check` before ending response
13
+
14
+ ## Settings
15
+
16
+ mode: checkpoint
17
+ <!-- autonomous | checkpoint | collaborative | supervised -->
18
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
19
+
20
+ tier: standard
21
+ <!-- lite | standard | full -->
22
+ <!-- lite: minimal rules, STATE.md only — for Haiku or simple projects -->
23
+ <!-- standard: core rules + context pairing — for Sonnet (default) -->
24
+ <!-- full: all rules, all intelligence layer files — for Opus or complex projects -->
25
+
26
+ method_version: 1.6
27
+ <!-- Use `wwa status` to compare against latest -->
28
+
29
+ ## CLI tools (optional)
30
+
31
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
32
+
33
+ | When you want to... | Run |
34
+ |---------------------|-----|
35
+ | Validate this entry point | `wwa check` |
36
+ | See what type of project this is | `wwa scan` |
37
+ | Test how a query routes | `wwa project-discovery` / `wwa context-refresh` / `wwa plan-create` (see CLI docs) |
38
+ | See current plan status | `wwa plan` |
39
+ | Get implementation guidance | `wwa implement` |
40
+ | View project review dashboard | `wwa review` |
41
+ | Show management digest | `wwa digest` |
42
+ | Session close + project snapshot | `wwa close` |
43
+ | Extract a refinement report | `wwa refine` |
44
+ | Extract a case study (with project tokens) | `wwa casestudy` |
45
+ | Check docs coverage | `wwa docs` |
46
+ | Show dependency graph | `wwa deps` |
47
+ | Generate document registry | `wwa doc-review` |
48
+ | Check methodology version | `wwa status` |
49
+ | Update methodology files | `wwa upgrade` |
50
+ | Set up a new project | `wwa init` |
51
+ | Run project discovery workflow | `wwa project-discovery` |
52
+ | Run context refresh workflow | `wwa context-refresh` |
53
+ | Run phase completion workflow | `wwa phase-complete` |
54
+ | Show routing for backlog | `wwa backlog` |
55
+ | Run planning workflow | `wwa plan-create` |
56
+ | Run dependency analysis workflow | `wwa dependency-analysis` |
57
+ | Run debt assessment workflow | `wwa debt-assessment` |
58
+ | Run docs update workflow | `wwa docs-update` |
59
+ | Run cross-reference workflow | `wwa cross-reference` |
60
+ | Append to backlog / decision / finding / session / summary | `wwa add <type> [content]` |
61
+
62
+ When doing **project review** or **self-review** sessions, use the collection checklist for capture format: `docs/internal/review/collection-checklist.md` (if present).
63
+
64
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
65
+ project setup, or methodology updates. All commands auto-detect project type and find
66
+ entry points automatically. Add --json for machine-readable output. -->
67
+
68
+ ## Do not
69
+
70
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
71
+ - Delete existing project files during brownfield integration — methodology is additive only
72
+ - Load files not in PROTOCOL.yaml scoping read-set for the current query type
73
+ - Defer STATE.md decision recording to end of session
74
+ - Skip cascade checks after file changes
75
+ - Load multiple specialist .context/ files for a single query
76
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
77
+
78
+ <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
79
+
80
+ ## First session
81
+
82
+ <!-- AGENT: If PROJECT.md contains {placeholder} text, this is a first session. -->
83
+ Follow the onboarding protocol in `.context/METHODOLOGY.md` — it guides you through
84
+ greenfield (4 stages) or brownfield (5 stages) setup with checkpoints at each step.
85
+
86
+ ## Before ending this response
87
+
88
+ Read `.context/PROTOCOL.yaml` `close_check`. For each triggered item,
89
+ update the target file now. A response that modifies files but skips
90
+ triggered obligations is incomplete.
@@ -0,0 +1,90 @@
1
+ # {Project Name} — Agent Entry Point
2
+
3
+ <!-- INSTRUCTION: Replace {Project Name} and write a 1-2 sentence project description below -->
4
+ {Describe what your project does, its architecture, and key technologies.}
5
+
6
+ ## On every query
7
+
8
+ 1. This file is auto-loaded — read it first
9
+ 2. Read `STATE.md` for current position, decisions, blockers
10
+ 3. Read `.context/PROTOCOL.yaml` for scoping, cascade, and conventions
11
+ 4. Scope query against PROTOCOL.yaml `scoping:` section
12
+ 5. After work, check PROTOCOL.yaml `close_check` before ending response
13
+
14
+ ## Settings
15
+
16
+ mode: checkpoint
17
+ <!-- autonomous | checkpoint | collaborative | supervised -->
18
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
19
+
20
+ tier: standard
21
+ <!-- lite | standard | full -->
22
+ <!-- lite: minimal rules, STATE.md only — for Haiku or simple projects -->
23
+ <!-- standard: core rules + context pairing — for Sonnet (default) -->
24
+ <!-- full: all rules, all intelligence layer files — for Opus or complex projects -->
25
+
26
+ method_version: 1.6
27
+ <!-- Use `wwa status` to compare against latest -->
28
+
29
+ ## CLI tools (optional)
30
+
31
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
32
+
33
+ | When you want to... | Run |
34
+ |---------------------|-----|
35
+ | Validate this entry point | `wwa check` |
36
+ | See what type of project this is | `wwa scan` |
37
+ | Test how a query routes | `wwa project-discovery` / `wwa context-refresh` / `wwa plan-create` (see CLI docs) |
38
+ | See current plan status | `wwa plan` |
39
+ | Get implementation guidance | `wwa implement` |
40
+ | View project review dashboard | `wwa review` |
41
+ | Show management digest | `wwa digest` |
42
+ | Session close + project snapshot | `wwa close` |
43
+ | Extract a refinement report | `wwa refine` |
44
+ | Extract a case study (with project tokens) | `wwa casestudy` |
45
+ | Check docs coverage | `wwa docs` |
46
+ | Show dependency graph | `wwa deps` |
47
+ | Generate document registry | `wwa doc-review` |
48
+ | Check methodology version | `wwa status` |
49
+ | Update methodology files | `wwa upgrade` |
50
+ | Set up a new project | `wwa init` |
51
+ | Run project discovery workflow | `wwa project-discovery` |
52
+ | Run context refresh workflow | `wwa context-refresh` |
53
+ | Run phase completion workflow | `wwa phase-complete` |
54
+ | Show routing for backlog | `wwa backlog` |
55
+ | Run planning workflow | `wwa plan-create` |
56
+ | Run dependency analysis workflow | `wwa dependency-analysis` |
57
+ | Run debt assessment workflow | `wwa debt-assessment` |
58
+ | Run docs update workflow | `wwa docs-update` |
59
+ | Run cross-reference workflow | `wwa cross-reference` |
60
+ | Append to backlog / decision / finding / session / summary | `wwa add <type> [content]` |
61
+
62
+ When doing **project review** or **self-review** sessions, use the collection checklist for capture format: `docs/internal/review/collection-checklist.md` (if present).
63
+
64
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
65
+ project setup, or methodology updates. All commands auto-detect project type and find
66
+ entry points automatically. Add --json for machine-readable output. -->
67
+
68
+ ## Do not
69
+
70
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
71
+ - Delete existing project files during brownfield integration — methodology is additive only
72
+ - Load files not in PROTOCOL.yaml scoping read-set for the current query type
73
+ - Defer STATE.md decision recording to end of session
74
+ - Skip cascade checks after file changes
75
+ - Load multiple specialist .context/ files for a single query
76
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
77
+
78
+ <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
79
+
80
+ ## First session
81
+
82
+ <!-- AGENT: If PROJECT.md contains {placeholder} text, this is a first session. -->
83
+ Follow the onboarding protocol in `.context/METHODOLOGY.md` — it guides you through
84
+ greenfield (4 stages) or brownfield (5 stages) setup with checkpoints at each step.
85
+
86
+ ## Before ending this response
87
+
88
+ Read `.context/PROTOCOL.yaml` `close_check`. For each triggered item,
89
+ update the target file now. A response that modifies files but skips
90
+ triggered obligations is incomplete.