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
@@ -3,7 +3,7 @@
3
3
  Pair with: entry point (CLAUDE.md / .cursorrules / AGENT.md)
4
4
  Use when: agent needs operational guidance beyond entry point rules
5
5
 
6
- This file contains methodology operational details that overflow from the entry point. For lite and standard integration profiles, the entry point stays lean — this file provides depth when needed.
6
+ This file contains methodology operational details that overflow from the entry point. For lite and standard integration profiles, the entry point stays lean — this file provides depth when needed. For full profile projects, this file serves as a reference but the entry point contains all rules directly.
7
7
 
8
8
  ## Workflows
9
9
 
@@ -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,38 @@ 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 (full tier) or self-contained sections (starter tier).
104
+ - Drill-down files (full tier): roadmap.md, plan.md, project.md, requirements.md, state.md, backlog.md.
105
+
106
+ ### agentWorkflows/
107
+
108
+ Agent workflow performance analysis. Updated after high-effort sessions.
109
+
110
+ - **INDEX.md** — Workflow summary, quick stats, links to analysis files (full tier) or self-contained sections (starter tier).
111
+ - Analysis files (full tier): sessions.md (SESSION-LOG synthesis), patterns.md (behavioral patterns), observations.md (case study findings).
112
+
113
+ ### Audit trail format
60
114
 
61
- SUMMARY.md session entries follow this structure:
115
+ SUMMARY.md is the session audit trail. Each entry follows this structure:
62
116
  ```
63
117
  ### {date} — {brief description}
64
118
  **Plan**: {what was planned}
@@ -21,6 +21,10 @@
21
21
  | **Methodology guidance** | .context/METHODOLOGY.md | -- |
22
22
  | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
23
23
  | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
24
+ | **Management overview** | Management/DIGEST.md, Management/STATUS.md, STATE.md | Management/STATUS.md, Management/DIGEST.md |
25
+ | **Project review** | Reviews/INDEX.md, relevant source files | Reviews/ (affected review file) |
26
+ | **Workflow analysis** | agentWorkflows/INDEX.md, SESSION-LOG.md | agentWorkflows/ (affected analysis file) |
27
+ | **Docs update** | .context/DOCS-MAP.md, relevant docs/ files | docs/ files, .context/DOCS-MAP.md |
24
28
 
25
29
  <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
26
30
  Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
@@ -39,18 +43,126 @@ When a file changes, check this table and update dependent files in the same res
39
43
  | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
40
44
  | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
41
45
  | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
42
- | Session close or high-effort task completion | SESSION-LOG.md (append metrics entry — effort, ambiguity, context level, tokens, time, workflow, features, cascades, friction, findings) |
46
+ | 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) |
47
+ | Significant milestone or phase completion | Management/STATUS.md (update current state, recent decisions, health indicators) |
48
+ | New project component or module | .context/DOCS-MAP.md (add component mapping, check scaffolding rules for new docs/ proposals) |
49
+ | docs/ file created or deleted | .context/DOCS-MAP.md (update inventory), docs/index.md (update navigation — create if it doesn't exist yet) |
43
50
 
44
51
  <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
45
52
 
53
+ ## Docs maintenance
54
+
55
+ <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
56
+ For full component-to-docs mapping, see .context/DOCS-MAP.md. -->
57
+
58
+ | Trigger | Update these docs/ files |
59
+ |---------|------------------------|
60
+ | Phase completed | docs/index.md (progress section — create from DOCS-MAP.md if it doesn't exist yet) |
61
+ | Architecture decision | docs/index.md (architecture section), .context/DOCS-MAP.md (if new component) |
62
+ | New project component | .context/DOCS-MAP.md (add mapping), docs/ (per DOCS-MAP.md scaffolding rules) |
63
+ | {structural-change} | {specific docs/ files per DOCS-MAP.md component mapping} |
64
+
46
65
  ## Workflow
47
66
 
48
67
  Select based on query type:
49
68
  - **General task** — Review, Plan, Implement, Document, Update
50
69
  - **Code change** — Review, Plan, Implement, Context-sync, Update
51
70
  - **Context refresh** — Scan, Compare, Update-context, Cascade, Record
52
- - **First session** — Detect, Initialize, Map, Pair, Ready
53
- - **Discovery (brownfield)** — Inventory, Map-dependencies, Extract-patterns, Assess, Bootstrap
71
+ - **First session (greenfield)** — Ask, Populate, Confirm (see onboarding protocol below)
72
+ - **First session (brownfield)** — Scan, Ask, Confirm (see onboarding protocol below)
73
+
74
+ ## First session protocol
75
+
76
+ <!-- AGENT: Follow this protocol on the FIRST session when methodology files contain only template placeholders. -->
77
+
78
+ 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.
79
+
80
+ ### Greenfield onboarding (no existing codebase)
81
+
82
+ **Stage 1 — Project vision** → populates PROJECT.md
83
+ Ask the user:
84
+ 1. What is your project about? (1-2 sentences)
85
+ 2. Who is it for?
86
+ 3. What problem does it solve?
87
+ 4. What technologies, languages, or frameworks will you use?
88
+ 5. What are 2-3 guiding principles for this project?
89
+
90
+ CHECKPOINT: Draft PROJECT.md from the answers. Show the user the draft. Wait for approval before writing.
91
+
92
+ **Stage 2 — Architecture** → populates .context/BASE.md, PROJECT-PROFILE.md, .context/DOCS-MAP.md
93
+ Ask the user:
94
+ 1. What are the main components or modules?
95
+ 2. How do they connect? (data flow, API calls, event-driven, etc.)
96
+ 3. What is the directory structure? (or what will it be?)
97
+ 4. What are the key dependencies?
98
+
99
+ 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.
100
+
101
+ **Stage 3 — Goals** → populates ROADMAP.md, PLAN.md
102
+ Ask the user:
103
+ 1. What are your immediate goals? (next 1-3 sessions)
104
+ 2. What does "done" look like for this project?
105
+ 3. Can you break this into 2-4 phases?
106
+
107
+ CHECKPOINT: Draft ROADMAP.md and PLAN.md (first task). Show the user. Wait for approval.
108
+
109
+ **Stage 4 — Starting state** → populates STATE.md
110
+ Ask the user:
111
+ 1. Any decisions already made? (tech choices, architecture, constraints)
112
+ 2. Any known blockers or risks?
113
+ 3. Any open questions you want tracked?
114
+
115
+ CHECKPOINT: Draft STATE.md. Show the user. Wait for approval. Then begin normal work.
116
+
117
+ ### Brownfield onboarding (existing codebase)
118
+
119
+ **Stage 1 — Scan** → reads existing files, writes nothing
120
+ Read: package.json, README, directory structure, key config files, entry points.
121
+ Present findings: "Here's what I found in your project: [summary]. Is this accurate?"
122
+
123
+ CHECKPOINT: Wait for user to confirm or correct your understanding.
124
+
125
+ **Stage 2 — Clarify** → populates PROJECT.md, PROJECT-PROFILE.md
126
+ Ask targeted questions based on what the scan missed:
127
+ 1. What's the intent behind [pattern you found]?
128
+ 2. Are there conventions not captured in config? (naming, structure, etc.)
129
+ 3. What's the current state — active development, maintenance, exploration?
130
+
131
+ CHECKPOINT: Draft PROJECT.md from scan + answers. Show the user. Wait for approval.
132
+
133
+ **Stage 3 — Map** → populates .context/BASE.md, .context/DOCS-MAP.md
134
+ Build codebase map from scan. Ask:
135
+ 1. Are there areas of the codebase I should understand deeply vs. ignore?
136
+ 2. Any architectural decisions I should know about that aren't documented?
137
+ 3. What are the most common types of changes you make?
138
+
139
+ CHECKPOINT: Draft .context/BASE.md and .context/DOCS-MAP.md (component-to-docs mapping from scan results). Show the user. Wait for approval.
140
+
141
+ **Stage 4 — Organize** → proposes entry point customization
142
+ Based on understanding, propose:
143
+ 1. Scoping rules — which query types match this project?
144
+ 2. Specialist context files — which domains need their own .context/ file?
145
+ 3. Cascade rules — what project-specific dependencies exist?
146
+
147
+ CHECKPOINT: Show proposed entry point customizations. Wait for approval before modifying this file.
148
+
149
+ **Stage 5 — Starting state** → populates STATE.md, ROADMAP.md
150
+ Propose initial state based on everything learned:
151
+ 1. Decisions already implicit in the codebase (document them)
152
+ 2. Current position (where is the project in its lifecycle?)
153
+ 3. Immediate goals
154
+
155
+ CHECKPOINT: Draft STATE.md and ROADMAP.md. Show the user. Wait for approval. Then begin normal work.
156
+
157
+ ### Checkpoint rules
158
+
159
+ - NEVER write to a methodology file without showing the user what you will write first
160
+ - At each CHECKPOINT, present the draft as a code block the user can review
161
+ - If the user says "looks good" or similar, write the file
162
+ - If the user edits or corrects, incorporate changes and show the updated draft
163
+ - If the user says "skip", leave the file as template placeholder
164
+ - After all stages complete, summarize what was populated and begin normal work
165
+ - 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)
54
166
 
55
167
  ## Interaction level
56
168
 
@@ -70,21 +182,28 @@ tier: standard
70
182
 
71
183
  method_version: 1.5
72
184
  <!-- Tracks which methodology version generated this entry point -->
73
- <!-- Use `npx wwa status` to compare against latest -->
185
+ <!-- Use `wwa status` to compare against latest -->
74
186
 
75
187
  ## CLI tools (optional)
76
188
 
77
- Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
189
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
78
190
 
79
191
  | When you want to... | Run |
80
192
  |---------------------|-----|
81
- | Validate this entry point | `npx wwa check` |
82
- | See what type of project this is | `npx wwa scan` |
83
- | Test how a query routes | `npx wwa route "your question"` |
84
- | Extract a refinement report | `npx wwa refine` |
85
- | Check methodology version | `npx wwa status` |
86
- | Update methodology files | `npx wwa upgrade` |
87
- | See what an entry point should contain | `npx wwa init code` / `context` / `data` / `mix` |
193
+ | Validate this entry point | `wwa check` |
194
+ | See what type of project this is | `wwa scan` |
195
+ | Test how a query routes | `wwa route "your question"` |
196
+ | See current plan status | `wwa plan` |
197
+ | Get implementation guidance | `wwa implement` |
198
+ | View project review dashboard | `wwa review` |
199
+ | Show management digest | `wwa digest` |
200
+ | Session close + project snapshot | `wwa close` |
201
+ | Extract a refinement report | `wwa refine` |
202
+ | Extract a case study (with project tokens) | `wwa casestudy` |
203
+ | Check docs coverage | `wwa docs` |
204
+ | Check methodology version | `wwa status` |
205
+ | Update methodology files | `wwa upgrade` |
206
+ | Set up a new project | `wwa init code` / `context` / `data` / `mix` |
88
207
 
89
208
  <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
90
209
  project setup, or methodology updates. All commands auto-detect project type and find
@@ -99,7 +218,9 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
99
218
  - Surface uncertainty as open questions in STATE.md — never guess silently
100
219
  - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
101
220
  - Propose plans and wait for approval — the human controls direction
102
- - 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
221
+ - Document proportionally low-effort tasks (status checks, lookups, clarifications) need no STATE.md or SESSION-LOG updates; high-effort tasks get full recording
222
+ - SUMMARY.md is the session audit trail (date, plan, outcome, files, decisions, next). Management digest lives in Management/DIGEST.md
223
+ - 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
103
224
 
104
225
  ## Do not
105
226
 
@@ -109,5 +230,6 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
109
230
  - Defer STATE.md decision recording to end of session
110
231
  - Skip cascade checks after file changes
111
232
  - Load multiple specialist .context/ files for a single query
233
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
112
234
 
113
235
  <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
@@ -21,6 +21,10 @@
21
21
  | **Methodology guidance** | .context/METHODOLOGY.md | -- |
22
22
  | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
23
23
  | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
24
+ | **Management overview** | Management/DIGEST.md, Management/STATUS.md, STATE.md | Management/STATUS.md, Management/DIGEST.md |
25
+ | **Project review** | Reviews/INDEX.md, relevant source files | Reviews/ (affected review file) |
26
+ | **Workflow analysis** | agentWorkflows/INDEX.md, SESSION-LOG.md | agentWorkflows/ (affected analysis file) |
27
+ | **Docs update** | .context/DOCS-MAP.md, relevant docs/ files | docs/ files, .context/DOCS-MAP.md |
24
28
 
25
29
  <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
26
30
  Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
@@ -39,18 +43,126 @@ When a file changes, check this table and update dependent files in the same res
39
43
  | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
40
44
  | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
41
45
  | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
42
- | Session close or high-effort task completion | SESSION-LOG.md (append metrics entry — effort, ambiguity, context level, tokens, time, workflow, features, cascades, friction, findings) |
46
+ | 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) |
47
+ | Significant milestone or phase completion | Management/STATUS.md (update current state, recent decisions, health indicators) |
48
+ | New project component or module | .context/DOCS-MAP.md (add component mapping, check scaffolding rules for new docs/ proposals) |
49
+ | docs/ file created or deleted | .context/DOCS-MAP.md (update inventory), docs/index.md (update navigation — create if it doesn't exist yet) |
43
50
 
44
51
  <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
45
52
 
53
+ ## Docs maintenance
54
+
55
+ <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
56
+ For full component-to-docs mapping, see .context/DOCS-MAP.md. -->
57
+
58
+ | Trigger | Update these docs/ files |
59
+ |---------|------------------------|
60
+ | Phase completed | docs/index.md (progress section — create from DOCS-MAP.md if it doesn't exist yet) |
61
+ | Architecture decision | docs/index.md (architecture section), .context/DOCS-MAP.md (if new component) |
62
+ | New project component | .context/DOCS-MAP.md (add mapping), docs/ (per DOCS-MAP.md scaffolding rules) |
63
+ | {structural-change} | {specific docs/ files per DOCS-MAP.md component mapping} |
64
+
46
65
  ## Workflow
47
66
 
48
67
  Select based on query type:
49
68
  - **General task** — Review, Plan, Implement, Document, Update
50
69
  - **Code change** — Review, Plan, Implement, Context-sync, Update
51
70
  - **Context refresh** — Scan, Compare, Update-context, Cascade, Record
52
- - **First session** — Detect, Initialize, Map, Pair, Ready
53
- - **Discovery (brownfield)** — Inventory, Map-dependencies, Extract-patterns, Assess, Bootstrap
71
+ - **First session (greenfield)** — Ask, Populate, Confirm (see onboarding protocol below)
72
+ - **First session (brownfield)** — Scan, Ask, Confirm (see onboarding protocol below)
73
+
74
+ ## First session protocol
75
+
76
+ <!-- AGENT: Follow this protocol on the FIRST session when methodology files contain only template placeholders. -->
77
+
78
+ 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.
79
+
80
+ ### Greenfield onboarding (no existing codebase)
81
+
82
+ **Stage 1 — Project vision** → populates PROJECT.md
83
+ Ask the user:
84
+ 1. What is your project about? (1-2 sentences)
85
+ 2. Who is it for?
86
+ 3. What problem does it solve?
87
+ 4. What technologies, languages, or frameworks will you use?
88
+ 5. What are 2-3 guiding principles for this project?
89
+
90
+ CHECKPOINT: Draft PROJECT.md from the answers. Show the user the draft. Wait for approval before writing.
91
+
92
+ **Stage 2 — Architecture** → populates .context/BASE.md, PROJECT-PROFILE.md, .context/DOCS-MAP.md
93
+ Ask the user:
94
+ 1. What are the main components or modules?
95
+ 2. How do they connect? (data flow, API calls, event-driven, etc.)
96
+ 3. What is the directory structure? (or what will it be?)
97
+ 4. What are the key dependencies?
98
+
99
+ 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.
100
+
101
+ **Stage 3 — Goals** → populates ROADMAP.md, PLAN.md
102
+ Ask the user:
103
+ 1. What are your immediate goals? (next 1-3 sessions)
104
+ 2. What does "done" look like for this project?
105
+ 3. Can you break this into 2-4 phases?
106
+
107
+ CHECKPOINT: Draft ROADMAP.md and PLAN.md (first task). Show the user. Wait for approval.
108
+
109
+ **Stage 4 — Starting state** → populates STATE.md
110
+ Ask the user:
111
+ 1. Any decisions already made? (tech choices, architecture, constraints)
112
+ 2. Any known blockers or risks?
113
+ 3. Any open questions you want tracked?
114
+
115
+ CHECKPOINT: Draft STATE.md. Show the user. Wait for approval. Then begin normal work.
116
+
117
+ ### Brownfield onboarding (existing codebase)
118
+
119
+ **Stage 1 — Scan** → reads existing files, writes nothing
120
+ Read: package.json, README, directory structure, key config files, entry points.
121
+ Present findings: "Here's what I found in your project: [summary]. Is this accurate?"
122
+
123
+ CHECKPOINT: Wait for user to confirm or correct your understanding.
124
+
125
+ **Stage 2 — Clarify** → populates PROJECT.md, PROJECT-PROFILE.md
126
+ Ask targeted questions based on what the scan missed:
127
+ 1. What's the intent behind [pattern you found]?
128
+ 2. Are there conventions not captured in config? (naming, structure, etc.)
129
+ 3. What's the current state — active development, maintenance, exploration?
130
+
131
+ CHECKPOINT: Draft PROJECT.md from scan + answers. Show the user. Wait for approval.
132
+
133
+ **Stage 3 — Map** → populates .context/BASE.md, .context/DOCS-MAP.md
134
+ Build codebase map from scan. Ask:
135
+ 1. Are there areas of the codebase I should understand deeply vs. ignore?
136
+ 2. Any architectural decisions I should know about that aren't documented?
137
+ 3. What are the most common types of changes you make?
138
+
139
+ CHECKPOINT: Draft .context/BASE.md and .context/DOCS-MAP.md (component-to-docs mapping from scan results). Show the user. Wait for approval.
140
+
141
+ **Stage 4 — Organize** → proposes entry point customization
142
+ Based on understanding, propose:
143
+ 1. Scoping rules — which query types match this project?
144
+ 2. Specialist context files — which domains need their own .context/ file?
145
+ 3. Cascade rules — what project-specific dependencies exist?
146
+
147
+ CHECKPOINT: Show proposed entry point customizations. Wait for approval before modifying this file.
148
+
149
+ **Stage 5 — Starting state** → populates STATE.md, ROADMAP.md
150
+ Propose initial state based on everything learned:
151
+ 1. Decisions already implicit in the codebase (document them)
152
+ 2. Current position (where is the project in its lifecycle?)
153
+ 3. Immediate goals
154
+
155
+ CHECKPOINT: Draft STATE.md and ROADMAP.md. Show the user. Wait for approval. Then begin normal work.
156
+
157
+ ### Checkpoint rules
158
+
159
+ - NEVER write to a methodology file without showing the user what you will write first
160
+ - At each CHECKPOINT, present the draft as a code block the user can review
161
+ - If the user says "looks good" or similar, write the file
162
+ - If the user edits or corrects, incorporate changes and show the updated draft
163
+ - If the user says "skip", leave the file as template placeholder
164
+ - After all stages complete, summarize what was populated and begin normal work
165
+ - 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)
54
166
 
55
167
  ## Interaction level
56
168
 
@@ -70,21 +182,28 @@ tier: standard
70
182
 
71
183
  method_version: 1.5
72
184
  <!-- Tracks which methodology version generated this entry point -->
73
- <!-- Use `npx wwa status` to compare against latest -->
185
+ <!-- Use `wwa status` to compare against latest -->
74
186
 
75
187
  ## CLI tools (optional)
76
188
 
77
- Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
189
+ Install: `npm install -g agent-method` (then use `wwa`), or `pip install wwa-tools`.
78
190
 
79
191
  | When you want to... | Run |
80
192
  |---------------------|-----|
81
- | Validate this entry point | `npx wwa check` |
82
- | See what type of project this is | `npx wwa scan` |
83
- | Test how a query routes | `npx wwa route "your question"` |
84
- | Extract a refinement report | `npx wwa refine` |
85
- | Check methodology version | `npx wwa status` |
86
- | Update methodology files | `npx wwa upgrade` |
87
- | See what an entry point should contain | `npx wwa init code` / `context` / `data` / `mix` |
193
+ | Validate this entry point | `wwa check` |
194
+ | See what type of project this is | `wwa scan` |
195
+ | Test how a query routes | `wwa route "your question"` |
196
+ | See current plan status | `wwa plan` |
197
+ | Get implementation guidance | `wwa implement` |
198
+ | View project review dashboard | `wwa review` |
199
+ | Show management digest | `wwa digest` |
200
+ | Session close + project snapshot | `wwa close` |
201
+ | Extract a refinement report | `wwa refine` |
202
+ | Extract a case study (with project tokens) | `wwa casestudy` |
203
+ | Check docs coverage | `wwa docs` |
204
+ | Check methodology version | `wwa status` |
205
+ | Update methodology files | `wwa upgrade` |
206
+ | Set up a new project | `wwa init code` / `context` / `data` / `mix` |
88
207
 
89
208
  <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
90
209
  project setup, or methodology updates. All commands auto-detect project type and find
@@ -99,7 +218,9 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
99
218
  - Surface uncertainty as open questions in STATE.md — never guess silently
100
219
  - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
101
220
  - Propose plans and wait for approval — the human controls direction
102
- - 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
221
+ - Document proportionally low-effort tasks (status checks, lookups, clarifications) need no STATE.md or SESSION-LOG updates; high-effort tasks get full recording
222
+ - SUMMARY.md is the session audit trail (date, plan, outcome, files, decisions, next). Management digest lives in Management/DIGEST.md
223
+ - 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
103
224
 
104
225
  ## Do not
105
226
 
@@ -109,5 +230,6 @@ Available via `npx wwa` (zero-install) or `pip install wwa-tools`:
109
230
  - Defer STATE.md decision recording to end of session
110
231
  - Skip cascade checks after file changes
111
232
  - Load multiple specialist .context/ files for a single query
233
+ - Record routine queries in STATE.md or SESSION-LOG.md — only decisions, blockers, and high-effort work warrant documentation
112
234
 
113
235
  <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->