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,113 @@
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
+ | **Methodology guidance** | .context/METHODOLOGY.md | -- |
22
+ | **Phase completion** | SUMMARY.md | SUMMARY.md, STATE.md, ROADMAP.md |
23
+ | **Backlog / ideas** | todos/backlog.md | todos/backlog.md |
24
+
25
+ <!-- INSTRUCTION: Replace the {your-domain-type} row with project-specific query types.
26
+ Each should pair .context/BASE.md with one specialist. Add as many rows as needed. -->
27
+
28
+ ## Dependency cascade
29
+
30
+ When a file changes, check this table and update dependent files in the same response.
31
+
32
+ | When this changes | Also update |
33
+ |------------------|-------------|
34
+ | Phase completion | SUMMARY.md (add entry), STATE.md (update position), ROADMAP.md (mark done) |
35
+ | Requirements change | REQUIREMENTS.md, ROADMAP.md, PLAN.md (if current task affected) |
36
+ | New decision made | STATE.md (decisions table — record immediately, never defer) |
37
+ | Open question resolved | STATE.md (mark resolved with resolution text, don't delete) |
38
+ | Project structure | .context/BASE.md (codebase map), this file (if new query types needed) |
39
+ | Intelligence layer file exceeds 300 lines | Restructure into index + components subdirectory (keep active content, archive completed sections) |
40
+ | New domain area | .context/BASE.md, consider new .context/ specialist, this file (if new scoping row) |
41
+ | Lifecycle stage change | PROJECT-PROFILE.md (update stage + date), STATE.md (record decision) |
42
+ | Session close | SESSION-LOG.md (append micro-entry — workflow, features, cascades, friction, findings) |
43
+
44
+ <!-- INSTRUCTION: Add project-specific cascade rules below the universal ones above. -->
45
+
46
+ ## Workflow
47
+
48
+ Select based on query type:
49
+ - **General task** — Review, Plan, Implement, Document, Update
50
+ - **Code change** — Review, Plan, Implement, Context-sync, Update
51
+ - **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
54
+
55
+ ## Interaction level
56
+
57
+ mode: checkpoint
58
+ <!-- autonomous | checkpoint | collaborative | supervised -->
59
+ <!-- checkpoint: propose plan, wait for approval, report at completion (default) -->
60
+
61
+ ## Model tier
62
+
63
+ tier: standard
64
+ <!-- lite | standard | full -->
65
+ <!-- lite: minimal rules, STATE.md only, 2 cascade rules — for Haiku or simple projects -->
66
+ <!-- standard: core rules + context pairing, overflow to .context/METHODOLOGY.md — for Sonnet (default) -->
67
+ <!-- full: all rules in entry point, all intelligence layer files — for Opus or complex projects -->
68
+
69
+ ## Method version
70
+
71
+ method_version: 1.5
72
+ <!-- Tracks which methodology version generated this entry point -->
73
+ <!-- Use `agent-method status` to compare against latest -->
74
+
75
+ ## CLI tools (optional)
76
+
77
+ Available via `npx agent-method` (zero-install) or `pip install agent-method-tools`:
78
+
79
+ | When you want to... | Run |
80
+ |---------------------|-----|
81
+ | Validate this entry point | `agent-method check` |
82
+ | See what type of project this is | `agent-method scan` |
83
+ | Test how a query routes | `agent-method route "your question"` |
84
+ | Extract a refinement report | `agent-method refine` |
85
+ | Check methodology version | `agent-method status` |
86
+ | Update methodology files | `agent-method upgrade` |
87
+ | See what an entry point should contain | `agent-method init code` / `context` / `data` / `mix` |
88
+
89
+ <!-- INSTRUCTION: The agent can suggest these commands when the user asks about validation,
90
+ project setup, or methodology updates. All commands auto-detect project type and find
91
+ entry points automatically. Add --json for machine-readable output. -->
92
+
93
+ ## Conventions
94
+
95
+ - Record decisions in STATE.md in the SAME response as the work — never defer
96
+ - Load .context/BASE.md + one specialist per query — never all context files
97
+ - After every file change, check the cascade table — deferred cascades don't happen
98
+ - Every code change is also a context change — update the codebase map
99
+ - Surface uncertainty as open questions in STATE.md — never guess silently
100
+ - Keep intelligence layer files under 300 lines — split into index + components subdirectory when exceeded
101
+ - Propose plans and wait for approval — the human controls direction
102
+ - At session close, append a micro-entry to SESSION-LOG.md — never skip, never read previous entries during normal work
103
+
104
+ ## Do not
105
+
106
+ - Modify project source code, tests, or pre-existing documentation through methodology operations — only create/modify methodology files (STATE.md, .context/, PLAN.md, etc.)
107
+ - Delete existing project files during brownfield integration — methodology is additive only
108
+ - Load files not in the scoping table's read-set for the current query type
109
+ - Defer STATE.md decision recording to end of session
110
+ - Skip cascade checks after file changes
111
+ - Load multiple specialist .context/ files for a single query
112
+
113
+ <!-- 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,44 @@
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. -->
@@ -0,0 +1,46 @@
1
+ # {Your Project Name}
2
+
3
+ <!-- INSTRUCTION: Replace with a 2-3 sentence description of your project.
4
+ Include what it does, who it's for, and what technologies it uses. -->
5
+ {Describe what your project does and who it's for}
6
+
7
+ ## Problem
8
+
9
+ <!-- INSTRUCTION: What problem does this solve? 2-3 bullet points. -->
10
+
11
+ - {Problem statement 1}
12
+ - {Problem statement 2}
13
+
14
+ ## Solution
15
+
16
+ <!-- INSTRUCTION: How does the project solve the problem? Brief description of the approach. -->
17
+
18
+ {Describe your approach}
19
+
20
+ ## Project structure
21
+
22
+ <!-- INSTRUCTION: Table of top-level directories and their purposes.
23
+ The agent uses this to understand the project layout.
24
+ For existing codebases, ask the agent to help populate this from a scan. -->
25
+
26
+ | Path | Purpose |
27
+ |------|---------|
28
+ | {src/} | {Source code} |
29
+ | {docs/} | {Documentation} |
30
+
31
+ ## Audiences
32
+
33
+ <!-- INSTRUCTION: Who interacts with this project? Users, developers, managers, agents? -->
34
+
35
+ | Audience | What they need |
36
+ |----------|---------------|
37
+ | {Developer} | {Working code, clear architecture} |
38
+ | {User} | {Functional product} |
39
+
40
+ ## Principles
41
+
42
+ <!-- INSTRUCTION: 3-5 guiding principles for decision-making on this project. -->
43
+
44
+ 1. {Principle 1}
45
+ 2. {Principle 2}
46
+ 3. {Principle 3}
@@ -0,0 +1,39 @@
1
+ # Roadmap
2
+
3
+ <!-- INSTRUCTION: Define phases with deliverables and gate criteria.
4
+ Each phase should have:
5
+ - A clear objective (1 sentence)
6
+ - A deliverable table (what, requirement, status)
7
+ - A gate (how you know the phase is done)
8
+ Copy the Phase template below for each phase in your project. -->
9
+
10
+ ## Phase 1 — {Phase name} [status]
11
+
12
+ <!-- INSTRUCTION: Replace {Phase name} with a descriptive name.
13
+ Set [status] to one of: current, pending, done -->
14
+
15
+ {One sentence describing what this phase achieves.}
16
+
17
+ | Deliverable | Requirement | Status |
18
+ |-------------|-------------|--------|
19
+ | {Deliverable 1} | {Which requirement it satisfies} | pending |
20
+ | {Deliverable 2} | {Which requirement it satisfies} | pending |
21
+
22
+ **Gate**: {How you know this phase is complete. Be specific — measurable criteria.}
23
+
24
+ ---
25
+
26
+ ## Phase 2 — {Phase name} [pending]
27
+
28
+ {One sentence describing what this phase achieves.}
29
+
30
+ | Deliverable | Requirement | Status |
31
+ |-------------|-------------|--------|
32
+ | {Deliverable 1} | {Requirement} | pending |
33
+
34
+ **Gate**: {Completion criteria}
35
+
36
+ ---
37
+
38
+ <!-- INSTRUCTION: Add more phases as needed. Each phase should be achievable
39
+ in 1-5 sessions. If a phase takes longer, split it. -->
@@ -0,0 +1,41 @@
1
+ # Session Log
2
+
3
+ Append-only session observation log for case study data collection. Each session adds a micro-entry at close. This file is read-only during extraction (never during normal work).
4
+
5
+ <!-- AGENT INSTRUCTION: At the end of every session, append a new entry below using this format.
6
+ Do NOT read this file during normal work — only append to it.
7
+ Do NOT modify or delete previous entries.
8
+ When this file exceeds 300 lines, archive older entries to session-log/batch-{N}.md -->
9
+
10
+ ## Project context
11
+
12
+ | Field | Value |
13
+ |-------|-------|
14
+ | Project name | {project name} |
15
+ | Project type | {code / data / analytical / mixed / general} |
16
+ | Integration profile | {lite / standard / full} |
17
+ | Extension(s) | {code-project / data-exploration / analytical-system / none} |
18
+ | Observation started | {date} |
19
+
20
+ ## Observation checklist
21
+
22
+ At session close, reflect on these before writing the micro-entry:
23
+ 1. Which workflow did this session follow?
24
+ 2. Which query types were encountered?
25
+ 3. Which features visibly activated? (context loading, cascade, decision recording, scoping)
26
+ 4. Were any cascades expected but missed?
27
+ 5. Were any decisions deferred instead of recorded immediately?
28
+ 6. Was there friction with any methodology rule?
29
+ 7. Any degradation signals? (HAI-05: cascade misses, instruction loss, shallow context)
30
+
31
+ ## Session entries
32
+
33
+ <!-- Append new entries below. Format:
34
+ ### S{N} — {YYYY-MM-DD} — {brief title}
35
+ Model: {model} | Profile: {profile} | Workflow: {WF-XX}
36
+ Queries: {query types encountered}
37
+ Features: {feature IDs activated}
38
+ Cascades: {triggered}/{expected} | Decisions: {count}
39
+ Friction: {none | brief description}
40
+ Finding: {none | observation with methodology implication}
41
+ -->
@@ -0,0 +1,42 @@
1
+ # State
2
+
3
+ ## Current position
4
+
5
+ - **Phase**: {Phase name or number}
6
+ - **Status**: {What's happening now}
7
+ - **Next**: {What comes after the current work}
8
+ - **Active context**: `.context/BASE.md`
9
+
10
+ <!-- INSTRUCTION: Update this section every session. The next session reads this
11
+ to know where to pick up. Be specific about what's in progress and what's next. -->
12
+
13
+ ## Decisions
14
+
15
+ | Date | Decision | Rationale |
16
+ |------|----------|-----------|
17
+ <!-- INSTRUCTION: Add decisions HERE, in the SAME response as the work that
18
+ produced them. Never defer to end of session. If the session is interrupted,
19
+ the decision survives. Format: date, what was decided, why. -->
20
+
21
+ ## Blockers
22
+
23
+ <!-- INSTRUCTION: List anything preventing progress. Remove when resolved. -->
24
+
25
+ None currently.
26
+
27
+ ## Open questions
28
+
29
+ <!-- INSTRUCTION: When the agent encounters uncertainty, it writes a numbered
30
+ question here. When resolved, don't delete — add the resolution inline.
31
+ This preserves reasoning history. -->
32
+
33
+ 1. {Open question — describe what's uncertain and why it matters}
34
+
35
+ ## Variant log
36
+
37
+ <!-- INSTRUCTION: Optional. Track experiment variants if your project involves
38
+ A/B testing, prompt variants, or configuration comparison. Delete if unused. -->
39
+
40
+ | Run | Scenario | Variant | Avg Score | Notes |
41
+ |-----|----------|---------|-----------|-------|
42
+ | -- | -- | -- | -- | No runs executed yet |