agent-method 1.5.3 → 1.5.6

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.

Potentially problematic release.


This version of agent-method might be problematic. Click here for more details.

Files changed (64) hide show
  1. package/README.md +197 -57
  2. package/bin/wwa.js +35 -9
  3. package/docs/internal/doc-tokens.yaml +452 -0
  4. package/docs/internal/feature-registry.yaml +13 -1
  5. package/lib/cli/casestudy.js +691 -0
  6. package/lib/cli/check.js +71 -71
  7. package/lib/cli/close.js +446 -0
  8. package/lib/cli/completion.js +639 -0
  9. package/lib/cli/digest.js +66 -0
  10. package/lib/cli/docs.js +207 -0
  11. package/lib/cli/helpers.js +49 -2
  12. package/lib/cli/implement.js +159 -0
  13. package/lib/cli/init.js +25 -6
  14. package/lib/cli/plan.js +128 -0
  15. package/lib/cli/refine.js +202 -202
  16. package/lib/cli/review.js +68 -0
  17. package/lib/cli/scan.js +28 -28
  18. package/lib/cli/status.js +61 -61
  19. package/lib/cli/upgrade.js +150 -147
  20. package/lib/init.js +478 -296
  21. package/package.json +12 -4
  22. package/templates/README.md +73 -25
  23. package/templates/entry-points/.cursorrules +143 -14
  24. package/templates/entry-points/AGENT.md +143 -14
  25. package/templates/entry-points/CLAUDE.md +143 -14
  26. package/templates/extensions/analytical-system.md +1 -1
  27. package/templates/extensions/code-project.md +1 -1
  28. package/templates/extensions/data-exploration.md +1 -1
  29. package/templates/full/.context/BASE.md +33 -0
  30. package/templates/full/.context/METHODOLOGY.md +62 -5
  31. package/templates/full/.cursorrules +128 -18
  32. package/templates/full/AGENT.md +128 -18
  33. package/templates/full/CLAUDE.md +128 -18
  34. package/templates/full/Management/DIGEST.md +23 -0
  35. package/templates/full/Management/STATUS.md +46 -0
  36. package/templates/full/PROJECT.md +34 -0
  37. package/templates/full/Reviews/INDEX.md +41 -0
  38. package/templates/full/Reviews/backlog.md +52 -0
  39. package/templates/full/Reviews/plan.md +43 -0
  40. package/templates/full/Reviews/project.md +41 -0
  41. package/templates/full/Reviews/requirements.md +42 -0
  42. package/templates/full/Reviews/roadmap.md +41 -0
  43. package/templates/full/Reviews/state.md +56 -0
  44. package/templates/full/SESSION-LOG.md +29 -0
  45. package/templates/full/SUMMARY.md +7 -4
  46. package/templates/full/agentWorkflows/INDEX.md +42 -0
  47. package/templates/full/agentWorkflows/observations.md +65 -0
  48. package/templates/full/agentWorkflows/patterns.md +68 -0
  49. package/templates/full/agentWorkflows/sessions.md +92 -0
  50. package/templates/full/intro/README.md +39 -0
  51. package/templates/starter/.context/BASE.md +35 -0
  52. package/templates/starter/.context/METHODOLOGY.md +59 -5
  53. package/templates/starter/.cursorrules +135 -13
  54. package/templates/starter/AGENT.md +135 -13
  55. package/templates/starter/CLAUDE.md +135 -13
  56. package/templates/starter/Management/DIGEST.md +23 -0
  57. package/templates/starter/Management/STATUS.md +46 -0
  58. package/templates/starter/PROJECT.md +34 -0
  59. package/templates/starter/Reviews/INDEX.md +75 -0
  60. package/templates/starter/SESSION-LOG.md +29 -0
  61. package/templates/starter/SUMMARY.md +27 -0
  62. package/templates/starter/agentWorkflows/INDEX.md +61 -0
  63. package/templates/starter/intro/README.md +37 -0
  64. package/templates/full/docs/index.md +0 -46
@@ -7,7 +7,8 @@
7
7
 
8
8
  1. This file is auto-loaded — read it first
9
9
  2. Read `STATE.md` for current position, decisions, blockers
10
- 3. Scope based on query type (see table below)
10
+ 3. Check `PROJECT-PROFILE.md` for lifecycle stage and active extensions
11
+ 4. Scope based on query type (see table below)
11
12
 
12
13
  ## Scoping rules
13
14
 
@@ -15,10 +16,16 @@
15
16
  |------------|-------------------|-------------------|
16
17
  | **Planning / roadmap** | REQUIREMENTS.md, ROADMAP.md | STATE.md, PLAN.md |
17
18
  | **Context refresh** | .context/ (all), project structure | .context/, this file (if scoping rules affected) |
19
+ | **Project discovery** | Project structure, package files, key source files | .context/BASE.md, .context/ specialists, STATE.md |
18
20
  | **{your-domain-type}** | .context/BASE.md + .context/{SPECIALIST}.md | {affected working files} |
21
+ | **Structural navigation** | .context/REGISTRY.md | .context/REGISTRY.md (if structure changed) |
19
22
  | **Methodology guidance** | .context/METHODOLOGY.md | -- |
20
23
  | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
21
24
  | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
25
+ | **Management overview** | Management/DIGEST.md, Management/STATUS.md, STATE.md | Management/STATUS.md, Management/DIGEST.md |
26
+ | **Project review** | Reviews/INDEX.md, relevant source files | Reviews/ (affected review file) |
27
+ | **Workflow analysis** | agentWorkflows/INDEX.md, SESSION-LOG.md | agentWorkflows/ (affected analysis file) |
28
+ | **Docs update** | .context/DOCS-MAP.md, relevant docs/ files | docs/ files, .context/DOCS-MAP.md |
22
29
 
23
30
  <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
24
31
  Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
@@ -35,18 +42,129 @@ When a file changes, check this table and update dependent files in the same res
35
42
  | Open question resolved | STATE.md (mark resolved with resolution text, don't delete) |
36
43
  | Project structure | .context/BASE.md (codebase map), this file (if new query types needed) |
37
44
  | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
45
+ | File split, created, deleted, or renamed | .context/REGISTRY.md (file tree, topic index, structural log) |
38
46
  | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
39
- | Session close or high-effort task completion | SESSION-LOG.md (append metrics entry — effort, ambiguity, context level, tokens, time, workflow, features, cascades, friction, findings) |
47
+ | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
48
+ | Session close or high-effort task completion | SESSION-LOG.md (append metrics entry — effort, ambiguity, context level, tokens, time, user response, refinement delta, workflow, features, cascades, friction, findings). For high-effort tasks also: Management/DIGEST.md (append row — date, task, query, outcome, key changes, decisions, effort, time), Management/STATUS.md (if milestone) |
49
+ | Significant milestone or phase completion | Management/STATUS.md (update current state, recent decisions, health indicators) |
50
+ | New project component or module | .context/DOCS-MAP.md (add component mapping, check scaffolding rules for new docs/ proposals) |
51
+ | docs/ file created or deleted | .context/DOCS-MAP.md (update inventory), docs/index.md (update navigation — create if it doesn't exist yet) |
40
52
 
41
53
  <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
42
54
 
55
+ ## Docs maintenance
56
+
57
+ <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
58
+ For full component-to-docs mapping, see .context/DOCS-MAP.md. -->
59
+
60
+ | Trigger | Update these docs/ files |
61
+ |---------|------------------------|
62
+ | Phase completed | docs/index.md (progress section — create from DOCS-MAP.md if it doesn't exist yet) |
63
+ | Architecture decision | docs/index.md (architecture section), .context/DOCS-MAP.md (if new component) |
64
+ | New project component | .context/DOCS-MAP.md (add mapping), docs/ (per DOCS-MAP.md scaffolding rules) |
65
+ | {structural-change} | {specific docs/ files per DOCS-MAP.md component mapping} |
66
+
43
67
  ## Workflow
44
68
 
45
69
  Select based on query type:
46
70
  - **General task** — Review, Plan, Implement, Document, Update
47
71
  - **Code change** — Review, Plan, Implement, Context-sync, Update
48
72
  - **Context refresh** — Scan, Compare, Update-context, Cascade, Record
49
- - **First session** — Detect, Initialize, Map, Pair, Ready
73
+ - **First session (greenfield)** — Ask, Populate, Confirm (see onboarding protocol below)
74
+ - **First session (brownfield)** — Scan, Ask, Confirm (see onboarding protocol below)
75
+
76
+ ## First session protocol
77
+
78
+ <!-- AGENT: Follow this protocol on the FIRST session when methodology files contain only template placeholders. -->
79
+
80
+ 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.
81
+
82
+ ### Greenfield onboarding (no existing codebase)
83
+
84
+ **Stage 1 — Project vision** → populates PROJECT.md
85
+ Ask the user:
86
+ 1. What is your project about? (1-2 sentences)
87
+ 2. Who is it for?
88
+ 3. What problem does it solve?
89
+ 4. What technologies, languages, or frameworks will you use?
90
+ 5. What are 2-3 guiding principles for this project?
91
+
92
+ CHECKPOINT: Draft PROJECT.md from the answers. Show the user the draft. Wait for approval before writing.
93
+
94
+ **Stage 2 — Architecture** → populates .context/BASE.md, PROJECT-PROFILE.md, .context/DOCS-MAP.md
95
+ Ask the user:
96
+ 1. What are the main components or modules?
97
+ 2. How do they connect? (data flow, API calls, event-driven, etc.)
98
+ 3. What is the directory structure? (or what will it be?)
99
+ 4. What are the key dependencies?
100
+
101
+ CHECKPOINT: Draft .context/BASE.md, PROJECT-PROFILE.md, and .context/DOCS-MAP.md (initial component-to-docs mapping based on architecture). Show the user. Wait for approval.
102
+
103
+ **Stage 3 — Goals** → populates ROADMAP.md, PLAN.md
104
+ Ask the user:
105
+ 1. What are your immediate goals? (next 1-3 sessions)
106
+ 2. What does "done" look like for this project?
107
+ 3. Can you break this into 2-4 phases?
108
+
109
+ CHECKPOINT: Draft ROADMAP.md and PLAN.md (first task). Show the user. Wait for approval.
110
+
111
+ **Stage 4 — Starting state** → populates STATE.md
112
+ Ask the user:
113
+ 1. Any decisions already made? (tech choices, architecture, constraints)
114
+ 2. Any known blockers or risks?
115
+ 3. Any open questions you want tracked?
116
+
117
+ CHECKPOINT: Draft STATE.md. Show the user. Wait for approval. Then begin normal work.
118
+
119
+ ### Brownfield onboarding (existing codebase)
120
+
121
+ **Stage 1 — Scan** → reads existing files, writes nothing
122
+ Read: package.json, README, directory structure, key config files, entry points.
123
+ Present findings: "Here's what I found in your project: [summary]. Is this accurate?"
124
+
125
+ CHECKPOINT: Wait for user to confirm or correct your understanding.
126
+
127
+ **Stage 2 — Clarify** → populates PROJECT.md, PROJECT-PROFILE.md
128
+ Ask targeted questions based on what the scan missed:
129
+ 1. What's the intent behind [pattern you found]?
130
+ 2. Are there conventions not captured in config? (naming, structure, etc.)
131
+ 3. What's the current state — active development, maintenance, exploration?
132
+
133
+ CHECKPOINT: Draft PROJECT.md from scan + answers. Show the user. Wait for approval.
134
+
135
+ **Stage 3 — Map** → populates .context/BASE.md, .context/DOCS-MAP.md
136
+ Build codebase map from scan. Ask:
137
+ 1. Are there areas of the codebase I should understand deeply vs. ignore?
138
+ 2. Any architectural decisions I should know about that aren't documented?
139
+ 3. What are the most common types of changes you make?
140
+
141
+ CHECKPOINT: Draft .context/BASE.md and .context/DOCS-MAP.md (component-to-docs mapping from scan results). Show the user. Wait for approval.
142
+
143
+ **Stage 4 — Organize** → proposes entry point customization
144
+ Based on understanding, propose:
145
+ 1. Scoping rules — which query types match this project?
146
+ 2. Specialist context files — which domains need their own .context/ file?
147
+ 3. Cascade rules — what project-specific dependencies exist?
148
+
149
+ CHECKPOINT: Show proposed entry point customizations. Wait for approval before modifying this file.
150
+
151
+ **Stage 5 — Starting state** → populates STATE.md, ROADMAP.md
152
+ Propose initial state based on everything learned:
153
+ 1. Decisions already implicit in the codebase (document them)
154
+ 2. Current position (where is the project in its lifecycle?)
155
+ 3. Immediate goals
156
+
157
+ CHECKPOINT: Draft STATE.md and ROADMAP.md. Show the user. Wait for approval. Then begin normal work.
158
+
159
+ ### Checkpoint rules
160
+
161
+ - NEVER write to a methodology file without showing the user what you will write first
162
+ - At each CHECKPOINT, present the draft as a code block the user can review
163
+ - If the user says "looks good" or similar, write the file
164
+ - If the user edits or corrects, incorporate changes and show the updated draft
165
+ - If the user says "skip", leave the file as template placeholder
166
+ - After all stages complete, summarize what was populated and begin normal work
167
+ - For brownfield: `.context/REGISTRY.md` is deferred — do not create it during onboarding. It will be created automatically when the first file split occurs (reduces first-session cognitive load)
50
168
 
51
169
  ## Interaction level
52
170
 
@@ -56,7 +174,7 @@ mode: checkpoint
56
174
 
57
175
  ## Model tier
58
176
 
59
- tier: standard
177
+ tier: full
60
178
  <!-- lite | standard | full -->
61
179
  <!-- lite: minimal rules, STATE.md only, 2 cascade rules — for Haiku or simple projects -->
62
180
  <!-- standard: core rules + context pairing, overflow to .context/METHODOLOGY.md — for Sonnet (default) -->
@@ -66,21 +184,28 @@ tier: standard
66
184
 
67
185
  method_version: 1.5
68
186
  <!-- Tracks which methodology version generated this entry point -->
69
- <!-- Use `npx wwa status` to compare against latest -->
187
+ <!-- Use `wwa status` to compare against latest -->
70
188
 
71
189
  ## CLI tools (optional)
72
190
 
73
- Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
191
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
74
192
 
75
193
  | When you want to... | Run |
76
194
  |---------------------|-----|
77
- | Validate this entry point | `npx wwa check` |
78
- | See what type of project this is | `npx wwa scan` |
79
- | Test how a query routes | `npx wwa route "your question"` |
80
- | Extract a refinement report | `npx wwa refine` |
81
- | Check methodology version | `npx wwa status` |
82
- | Update methodology files | `npx wwa upgrade` |
83
- | See what an entry point should contain | `npx wwa init code` / `context` / `data` / `mix` |
195
+ | Validate this entry point | `wwa check` |
196
+ | See what type of project this is | `wwa scan` |
197
+ | Test how a query routes | `wwa route "your question"` |
198
+ | See current plan status | `wwa plan` |
199
+ | Get implementation guidance | `wwa implement` |
200
+ | View project review dashboard | `wwa review` |
201
+ | Show management digest | `wwa digest` |
202
+ | Session close + project snapshot | `wwa close` |
203
+ | Extract a refinement report | `wwa refine` |
204
+ | Extract a case study (with project tokens) | `wwa casestudy` |
205
+ | Check docs coverage | `wwa docs` |
206
+ | Check methodology version | `wwa status` |
207
+ | Update methodology files | `wwa upgrade` |
208
+ | Set up a new project | `wwa init code` / `context` / `data` / `mix` |
84
209
 
85
210
  <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
86
211
  project setup, or methodology updates. All commands auto-detect project type and find
@@ -95,7 +220,9 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
95
220
  - Surface uncertainty as open questions in STATE.md — never guess silently
96
221
  - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
97
222
  - Propose plans and wait for approval — the human controls direction
98
- - At session close or after any high-effort task, append a metrics entry to SESSION-LOG.md include effort level, question ambiguity, context level, estimated tokens, and time. Never skip, never read previous entries during normal work
223
+ - Document proportionally low-effort tasks (status checks, lookups, clarifications) need no STATE.md or SESSION-LOG updates; high-effort tasks get full recording
224
+ - SUMMARY.md is the session audit trail (date, plan, outcome, files, decisions, next). Management digest lives in Management/DIGEST.md
225
+ - At session close or after any high-effort task, append a metrics entry to SESSION-LOG.md — include effort level, question ambiguity, context level, estimated tokens, time, user response (accepted/edited/revised/rejected/redirected), and for medium/high effort tasks: revision count, refinement magnitude (none/minor/moderate/major/rework), delta categories, and survival rate. Never skip, never read previous entries during normal work
99
226
 
100
227
  ## Do not
101
228
 
@@ -105,5 +232,7 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
105
232
  - Defer STATE.md decision recording to end of session
106
233
  - Skip cascade checks after file changes
107
234
  - Load multiple specialist .context/ files for a single query
235
+ - Update docs/ for typo fixes or internal-only changes
236
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
108
237
 
109
238
  <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
@@ -11,7 +11,7 @@
11
11
  5. Add the conventions and do-not items to your existing lists
12
12
  6. Delete this file after merging — it's a reference, not a runtime file
13
13
 
14
- Derived from: feature-registry.yaml (v1.4) query_patterns [analytical] + WF-06
14
+ Derived from: feature-registry.yaml (v1.5) query_patterns [analytical] + WF-06
15
15
  Specialists referenced: COMPOSITION.md, EVALUATION.md, EXECUTION.md, DOMAIN.md, UI_CONTEXT.md
16
16
  Key difference: analytical systems iterate — compose, evaluate, refine cycles are the norm
17
17
  -->
@@ -11,7 +11,7 @@
11
11
  5. Add the conventions and do-not items to your existing lists
12
12
  6. Delete this file after merging — it's a reference, not a runtime file
13
13
 
14
- Derived from: feature-registry.yaml (v1.1) query_patterns [code] + WF-02
14
+ Derived from: feature-registry.yaml (v1.5) query_patterns [code] + WF-02
15
15
  Specialists referenced: customize the specialist names to match your project
16
16
  -->
17
17
 
@@ -11,7 +11,7 @@
11
11
  5. Add the conventions and do-not items to your existing lists
12
12
  6. Delete this file after merging — it's a reference, not a runtime file
13
13
 
14
- Derived from: feature-registry.yaml (v1.1) query_patterns [data] + WF-05
14
+ Derived from: feature-registry.yaml (v1.5) query_patterns [data] + WF-05
15
15
  Specialists referenced: SCHEMA.md, DOCUMENTS.md, RELATIONSHIPS.md
16
16
  Key difference: most exploration queries are READ-ONLY — no file changes, no cascades
17
17
  -->
@@ -66,3 +66,36 @@
66
66
  | PROJECT.md | Project vision and structure |
67
67
  | REQUIREMENTS.md | What must be achieved, with phase traceability |
68
68
  | SUMMARY.md | Execution history — session audit trail |
69
+
70
+ ## Agent onboarding
71
+
72
+ <!-- AGENT: Use these questions to populate this file during the first session.
73
+ Ask the user each question at Stage 2 (Architecture), draft this file from
74
+ the answers, and show the draft at the checkpoint before writing.
75
+ Remove this section after the file is populated — it's scaffolding. -->
76
+
77
+ ### Greenfield
78
+
79
+ Ask the user:
80
+ 1. What are the main components or modules? (populate "What this system is")
81
+ 2. How do they connect? Data flow, API calls, event-driven? (populate System model)
82
+ 3. What is the directory structure and what does each directory do? (populate Codebase map)
83
+ 4. What are the key external dependencies? (populate Dependencies table)
84
+ 5. What recurring task types will you work on? (populate Pairing protocol — helps create specialist context files)
85
+
86
+ ### Brownfield
87
+
88
+ <!-- AGENT: For brownfield projects, auto-populate most of this from the Stage 1 scan.
89
+ Build the codebase map from what you found. Ask targeted questions only for gaps. -->
90
+
91
+ Pre-fill from scan:
92
+ - **What this system is**: infer from README + source structure + config files
93
+ - **System model**: infer from imports, API routes, database connections, event patterns
94
+ - **Codebase map**: build from directory listing + language detection + framework patterns
95
+ - **Dependencies**: extract from lockfiles and config
96
+
97
+ Ask the user only for gaps:
98
+ 1. I found [components]. Are there connections between them I'm missing? (validate System model)
99
+ 2. Which parts of the codebase get the most changes? (helps prioritize Pairing protocol)
100
+ 3. Are there historical patterns or conventions not visible in code? (e.g., "we always use X for Y")
101
+ 4. What types of work will you primarily do? (populate Pairing protocol for specialist files)
@@ -11,8 +11,33 @@ Select based on query type:
11
11
  - **General task** — Review, Plan, Implement, Document, Update
12
12
  - **Code change** — Review, Plan, Implement, Context-sync, Update
13
13
  - **Context refresh** — Scan, Compare, Update-context, Cascade, Record
14
- - **First session** — Detect, Initialize, Map, Pair, Ready
15
- - **Discovery (brownfield)** — Inventory, Map-dependencies, Extract-patterns, Assess, Bootstrap
14
+ - **First session (greenfield)** — Ask, Populate, Confirm (see entry point onboarding protocol)
15
+ - **First session (brownfield)** — Scan, Ask, Confirm (see entry point onboarding protocol)
16
+
17
+ ## Checkpoint protocol
18
+
19
+ The first session protocol in the entry point defines stage-by-stage checkpoints for onboarding. These rules apply to all checkpoints, both during onboarding and normal work:
20
+
21
+ ### When to checkpoint
22
+
23
+ - **Onboarding**: After each stage's questions are answered, before writing any file
24
+ - **Normal work**: Before executing any plan (checkpoint interaction level)
25
+ - **File writes**: Never write methodology files without showing a preview first
26
+
27
+ ### Checkpoint format
28
+
29
+ 1. Present the draft as a code block the user can review
30
+ 2. Wait for explicit approval ("looks good", "yes", "approved")
31
+ 3. If the user edits or corrects, incorporate changes and show updated draft
32
+ 4. If the user says "skip", leave the file as template placeholder
33
+
34
+ ### Brownfield safeguards
35
+
36
+ - Stage 1 (Scan) reads only — no writes under any circumstances
37
+ - Existing project files are never modified — methodology files only
38
+ - Entry point customizations are proposed, not applied, until approved
39
+ - Agent presents scan findings as questions, not assertions
40
+ - `.context/REGISTRY.md` is deferred — not created during onboarding (created on first file split to reduce cognitive load on smaller models)
16
41
 
17
42
  ## Interaction level
18
43
 
@@ -56,9 +81,41 @@ When any intelligence layer file exceeds 300 lines (~3,750 tokens):
56
81
  3. Components hold archived sections grouped by semantic boundary
57
82
  4. Update .context/REGISTRY.md (if it exists) with new file entries
58
83
 
59
- ## Audit trail format
84
+ ## Reporting layers
85
+
86
+ Three directories separate reporting concerns from operational files:
87
+
88
+ ### Management/
89
+
90
+ Management-facing project oversight. Managers read this, not STATE.md or SESSION-LOG.md.
91
+
92
+ - **DIGEST.md** — Append a row for every high-effort task. Format: date, task, query, outcome, key changes, decisions, effort, time. Low-effort work is NOT recorded.
93
+ - **STATUS.md** — Update after milestones: current phase, active work, recent decisions (last 5), blockers, health indicators.
94
+
95
+ **What qualifies as high-effort**: Multi-file changes (3+ files), architectural decisions, phase completions, complex multi-step queries, new feature implementations.
96
+
97
+ **What does NOT qualify**: Status checks, lookups, clarifications, single-file bug fixes, routine maintenance, configuration changes.
98
+
99
+ ### Reviews/
100
+
101
+ Synthesized views of intelligence layer files. Updated when doing a "project review" query.
102
+
103
+ - **INDEX.md** — Dashboard with key metrics and links to drill-down files.
104
+ - **Drill-down files**: roadmap.md, plan.md, project.md, requirements.md, state.md, backlog.md — each synthesizes from its source file.
105
+ - Update the corresponding review file when source data changes significantly, not on every edit.
106
+
107
+ ### agentWorkflows/
108
+
109
+ Agent workflow performance analysis. Updated after high-effort sessions.
110
+
111
+ - **INDEX.md** — Workflow summary, quick stats, links to analysis files.
112
+ - **sessions.md** — SESSION-LOG.md synthesis: effort distribution, query patterns, acceptance rates, refinement analysis.
113
+ - **patterns.md** — Extracted behavioral patterns: what works, friction points, anti-patterns, improvement suggestions.
114
+ - **observations.md** — Case study observations: findings with methodology implications, severity classification, refinement candidates.
115
+
116
+ ### Audit trail format
60
117
 
61
- SUMMARY.md session entries follow this structure:
118
+ SUMMARY.md is the session audit trail. Each entry follows this structure:
62
119
  ```
63
120
  ### {date} — {brief description}
64
121
  **Plan**: {what was planned}
@@ -73,7 +130,7 @@ SUMMARY.md session entries follow this structure:
73
130
 
74
131
  | Trigger | Update these docs/ files |
75
132
  |---------|------------------------|
76
- | Phase completed | docs/index.md (progress section) |
133
+ | Phase completed | docs/index.md (progress section — create from DOCS-MAP.md if it doesn't exist yet) |
77
134
  | Architecture decision | docs/index.md (architecture section) |
78
135
 
79
136
  ## Navigation registry protocol
@@ -22,6 +22,10 @@
22
22
  | **Methodology guidance** | .context/METHODOLOGY.md | -- |
23
23
  | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
24
24
  | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
25
+ | **Management overview** | Management/DIGEST.md, Management/STATUS.md, STATE.md | Management/STATUS.md, Management/DIGEST.md |
26
+ | **Project review** | Reviews/INDEX.md, relevant source files | Reviews/ (affected review file) |
27
+ | **Workflow analysis** | agentWorkflows/INDEX.md, SESSION-LOG.md | agentWorkflows/ (affected analysis file) |
28
+ | **Docs update** | .context/DOCS-MAP.md, relevant docs/ files | docs/ files, .context/DOCS-MAP.md |
25
29
 
26
30
  <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
27
31
  Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
@@ -41,20 +45,24 @@ When a file changes, check this table and update dependent files in the same res
41
45
  | File split, created, deleted, or renamed | .context/REGISTRY.md (file tree, topic index, structural log) |
42
46
  | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
43
47
  | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
44
- | Session close or high-effort task completion | SESSION-LOG.md (append metrics entry — effort, ambiguity, context level, tokens, time, workflow, features, cascades, friction, findings) |
48
+ | Session close or high-effort task completion | SESSION-LOG.md (append metrics entry — effort, ambiguity, context level, tokens, time, user response, refinement delta, workflow, features, cascades, friction, findings). For high-effort tasks also: Management/DIGEST.md (append row — date, task, query, outcome, key changes, decisions, effort, time), Management/STATUS.md (if milestone) |
49
+ | Significant milestone or phase completion | Management/STATUS.md (update current state, recent decisions, health indicators) |
50
+ | New project component or module | .context/DOCS-MAP.md (add component mapping, check scaffolding rules for new docs/ proposals) |
51
+ | docs/ file created or deleted | .context/DOCS-MAP.md (update inventory), docs/index.md (update navigation — create if it doesn't exist yet) |
45
52
 
46
53
  <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
47
54
 
48
55
  ## Docs maintenance
49
56
 
50
57
  <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
51
- Add rows as your docs/ structure grows. -->
58
+ For full component-to-docs mapping, see .context/DOCS-MAP.md. -->
52
59
 
53
60
  | Trigger | Update these docs/ files |
54
61
  |---------|------------------------|
55
- | Phase completed | docs/index.md (progress section) |
56
- | Architecture decision | docs/index.md (architecture section) |
57
- | {structural-change} | {specific docs/ files} |
62
+ | Phase completed | docs/index.md (progress section — create from DOCS-MAP.md if it doesn't exist yet) |
63
+ | Architecture decision | docs/index.md (architecture section), .context/DOCS-MAP.md (if new component) |
64
+ | New project component | .context/DOCS-MAP.md (add mapping), docs/ (per DOCS-MAP.md scaffolding rules) |
65
+ | {structural-change} | {specific docs/ files per DOCS-MAP.md component mapping} |
58
66
 
59
67
  ## Workflow
60
68
 
@@ -62,8 +70,101 @@ Select based on query type:
62
70
  - **General task** — Review, Plan, Implement, Document, Update
63
71
  - **Code change** — Review, Plan, Implement, Context-sync, Update
64
72
  - **Context refresh** — Scan, Compare, Update-context, Cascade, Record
65
- - **First session** — Detect, Initialize, Map, Pair, Ready
66
- - **Discovery (brownfield)** — Inventory, Map-dependencies, Extract-patterns, Assess, Bootstrap
73
+ - **First session (greenfield)** — Ask, Populate, Confirm (see onboarding protocol below)
74
+ - **First session (brownfield)** — Scan, Ask, Confirm (see onboarding protocol below)
75
+
76
+ ## First session protocol
77
+
78
+ <!-- AGENT: Follow this protocol on the FIRST session when methodology files contain only template placeholders. -->
79
+
80
+ 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.
81
+
82
+ ### Greenfield onboarding (no existing codebase)
83
+
84
+ **Stage 1 — Project vision** → populates PROJECT.md
85
+ Ask the user:
86
+ 1. What is your project about? (1-2 sentences)
87
+ 2. Who is it for?
88
+ 3. What problem does it solve?
89
+ 4. What technologies, languages, or frameworks will you use?
90
+ 5. What are 2-3 guiding principles for this project?
91
+
92
+ CHECKPOINT: Draft PROJECT.md from the answers. Show the user the draft. Wait for approval before writing.
93
+
94
+ **Stage 2 — Architecture** → populates .context/BASE.md, PROJECT-PROFILE.md, .context/DOCS-MAP.md
95
+ Ask the user:
96
+ 1. What are the main components or modules?
97
+ 2. How do they connect? (data flow, API calls, event-driven, etc.)
98
+ 3. What is the directory structure? (or what will it be?)
99
+ 4. What are the key dependencies?
100
+
101
+ CHECKPOINT: Draft .context/BASE.md, PROJECT-PROFILE.md, and .context/DOCS-MAP.md (initial component-to-docs mapping based on architecture). Show the user. Wait for approval.
102
+
103
+ **Stage 3 — Goals** → populates ROADMAP.md, PLAN.md
104
+ Ask the user:
105
+ 1. What are your immediate goals? (next 1-3 sessions)
106
+ 2. What does "done" look like for this project?
107
+ 3. Can you break this into 2-4 phases?
108
+
109
+ CHECKPOINT: Draft ROADMAP.md and PLAN.md (first task). Show the user. Wait for approval.
110
+
111
+ **Stage 4 — Starting state** → populates STATE.md
112
+ Ask the user:
113
+ 1. Any decisions already made? (tech choices, architecture, constraints)
114
+ 2. Any known blockers or risks?
115
+ 3. Any open questions you want tracked?
116
+
117
+ CHECKPOINT: Draft STATE.md. Show the user. Wait for approval. Then begin normal work.
118
+
119
+ ### Brownfield onboarding (existing codebase)
120
+
121
+ **Stage 1 — Scan** → reads existing files, writes nothing
122
+ Read: package.json, README, directory structure, key config files, entry points.
123
+ Present findings: "Here's what I found in your project: [summary]. Is this accurate?"
124
+
125
+ CHECKPOINT: Wait for user to confirm or correct your understanding.
126
+
127
+ **Stage 2 — Clarify** → populates PROJECT.md, PROJECT-PROFILE.md
128
+ Ask targeted questions based on what the scan missed:
129
+ 1. What's the intent behind [pattern you found]?
130
+ 2. Are there conventions not captured in config? (naming, structure, etc.)
131
+ 3. What's the current state — active development, maintenance, exploration?
132
+
133
+ CHECKPOINT: Draft PROJECT.md from scan + answers. Show the user. Wait for approval.
134
+
135
+ **Stage 3 — Map** → populates .context/BASE.md, .context/DOCS-MAP.md
136
+ Build codebase map from scan. Ask:
137
+ 1. Are there areas of the codebase I should understand deeply vs. ignore?
138
+ 2. Any architectural decisions I should know about that aren't documented?
139
+ 3. What are the most common types of changes you make?
140
+
141
+ CHECKPOINT: Draft .context/BASE.md and .context/DOCS-MAP.md (component-to-docs mapping from scan results). Show the user. Wait for approval.
142
+
143
+ **Stage 4 — Organize** → proposes entry point customization
144
+ Based on understanding, propose:
145
+ 1. Scoping rules — which query types match this project?
146
+ 2. Specialist context files — which domains need their own .context/ file?
147
+ 3. Cascade rules — what project-specific dependencies exist?
148
+
149
+ CHECKPOINT: Show proposed entry point customizations. Wait for approval before modifying this file.
150
+
151
+ **Stage 5 — Starting state** → populates STATE.md, ROADMAP.md
152
+ Propose initial state based on everything learned:
153
+ 1. Decisions already implicit in the codebase (document them)
154
+ 2. Current position (where is the project in its lifecycle?)
155
+ 3. Immediate goals
156
+
157
+ CHECKPOINT: Draft STATE.md and ROADMAP.md. Show the user. Wait for approval. Then begin normal work.
158
+
159
+ ### Checkpoint rules
160
+
161
+ - NEVER write to a methodology file without showing the user what you will write first
162
+ - At each CHECKPOINT, present the draft as a code block the user can review
163
+ - If the user says "looks good" or similar, write the file
164
+ - If the user edits or corrects, incorporate changes and show the updated draft
165
+ - If the user says "skip", leave the file as template placeholder
166
+ - After all stages complete, summarize what was populated and begin normal work
167
+ - For brownfield: `.context/REGISTRY.md` is deferred — do not create it during onboarding. It will be created automatically when the first file split occurs (reduces first-session cognitive load)
67
168
 
68
169
  ## Interaction level
69
170
 
@@ -83,21 +184,28 @@ tier: full
83
184
 
84
185
  method_version: 1.5
85
186
  <!-- Tracks which methodology version generated this entry point -->
86
- <!-- Use `npx wwa status` to compare against latest -->
187
+ <!-- Use `wwa status` to compare against latest -->
87
188
 
88
189
  ## CLI tools (optional)
89
190
 
90
- Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
191
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
91
192
 
92
193
  | When you want to... | Run |
93
194
  |---------------------|-----|
94
- | Validate this entry point | `npx wwa check` |
95
- | See what type of project this is | `npx wwa scan` |
96
- | Test how a query routes | `npx wwa route "your question"` |
97
- | Extract a refinement report | `npx wwa refine` |
98
- | Check methodology version | `npx wwa status` |
99
- | Update methodology files | `npx wwa upgrade` |
100
- | See what an entry point should contain | `npx wwa init code` / `context` / `data` / `mix` |
195
+ | Validate this entry point | `wwa check` |
196
+ | See what type of project this is | `wwa scan` |
197
+ | Test how a query routes | `wwa route "your question"` |
198
+ | See current plan status | `wwa plan` |
199
+ | Get implementation guidance | `wwa implement` |
200
+ | View project review dashboard | `wwa review` |
201
+ | Show management digest | `wwa digest` |
202
+ | Session close + project snapshot | `wwa close` |
203
+ | Extract a refinement report | `wwa refine` |
204
+ | Extract a case study (with project tokens) | `wwa casestudy` |
205
+ | Check docs coverage | `wwa docs` |
206
+ | Check methodology version | `wwa status` |
207
+ | Update methodology files | `wwa upgrade` |
208
+ | Set up a new project | `wwa init code` / `context` / `data` / `mix` |
101
209
 
102
210
  <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
103
211
  project setup, or methodology updates. All commands auto-detect project type and find
@@ -112,8 +220,9 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
112
220
  - Surface uncertainty as open questions in STATE.md — never guess silently
113
221
  - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
114
222
  - Propose plans and wait for approval — the human controls direction
115
- - SUMMARY.md entries follow audit trail format: date, plan, outcome, files, decisions, next
116
- - At session close or after any high-effort task, append a metrics entry to SESSION-LOG.md — include effort level, question ambiguity, context level, estimated tokens, and time. Never skip, never read previous entries during normal work
223
+ - Document proportionally low-effort tasks (status checks, lookups, clarifications) need no STATE.md or SESSION-LOG updates; high-effort tasks get full recording
224
+ - SUMMARY.md is the session audit trail (date, plan, outcome, files, decisions, next). Management digest lives in Management/DIGEST.md
225
+ - At session close or after any high-effort task, append a metrics entry to SESSION-LOG.md — include effort level, question ambiguity, context level, estimated tokens, time, user response (accepted/edited/revised/rejected/redirected), and for medium/high effort tasks: revision count, refinement magnitude (none/minor/moderate/major/rework), delta categories, and survival rate. Never skip, never read previous entries during normal work
117
226
 
118
227
  ## Do not
119
228
 
@@ -124,5 +233,6 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
124
233
  - Skip cascade checks after file changes
125
234
  - Load multiple specialist .context/ files for a single query
126
235
  - Update docs/ for typo fixes or internal-only changes
236
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
127
237
 
128
238
  <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->