agent-method 1.5.3 → 1.5.5

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.
package/README.md CHANGED
@@ -4,24 +4,36 @@ A file-structure-first methodology for AI-agent-assisted development. Files are
4
4
 
5
5
  `ai-agents` `prompt-engineering` `developer-tools` `context-engineering` `agent-framework` `mcp` `model-context-protocol` `cursor` `claude-code`
6
6
 
7
+ ---
8
+
7
9
  ## Who This Is For
8
10
 
9
- People who want to describe what they want and have it built correctly without losing context between sessions, re-explaining decisions, or watching the agent drift off scope.
11
+ There is real stigma around AI-assisted development, and it's warranted. Most "vibe coding" produces work that no one fully understands — not the developer, not the agent, and certainly not the next person who reads the code.
12
+
13
+ This project takes a different position. Three active case studies are being run to examine how development agents reason, where they lose context, and what structures keep their output connected to human-readable, auditable decisions. The methodology tracks agent behavior session over session — what worked, what was revised, what the human had to correct — and feeds that data back into improving future collaboration.
14
+
15
+ If you want to build with an agent but also want full visibility into the work being done, the decisions being made, and a path to measurably improving your agent's effectiveness over time — this is for you.
10
16
 
11
- If you've ever had an AI agent forget what you told it yesterday, make the same mistake twice, or change files it shouldn't have touched — this fixes that.
17
+ ---
12
18
 
13
19
  ## Requirements
14
20
 
15
- - **Node.js >= 18**
21
+ - **Node.js >= 18** — [download](https://nodejs.org/)
16
22
  - **A supported AI runtime** — [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Cursor](https://cursor.sh), or any agent that reads markdown files
17
23
 
18
- ## Getting Started
24
+ ---
25
+
26
+ ## Installation
27
+
28
+ ### Quick start (recommended)
29
+
30
+ One command, guided prompts:
19
31
 
20
32
  ```bash
21
- npx wwa init
33
+ npx agent-method init
22
34
  ```
23
35
 
24
- The installer guides you through everything:
36
+ The installer walks you through everything:
25
37
 
26
38
  1. **Project type** — Code, Data, Analytical, Mixed, or General
27
39
  2. **Directory** — where to set up (default: current directory)
@@ -31,57 +43,76 @@ The installer guides you through everything:
31
43
 
32
44
  Done. Open `PROJECT.md` and start working with your AI agent.
33
45
 
34
- ### Verify
46
+ To update an existing project later:
35
47
 
36
48
  ```bash
37
- npx wwa check
49
+ npx agent-method upgrade # adds new methodology sections, never overwrites
50
+ npx agent-method status # check your current version
38
51
  ```
39
52
 
40
- Validates your entry point, auto-detects project type, and reports any issues.
53
+ <details>
54
+ <summary><strong>Install globally</strong> — skip <code>npx</code> each time</summary>
41
55
 
42
- ## Staying Updated
56
+ ```bash
57
+ npm install -g agent-method
58
+ ```
59
+
60
+ After this, use `wwa` directly:
43
61
 
44
62
  ```bash
45
- npx wwa upgrade
63
+ wwa init
64
+ wwa check
65
+ wwa status
46
66
  ```
47
67
 
48
- Brownfield-safe appends new methodology sections without overwriting your customizations. Check your current version with `npx wwa status`.
68
+ Both `wwa` and `agent-method` work as command names.
69
+
70
+ </details>
49
71
 
50
- ## Non-interactive Install (CI, Scripts, Docker)
72
+ <details>
73
+ <summary><strong>Non-interactive install</strong> — CI, scripts, Docker</summary>
74
+
75
+ Specify everything on the command line (no prompts):
51
76
 
52
77
  ```bash
53
- # Specify everything on the command line
54
- npx wwa init code ~/my-project --runtime claude --tier starter --profile standard
78
+ # Full options
79
+ npx agent-method init code ~/my-project --runtime claude --tier starter --profile standard
55
80
 
56
- # Just the type and directory (defaults for the rest)
57
- npx wwa init code ~/my-project
81
+ # Just type and directory (defaults for the rest)
82
+ npx agent-method init code ~/my-project
58
83
 
59
84
  # Data project for Cursor
60
- npx wwa init data ~/my-data --runtime cursor
85
+ npx agent-method init data ~/my-data --runtime cursor
61
86
 
62
87
  # Analytical project with full methodology
63
- npx wwa init context ~/my-analysis --tier full --profile full
88
+ npx agent-method init context ~/my-analysis --tier full --profile full
64
89
  ```
65
90
 
66
- ### Install globally
91
+ **Options:**
67
92
 
68
- Instead of `npx` each time:
93
+ | Flag | Values | Default |
94
+ |------|--------|---------|
95
+ | `--runtime` | `claude`, `cursor`, `all` | `all` |
96
+ | `--tier` | `starter`, `full` | `starter` |
97
+ | `--profile` | `lite`, `standard`, `full` | `standard` |
69
98
 
70
- ```bash
71
- npm install -g wwa
72
- ```
99
+ </details>
73
100
 
74
- ### Python alternative
101
+ <details>
102
+ <summary><strong>Python alternative</strong> — same commands, same templates</summary>
75
103
 
76
- Same commands, same registry, same templates:
104
+ Requires Python >= 3.9:
77
105
 
78
106
  ```bash
79
- pip install wwa-tools # requires Python >= 3.9
107
+ pip install wwa-tools
80
108
  ```
81
109
 
82
- ## Development Installation
110
+ The Python CLI is an independent implementation sharing the same registry and templates. It is **not** required for the Node.js CLI — pick whichever fits your environment.
111
+
112
+ </details>
83
113
 
84
- Clone and run locally for testing or contributing:
114
+ <details>
115
+ <summary><strong>Development install</strong> — contributing or testing locally</summary>
85
116
 
86
117
  ```bash
87
118
  git clone https://github.com/anthropics/wwa.git
@@ -98,6 +129,34 @@ bash setup.sh ~/my-project
98
129
 
99
130
  Interactive — asks project name, type, runtime, tier, lifecycle, and profile.
100
131
 
132
+ </details>
133
+
134
+ ---
135
+
136
+ ## Verify
137
+
138
+ ```bash
139
+ npx agent-method check
140
+ ```
141
+
142
+ Validates your entry point, auto-detects project type, and reports any issues.
143
+
144
+ ---
145
+
146
+ ## Staying Updated
147
+
148
+ ```bash
149
+ npx agent-method upgrade
150
+ ```
151
+
152
+ Brownfield-safe — appends new methodology sections without overwriting your customizations.
153
+
154
+ ```bash
155
+ npx agent-method status # check your current version
156
+ ```
157
+
158
+ ---
159
+
101
160
  ## Commands
102
161
 
103
162
  | Command | What it does |
@@ -114,26 +173,41 @@ Interactive — asks project name, type, runtime, tier, lifecycle, and profile.
114
173
 
115
174
  All commands support `--json` for machine-readable output.
116
175
 
117
- ### MCP Server (AI tool integration)
176
+ <details>
177
+ <summary><strong>MCP Server</strong> — expose tools directly to your AI agent</summary>
118
178
 
119
- Expose methodology tools directly to your AI agent via the [Model Context Protocol](https://modelcontextprotocol.io):
179
+ Add to your IDE's MCP config (VS Code, Cursor, Claude Code, Cline):
120
180
 
121
181
  ```json
122
182
  {
123
183
  "mcpServers": {
124
184
  "wwa": {
125
185
  "command": "npx",
126
- "args": ["wwa", "serve"]
186
+ "args": ["agent-method", "serve"]
127
187
  }
128
188
  }
129
189
  }
130
190
  ```
131
191
 
132
- 8 tools available. Works with VS Code, Cursor, Claude Code, Cline. See [MCP Integration Guide](docs/guides/mcp-integration.md).
192
+ **8 tools available:**
193
+
194
+ | Tool | What it does |
195
+ |------|-------------|
196
+ | `route_query` | Classify a query and return read/write sets |
197
+ | `validate_entry_point` | Check entry point for issues |
198
+ | `detect_project` | Auto-detect project type from files |
199
+ | `resolve_cascade` | Show what files to update after a change |
200
+ | `check_capability` | Verify model meets task requirements |
201
+ | `lookup_feature` | Look up a methodology feature by ID |
202
+ | `list_workflows` | List available guided workflows |
203
+ | `refactor_markdown` | Analyze files over 300 lines, suggest splits |
133
204
 
134
- ### Pipeline commands (advanced)
205
+ See [MCP Integration Guide](docs/guides/mcp-integration.md) for full setup.
135
206
 
136
- For debugging individual pipeline stages:
207
+ </details>
208
+
209
+ <details>
210
+ <summary><strong>Pipeline commands</strong> — debug individual pipeline stages</summary>
137
211
 
138
212
  ```bash
139
213
  wwa pipeline classify "<query>" --project-type code
@@ -143,6 +217,12 @@ wwa pipeline cascade --trigger phase_completion
143
217
  wwa pipeline test fixtures/
144
218
  ```
145
219
 
220
+ These are primarily for debugging and development. Most users won't need them.
221
+
222
+ </details>
223
+
224
+ ---
225
+
146
226
  ## What You Get
147
227
 
148
228
  ```
@@ -158,7 +238,21 @@ your-project/
158
238
  METHODOLOGY.md # Workflows, conventions overflow
159
239
  ```
160
240
 
161
- Full tier adds: `REQUIREMENTS.md`, `SUMMARY.md`, `.context/REGISTRY.md`, `docs/`, `todos/backlog.md`.
241
+ <details>
242
+ <summary><strong>Full tier</strong> — adds these files for complex projects</summary>
243
+
244
+ ```
245
+ REQUIREMENTS.md # Formal requirements with traceability
246
+ SUMMARY.md # Session audit trail
247
+ .context/
248
+ REGISTRY.md # Navigation registry for large projects
249
+ docs/
250
+ index.md # Documentation hub
251
+ todos/
252
+ backlog.md # Ideas and future work
253
+ ```
254
+
255
+ </details>
162
256
 
163
257
  Every file ships with **inline instructions** — the agent reads them and helps you populate each section.
164
258
 
@@ -166,7 +260,8 @@ Every file ships with **inline instructions** — the agent reads them and helps
166
260
 
167
261
  ## About
168
262
 
169
- ### The problem
263
+ <details>
264
+ <summary><strong>The problem</strong></summary>
170
265
 
171
266
  AI-agent-assisted development breaks down in three ways:
172
267
 
@@ -176,7 +271,10 @@ AI-agent-assisted development breaks down in three ways:
176
271
 
177
272
  Existing solutions tie you to specific agent runtimes through CLI tools and slash commands. wwa solves this with **files as the interface** — readable, portable, agent-agnostic.
178
273
 
179
- ### How it works
274
+ </details>
275
+
276
+ <details>
277
+ <summary><strong>How it works</strong></summary>
180
278
 
181
279
  **Scoping rules** — The entry point contains a table mapping query types to file sets. The agent loads only the relevant files and constrains its writes. Context windows stay small, responses stay focused.
182
280
 
@@ -186,7 +284,10 @@ Existing solutions tie you to specific agent runtimes through CLI tools and slas
186
284
 
187
285
  **Cross-session memory** — `STATE.md` persists decisions, blockers, and current position across sessions. No re-explaining what happened yesterday.
188
286
 
189
- ### Integration profiles
287
+ </details>
288
+
289
+ <details>
290
+ <summary><strong>Integration profiles</strong></summary>
190
291
 
191
292
  | Profile | Best for | What's included |
192
293
  |---------|----------|-----------------|
@@ -196,7 +297,10 @@ Existing solutions tie you to specific agent runtimes through CLI tools and slas
196
297
 
197
298
  Three rules followed consistently beat ten rules followed inconsistently.
198
299
 
199
- ### Project types
300
+ </details>
301
+
302
+ <details>
303
+ <summary><strong>Project types</strong></summary>
200
304
 
201
305
  | Type | CLI name | What's added |
202
306
  |------|----------|-------------|
@@ -206,16 +310,20 @@ Three rules followed consistently beat ten rules followed inconsistently.
206
310
  | **Mixed** | `mix` | Multiple extensions combined |
207
311
  | **General** | `general` | Universal scoping and cascade rules only |
208
312
 
209
- ### Brownfield projects
313
+ </details>
210
314
 
211
- Works with existing codebases:
315
+ <details>
316
+ <summary><strong>Brownfield projects</strong> — works with existing codebases</summary>
212
317
 
213
318
  - **Never overwrites** existing files
214
319
  - **Appends** methodology sections to your existing entry point
215
320
  - **Preserves** all your existing conventions and rules
216
321
  - **Suggests** the Discovery workflow for systematic codebase understanding
217
322
 
218
- ### Supported runtimes
323
+ </details>
324
+
325
+ <details>
326
+ <summary><strong>Supported runtimes</strong></summary>
219
327
 
220
328
  | File | Runtime | Auto-loaded? |
221
329
  |------|---------|:------------:|
@@ -223,6 +331,10 @@ Works with existing codebases:
223
331
  | `.cursorrules` | Cursor | Yes |
224
332
  | `AGENT.md` | Any agent | No (paste or reference manually) |
225
333
 
334
+ </details>
335
+
336
+ ---
337
+
226
338
  ## Documentation
227
339
 
228
340
  | Document | Audience |
@@ -234,7 +346,7 @@ Works with existing codebases:
234
346
  | [Template kit](templates/README.md) | Template tiers, extensions, bootstrapping |
235
347
  | [Docs hub](docs/index.md) | Full architecture, workflow, and methodology docs |
236
348
 
237
- ## Prior art
349
+ ## Prior Art
238
350
 
239
351
  | System | Relationship |
240
352
  |--------|-------------|
package/lib/cli/check.js CHANGED
@@ -1,71 +1,71 @@
1
- /** wwa check — validate entry point and project setup. */
2
-
3
- import { dirname, resolve } from "node:path";
4
- import {
5
- findEntryPoint,
6
- resolveProjectType,
7
- getPipeline,
8
- loadRegistryData,
9
- } from "./helpers.js";
10
-
11
- export function register(program) {
12
- program
13
- .command("check [entry-point]")
14
- .description("Validate your entry point and project setup")
15
- .option(
16
- "-p, --project-type <type>",
17
- "Project type: code, context, data, mix, general (auto-detected if omitted)"
18
- )
19
- .option("--registry <path>", "Path to feature-registry.yaml")
20
- .option("--json", "Output as JSON")
21
- .action(async (entryPoint, opts) => {
22
- const { validateEntryPoint, detectProjectType } = await getPipeline();
23
- const reg = await loadRegistryData(opts.registry);
24
-
25
- if (!entryPoint) {
26
- entryPoint = findEntryPoint(".");
27
- if (!entryPoint) {
28
- console.error(
29
- "No entry point found in current directory " +
30
- "(looked for CLAUDE.md, .cursorrules, AGENT.md).\n" +
31
- "Specify a path: npx wwa check path/to/CLAUDE.md"
32
- );
33
- process.exit(1);
34
- }
35
- }
36
-
37
- let projectType;
38
- if (opts.projectType) {
39
- projectType = resolveProjectType(opts.projectType);
40
- } else {
41
- const detected = detectProjectType(dirname(resolve(entryPoint)));
42
- projectType = detected.project_type || "general";
43
- }
44
-
45
- const result = validateEntryPoint(entryPoint, projectType, reg);
46
- console.log(`Checking: ${entryPoint} (type: ${projectType})`);
47
-
48
- if (opts.json) {
49
- console.log(JSON.stringify(result, null, 2));
50
- } else {
51
- const overall = result.valid ? "PASS" : "FAIL";
52
- console.log(` Overall: ${overall}`);
53
- for (const [checkId, chk] of Object.entries(result.checks)) {
54
- const cStatus = chk.pass ? "PASS" : "FAIL";
55
- let extra = "";
56
- if (chk.missing && chk.missing.length > 0) {
57
- extra = ` (missing: ${chk.missing.join(", ")})`;
58
- }
59
- console.log(` ${checkId}: ${cStatus}${extra}`);
60
- }
61
- if (result.issues && result.issues.length > 0) {
62
- console.log("\n Issues:");
63
- for (const issue of result.issues) {
64
- console.log(
65
- ` [${issue.severity}] ${issue.check}: ${issue.description}`
66
- );
67
- }
68
- }
69
- }
70
- });
71
- }
1
+ /** wwa check — validate entry point and project setup. */
2
+
3
+ import { dirname, resolve } from "node:path";
4
+ import {
5
+ findEntryPoint,
6
+ resolveProjectType,
7
+ getPipeline,
8
+ loadRegistryData,
9
+ } from "./helpers.js";
10
+
11
+ export function register(program) {
12
+ program
13
+ .command("check [entry-point]")
14
+ .description("Validate your entry point and project setup")
15
+ .option(
16
+ "-p, --project-type <type>",
17
+ "Project type: code, context, data, mix, general (auto-detected if omitted)"
18
+ )
19
+ .option("--registry <path>", "Path to feature-registry.yaml")
20
+ .option("--json", "Output as JSON")
21
+ .action(async (entryPoint, opts) => {
22
+ const { validateEntryPoint, detectProjectType } = await getPipeline();
23
+ const reg = await loadRegistryData(opts.registry);
24
+
25
+ if (!entryPoint) {
26
+ entryPoint = findEntryPoint(".");
27
+ if (!entryPoint) {
28
+ console.error(
29
+ "No entry point found in current directory " +
30
+ "(looked for CLAUDE.md, .cursorrules, AGENT.md).\n" +
31
+ "Specify a path: npx agent-method check path/to/CLAUDE.md"
32
+ );
33
+ process.exit(1);
34
+ }
35
+ }
36
+
37
+ let projectType;
38
+ if (opts.projectType) {
39
+ projectType = resolveProjectType(opts.projectType);
40
+ } else {
41
+ const detected = detectProjectType(dirname(resolve(entryPoint)));
42
+ projectType = detected.project_type || "general";
43
+ }
44
+
45
+ const result = validateEntryPoint(entryPoint, projectType, reg);
46
+ console.log(`Checking: ${entryPoint} (type: ${projectType})`);
47
+
48
+ if (opts.json) {
49
+ console.log(JSON.stringify(result, null, 2));
50
+ } else {
51
+ const overall = result.valid ? "PASS" : "FAIL";
52
+ console.log(` Overall: ${overall}`);
53
+ for (const [checkId, chk] of Object.entries(result.checks)) {
54
+ const cStatus = chk.pass ? "PASS" : "FAIL";
55
+ let extra = "";
56
+ if (chk.missing && chk.missing.length > 0) {
57
+ extra = ` (missing: ${chk.missing.join(", ")})`;
58
+ }
59
+ console.log(` ${checkId}: ${cStatus}${extra}`);
60
+ }
61
+ if (result.issues && result.issues.length > 0) {
62
+ console.log("\n Issues:");
63
+ for (const issue of result.issues) {
64
+ console.log(
65
+ ` [${issue.severity}] ${issue.check}: ${issue.description}`
66
+ );
67
+ }
68
+ }
69
+ }
70
+ });
71
+ }