agent-method 1.5.0 → 1.5.1
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 +256 -256
- package/lib/cli/check.js +1 -1
- package/lib/cli/init.js +1 -1
- package/lib/cli/refine.js +1 -1
- package/lib/cli/scan.js +2 -2
- package/lib/cli/status.js +1 -1
- package/lib/cli/upgrade.js +1 -1
- package/lib/init.js +1 -1
- package/package.json +1 -1
- package/templates/README.md +293 -293
- package/templates/entry-points/.cursorrules +8 -8
- package/templates/entry-points/AGENT.md +8 -8
- package/templates/entry-points/CLAUDE.md +8 -8
- package/templates/full/.cursorrules +8 -8
- package/templates/full/AGENT.md +8 -8
- package/templates/full/CLAUDE.md +8 -8
- package/templates/starter/.cursorrules +8 -8
- package/templates/starter/AGENT.md +8 -8
- package/templates/starter/CLAUDE.md +8 -8
package/templates/README.md
CHANGED
|
@@ -1,293 +1,293 @@
|
|
|
1
|
-
# Template Kit
|
|
2
|
-
|
|
3
|
-
Copyable project templates. Pick one, copy it into your project root, fill in PROJECT.md, and start working with your AI agent.
|
|
4
|
-
|
|
5
|
-
## Starter template (minimum viable)
|
|
6
|
-
|
|
7
|
-
For most projects. Seven files that give you cross-session memory, scoped context loading, persistent codebase understanding, lifecycle tracking, and structured execution.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
starter/
|
|
11
|
-
CLAUDE.md # Claude Code entry point (auto-loaded)
|
|
12
|
-
.cursorrules # Cursor entry point (auto-loaded)
|
|
13
|
-
AGENT.md # Generic entry point (manual loading)
|
|
14
|
-
PROJECT.md # Your project vision -- fill this in first
|
|
15
|
-
PROJECT-PROFILE.md # Project type, lifecycle stage, active extensions (agent-maintained)
|
|
16
|
-
STATE.md # Decisions, blockers, current position
|
|
17
|
-
ROADMAP.md # Phase breakdown with gate criteria
|
|
18
|
-
PLAN.md # Current task with verification criteria
|
|
19
|
-
.context/
|
|
20
|
-
BASE.md # Core context -- always loaded with entry point
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**Setup**: Delete the two entry point files you don't use. Keep the one that matches your agent runtime.
|
|
24
|
-
|
|
25
|
-
**What you get**: Persistent decisions, scoped file reading, phase-gated execution, atomic task tracking, configurable interaction level, persistent codebase context.
|
|
26
|
-
|
|
27
|
-
**What you don't get**: Specialist context pairing, human-facing docs scaffold, execution history, full communication point structure.
|
|
28
|
-
|
|
29
|
-
## Full template (complete methodology)
|
|
30
|
-
|
|
31
|
-
For complex or multi-phase projects where context management and dual-audience separation matter.
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
full/
|
|
35
|
-
CLAUDE.md # Claude Code entry point (auto-loaded)
|
|
36
|
-
.cursorrules # Cursor entry point (auto-loaded)
|
|
37
|
-
AGENT.md # Generic entry point (manual loading)
|
|
38
|
-
PROJECT.md # Vision, audiences, structure
|
|
39
|
-
PROJECT-PROFILE.md # Project type, lifecycle, extensions (agent-maintained)
|
|
40
|
-
STATE.md # Decisions, blockers, position, open questions
|
|
41
|
-
REQUIREMENTS.md # Scoped features with phase traceability
|
|
42
|
-
ROADMAP.md # Phase breakdown with gate criteria
|
|
43
|
-
PLAN.md # Current atomic task
|
|
44
|
-
SUMMARY.md # Execution history (session audit trail)
|
|
45
|
-
.context/
|
|
46
|
-
BASE.md # Core context -- always loaded with entry point
|
|
47
|
-
docs/
|
|
48
|
-
index.md # Human-facing project dashboard (checkpoint records land here)
|
|
49
|
-
todos/
|
|
50
|
-
backlog.md # Captured ideas for future work
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Setup**: Delete the two entry point files you don't use. Keep the one that matches your agent runtime.
|
|
54
|
-
|
|
55
|
-
**What you get**: Everything in starter, plus specialist context pairing, dependency cascade, execution history, human dashboard scaffold, backlog capture, full communication point structure (direction, checkpoint, record).
|
|
56
|
-
|
|
57
|
-
## Template content: guided, not empty
|
|
58
|
-
|
|
59
|
-
Template files ship with **inline instructions** — structured prompts that show both the user and the agent what goes in each section. The agent can read these instructions and help populate the files.
|
|
60
|
-
|
|
61
|
-
Example from a guided PROJECT.md:
|
|
62
|
-
```markdown
|
|
63
|
-
# {Your Project Name}
|
|
64
|
-
|
|
65
|
-
<!-- INSTRUCTION: Replace with a 2-3 sentence description of your project -->
|
|
66
|
-
{Describe what your project does and who it's for}
|
|
67
|
-
|
|
68
|
-
## Problem
|
|
69
|
-
<!-- INSTRUCTION: What problem does this solve? 2-3 bullet points. -->
|
|
70
|
-
|
|
71
|
-
## Solution
|
|
72
|
-
<!-- INSTRUCTION: How does the project solve the problem? -->
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Example from a guided .context/BASE.md:
|
|
76
|
-
```markdown
|
|
77
|
-
# Base Context — Always Loaded
|
|
78
|
-
|
|
79
|
-
## What this system is
|
|
80
|
-
<!-- INSTRUCTION: 2-3 sentences describing your project's architecture -->
|
|
81
|
-
|
|
82
|
-
## Codebase map
|
|
83
|
-
<!-- INSTRUCTION: Table of directories, their purposes, and key patterns -->
|
|
84
|
-
<!-- The agent will help populate this from a codebase scan -->
|
|
85
|
-
| Path | Purpose | Key patterns |
|
|
86
|
-
|------|---------|-------------|
|
|
87
|
-
|
|
88
|
-
## Pairing protocol
|
|
89
|
-
| Task type | Pair BASE.md with |
|
|
90
|
-
|-----------|-------------------|
|
|
91
|
-
<!-- INSTRUCTION: Add rows as you create specialist .context/ files -->
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
The inline instructions serve as:
|
|
95
|
-
- **User guidance**: Human sees what to fill in
|
|
96
|
-
- **Agent prompts**: Agent reads the instructions and can help populate
|
|
97
|
-
- **Structure enforcement**: Files have the right sections from day one
|
|
98
|
-
|
|
99
|
-
## Bootstrapping: new project vs existing codebase
|
|
100
|
-
|
|
101
|
-
### Greenfield (starting from scratch)
|
|
102
|
-
|
|
103
|
-
1. Copy template into your project root
|
|
104
|
-
2. Delete the two entry point files you don't use
|
|
105
|
-
3. Fill in PROJECT.md with your project vision
|
|
106
|
-
4. Start a conversation — the agent helps populate .context/BASE.md as you build
|
|
107
|
-
|
|
108
|
-
### Brownfield (existing codebase)
|
|
109
|
-
|
|
110
|
-
1. Copy template into your existing project root
|
|
111
|
-
2. Delete the two entry point files you don't use
|
|
112
|
-
3. Fill in PROJECT.md with your project vision
|
|
113
|
-
4. Ask the agent: "Scan the codebase and populate the context files"
|
|
114
|
-
5. Agent activates the **Discovery workflow (WF-08)**:
|
|
115
|
-
- **Inventory**: Walks entire project structure, maps directories and files
|
|
116
|
-
- **Map**: Traces dependencies (packages, imports, services)
|
|
117
|
-
- **Extract**: Identifies patterns, conventions, and architectural decisions
|
|
118
|
-
- **Assess**: Evaluates technical debt, risks, and improvement opportunities
|
|
119
|
-
- **Bootstrap**: Writes .context/BASE.md, proposes specialists, updates scoping table
|
|
120
|
-
6. Agent updates PROJECT-PROFILE.md lifecycle stage to "discovery"
|
|
121
|
-
7. You approve specialist files; agent transitions lifecycle to "development" when ready
|
|
122
|
-
|
|
123
|
-
### Integration profiles
|
|
124
|
-
|
|
125
|
-
Both templates support three integration profiles that control how much methodology surface area gets installed. This is critical for brownfield projects and lighter models.
|
|
126
|
-
|
|
127
|
-
| Profile | Target model | What's installed | Entry point budget |
|
|
128
|
-
|---------|-------------|-----------------|-------------------|
|
|
129
|
-
| **Lite** | Haiku, GPT-3.5 | STATE.md + .context/METHODOLOGY.md | 25 lines |
|
|
130
|
-
| **Standard** | Sonnet, GPT-4 | STATE.md, PLAN.md, .context/BASE.md, .context/METHODOLOGY.md | 40 lines |
|
|
131
|
-
| **Full** | Opus, o1 | All intelligence layer files | 60 lines |
|
|
132
|
-
|
|
133
|
-
For lite and standard profiles, operational details (workflows, extended conventions, do-not rules) overflow to `.context/METHODOLOGY.md` — loaded on-demand via the scoping table, not every session. This keeps the entry point lean enough for lighter models to process reliably.
|
|
134
|
-
|
|
135
|
-
When setup.sh detects an existing entry point file, it uses the **brownfield merge protocol**: methodology content is appended to the existing file rather than overwriting it.
|
|
136
|
-
|
|
137
|
-
See `docs/architecture/integration-profiles.md` for the full specification.
|
|
138
|
-
|
|
139
|
-
### Interaction level (in entry point)
|
|
140
|
-
|
|
141
|
-
Both templates include an interaction level setting in the entry point:
|
|
142
|
-
|
|
143
|
-
```markdown
|
|
144
|
-
## Interaction level
|
|
145
|
-
mode: checkpoint # autonomous | checkpoint | collaborative | supervised
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
| Level | Agent behavior |
|
|
149
|
-
|-------|---------------|
|
|
150
|
-
| **autonomous** | Executes full plan, reports at completion |
|
|
151
|
-
| **checkpoint** | Proposes plan, executes after approval, reports at completion |
|
|
152
|
-
| **collaborative** | Back-and-forth at each step |
|
|
153
|
-
| **supervised** | Explains intent before every file change |
|
|
154
|
-
|
|
155
|
-
## Entry points (all three included)
|
|
156
|
-
|
|
157
|
-
Both templates ship with all three entry point variants. Pick the one that matches your runtime and delete the others:
|
|
158
|
-
|
|
159
|
-
| File | Runtime | Auto-loaded? |
|
|
160
|
-
|------|---------|:------------:|
|
|
161
|
-
| `CLAUDE.md` | Claude Code | Yes |
|
|
162
|
-
| `.cursorrules` | Cursor | Yes |
|
|
163
|
-
| `AGENT.md` | Any agent (manual loading) | No |
|
|
164
|
-
|
|
165
|
-
All three contain identical scoping rules, cascade structure, and conventions — only the filename and auto-loading behavior differ.
|
|
166
|
-
|
|
167
|
-
Standalone entry point files are also available in `entry-points/` for reference or individual use.
|
|
168
|
-
|
|
169
|
-
## Project-type extensions
|
|
170
|
-
|
|
171
|
-
The starter and full templates ship with **universal** scoping rules, cascade rules, and workflows that work for any project. For project-type-specific capabilities, apply an extension.
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
extensions/
|
|
175
|
-
MANIFEST.md # Extension composition rules, compatibility matrix
|
|
176
|
-
code-project.md # Code-specific: scoping, cascade, WF-02, specialists
|
|
177
|
-
data-exploration.md # Data-specific: exploration commands, WF-05, specialists
|
|
178
|
-
analytical-system.md # Analytical-specific: chain work, evaluation, WF-06, specialists
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### How to apply an extension
|
|
182
|
-
|
|
183
|
-
1. Open the extension file (e.g., `extensions/code-project.md`)
|
|
184
|
-
2. Copy each section's rows into the corresponding section of your entry point
|
|
185
|
-
3. Create the recommended specialist .context/ files as your project grows
|
|
186
|
-
4. Delete the extension file — it's a reference, not a runtime artifact
|
|
187
|
-
|
|
188
|
-
### Extensions are additive
|
|
189
|
-
|
|
190
|
-
Extensions add rows to existing tables — they never override universal content. You can apply multiple extensions for projects that span types:
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
Base entry point (universal)
|
|
194
|
-
+ code-project.md (code scoping, cascade, WF-02)
|
|
195
|
-
+ data-exploration.md (exploration scoping, cascade, WF-05)
|
|
196
|
-
+ analytical-system.md (chain/evaluation scoping, cascade, WF-06)
|
|
197
|
-
= Mixed project entry point (any combination)
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Registry-driven derivation
|
|
201
|
-
|
|
202
|
-
Extensions are derived from the feature registry (`docs/internal/feature-registry.yaml`). Each extension's scoping rules trace to registry `query_patterns`, cascade rules trace to registry `dependencies`, and workflows trace to registry `workflows`. See `docs/internal/entry-point-derivation.md` for the derivation specification.
|
|
203
|
-
|
|
204
|
-
## What the entry point embeds
|
|
205
|
-
|
|
206
|
-
The entry point distills the methodology's behavioral protocol into a dense, table-driven file:
|
|
207
|
-
|
|
208
|
-
- **Scoping rules** — Query-type-to-file mapping. The agent reads the table, loads the right files, and constrains writes. Derived from the 4 universal query types plus project-specific types.
|
|
209
|
-
- **Cascade table** — "When X changes, also update Y." Prevents file drift by making dependencies explicit. The agent checks this after every change.
|
|
210
|
-
- **Workflow selection** — Eight guided workflows: general task (WF-01), code change (WF-02), context refresh (WF-03), bootstrap (WF-04), data exploration (WF-05), analytical system (WF-06), specification project (WF-07), discovery (WF-08). The agent selects based on query type, project type, and lifecycle stage.
|
|
211
|
-
- **Conventions** — Six behavioral rules derived from the agent protocol directives: record decisions immediately, scope to avoid drowning, cascade is not optional, build understanding not just code, surface uncertainty, human controls direction.
|
|
212
|
-
- **Interaction level** — Configurable checkpoint density from autonomous to supervised.
|
|
213
|
-
|
|
214
|
-
An agent reading the entry point can follow the full behavioral protocol without accessing any other methodology documentation.
|
|
215
|
-
|
|
216
|
-
## Context maintenance
|
|
217
|
-
|
|
218
|
-
Context files are living documents. As your project evolves, the agent keeps them current:
|
|
219
|
-
|
|
220
|
-
- **Code changes** → Agent updates .context/BASE.md codebase map via cascade
|
|
221
|
-
- **New domain areas** → Agent suggests creating specialist .context/ files
|
|
222
|
-
- **Architecture decisions** → Agent records them in relevant .context/ files
|
|
223
|
-
- **Context drift** → Ask the agent "refresh the project context" to resync
|
|
224
|
-
|
|
225
|
-
See `docs/architecture/context-pairing.md` for the full context maintenance lifecycle.
|
|
226
|
-
|
|
227
|
-
## How to use
|
|
228
|
-
|
|
229
|
-
### Recommended: npx
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
npx agent-method init code ~/my-project
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Replace `code` with: `context`, `data`, `mix`, or `general`.
|
|
236
|
-
|
|
237
|
-
### Manual
|
|
238
|
-
|
|
239
|
-
1. Copy `starter/` or `full/` into your project root
|
|
240
|
-
2. Delete the two entry point files you don't use
|
|
241
|
-
3. Fill in `PROJECT.md` with your project vision
|
|
242
|
-
4. Start a conversation with your agent — it reads the entry point and knows what to do
|
|
243
|
-
5. For existing codebases: ask the agent to scan and populate context files
|
|
244
|
-
|
|
245
|
-
See `docs/guides/quick-start.md` for a detailed walkthrough.
|
|
246
|
-
|
|
247
|
-
## CLI Tools (optional)
|
|
248
|
-
|
|
249
|
-
The methodology works without any tooling. For teams that want additional validation and automation:
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
npx agent-method # zero-install (Node.js 18+)
|
|
253
|
-
npm install -g agent-method # permanent install
|
|
254
|
-
pip install agent-method-tools # Python alternative
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### Developer commands
|
|
258
|
-
|
|
259
|
-
| Command | Use case |
|
|
260
|
-
|---------|----------|
|
|
261
|
-
| `agent-method check` | Validate entry point (auto-finds CLAUDE.md/.cursorrules/AGENT.md) |
|
|
262
|
-
| `agent-method scan` | Detect project type from directory contents |
|
|
263
|
-
| `agent-method route "<query>"` | Test how a query routes through the pipeline |
|
|
264
|
-
| `agent-method refine` | Extract refinement report (auto-finds SESSION-LOG.md) |
|
|
265
|
-
| `agent-method status` | Check if methodology version is current |
|
|
266
|
-
| `agent-method upgrade` | Brownfield-safe update (adds missing files, updates version) |
|
|
267
|
-
| `agent-method init <type>` | Describe entry point contents for a project type |
|
|
268
|
-
|
|
269
|
-
### Project types
|
|
270
|
-
|
|
271
|
-
Use friendly names everywhere — all commands accept aliases:
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
agent-method init code # software project
|
|
275
|
-
agent-method init context # analytical/prompt project (e.g. PromptStudy)
|
|
276
|
-
agent-method init data # data index/querying project (e.g. SysMLv2)
|
|
277
|
-
agent-method init mix # multi-type project
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Advanced: pipeline subcommands
|
|
281
|
-
|
|
282
|
-
For debugging routing logic: `agent-method pipeline classify|select|resolve|cascade|test`.
|
|
283
|
-
|
|
284
|
-
### Dependencies
|
|
285
|
-
|
|
286
|
-
- Python 3.9+
|
|
287
|
-
- PyYAML >= 6.0
|
|
288
|
-
- Click >= 8.0
|
|
289
|
-
|
|
290
|
-
### Future enhancements
|
|
291
|
-
|
|
292
|
-
- MCP server: `pip install agent-method-tools[mcp]` — exposes pipeline as agent-callable tools
|
|
293
|
-
- Registry watcher: `pip install agent-method-tools[watch]` — proactive validation on file changes
|
|
1
|
+
# Template Kit
|
|
2
|
+
|
|
3
|
+
Copyable project templates. Pick one, copy it into your project root, fill in PROJECT.md, and start working with your AI agent.
|
|
4
|
+
|
|
5
|
+
## Starter template (minimum viable)
|
|
6
|
+
|
|
7
|
+
For most projects. Seven files that give you cross-session memory, scoped context loading, persistent codebase understanding, lifecycle tracking, and structured execution.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
starter/
|
|
11
|
+
CLAUDE.md # Claude Code entry point (auto-loaded)
|
|
12
|
+
.cursorrules # Cursor entry point (auto-loaded)
|
|
13
|
+
AGENT.md # Generic entry point (manual loading)
|
|
14
|
+
PROJECT.md # Your project vision -- fill this in first
|
|
15
|
+
PROJECT-PROFILE.md # Project type, lifecycle stage, active extensions (agent-maintained)
|
|
16
|
+
STATE.md # Decisions, blockers, current position
|
|
17
|
+
ROADMAP.md # Phase breakdown with gate criteria
|
|
18
|
+
PLAN.md # Current task with verification criteria
|
|
19
|
+
.context/
|
|
20
|
+
BASE.md # Core context -- always loaded with entry point
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Setup**: Delete the two entry point files you don't use. Keep the one that matches your agent runtime.
|
|
24
|
+
|
|
25
|
+
**What you get**: Persistent decisions, scoped file reading, phase-gated execution, atomic task tracking, configurable interaction level, persistent codebase context.
|
|
26
|
+
|
|
27
|
+
**What you don't get**: Specialist context pairing, human-facing docs scaffold, execution history, full communication point structure.
|
|
28
|
+
|
|
29
|
+
## Full template (complete methodology)
|
|
30
|
+
|
|
31
|
+
For complex or multi-phase projects where context management and dual-audience separation matter.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
full/
|
|
35
|
+
CLAUDE.md # Claude Code entry point (auto-loaded)
|
|
36
|
+
.cursorrules # Cursor entry point (auto-loaded)
|
|
37
|
+
AGENT.md # Generic entry point (manual loading)
|
|
38
|
+
PROJECT.md # Vision, audiences, structure
|
|
39
|
+
PROJECT-PROFILE.md # Project type, lifecycle, extensions (agent-maintained)
|
|
40
|
+
STATE.md # Decisions, blockers, position, open questions
|
|
41
|
+
REQUIREMENTS.md # Scoped features with phase traceability
|
|
42
|
+
ROADMAP.md # Phase breakdown with gate criteria
|
|
43
|
+
PLAN.md # Current atomic task
|
|
44
|
+
SUMMARY.md # Execution history (session audit trail)
|
|
45
|
+
.context/
|
|
46
|
+
BASE.md # Core context -- always loaded with entry point
|
|
47
|
+
docs/
|
|
48
|
+
index.md # Human-facing project dashboard (checkpoint records land here)
|
|
49
|
+
todos/
|
|
50
|
+
backlog.md # Captured ideas for future work
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Setup**: Delete the two entry point files you don't use. Keep the one that matches your agent runtime.
|
|
54
|
+
|
|
55
|
+
**What you get**: Everything in starter, plus specialist context pairing, dependency cascade, execution history, human dashboard scaffold, backlog capture, full communication point structure (direction, checkpoint, record).
|
|
56
|
+
|
|
57
|
+
## Template content: guided, not empty
|
|
58
|
+
|
|
59
|
+
Template files ship with **inline instructions** — structured prompts that show both the user and the agent what goes in each section. The agent can read these instructions and help populate the files.
|
|
60
|
+
|
|
61
|
+
Example from a guided PROJECT.md:
|
|
62
|
+
```markdown
|
|
63
|
+
# {Your Project Name}
|
|
64
|
+
|
|
65
|
+
<!-- INSTRUCTION: Replace with a 2-3 sentence description of your project -->
|
|
66
|
+
{Describe what your project does and who it's for}
|
|
67
|
+
|
|
68
|
+
## Problem
|
|
69
|
+
<!-- INSTRUCTION: What problem does this solve? 2-3 bullet points. -->
|
|
70
|
+
|
|
71
|
+
## Solution
|
|
72
|
+
<!-- INSTRUCTION: How does the project solve the problem? -->
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Example from a guided .context/BASE.md:
|
|
76
|
+
```markdown
|
|
77
|
+
# Base Context — Always Loaded
|
|
78
|
+
|
|
79
|
+
## What this system is
|
|
80
|
+
<!-- INSTRUCTION: 2-3 sentences describing your project's architecture -->
|
|
81
|
+
|
|
82
|
+
## Codebase map
|
|
83
|
+
<!-- INSTRUCTION: Table of directories, their purposes, and key patterns -->
|
|
84
|
+
<!-- The agent will help populate this from a codebase scan -->
|
|
85
|
+
| Path | Purpose | Key patterns |
|
|
86
|
+
|------|---------|-------------|
|
|
87
|
+
|
|
88
|
+
## Pairing protocol
|
|
89
|
+
| Task type | Pair BASE.md with |
|
|
90
|
+
|-----------|-------------------|
|
|
91
|
+
<!-- INSTRUCTION: Add rows as you create specialist .context/ files -->
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The inline instructions serve as:
|
|
95
|
+
- **User guidance**: Human sees what to fill in
|
|
96
|
+
- **Agent prompts**: Agent reads the instructions and can help populate
|
|
97
|
+
- **Structure enforcement**: Files have the right sections from day one
|
|
98
|
+
|
|
99
|
+
## Bootstrapping: new project vs existing codebase
|
|
100
|
+
|
|
101
|
+
### Greenfield (starting from scratch)
|
|
102
|
+
|
|
103
|
+
1. Copy template into your project root
|
|
104
|
+
2. Delete the two entry point files you don't use
|
|
105
|
+
3. Fill in PROJECT.md with your project vision
|
|
106
|
+
4. Start a conversation — the agent helps populate .context/BASE.md as you build
|
|
107
|
+
|
|
108
|
+
### Brownfield (existing codebase)
|
|
109
|
+
|
|
110
|
+
1. Copy template into your existing project root
|
|
111
|
+
2. Delete the two entry point files you don't use
|
|
112
|
+
3. Fill in PROJECT.md with your project vision
|
|
113
|
+
4. Ask the agent: "Scan the codebase and populate the context files"
|
|
114
|
+
5. Agent activates the **Discovery workflow (WF-08)**:
|
|
115
|
+
- **Inventory**: Walks entire project structure, maps directories and files
|
|
116
|
+
- **Map**: Traces dependencies (packages, imports, services)
|
|
117
|
+
- **Extract**: Identifies patterns, conventions, and architectural decisions
|
|
118
|
+
- **Assess**: Evaluates technical debt, risks, and improvement opportunities
|
|
119
|
+
- **Bootstrap**: Writes .context/BASE.md, proposes specialists, updates scoping table
|
|
120
|
+
6. Agent updates PROJECT-PROFILE.md lifecycle stage to "discovery"
|
|
121
|
+
7. You approve specialist files; agent transitions lifecycle to "development" when ready
|
|
122
|
+
|
|
123
|
+
### Integration profiles
|
|
124
|
+
|
|
125
|
+
Both templates support three integration profiles that control how much methodology surface area gets installed. This is critical for brownfield projects and lighter models.
|
|
126
|
+
|
|
127
|
+
| Profile | Target model | What's installed | Entry point budget |
|
|
128
|
+
|---------|-------------|-----------------|-------------------|
|
|
129
|
+
| **Lite** | Haiku, GPT-3.5 | STATE.md + .context/METHODOLOGY.md | 25 lines |
|
|
130
|
+
| **Standard** | Sonnet, GPT-4 | STATE.md, PLAN.md, .context/BASE.md, .context/METHODOLOGY.md | 40 lines |
|
|
131
|
+
| **Full** | Opus, o1 | All intelligence layer files | 60 lines |
|
|
132
|
+
|
|
133
|
+
For lite and standard profiles, operational details (workflows, extended conventions, do-not rules) overflow to `.context/METHODOLOGY.md` — loaded on-demand via the scoping table, not every session. This keeps the entry point lean enough for lighter models to process reliably.
|
|
134
|
+
|
|
135
|
+
When setup.sh detects an existing entry point file, it uses the **brownfield merge protocol**: methodology content is appended to the existing file rather than overwriting it.
|
|
136
|
+
|
|
137
|
+
See `docs/architecture/integration-profiles.md` for the full specification.
|
|
138
|
+
|
|
139
|
+
### Interaction level (in entry point)
|
|
140
|
+
|
|
141
|
+
Both templates include an interaction level setting in the entry point:
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
## Interaction level
|
|
145
|
+
mode: checkpoint # autonomous | checkpoint | collaborative | supervised
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
| Level | Agent behavior |
|
|
149
|
+
|-------|---------------|
|
|
150
|
+
| **autonomous** | Executes full plan, reports at completion |
|
|
151
|
+
| **checkpoint** | Proposes plan, executes after approval, reports at completion |
|
|
152
|
+
| **collaborative** | Back-and-forth at each step |
|
|
153
|
+
| **supervised** | Explains intent before every file change |
|
|
154
|
+
|
|
155
|
+
## Entry points (all three included)
|
|
156
|
+
|
|
157
|
+
Both templates ship with all three entry point variants. Pick the one that matches your runtime and delete the others:
|
|
158
|
+
|
|
159
|
+
| File | Runtime | Auto-loaded? |
|
|
160
|
+
|------|---------|:------------:|
|
|
161
|
+
| `CLAUDE.md` | Claude Code | Yes |
|
|
162
|
+
| `.cursorrules` | Cursor | Yes |
|
|
163
|
+
| `AGENT.md` | Any agent (manual loading) | No |
|
|
164
|
+
|
|
165
|
+
All three contain identical scoping rules, cascade structure, and conventions — only the filename and auto-loading behavior differ.
|
|
166
|
+
|
|
167
|
+
Standalone entry point files are also available in `entry-points/` for reference or individual use.
|
|
168
|
+
|
|
169
|
+
## Project-type extensions
|
|
170
|
+
|
|
171
|
+
The starter and full templates ship with **universal** scoping rules, cascade rules, and workflows that work for any project. For project-type-specific capabilities, apply an extension.
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
extensions/
|
|
175
|
+
MANIFEST.md # Extension composition rules, compatibility matrix
|
|
176
|
+
code-project.md # Code-specific: scoping, cascade, WF-02, specialists
|
|
177
|
+
data-exploration.md # Data-specific: exploration commands, WF-05, specialists
|
|
178
|
+
analytical-system.md # Analytical-specific: chain work, evaluation, WF-06, specialists
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### How to apply an extension
|
|
182
|
+
|
|
183
|
+
1. Open the extension file (e.g., `extensions/code-project.md`)
|
|
184
|
+
2. Copy each section's rows into the corresponding section of your entry point
|
|
185
|
+
3. Create the recommended specialist .context/ files as your project grows
|
|
186
|
+
4. Delete the extension file — it's a reference, not a runtime artifact
|
|
187
|
+
|
|
188
|
+
### Extensions are additive
|
|
189
|
+
|
|
190
|
+
Extensions add rows to existing tables — they never override universal content. You can apply multiple extensions for projects that span types:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
Base entry point (universal)
|
|
194
|
+
+ code-project.md (code scoping, cascade, WF-02)
|
|
195
|
+
+ data-exploration.md (exploration scoping, cascade, WF-05)
|
|
196
|
+
+ analytical-system.md (chain/evaluation scoping, cascade, WF-06)
|
|
197
|
+
= Mixed project entry point (any combination)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Registry-driven derivation
|
|
201
|
+
|
|
202
|
+
Extensions are derived from the feature registry (`docs/internal/feature-registry.yaml`). Each extension's scoping rules trace to registry `query_patterns`, cascade rules trace to registry `dependencies`, and workflows trace to registry `workflows`. See `docs/internal/entry-point-derivation.md` for the derivation specification.
|
|
203
|
+
|
|
204
|
+
## What the entry point embeds
|
|
205
|
+
|
|
206
|
+
The entry point distills the methodology's behavioral protocol into a dense, table-driven file:
|
|
207
|
+
|
|
208
|
+
- **Scoping rules** — Query-type-to-file mapping. The agent reads the table, loads the right files, and constrains writes. Derived from the 4 universal query types plus project-specific types.
|
|
209
|
+
- **Cascade table** — "When X changes, also update Y." Prevents file drift by making dependencies explicit. The agent checks this after every change.
|
|
210
|
+
- **Workflow selection** — Eight guided workflows: general task (WF-01), code change (WF-02), context refresh (WF-03), bootstrap (WF-04), data exploration (WF-05), analytical system (WF-06), specification project (WF-07), discovery (WF-08). The agent selects based on query type, project type, and lifecycle stage.
|
|
211
|
+
- **Conventions** — Six behavioral rules derived from the agent protocol directives: record decisions immediately, scope to avoid drowning, cascade is not optional, build understanding not just code, surface uncertainty, human controls direction.
|
|
212
|
+
- **Interaction level** — Configurable checkpoint density from autonomous to supervised.
|
|
213
|
+
|
|
214
|
+
An agent reading the entry point can follow the full behavioral protocol without accessing any other methodology documentation.
|
|
215
|
+
|
|
216
|
+
## Context maintenance
|
|
217
|
+
|
|
218
|
+
Context files are living documents. As your project evolves, the agent keeps them current:
|
|
219
|
+
|
|
220
|
+
- **Code changes** → Agent updates .context/BASE.md codebase map via cascade
|
|
221
|
+
- **New domain areas** → Agent suggests creating specialist .context/ files
|
|
222
|
+
- **Architecture decisions** → Agent records them in relevant .context/ files
|
|
223
|
+
- **Context drift** → Ask the agent "refresh the project context" to resync
|
|
224
|
+
|
|
225
|
+
See `docs/architecture/context-pairing.md` for the full context maintenance lifecycle.
|
|
226
|
+
|
|
227
|
+
## How to use
|
|
228
|
+
|
|
229
|
+
### Recommended: npx
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
npx agent-method init code ~/my-project
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Replace `code` with: `context`, `data`, `mix`, or `general`.
|
|
236
|
+
|
|
237
|
+
### Manual
|
|
238
|
+
|
|
239
|
+
1. Copy `starter/` or `full/` into your project root
|
|
240
|
+
2. Delete the two entry point files you don't use
|
|
241
|
+
3. Fill in `PROJECT.md` with your project vision
|
|
242
|
+
4. Start a conversation with your agent — it reads the entry point and knows what to do
|
|
243
|
+
5. For existing codebases: ask the agent to scan and populate context files
|
|
244
|
+
|
|
245
|
+
See `docs/guides/quick-start.md` for a detailed walkthrough.
|
|
246
|
+
|
|
247
|
+
## CLI Tools (optional)
|
|
248
|
+
|
|
249
|
+
The methodology works without any tooling. For teams that want additional validation and automation:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
npx agent-method # zero-install (Node.js 18+)
|
|
253
|
+
npm install -g agent-method # permanent install
|
|
254
|
+
pip install agent-method-tools # Python alternative
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Developer commands
|
|
258
|
+
|
|
259
|
+
| Command | Use case |
|
|
260
|
+
|---------|----------|
|
|
261
|
+
| `npx agent-method check` | Validate entry point (auto-finds CLAUDE.md/.cursorrules/AGENT.md) |
|
|
262
|
+
| `npx agent-method scan` | Detect project type from directory contents |
|
|
263
|
+
| `npx agent-method route "<query>"` | Test how a query routes through the pipeline |
|
|
264
|
+
| `npx agent-method refine` | Extract refinement report (auto-finds SESSION-LOG.md) |
|
|
265
|
+
| `npx agent-method status` | Check if methodology version is current |
|
|
266
|
+
| `npx agent-method upgrade` | Brownfield-safe update (adds missing files, updates version) |
|
|
267
|
+
| `npx agent-method init <type>` | Describe entry point contents for a project type |
|
|
268
|
+
|
|
269
|
+
### Project types
|
|
270
|
+
|
|
271
|
+
Use friendly names everywhere — all commands accept aliases:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
agent-method init code # software project
|
|
275
|
+
agent-method init context # analytical/prompt project (e.g. PromptStudy)
|
|
276
|
+
agent-method init data # data index/querying project (e.g. SysMLv2)
|
|
277
|
+
agent-method init mix # multi-type project
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Advanced: pipeline subcommands
|
|
281
|
+
|
|
282
|
+
For debugging routing logic: `npx agent-method pipeline classify|select|resolve|cascade|test`.
|
|
283
|
+
|
|
284
|
+
### Dependencies
|
|
285
|
+
|
|
286
|
+
- Python 3.9+
|
|
287
|
+
- PyYAML >= 6.0
|
|
288
|
+
- Click >= 8.0
|
|
289
|
+
|
|
290
|
+
### Future enhancements
|
|
291
|
+
|
|
292
|
+
- MCP server: `pip install agent-method-tools[mcp]` — exposes pipeline as agent-callable tools
|
|
293
|
+
- Registry watcher: `pip install agent-method-tools[watch]` — proactive validation on file changes
|
|
@@ -66,7 +66,7 @@ tier: standard
|
|
|
66
66
|
|
|
67
67
|
method_version: 1.5
|
|
68
68
|
<!-- Tracks which methodology version generated this entry point -->
|
|
69
|
-
<!-- Use `agent-method status` to compare against latest -->
|
|
69
|
+
<!-- Use `npx agent-method status` to compare against latest -->
|
|
70
70
|
|
|
71
71
|
## CLI tools (optional)
|
|
72
72
|
|
|
@@ -74,13 +74,13 @@ Available via `npx agent-method` (zero-install) or `pip install agent-method-too
|
|
|
74
74
|
|
|
75
75
|
| When you want to... | Run |
|
|
76
76
|
|---------------------|-----|
|
|
77
|
-
| Validate this entry point | `agent-method check` |
|
|
78
|
-
| See what type of project this is | `agent-method scan` |
|
|
79
|
-
| Test how a query routes | `agent-method route "your question"` |
|
|
80
|
-
| Extract a refinement report | `agent-method refine` |
|
|
81
|
-
| Check methodology version | `agent-method status` |
|
|
82
|
-
| Update methodology files | `agent-method upgrade` |
|
|
83
|
-
| See what an entry point should contain | `agent-method init code` / `context` / `data` / `mix` |
|
|
77
|
+
| Validate this entry point | `npx agent-method check` |
|
|
78
|
+
| See what type of project this is | `npx agent-method scan` |
|
|
79
|
+
| Test how a query routes | `npx agent-method route "your question"` |
|
|
80
|
+
| Extract a refinement report | `npx agent-method refine` |
|
|
81
|
+
| Check methodology version | `npx agent-method status` |
|
|
82
|
+
| Update methodology files | `npx agent-method upgrade` |
|
|
83
|
+
| See what an entry point should contain | `npx agent-method init code` / `context` / `data` / `mix` |
|
|
84
84
|
|
|
85
85
|
<!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
|
|
86
86
|
project setup, or methodology updates. All commands auto-detect project type and find
|
|
@@ -66,7 +66,7 @@ tier: standard
|
|
|
66
66
|
|
|
67
67
|
method_version: 1.5
|
|
68
68
|
<!-- Tracks which methodology version generated this entry point -->
|
|
69
|
-
<!-- Use `agent-method status` to compare against latest -->
|
|
69
|
+
<!-- Use `npx agent-method status` to compare against latest -->
|
|
70
70
|
|
|
71
71
|
## CLI tools (optional)
|
|
72
72
|
|
|
@@ -74,13 +74,13 @@ Available via `npx agent-method` (zero-install) or `pip install agent-method-too
|
|
|
74
74
|
|
|
75
75
|
| When you want to... | Run |
|
|
76
76
|
|---------------------|-----|
|
|
77
|
-
| Validate this entry point | `agent-method check` |
|
|
78
|
-
| See what type of project this is | `agent-method scan` |
|
|
79
|
-
| Test how a query routes | `agent-method route "your question"` |
|
|
80
|
-
| Extract a refinement report | `agent-method refine` |
|
|
81
|
-
| Check methodology version | `agent-method status` |
|
|
82
|
-
| Update methodology files | `agent-method upgrade` |
|
|
83
|
-
| See what an entry point should contain | `agent-method init code` / `context` / `data` / `mix` |
|
|
77
|
+
| Validate this entry point | `npx agent-method check` |
|
|
78
|
+
| See what type of project this is | `npx agent-method scan` |
|
|
79
|
+
| Test how a query routes | `npx agent-method route "your question"` |
|
|
80
|
+
| Extract a refinement report | `npx agent-method refine` |
|
|
81
|
+
| Check methodology version | `npx agent-method status` |
|
|
82
|
+
| Update methodology files | `npx agent-method upgrade` |
|
|
83
|
+
| See what an entry point should contain | `npx agent-method init code` / `context` / `data` / `mix` |
|
|
84
84
|
|
|
85
85
|
<!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
|
|
86
86
|
project setup, or methodology updates. All commands auto-detect project type and find
|