agent-method 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +256 -0
  2. package/bin/agent-method.js +58 -0
  3. package/docs/internal/feature-registry.yaml +1532 -0
  4. package/lib/cli/check.js +71 -0
  5. package/lib/cli/helpers.js +151 -0
  6. package/lib/cli/init.js +60 -0
  7. package/lib/cli/pipeline.js +163 -0
  8. package/lib/cli/refine.js +202 -0
  9. package/lib/cli/route.js +62 -0
  10. package/lib/cli/scan.js +28 -0
  11. package/lib/cli/status.js +61 -0
  12. package/lib/cli/upgrade.js +146 -0
  13. package/lib/init.js +240 -0
  14. package/lib/pipeline.js +887 -0
  15. package/lib/registry.js +108 -0
  16. package/package.json +39 -0
  17. package/templates/README.md +293 -0
  18. package/templates/entry-points/.cursorrules +109 -0
  19. package/templates/entry-points/AGENT.md +109 -0
  20. package/templates/entry-points/CLAUDE.md +109 -0
  21. package/templates/extensions/MANIFEST.md +110 -0
  22. package/templates/extensions/analytical-system.md +96 -0
  23. package/templates/extensions/code-project.md +77 -0
  24. package/templates/extensions/data-exploration.md +117 -0
  25. package/templates/full/.context/BASE.md +68 -0
  26. package/templates/full/.context/COMPOSITION.md +47 -0
  27. package/templates/full/.context/METHODOLOGY.md +84 -0
  28. package/templates/full/.context/REGISTRY.md +75 -0
  29. package/templates/full/.cursorrules +128 -0
  30. package/templates/full/AGENT.md +128 -0
  31. package/templates/full/CLAUDE.md +128 -0
  32. package/templates/full/PLAN.md +67 -0
  33. package/templates/full/PROJECT-PROFILE.md +61 -0
  34. package/templates/full/PROJECT.md +46 -0
  35. package/templates/full/REQUIREMENTS.md +30 -0
  36. package/templates/full/ROADMAP.md +39 -0
  37. package/templates/full/SESSION-LOG.md +41 -0
  38. package/templates/full/STATE.md +42 -0
  39. package/templates/full/SUMMARY.md +24 -0
  40. package/templates/full/docs/index.md +46 -0
  41. package/templates/full/todos/backlog.md +19 -0
  42. package/templates/starter/.context/BASE.md +66 -0
  43. package/templates/starter/.context/METHODOLOGY.md +70 -0
  44. package/templates/starter/.cursorrules +113 -0
  45. package/templates/starter/AGENT.md +113 -0
  46. package/templates/starter/CLAUDE.md +113 -0
  47. package/templates/starter/PLAN.md +67 -0
  48. package/templates/starter/PROJECT-PROFILE.md +44 -0
  49. package/templates/starter/PROJECT.md +46 -0
  50. package/templates/starter/ROADMAP.md +39 -0
  51. package/templates/starter/SESSION-LOG.md +41 -0
  52. package/templates/starter/STATE.md +42 -0
@@ -0,0 +1,84 @@
1
+ # Methodology Reference
2
+
3
+ Pair with: entry point (CLAUDE.md / .cursorrules / AGENT.md)
4
+ Use when: agent needs operational guidance beyond entry point rules
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. For full profile projects, this file serves as a reference but the entry point contains all rules directly.
7
+
8
+ ## Workflows
9
+
10
+ Select based on query type:
11
+ - **General task** — Review, Plan, Implement, Document, Update
12
+ - **Code change** — Review, Plan, Implement, Context-sync, Update
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
16
+
17
+ ## Interaction level
18
+
19
+ The entry point's `mode` setting controls checkpoint density:
20
+
21
+ | Level | Behavior |
22
+ |-------|----------|
23
+ | autonomous | Execute full plan, report at completion |
24
+ | checkpoint | Propose plan, wait for approval, report at completion (default) |
25
+ | collaborative | Back-and-forth at each step |
26
+ | supervised | Explain intent before every file change |
27
+
28
+ ## Extended conventions
29
+
30
+ These conventions supplement the core set in the entry point:
31
+ - Every code change is also a context change — update the codebase map
32
+ - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
33
+ - SUMMARY.md entries follow audit trail format: date, plan, outcome, files, decisions, next
34
+
35
+ ## Safety invariants
36
+
37
+ These rules are absolute — they hold regardless of profile, project type, or lifecycle stage:
38
+
39
+ - **Never modify project source code** through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
40
+ - **Never delete existing project files** — methodology integration is purely additive
41
+ - **Never overwrite existing entry point content** — only append methodology sections
42
+
43
+ ## Do-not rules
44
+
45
+ - Load files not in the scoping table's read-set for the current query type
46
+ - Defer STATE.md decision recording to end of session
47
+ - Skip cascade checks after file changes
48
+ - Load multiple specialist .context/ files for a single query
49
+ - Update docs/ for typo fixes or internal-only changes
50
+
51
+ ## File scale management
52
+
53
+ When any intelligence layer file exceeds 300 lines (~3,750 tokens):
54
+ 1. Split into index file (original path) + components subdirectory
55
+ 2. Index keeps active content + navigation table
56
+ 3. Components hold archived sections grouped by semantic boundary
57
+ 4. Update .context/REGISTRY.md (if it exists) with new file entries
58
+
59
+ ## Audit trail format
60
+
61
+ SUMMARY.md session entries follow this structure:
62
+ ```
63
+ ### {date} — {brief description}
64
+ **Plan**: {what was planned}
65
+ **Outcome**: {what was done}
66
+ **Files created**: {list}
67
+ **Files updated**: {list}
68
+ **Decisions**: {key decisions made}
69
+ **Next**: {what should happen next session}
70
+ ```
71
+
72
+ ## Docs maintenance triggers
73
+
74
+ | Trigger | Update these docs/ files |
75
+ |---------|------------------------|
76
+ | Phase completed | docs/index.md (progress section) |
77
+ | Architecture decision | docs/index.md (architecture section) |
78
+
79
+ ## Navigation registry protocol
80
+
81
+ When .context/REGISTRY.md exists, update it after:
82
+ - File split, creation, deletion, or rename
83
+ - Topic index changes (new keywords)
84
+ - Growth alerts (files approaching 300-line threshold)
@@ -0,0 +1,75 @@
1
+ # Navigation Registry
2
+
3
+ <!-- INSTRUCTION: This file is the agent's map of all intelligence layer files.
4
+ It enables fast content location across split file trees without reading every file.
5
+
6
+ Populate this file when your first file split happens (any intelligence layer file
7
+ exceeding 300 lines). Until then, this file can remain empty — your project is small
8
+ enough that direct navigation works.
9
+
10
+ Three sections to maintain:
11
+ 1. File tree — every intelligence layer file with path, lines, status, digest
12
+ 2. Topic index — keyword → file path + section hint for fast lookup
13
+ 3. Structural log — when files are split, deleted, or renamed
14
+
15
+ Update this file as a cascade whenever:
16
+ - A file is split into index + components
17
+ - A file is created, deleted, or renamed
18
+ - During context refresh (verify line counts, flag stale entries) -->
19
+
20
+ ## File tree
21
+
22
+ <!-- INSTRUCTION: Add rows as your project grows. Status: active (normal file),
23
+ index (split into components), component (archived section from a split file) -->
24
+
25
+ | Path | Lines | Status | Digest |
26
+ |------|-------|--------|--------|
27
+ | `{AGENT}.md` | — | active | Agent entry point |
28
+ | `STATE.md` | — | active | Current position, decisions, blockers |
29
+ | `ROADMAP.md` | — | active | Development phases |
30
+ | `PLAN.md` | — | active | Current task |
31
+ | `SUMMARY.md` | — | active | Session history |
32
+ | `REQUIREMENTS.md` | — | active | What the project must achieve |
33
+ | `.context/BASE.md` | — | active | System model, project map |
34
+ | `.context/REGISTRY.md` | — | active | This file |
35
+
36
+ ### Growth alerts
37
+
38
+ <!-- Files approaching the 300-line threshold. Update during context refresh. -->
39
+
40
+ | Path | Lines | Threshold | Action needed |
41
+ |------|-------|-----------|---------------|
42
+ | — | — | 300 | No files approaching threshold yet |
43
+
44
+ ---
45
+
46
+ ## Topic index
47
+
48
+ <!-- INSTRUCTION: Add entries as your project develops content worth indexing.
49
+ The topic index is most valuable AFTER files have been split — it lets the agent
50
+ find content that moved from one file to component files. -->
51
+
52
+ | Topic | File | Section hint |
53
+ |-------|------|-------------|
54
+ | — | — | Populate when content is worth indexing |
55
+
56
+ ---
57
+
58
+ ## Structural log
59
+
60
+ <!-- Records when files are split, created, deleted, or renamed.
61
+ Enables the agent to understand why an expected file might not exist. -->
62
+
63
+ | Date | Action | Source | Target(s) | Reason |
64
+ |------|--------|--------|-----------|--------|
65
+ | — | — | — | — | No structural changes yet |
66
+
67
+ ---
68
+
69
+ ## Maintenance protocol
70
+
71
+ **After file split**: Update file tree (new components, changed statuses). Add topic index entries. Add structural log entry.
72
+
73
+ **After file creation/deletion**: Update file tree. Update topic index. Add structural log entry.
74
+
75
+ **During context refresh**: Verify line counts. Flag growth alerts. Remove stale entries.
@@ -0,0 +1,128 @@
1
+ # {Project Name} — Agent Entry Point
2
+
3
+ <!-- INSTRUCTION: Replace {Project Name} and write a 1-2 sentence project description below -->
4
+ {Describe what your project does, its architecture, and key technologies.}
5
+
6
+ ## On every query
7
+
8
+ 1. This file is auto-loaded — read it first
9
+ 2. Read `STATE.md` for current position, decisions, blockers
10
+ 3. Check `PROJECT-PROFILE.md` for lifecycle stage and active extensions
11
+ 4. Scope based on query type (see table below)
12
+
13
+ ## Scoping rules
14
+
15
+ | Query type | Read before acting | Update after acting |
16
+ |------------|-------------------|-------------------|
17
+ | **Planning / roadmap** | REQUIREMENTS.md, ROADMAP.md | STATE.md, PLAN.md |
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 |
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) |
22
+ | **Methodology guidance** | .context/METHODOLOGY.md | -- |
23
+ | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
24
+ | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
25
+
26
+ <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
27
+ Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
28
+
29
+ ## Dependency cascade
30
+
31
+ When a file changes, check this table and update dependent files in the same response.
32
+
33
+ | When this changes | Also update |
34
+ |------------------|-------------|
35
+ | Phase completion | SUMMARY.md (add entry), STATE.md (update position), ROADMAP.md (mark done) |
36
+ | Requirements change | REQUIREMENTS.md, ROADMAP.md, PLAN.md (if current task affected) |
37
+ | New decision made | STATE.md (decisions table — record immediately, never defer) |
38
+ | Open question resolved | STATE.md (mark resolved with resolution text, don't delete) |
39
+ | Project structure | .context/BASE.md (codebase map), this file (if new query types needed) |
40
+ | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
41
+ | File split, created, deleted, or renamed | .context/REGISTRY.md (file tree, topic index, structural log) |
42
+ | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
43
+ | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
44
+ | Session close | SESSION-LOG.md (append micro-entry — workflow, features, cascades, friction, findings) |
45
+
46
+ <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
47
+
48
+ ## Docs maintenance
49
+
50
+ <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
51
+ Add rows as your docs/ structure grows. -->
52
+
53
+ | Trigger | Update these docs/ files |
54
+ |---------|------------------------|
55
+ | Phase completed | docs/index.md (progress section) |
56
+ | Architecture decision | docs/index.md (architecture section) |
57
+ | {structural-change} | {specific docs/ files} |
58
+
59
+ ## Workflow
60
+
61
+ Select based on query type:
62
+ - **General task** — Review, Plan, Implement, Document, Update
63
+ - **Code change** — Review, Plan, Implement, Context-sync, Update
64
+ - **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
67
+
68
+ ## Interaction level
69
+
70
+ mode: checkpoint
71
+ <!-- autonomous | checkpoint | collaborative | supervised -->
72
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
73
+
74
+ ## Model tier
75
+
76
+ tier: full
77
+ <!-- lite | standard | full -->
78
+ <!-- lite: minimal rules, STATE.md only, 2 cascade rules — for Haiku or simple projects -->
79
+ <!-- standard: core rules + context pairing, overflow to .context/METHODOLOGY.md — for Sonnet (default) -->
80
+ <!-- full: all rules in entry point, all intelligence layer files — for Opus or complex projects -->
81
+
82
+ ## Method version
83
+
84
+ method_version: 1.5
85
+ <!-- Tracks which methodology version generated this entry point -->
86
+ <!-- Use `agent-method status` to compare against latest -->
87
+
88
+ ## CLI tools (optional)
89
+
90
+ Available via `npx agent-method` (zero-install) or `pip install agent-method-tools`:
91
+
92
+ | When you want to... | Run |
93
+ |---------------------|-----|
94
+ | Validate this entry point | `agent-method check` |
95
+ | See what type of project this is | `agent-method scan` |
96
+ | Test how a query routes | `agent-method route "your question"` |
97
+ | Extract a refinement report | `agent-method refine` |
98
+ | Check methodology version | `agent-method status` |
99
+ | Update methodology files | `agent-method upgrade` |
100
+ | See what an entry point should contain | `agent-method init code` / `context` / `data` / `mix` |
101
+
102
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
103
+ project setup, or methodology updates. All commands auto-detect project type and find
104
+ entry points automatically. Add --json for machine-readable output. -->
105
+
106
+ ## Conventions
107
+
108
+ - Record decisions in STATE.md in the SAME response as the work — never defer
109
+ - Load .context/BASE.md + one specialist per query — never all context files
110
+ - After every file change, check the cascade table — deferred cascades don't happen
111
+ - Every code change is also a context change — update the codebase map
112
+ - Surface uncertainty as open questions in STATE.md — never guess silently
113
+ - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
114
+ - 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, append a micro-entry to SESSION-LOG.md — never skip, never read previous entries during normal work
117
+
118
+ ## Do not
119
+
120
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
121
+ - Delete existing project files during brownfield integration — methodology is additive only
122
+ - Load files not in the scoping table's read-set for the current query type
123
+ - Defer STATE.md decision recording to end of session
124
+ - Skip cascade checks after file changes
125
+ - Load multiple specialist .context/ files for a single query
126
+ - Update docs/ for typo fixes or internal-only changes
127
+
128
+ <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
@@ -0,0 +1,128 @@
1
+ # {Project Name} — Agent Entry Point
2
+
3
+ <!-- INSTRUCTION: Replace {Project Name} and write a 1-2 sentence project description below -->
4
+ {Describe what your project does, its architecture, and key technologies.}
5
+
6
+ ## On every query
7
+
8
+ 1. This file is auto-loaded — read it first
9
+ 2. Read `STATE.md` for current position, decisions, blockers
10
+ 3. Check `PROJECT-PROFILE.md` for lifecycle stage and active extensions
11
+ 4. Scope based on query type (see table below)
12
+
13
+ ## Scoping rules
14
+
15
+ | Query type | Read before acting | Update after acting |
16
+ |------------|-------------------|-------------------|
17
+ | **Planning / roadmap** | REQUIREMENTS.md, ROADMAP.md | STATE.md, PLAN.md |
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 |
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) |
22
+ | **Methodology guidance** | .context/METHODOLOGY.md | -- |
23
+ | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
24
+ | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
25
+
26
+ <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
27
+ Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
28
+
29
+ ## Dependency cascade
30
+
31
+ When a file changes, check this table and update dependent files in the same response.
32
+
33
+ | When this changes | Also update |
34
+ |------------------|-------------|
35
+ | Phase completion | SUMMARY.md (add entry), STATE.md (update position), ROADMAP.md (mark done) |
36
+ | Requirements change | REQUIREMENTS.md, ROADMAP.md, PLAN.md (if current task affected) |
37
+ | New decision made | STATE.md (decisions table — record immediately, never defer) |
38
+ | Open question resolved | STATE.md (mark resolved with resolution text, don't delete) |
39
+ | Project structure | .context/BASE.md (codebase map), this file (if new query types needed) |
40
+ | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
41
+ | File split, created, deleted, or renamed | .context/REGISTRY.md (file tree, topic index, structural log) |
42
+ | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
43
+ | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
44
+ | Session close | SESSION-LOG.md (append micro-entry — workflow, features, cascades, friction, findings) |
45
+
46
+ <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
47
+
48
+ ## Docs maintenance
49
+
50
+ <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
51
+ Add rows as your docs/ structure grows. -->
52
+
53
+ | Trigger | Update these docs/ files |
54
+ |---------|------------------------|
55
+ | Phase completed | docs/index.md (progress section) |
56
+ | Architecture decision | docs/index.md (architecture section) |
57
+ | {structural-change} | {specific docs/ files} |
58
+
59
+ ## Workflow
60
+
61
+ Select based on query type:
62
+ - **General task** — Review, Plan, Implement, Document, Update
63
+ - **Code change** — Review, Plan, Implement, Context-sync, Update
64
+ - **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
67
+
68
+ ## Interaction level
69
+
70
+ mode: checkpoint
71
+ <!-- autonomous | checkpoint | collaborative | supervised -->
72
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
73
+
74
+ ## Model tier
75
+
76
+ tier: full
77
+ <!-- lite | standard | full -->
78
+ <!-- lite: minimal rules, STATE.md only, 2 cascade rules — for Haiku or simple projects -->
79
+ <!-- standard: core rules + context pairing, overflow to .context/METHODOLOGY.md — for Sonnet (default) -->
80
+ <!-- full: all rules in entry point, all intelligence layer files — for Opus or complex projects -->
81
+
82
+ ## Method version
83
+
84
+ method_version: 1.5
85
+ <!-- Tracks which methodology version generated this entry point -->
86
+ <!-- Use `agent-method status` to compare against latest -->
87
+
88
+ ## CLI tools (optional)
89
+
90
+ Available via `npx agent-method` (zero-install) or `pip install agent-method-tools`:
91
+
92
+ | When you want to... | Run |
93
+ |---------------------|-----|
94
+ | Validate this entry point | `agent-method check` |
95
+ | See what type of project this is | `agent-method scan` |
96
+ | Test how a query routes | `agent-method route "your question"` |
97
+ | Extract a refinement report | `agent-method refine` |
98
+ | Check methodology version | `agent-method status` |
99
+ | Update methodology files | `agent-method upgrade` |
100
+ | See what an entry point should contain | `agent-method init code` / `context` / `data` / `mix` |
101
+
102
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
103
+ project setup, or methodology updates. All commands auto-detect project type and find
104
+ entry points automatically. Add --json for machine-readable output. -->
105
+
106
+ ## Conventions
107
+
108
+ - Record decisions in STATE.md in the SAME response as the work — never defer
109
+ - Load .context/BASE.md + one specialist per query — never all context files
110
+ - After every file change, check the cascade table — deferred cascades don't happen
111
+ - Every code change is also a context change — update the codebase map
112
+ - Surface uncertainty as open questions in STATE.md — never guess silently
113
+ - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
114
+ - 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, append a micro-entry to SESSION-LOG.md — never skip, never read previous entries during normal work
117
+
118
+ ## Do not
119
+
120
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
121
+ - Delete existing project files during brownfield integration — methodology is additive only
122
+ - Load files not in the scoping table's read-set for the current query type
123
+ - Defer STATE.md decision recording to end of session
124
+ - Skip cascade checks after file changes
125
+ - Load multiple specialist .context/ files for a single query
126
+ - Update docs/ for typo fixes or internal-only changes
127
+
128
+ <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
@@ -0,0 +1,128 @@
1
+ # {Project Name} — Agent Entry Point
2
+
3
+ <!-- INSTRUCTION: Replace {Project Name} and write a 1-2 sentence project description below -->
4
+ {Describe what your project does, its architecture, and key technologies.}
5
+
6
+ ## On every query
7
+
8
+ 1. This file is auto-loaded — read it first
9
+ 2. Read `STATE.md` for current position, decisions, blockers
10
+ 3. Check `PROJECT-PROFILE.md` for lifecycle stage and active extensions
11
+ 4. Scope based on query type (see table below)
12
+
13
+ ## Scoping rules
14
+
15
+ | Query type | Read before acting | Update after acting |
16
+ |------------|-------------------|-------------------|
17
+ | **Planning / roadmap** | REQUIREMENTS.md, ROADMAP.md | STATE.md, PLAN.md |
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 |
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) |
22
+ | **Methodology guidance** | .context/METHODOLOGY.md | -- |
23
+ | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
24
+ | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
25
+
26
+ <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
27
+ Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
28
+
29
+ ## Dependency cascade
30
+
31
+ When a file changes, check this table and update dependent files in the same response.
32
+
33
+ | When this changes | Also update |
34
+ |------------------|-------------|
35
+ | Phase completion | SUMMARY.md (add entry), STATE.md (update position), ROADMAP.md (mark done) |
36
+ | Requirements change | REQUIREMENTS.md, ROADMAP.md, PLAN.md (if current task affected) |
37
+ | New decision made | STATE.md (decisions table — record immediately, never defer) |
38
+ | Open question resolved | STATE.md (mark resolved with resolution text, don't delete) |
39
+ | Project structure | .context/BASE.md (codebase map), this file (if new query types needed) |
40
+ | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
41
+ | File split, created, deleted, or renamed | .context/REGISTRY.md (file tree, topic index, structural log) |
42
+ | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
43
+ | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
44
+ | Session close | SESSION-LOG.md (append micro-entry — workflow, features, cascades, friction, findings) |
45
+
46
+ <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
47
+
48
+ ## Docs maintenance
49
+
50
+ <!-- INSTRUCTION: This table tells the agent when to update human-facing docs.
51
+ Add rows as your docs/ structure grows. -->
52
+
53
+ | Trigger | Update these docs/ files |
54
+ |---------|------------------------|
55
+ | Phase completed | docs/index.md (progress section) |
56
+ | Architecture decision | docs/index.md (architecture section) |
57
+ | {structural-change} | {specific docs/ files} |
58
+
59
+ ## Workflow
60
+
61
+ Select based on query type:
62
+ - **General task** — Review, Plan, Implement, Document, Update
63
+ - **Code change** — Review, Plan, Implement, Context-sync, Update
64
+ - **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
67
+
68
+ ## Interaction level
69
+
70
+ mode: checkpoint
71
+ <!-- autonomous | checkpoint | collaborative | supervised -->
72
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
73
+
74
+ ## Model tier
75
+
76
+ tier: full
77
+ <!-- lite | standard | full -->
78
+ <!-- lite: minimal rules, STATE.md only, 2 cascade rules — for Haiku or simple projects -->
79
+ <!-- standard: core rules + context pairing, overflow to .context/METHODOLOGY.md — for Sonnet (default) -->
80
+ <!-- full: all rules in entry point, all intelligence layer files — for Opus or complex projects -->
81
+
82
+ ## Method version
83
+
84
+ method_version: 1.5
85
+ <!-- Tracks which methodology version generated this entry point -->
86
+ <!-- Use `agent-method status` to compare against latest -->
87
+
88
+ ## CLI tools (optional)
89
+
90
+ Available via `npx agent-method` (zero-install) or `pip install agent-method-tools`:
91
+
92
+ | When you want to... | Run |
93
+ |---------------------|-----|
94
+ | Validate this entry point | `agent-method check` |
95
+ | See what type of project this is | `agent-method scan` |
96
+ | Test how a query routes | `agent-method route "your question"` |
97
+ | Extract a refinement report | `agent-method refine` |
98
+ | Check methodology version | `agent-method status` |
99
+ | Update methodology files | `agent-method upgrade` |
100
+ | See what an entry point should contain | `agent-method init code` / `context` / `data` / `mix` |
101
+
102
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
103
+ project setup, or methodology updates. All commands auto-detect project type and find
104
+ entry points automatically. Add --json for machine-readable output. -->
105
+
106
+ ## Conventions
107
+
108
+ - Record decisions in STATE.md in the SAME response as the work — never defer
109
+ - Load .context/BASE.md + one specialist per query — never all context files
110
+ - After every file change, check the cascade table — deferred cascades don't happen
111
+ - Every code change is also a context change — update the codebase map
112
+ - Surface uncertainty as open questions in STATE.md — never guess silently
113
+ - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
114
+ - 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, append a micro-entry to SESSION-LOG.md — never skip, never read previous entries during normal work
117
+
118
+ ## Do not
119
+
120
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
121
+ - Delete existing project files during brownfield integration — methodology is additive only
122
+ - Load files not in the scoping table's read-set for the current query type
123
+ - Defer STATE.md decision recording to end of session
124
+ - Skip cascade checks after file changes
125
+ - Load multiple specialist .context/ files for a single query
126
+ - Update docs/ for typo fixes or internal-only changes
127
+
128
+ <!-- INSTRUCTION: Add project-specific "do not" rules as you discover common mistakes -->
@@ -0,0 +1,67 @@
1
+ # Current Plan
2
+
3
+ <!-- INSTRUCTION: This file contains ONE task at a time. Replace the entire
4
+ contents when starting a new task — never accumulate multiple plans.
5
+ The agent proposes the plan and waits for human approval before executing. -->
6
+
7
+ ## {Task name}
8
+
9
+ ### Objective
10
+
11
+ {What this task achieves. One clear sentence.}
12
+
13
+ ### Prerequisites
14
+
15
+ <!-- INSTRUCTION: What must be true before starting this task? -->
16
+
17
+ - {Prior phase or task complete}
18
+ - {Required files or context available}
19
+
20
+ ### Dependencies
21
+
22
+ <!-- INSTRUCTION: What depends on this task? What does this task block? -->
23
+
24
+ - {Phase/task that depends on this completing}
25
+
26
+ ---
27
+
28
+ ### Step 1: {Step name}
29
+
30
+ **Objective**: {What this step achieves}
31
+
32
+ **Read**: {Files to read before this step}
33
+ **Produce**: {Files created or modified by this step}
34
+
35
+ **Substeps**:
36
+ - a. {First substep}
37
+ - b. {Second substep}
38
+
39
+ **Verify**: {How to confirm this step is complete and correct}
40
+
41
+ ---
42
+
43
+ ### Step 2: {Step name}
44
+
45
+ **Objective**: {What this step achieves}
46
+
47
+ **Read**: {Files to read}
48
+ **Produce**: {Files created or modified}
49
+
50
+ **Verify**: {Verification criteria}
51
+
52
+ ---
53
+
54
+ <!-- INSTRUCTION: Add more steps as needed. Each step should have:
55
+ - Clear objective
56
+ - Read/produce specs (what files are involved)
57
+ - Substeps (if complex)
58
+ - Verification criteria (how to confirm it's done right) -->
59
+
60
+ ### Completion criteria
61
+
62
+ {Task name} is done when:
63
+ 1. {Criterion 1 — specific and measurable}
64
+ 2. {Criterion 2}
65
+ 3. {Criterion 3}
66
+
67
+ **Next after {task name}**: {What comes next}
@@ -0,0 +1,61 @@
1
+ # Project Profile
2
+
3
+ <!-- INSTRUCTION: This file is maintained by the agent. It tracks your project's
4
+ type, lifecycle stage, and active extensions. The agent reads this to adjust
5
+ feature priorities and workflow selection. You can also update it manually
6
+ when your project's situation changes.
7
+
8
+ Fill in the initial values during setup. The agent updates lifecycle stage
9
+ and maturity as the project evolves. -->
10
+
11
+ ## Project identity
12
+
13
+ - **Types**: [{project-type}]
14
+ - **Extensions**: [{extensions-applied}]
15
+
16
+ <!-- INSTRUCTION: Project types: code, data, analytical, mixed, general.
17
+ Extensions: code-project, data-exploration, analytical-system, or none. -->
18
+
19
+ ## Lifecycle
20
+
21
+ - **Stage**: {stage}
22
+ - **Maturity**: {maturity}
23
+ - **Last transition**: {date} ({from} -> {to})
24
+
25
+ <!-- INSTRUCTION: Lifecycle stages:
26
+ - discovery: Understanding an existing project (brownfield entry)
27
+ - design: Defining architecture and structure (greenfield start)
28
+ - development: Building and iterating (active implementation)
29
+ - evolution: Maintaining and extending (stable baseline)
30
+
31
+ Maturity levels: new, early, established, legacy.
32
+ The agent suggests transitions; you decide when to move. -->
33
+
34
+ ## Extension stack
35
+
36
+ | Extension | Applied | Source |
37
+ |-----------|---------|--------|
38
+ | code-project | {yes/no} | {setup.sh / manual} |
39
+ | data-exploration | {yes/no} | {setup.sh / manual} |
40
+ | analytical-system | {yes/no} | {setup.sh / manual} |
41
+
42
+ <!-- INSTRUCTION: Track which extensions are active. Extensions can be added
43
+ mid-project without re-running setup.sh — merge the extension file
44
+ into your entry point manually and update this table. -->
45
+
46
+ ## Discovery log
47
+
48
+ <!-- INSTRUCTION: When the agent runs WF-08 (discovery workflow), key findings
49
+ are recorded here for quick reference. Only used during Discovery stage.
50
+ Can be deleted once the project moves to Development or Evolution. -->
51
+
52
+ | Date | Finding | Severity | Action taken |
53
+ |------|---------|----------|-------------|
54
+
55
+ ## Context evolution history
56
+
57
+ <!-- INSTRUCTION: Track lifecycle transitions and extension changes over time.
58
+ Helps the agent understand how the project has evolved. -->
59
+
60
+ | Date | Change | Rationale |
61
+ |------|--------|-----------|