agent-directives 0.1.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.
- package/README.md +385 -0
- package/directives/adaptive-routing.md +361 -0
- package/directives/architecture-boundaries.md +223 -0
- package/directives/codebase-navigation.md +325 -0
- package/directives/context-handoff.md +220 -0
- package/directives/error-memory.md +169 -0
- package/directives/exploration-mode.md +266 -0
- package/directives/session-decisions.md +193 -0
- package/directives/specification-driven-development.md +278 -0
- package/directives/task-framing.md +154 -0
- package/directives/test-driven-development.md +305 -0
- package/directives/type-driven-development.md +173 -0
- package/directives/verification.md +266 -0
- package/directives/workspace-isolation.md +219 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +232 -0
- package/dist/cli.js.map +1 -0
- package/dist/context-audit.d.ts +30 -0
- package/dist/context-audit.d.ts.map +1 -0
- package/dist/context-audit.js +75 -0
- package/dist/context-audit.js.map +1 -0
- package/dist/install.d.ts +18 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +28 -0
- package/dist/install.js.map +1 -0
- package/dist/manifest.d.ts +25 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +29 -0
- package/dist/manifest.js.map +1 -0
- package/dist/prompt.d.ts +3 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +29 -0
- package/dist/prompt.js.map +1 -0
- package/dist/targets.d.ts +10 -0
- package/dist/targets.d.ts.map +1 -0
- package/dist/targets.js +32 -0
- package/dist/targets.js.map +1 -0
- package/manifest.json +387 -0
- package/package.json +74 -0
- package/skills/architecture-boundary-reviewer/SKILL.md +228 -0
- package/skills/code-reviewer/SKILL.md +77 -0
- package/skills/codebase-health-reviewer/SKILL.md +234 -0
- package/skills/harness-hooks-reviewer/SKILL.md +159 -0
- package/skills/implementation-task-planner/SKILL.md +205 -0
- package/skills/mcp-integration-reviewer/SKILL.md +157 -0
- package/skills/product-requirements-writer/SKILL.md +205 -0
- package/skills/production-readiness-reviewer/SKILL.md +240 -0
- package/skills/self-audit/SKILL.md +134 -0
- package/skills/spec-reviewer/SKILL.md +304 -0
- package/skills/subagent-driven-development/SKILL.md +236 -0
- package/skills/systematic-debugging/SKILL.md +313 -0
- package/skills/test-reviewer/SKILL.md +293 -0
- package/templates/AGENTS.md +120 -0
- package/templates/CLAUDE.md +115 -0
- package/templates/copilot-instructions.md +116 -0
- package/templates/decision-log.md +44 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# <!-- FILL IN: project name -->
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
This file is an agent instruction template adapted from agent-directives.
|
|
5
|
+
Replace every <!-- FILL IN: ... --> placeholder with project-specific content.
|
|
6
|
+
Delete this comment block when done.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
## Five non-negotiables
|
|
10
|
+
|
|
11
|
+
- Surface assumptions before building. Wrong assumptions held silently are the most common failure mode.
|
|
12
|
+
- Stop and ask when requirements conflict. Don’t guess.
|
|
13
|
+
- Push back when warranted. The agent (or engineer) is not a yes-machine.
|
|
14
|
+
- Prefer the boring, obvious solution. Cleverness is expensive.
|
|
15
|
+
- Touch only what you’re asked to touch.
|
|
16
|
+
|
|
17
|
+
## Why
|
|
18
|
+
|
|
19
|
+
<!-- FILL IN: one-paragraph description of why this project exists and what it does -->
|
|
20
|
+
|
|
21
|
+
## What
|
|
22
|
+
|
|
23
|
+
<!-- FILL IN: technologies, frameworks, build system, key dependencies -->
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
| Command | Purpose |
|
|
28
|
+
| ------- | ------- |
|
|
29
|
+
| <!-- FILL IN: build command --> | <!-- FILL IN: build purpose --> |
|
|
30
|
+
| <!-- FILL IN: test command --> | <!-- FILL IN: test purpose --> |
|
|
31
|
+
| <!-- FILL IN: lint command --> | <!-- FILL IN: lint purpose --> |
|
|
32
|
+
| <!-- FILL IN: format command (optional) --> | <!-- FILL IN: format purpose (optional) --> |
|
|
33
|
+
| <!-- FILL IN: additional command (optional) --> | <!-- FILL IN: additional purpose (optional) --> |
|
|
34
|
+
|
|
35
|
+
## Mandatory Workflow
|
|
36
|
+
|
|
37
|
+
**NEVER commit directly to `main`.** Work on a feature branch. No exceptions.
|
|
38
|
+
|
|
39
|
+
**Load `directives/adaptive-routing.md` first.**
|
|
40
|
+
|
|
41
|
+
The root file provides project-specific context plus compact routing pointers: commands, repo layout, local constraints, and any client-specific workflow reminders.
|
|
42
|
+
|
|
43
|
+
Workflow path selection, directive loading, skill loading, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
44
|
+
|
|
45
|
+
After routing, report:
|
|
46
|
+
`Route: <path>; using <directive/skill files>; evidence: <checks>.`
|
|
47
|
+
|
|
48
|
+
When adaptive routing selects Full Path or another route that invokes the full
|
|
49
|
+
phase sequence, no skipping steps:
|
|
50
|
+
|
|
51
|
+
| Step | Phase | Action | Verify |
|
|
52
|
+
| ---- | ------------ | ---------------------------------------- | ---------------------------------------------------------------------------- |
|
|
53
|
+
| -1 | **ORIENT** | **Navigate codebase safely** | See `directives/codebase-navigation.md` (SAFE pattern) |
|
|
54
|
+
| -0.5 | **BOUNDARIES** | **Classify touched files and dependency edges** | See `directives/architecture-boundaries.md` when imports/exports/packages/shared code may change |
|
|
55
|
+
| 0 | **BASELINE** | **Verify starting state is clean** | <!-- FILL IN: baseline verification command --> all pass |
|
|
56
|
+
| 1 | TYPES | Define types first | Type-check passes |
|
|
57
|
+
| 2 | RED | Write ONE failing test | Test fails |
|
|
58
|
+
| 3 | GREEN | Write minimum code to pass | New test passes, all existing tests still pass, type-check passes |
|
|
59
|
+
| 4 | REFACTOR | Clean up if needed | All tests still pass |
|
|
60
|
+
| 4.5 | **SELF-AUDIT** | **Triage weakest assumptions and anomalies** | See `skills/self-audit/SKILL.md` — route findings: 🔁 fix → step 2, 📋 document, or 🧑 ask human |
|
|
61
|
+
| 4.75 | **VERIFY** | **Produce verification summary** | See `directives/verification.md` for protocol — target 📋 documented Jenga entries |
|
|
62
|
+
| 5 | GATES | Run quality gates | <!-- FILL IN: gates commands --> |
|
|
63
|
+
| 5.5 | **HANDOFF** | **Compact current task state when routed** | See `directives/context-handoff.md` for phase/session handoff |
|
|
64
|
+
| 6 | COMMIT | Atomic commit | One behavior per commit |
|
|
65
|
+
|
|
66
|
+
Steps 2–6 repeat for each behavior. Do not batch.
|
|
67
|
+
|
|
68
|
+
## Directives (Routed)
|
|
69
|
+
|
|
70
|
+
Run adaptive routing first, then load the directives selected for the task phase.
|
|
71
|
+
They govern **how** you work. Do not load unrelated directives just to satisfy ceremony.
|
|
72
|
+
|
|
73
|
+
| Directive | What it governs | File |
|
|
74
|
+
| ---------------------------- | ------------------------------------------- | -------------------------------------------- |
|
|
75
|
+
| Adaptive Routing | Selects workflow path and required directives/skills | `directives/adaptive-routing.md` |
|
|
76
|
+
| Workspace Isolation | Protect mutable work with an isolated workspace; prefer native tools, then git fallback | `directives/workspace-isolation.md` |
|
|
77
|
+
| Codebase Navigation | SAFE exploration before implementation | `directives/codebase-navigation.md` |
|
|
78
|
+
| Architecture Boundaries | Preserve dependency DAG and import rules | `directives/architecture-boundaries.md` |
|
|
79
|
+
| Exploration Mode | Pre-implementation investigation stance | `directives/exploration-mode.md` |
|
|
80
|
+
| Task Framing | Intake checklist for non-trivial work | `directives/task-framing.md` |
|
|
81
|
+
| Specification-Driven Dev | Write specs before code, verify after | `directives/specification-driven-development.md` |
|
|
82
|
+
| Type-First Development | Types before implementation | `directives/type-driven-development.md` |
|
|
83
|
+
| Test-Driven Development | RED/GREEN/REFACTOR for behavior changes | `directives/test-driven-development.md` |
|
|
84
|
+
| Verification Protocol | Evidence of correctness before GATES | `directives/verification.md` |
|
|
85
|
+
| Error Memory | Persistent memory for repeated mistakes | `directives/error-memory.md` |
|
|
86
|
+
| Context Handoff | Compact current task state at phase/session boundaries | `directives/context-handoff.md` |
|
|
87
|
+
| Session Decisions | Durable decision capture at task completion | `directives/session-decisions.md` |
|
|
88
|
+
|
|
89
|
+
## Skills (Mandatory)
|
|
90
|
+
|
|
91
|
+
Load the relevant skill selected by adaptive routing before performing any task it covers.
|
|
92
|
+
|
|
93
|
+
| Skill | When | File |
|
|
94
|
+
| ------------- | --------------------------------------------- | -------------------------- |
|
|
95
|
+
| Code Reviewer | Before reviewing PRs, branches, diffs, or local changes | `skills/code-reviewer/SKILL.md` |
|
|
96
|
+
| Test Reviewer | Before writing or reviewing any test | `skills/test-reviewer/SKILL.md` |
|
|
97
|
+
| Spec Reviewer | Before merging when a written spec exists | `skills/spec-reviewer/SKILL.md` |
|
|
98
|
+
| Product Requirements Writer | Before turning a feature idea or vague requirement into a PRD/spec | `skills/product-requirements-writer/SKILL.md` |
|
|
99
|
+
| Implementation Task Planner | Before turning a PRD, issue, or acceptance criteria into implementation tasks | `skills/implementation-task-planner/SKILL.md` |
|
|
100
|
+
| Subagent-Driven Development | Before executing an existing implementation plan through delegated subagents or isolated worker sessions | `skills/subagent-driven-development/SKILL.md` |
|
|
101
|
+
| Self-Audit | After REFACTOR, before VERIFY (every Full Path cycle) | `skills/self-audit/SKILL.md` |
|
|
102
|
+
| Systematic Debugging | Before fixing bugs, failing tests, CI failures, or regressions | `skills/systematic-debugging/SKILL.md` |
|
|
103
|
+
| Architecture Boundary Reviewer | Before merging changes to imports, exports, packages, services, shared code, or folder boundaries | `skills/architecture-boundary-reviewer/SKILL.md` |
|
|
104
|
+
| Codebase Health Reviewer | Before merging TypeScript/JavaScript refactors, cleanup, shared utilities, or Fallow-relevant changes | `skills/codebase-health-reviewer/SKILL.md` |
|
|
105
|
+
| Production Readiness Reviewer | Before merging/reviewing production-sensitive changes: persistence, external services, async jobs, auth/security/privacy, infra/config/deploy, critical user paths, performance/scale, or cross-service compatibility | `skills/production-readiness-reviewer/SKILL.md` |
|
|
106
|
+
| Harness Hooks Reviewer | Before adding/reviewing agent harness hooks, start/stop hooks, pre-action hooks, or deterministic agent automation | `skills/harness-hooks-reviewer/SKILL.md` |
|
|
107
|
+
| MCP Integration Reviewer | Before adding/reviewing MCP servers/tools, agent tool schemas, internal API bridges, or write-capable agent tools | `skills/mcp-integration-reviewer/SKILL.md` |
|
|
108
|
+
|
|
109
|
+
## Task Framing (Mandatory for Non-Trivial Work)
|
|
110
|
+
|
|
111
|
+
Before implementing a non-trivial, ambiguous, or cross-cutting task, load and
|
|
112
|
+
follow `directives/task-framing.md`. This directive defines the minimum framing
|
|
113
|
+
checklist, when a proposal must precede implementation, and which supporting
|
|
114
|
+
docs are supplemental rather than binding.
|
|
115
|
+
|
|
116
|
+
## Decision Log Lookup
|
|
117
|
+
|
|
118
|
+
Before changing repo policy, contributor workflow, or any cross-cutting
|
|
119
|
+
convention, scan frontmatter in `docs/decisions/*.md` and load matching active
|
|
120
|
+
entries. Progressive disclosure — do not bulk-read every record.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# <!-- FILL IN: project name -->
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
This file is a Claude Code instruction template adapted from agent-directives.
|
|
5
|
+
Replace every <!-- FILL IN: ... --> placeholder with project-specific content.
|
|
6
|
+
Delete this comment block when done.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
## Five non-negotiables
|
|
10
|
+
|
|
11
|
+
- Surface assumptions before building. Wrong assumptions held silently are the most common failure mode.
|
|
12
|
+
- Stop and ask when requirements conflict. Don’t guess.
|
|
13
|
+
- Push back when warranted. The agent (or engineer) is not a yes-machine.
|
|
14
|
+
- Prefer the boring, obvious solution. Cleverness is expensive.
|
|
15
|
+
- Touch only what you’re asked to touch.
|
|
16
|
+
|
|
17
|
+
## Why
|
|
18
|
+
|
|
19
|
+
<!-- FILL IN: one-paragraph description of why this project exists and what it does -->
|
|
20
|
+
|
|
21
|
+
## What
|
|
22
|
+
|
|
23
|
+
<!-- FILL IN: technologies, frameworks, build system, key dependencies -->
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
| Command | Purpose |
|
|
28
|
+
| ------- | ------- |
|
|
29
|
+
| <!-- FILL IN: build command --> | <!-- FILL IN: build purpose --> |
|
|
30
|
+
| <!-- FILL IN: test command --> | <!-- FILL IN: test purpose --> |
|
|
31
|
+
| <!-- FILL IN: lint command --> | <!-- FILL IN: lint purpose --> |
|
|
32
|
+
| <!-- FILL IN: format command (optional) --> | <!-- FILL IN: format purpose (optional) --> |
|
|
33
|
+
| <!-- FILL IN: additional command (optional) --> | <!-- FILL IN: additional purpose (optional) --> |
|
|
34
|
+
|
|
35
|
+
## Mandatory Workflow
|
|
36
|
+
|
|
37
|
+
**NEVER commit directly to `main`.** Work on a feature branch. No exceptions.
|
|
38
|
+
|
|
39
|
+
**Load `directives/adaptive-routing.md` first.**
|
|
40
|
+
|
|
41
|
+
The root file provides project-specific context plus compact routing pointers: commands, repo layout, local constraints, and any client-specific workflow reminders.
|
|
42
|
+
|
|
43
|
+
Workflow path selection, directive loading, skill loading, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
44
|
+
|
|
45
|
+
After routing, report:
|
|
46
|
+
`Route: <path>; using <directive/skill files>; evidence: <checks>.`
|
|
47
|
+
|
|
48
|
+
When adaptive routing selects Full Path or another route that invokes the full
|
|
49
|
+
phase sequence, no skipping steps:
|
|
50
|
+
|
|
51
|
+
| Step | Phase | Action | Verify |
|
|
52
|
+
| ---- | ------------ | ---------------------------------------- | ---------------------------------------------------------------------------- |
|
|
53
|
+
| -1 | **ORIENT** | **Navigate codebase safely** | See codebase-navigation directive (SAFE pattern) |
|
|
54
|
+
| -0.5 | **BOUNDARIES** | **Classify touched files and dependency edges** | See architecture-boundaries directive when imports/exports/packages/shared code may change |
|
|
55
|
+
| 0 | **BASELINE** | **Verify starting state is clean** | <!-- FILL IN: baseline verification command --> all pass |
|
|
56
|
+
| 1 | TYPES | Define types first | Type-check passes |
|
|
57
|
+
| 2 | RED | Write ONE failing test | Test fails |
|
|
58
|
+
| 3 | GREEN | Write minimum code to pass | New test passes, all existing tests still pass, type-check passes |
|
|
59
|
+
| 4 | REFACTOR | Clean up if needed | All tests still pass |
|
|
60
|
+
| 4.5 | **SELF-AUDIT** | **Triage weakest assumptions and anomalies** | See `skills/self-audit/SKILL.md` — route findings: 🔁 fix → step 2, 📋 document, or 🧑 ask human |
|
|
61
|
+
| 4.75 | **VERIFY** | **Produce verification summary** | See verification directive — target 📋 documented Jenga entries |
|
|
62
|
+
| 5 | GATES | Run quality gates | <!-- FILL IN: gates commands --> |
|
|
63
|
+
| 5.5 | **HANDOFF** | **Compact current task state when routed** | See `directives/context-handoff.md` for phase/session handoff |
|
|
64
|
+
| 6 | COMMIT | Atomic commit | One behavior per commit |
|
|
65
|
+
|
|
66
|
+
Steps 2–6 repeat for each behavior. Do not batch.
|
|
67
|
+
|
|
68
|
+
## Directives
|
|
69
|
+
|
|
70
|
+
Load `directives/adaptive-routing.md` first, then load only the directives it selects for the current task.
|
|
71
|
+
|
|
72
|
+
- **Adaptive Routing** — Selects workflow path and required directives/skills (`directives/adaptive-routing.md`)
|
|
73
|
+
- **Workspace Isolation** — Protect mutable work with an isolated workspace; prefer native tools, then git fallback (`directives/workspace-isolation.md`)
|
|
74
|
+
- **Codebase Navigation** — SAFE exploration pattern before implementation (`directives/codebase-navigation.md`)
|
|
75
|
+
- **Architecture Boundaries** — Preserve dependency DAG and import rules (`directives/architecture-boundaries.md`)
|
|
76
|
+
- **Exploration Mode** — Pre-implementation investigation and thinking stance (`directives/exploration-mode.md`)
|
|
77
|
+
- **Task Framing** — Intake checklist for non-trivial work (`directives/task-framing.md`)
|
|
78
|
+
- **Specification-Driven Development** — Write specs before code, implement against specs, verify after (`directives/specification-driven-development.md`)
|
|
79
|
+
- **Type-First Development** — Define types before writing implementation code (`directives/type-driven-development.md`)
|
|
80
|
+
- **Test-Driven Development** — Strict RED/GREEN/REFACTOR cycle for behavior-changing code (`directives/test-driven-development.md`)
|
|
81
|
+
- **Verification Protocol** — Structured evidence of correctness before GATES (`directives/verification.md`)
|
|
82
|
+
- **Error Memory** — Persistent memory for repeated mistakes (`directives/error-memory.md`)
|
|
83
|
+
- **Context Handoff** — Compact current task state at phase/session boundaries (`directives/context-handoff.md`)
|
|
84
|
+
- **Session Decisions** — Durable decision capture at task completion (`directives/session-decisions.md`)
|
|
85
|
+
|
|
86
|
+
## Skills
|
|
87
|
+
|
|
88
|
+
Load the relevant skill selected by adaptive routing for the task type.
|
|
89
|
+
|
|
90
|
+
- **Code Reviewer** — Before reviewing PRs, branches, diffs, or local changes (`skills/code-reviewer/SKILL.md`)
|
|
91
|
+
- **Test Reviewer** — Before writing or reviewing any test (`skills/test-reviewer/SKILL.md`)
|
|
92
|
+
- **Spec Reviewer** — Before merging when a written spec exists (`skills/spec-reviewer/SKILL.md`)
|
|
93
|
+
- **Product Requirements Writer** — Before turning a feature idea or vague requirement into a PRD/spec (`skills/product-requirements-writer/SKILL.md`)
|
|
94
|
+
- **Implementation Task Planner** — Before turning a PRD, issue, or acceptance criteria into implementation tasks (`skills/implementation-task-planner/SKILL.md`)
|
|
95
|
+
- **Subagent-Driven Development** — Before executing an existing implementation plan through delegated subagents or isolated worker sessions (`skills/subagent-driven-development/SKILL.md`)
|
|
96
|
+
- **Self-Audit** — After REFACTOR, before VERIFY on every Full Path cycle (`skills/self-audit/SKILL.md`)
|
|
97
|
+
- **Systematic Debugging** — Before fixing bugs, failing tests, CI failures, or regressions (`skills/systematic-debugging/SKILL.md`)
|
|
98
|
+
- **Architecture Boundary Reviewer** — Before merging changes to imports, exports, packages, services, shared code, or folder boundaries (`skills/architecture-boundary-reviewer/SKILL.md`)
|
|
99
|
+
- **Codebase Health Reviewer** — Before merging TypeScript/JavaScript refactors, cleanup, shared utilities, or Fallow-relevant changes (`skills/codebase-health-reviewer/SKILL.md`)
|
|
100
|
+
- **Production Readiness Reviewer** — Before merging/reviewing production-sensitive changes: persistence, external services, async jobs, auth/security/privacy, infra/config/deploy, critical user paths, performance/scale, or cross-service compatibility (`skills/production-readiness-reviewer/SKILL.md`)
|
|
101
|
+
- **Harness Hooks Reviewer** — Before adding/reviewing agent harness hooks, start/stop hooks, pre-action hooks, or deterministic agent automation (`skills/harness-hooks-reviewer/SKILL.md`)
|
|
102
|
+
- **MCP Integration Reviewer** — Before adding/reviewing MCP servers/tools, agent tool schemas, internal API bridges, or write-capable agent tools (`skills/mcp-integration-reviewer/SKILL.md`)
|
|
103
|
+
|
|
104
|
+
## Task Framing (Mandatory for Non-Trivial Work)
|
|
105
|
+
|
|
106
|
+
Before implementing a non-trivial, ambiguous, or cross-cutting task, load and
|
|
107
|
+
follow the task-framing directive. It defines the minimum framing checklist,
|
|
108
|
+
when a proposal must precede implementation, and which supporting docs are
|
|
109
|
+
supplemental rather than binding.
|
|
110
|
+
|
|
111
|
+
## Decision Log Lookup
|
|
112
|
+
|
|
113
|
+
Before changing repo policy, contributor workflow, or any cross-cutting
|
|
114
|
+
convention, scan frontmatter in `docs/decisions/*.md` and load matching active
|
|
115
|
+
entries. Progressive disclosure — do not bulk-read every record.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# <!-- FILL IN: project name -->
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
This file is a GitHub Copilot instruction template adapted from agent-directives.
|
|
5
|
+
Replace every <!-- FILL IN: ... --> placeholder with project-specific content.
|
|
6
|
+
Delete this comment block when done.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
## Five non-negotiables
|
|
10
|
+
|
|
11
|
+
- Surface assumptions before building. Wrong assumptions held silently are the most common failure mode.
|
|
12
|
+
- Stop and ask when requirements conflict. Don’t guess.
|
|
13
|
+
- Push back when warranted. The agent (or engineer) is not a yes-machine.
|
|
14
|
+
- Prefer the boring, obvious solution. Cleverness is expensive.
|
|
15
|
+
- Touch only what you’re asked to touch.
|
|
16
|
+
|
|
17
|
+
## What This Project Is
|
|
18
|
+
|
|
19
|
+
<!-- FILL IN: one-paragraph description of the project and its purpose -->
|
|
20
|
+
|
|
21
|
+
## Key Rules
|
|
22
|
+
|
|
23
|
+
These rules are routed by `directives/adaptive-routing.md`. Load that directive
|
|
24
|
+
first, then load the corresponding detailed directive from `directives/`.
|
|
25
|
+
|
|
26
|
+
### Types First
|
|
27
|
+
|
|
28
|
+
Define types before writing any implementation code. Run the project's type-check
|
|
29
|
+
before proceeding to tests.
|
|
30
|
+
|
|
31
|
+
### Strict TDD
|
|
32
|
+
|
|
33
|
+
Follow the RED/GREEN/REFACTOR cycle for behavior-changing code:
|
|
34
|
+
|
|
35
|
+
1. Write ONE failing test → confirm it fails
|
|
36
|
+
2. Write minimum code to pass → confirm ALL tests pass
|
|
37
|
+
3. Clean up if needed → confirm all tests still pass
|
|
38
|
+
4. Repeat for each behavior — do not batch
|
|
39
|
+
|
|
40
|
+
**Never** write behavior-changing implementation before a failing test exists.
|
|
41
|
+
|
|
42
|
+
### No Skipping Steps
|
|
43
|
+
|
|
44
|
+
Do not skip REFACTOR or VERIFY phases. Do not batch multiple behaviors into
|
|
45
|
+
one commit. Each behavior gets its own test-commit + implementation-commit pair.
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
| Command | Purpose |
|
|
50
|
+
| ------- | ------- |
|
|
51
|
+
| <!-- FILL IN: build command --> | <!-- FILL IN: build purpose --> |
|
|
52
|
+
| <!-- FILL IN: test command --> | <!-- FILL IN: test purpose --> |
|
|
53
|
+
| <!-- FILL IN: lint command --> | <!-- FILL IN: lint purpose --> |
|
|
54
|
+
| <!-- FILL IN: format command (optional) --> | <!-- FILL IN: format purpose (optional) --> |
|
|
55
|
+
|
|
56
|
+
## Mandatory Workflow
|
|
57
|
+
|
|
58
|
+
**Load `directives/adaptive-routing.md` first.**
|
|
59
|
+
|
|
60
|
+
The root file provides project-specific context plus compact routing pointers: commands, repo layout, local constraints, and any client-specific workflow reminders.
|
|
61
|
+
|
|
62
|
+
Workflow path selection, directive loading, skill loading, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
63
|
+
|
|
64
|
+
After routing, report:
|
|
65
|
+
`Route: <path>; using <directive/skill files>; evidence: <checks>.`
|
|
66
|
+
|
|
67
|
+
## Forbidden
|
|
68
|
+
|
|
69
|
+
- `any` type or implicit `any`
|
|
70
|
+
- `it.skip()` in tests
|
|
71
|
+
- Fake assertions (`expect(true).toBe(true)`)
|
|
72
|
+
- Writing behavior-changing implementation before a failing test exists
|
|
73
|
+
- Batching multiple behaviors into one commit
|
|
74
|
+
|
|
75
|
+
## Directives
|
|
76
|
+
|
|
77
|
+
For detailed guidance on each workflow rule, load `directives/adaptive-routing.md` first,
|
|
78
|
+
then load only the selected directive:
|
|
79
|
+
|
|
80
|
+
- `directives/adaptive-routing.md` — Selects workflow path and required directives/skills
|
|
81
|
+
- `directives/workspace-isolation.md` — Protect mutable work with an isolated workspace; prefer native tools, then git fallback
|
|
82
|
+
- `directives/codebase-navigation.md` — SAFE exploration pattern
|
|
83
|
+
- `directives/architecture-boundaries.md` — Preserve dependency DAG and import rules
|
|
84
|
+
- `directives/exploration-mode.md` — Pre-implementation investigation stance
|
|
85
|
+
- `directives/task-framing.md` — Intake checklist for non-trivial work
|
|
86
|
+
- `directives/specification-driven-development.md` — Write specs before code, verify after
|
|
87
|
+
- `directives/type-driven-development.md` — Types before implementation
|
|
88
|
+
- `directives/test-driven-development.md` — RED/GREEN/REFACTOR cycle
|
|
89
|
+
- `directives/verification.md` — Evidence of correctness before GATES
|
|
90
|
+
- `directives/error-memory.md` — Persistent memory for repeated mistakes
|
|
91
|
+
- `directives/context-handoff.md` — Compact current task state at phase/session boundaries
|
|
92
|
+
- `directives/session-decisions.md` — Durable decision capture
|
|
93
|
+
|
|
94
|
+
## Skills
|
|
95
|
+
|
|
96
|
+
Load the relevant skill selected by adaptive routing for the task type.
|
|
97
|
+
|
|
98
|
+
- `skills/code-reviewer/SKILL.md` — Before reviewing PRs, branches, diffs, or local changes
|
|
99
|
+
- `skills/test-reviewer/SKILL.md` — Before writing or reviewing any test
|
|
100
|
+
- `skills/spec-reviewer/SKILL.md` — Before merging when a written spec exists
|
|
101
|
+
- `skills/product-requirements-writer/SKILL.md` — Before turning a feature idea or vague requirement into a PRD/spec
|
|
102
|
+
- `skills/implementation-task-planner/SKILL.md` — Before turning a PRD, issue, or acceptance criteria into implementation tasks
|
|
103
|
+
- `skills/subagent-driven-development/SKILL.md` — Before executing an existing implementation plan through delegated subagents or isolated worker sessions
|
|
104
|
+
- `skills/self-audit/SKILL.md` — After REFACTOR, before VERIFY on every Full Path cycle
|
|
105
|
+
- `skills/systematic-debugging/SKILL.md` — Before fixing bugs, failing tests, CI failures, or regressions
|
|
106
|
+
- `skills/architecture-boundary-reviewer/SKILL.md` — Before merging changes to imports, exports, packages, services, shared code, or folder boundaries
|
|
107
|
+
- `skills/codebase-health-reviewer/SKILL.md` — Before merging TypeScript/JavaScript refactors, cleanup, shared utilities, or Fallow-relevant changes
|
|
108
|
+
- `skills/production-readiness-reviewer/SKILL.md` — Before merging/reviewing production-sensitive changes: persistence, external services, async jobs, auth/security/privacy, infra/config/deploy, critical user paths, performance/scale, or cross-service compatibility
|
|
109
|
+
- `skills/harness-hooks-reviewer/SKILL.md` — Before adding/reviewing agent harness hooks, start/stop hooks, pre-action hooks, or deterministic agent automation
|
|
110
|
+
- `skills/mcp-integration-reviewer/SKILL.md` — Before adding/reviewing MCP servers/tools, agent tool schemas, internal API bridges, or write-capable agent tools
|
|
111
|
+
|
|
112
|
+
## Decision Log Lookup
|
|
113
|
+
|
|
114
|
+
Before changing repo policy, contributor workflow, or any cross-cutting
|
|
115
|
+
convention, scan frontmatter in `docs/decisions/*.md` and load matching active
|
|
116
|
+
entries. Progressive disclosure — do not bulk-read every record.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: <!-- FILL IN: YYYY-MM-DD — today's date -->
|
|
3
|
+
task: <!-- FILL IN: one-line task description -->
|
|
4
|
+
domain: <!-- FILL IN: short-kebab-case-decision-domain -->
|
|
5
|
+
kind: <!-- FILL IN: repo-policy | process | architecture | code-convention -->
|
|
6
|
+
scope: <!-- FILL IN: repo | cross-cutting | subtree -->
|
|
7
|
+
status: active
|
|
8
|
+
triggers:
|
|
9
|
+
- <!-- FILL IN: when this record should be read -->
|
|
10
|
+
applies_to:
|
|
11
|
+
- <!-- FILL IN: path/or/glob affected by this decision -->
|
|
12
|
+
supersedes: []
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# <!-- FILL IN: verb phrase naming the decision domain, e.g. "Adopt structured error handling pattern" -->
|
|
16
|
+
|
|
17
|
+
## Context
|
|
18
|
+
|
|
19
|
+
<!-- FILL IN: 2–4 sentences describing the problem, constraints, and why this was a real choice with plausible alternatives. -->
|
|
20
|
+
|
|
21
|
+
## Decision
|
|
22
|
+
|
|
23
|
+
<!-- FILL IN: one paragraph with specific reasoning — name the properties that made this option preferable. -->
|
|
24
|
+
|
|
25
|
+
## Rejected Alternatives
|
|
26
|
+
|
|
27
|
+
<!-- FILL IN: at least one entry. Name the alternative and the specific reason it was disqualified. -->
|
|
28
|
+
|
|
29
|
+
<!-- Example:
|
|
30
|
+
**Option X** — [describe briefly]. Rejected because [specific reason it didn't meet requirements].
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
## Consequences
|
|
34
|
+
|
|
35
|
+
<!-- FILL IN: what this decision makes true going forward. Include: -->
|
|
36
|
+
|
|
37
|
+
**Easier:**
|
|
38
|
+
- <!-- FILL IN: what becomes simpler as a result of this decision -->
|
|
39
|
+
|
|
40
|
+
**Harder:**
|
|
41
|
+
- <!-- FILL IN: what becomes more difficult as a result of this decision -->
|
|
42
|
+
|
|
43
|
+
**Watch for:**
|
|
44
|
+
- <!-- FILL IN: risks or edge cases to monitor over time -->
|