@deftai/directive-content 0.55.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/.agents/skills/deft/SKILL.md +6 -0
- package/.agents/skills/deft-directive-article-review/SKILL.md +11 -0
- package/.agents/skills/deft-directive-build/SKILL.md +10 -0
- package/.agents/skills/deft-directive-cost/SKILL.md +12 -0
- package/.agents/skills/deft-directive-debug/SKILL.md +13 -0
- package/.agents/skills/deft-directive-gh-arch/SKILL.md +11 -0
- package/.agents/skills/deft-directive-gh-slice/SKILL.md +10 -0
- package/.agents/skills/deft-directive-glossary/SKILL.md +10 -0
- package/.agents/skills/deft-directive-interview/SKILL.md +9 -0
- package/.agents/skills/deft-directive-pre-pr/SKILL.md +9 -0
- package/.agents/skills/deft-directive-refinement/SKILL.md +10 -0
- package/.agents/skills/deft-directive-release/SKILL.md +12 -0
- package/.agents/skills/deft-directive-review-cycle/SKILL.md +10 -0
- package/.agents/skills/deft-directive-setup/SKILL.md +10 -0
- package/.agents/skills/deft-directive-swarm/SKILL.md +10 -0
- package/.agents/skills/deft-directive-sync/SKILL.md +9 -0
- package/.agents/skills/deft-directive-triage/SKILL.md +9 -0
- package/.agents/skills/deft-directive-write-skill/SKILL.md +9 -0
- package/LICENSE.md +22 -0
- package/QUICK-START.md +167 -0
- package/UPGRADING.md +517 -0
- package/coding/build-output.md +28 -0
- package/coding/coding.md +235 -0
- package/coding/debugging.md +110 -0
- package/coding/holzmann.md +96 -0
- package/coding/hygiene.md +127 -0
- package/coding/security.md +158 -0
- package/coding/testing.md +162 -0
- package/coding/toolchain.md +44 -0
- package/commands.md +300 -0
- package/context/context.md +57 -0
- package/context/deterministic-split.md +67 -0
- package/context/examples.md +26 -0
- package/context/fractal-summaries.md +69 -0
- package/context/long-horizon.md +46 -0
- package/context/spec-deltas.md +177 -0
- package/context/tool-design.md +34 -0
- package/context/working-memory.md +62 -0
- package/contracts/boundary-maps.md +65 -0
- package/contracts/deterministic-questions.md +59 -0
- package/contracts/hierarchy.md +77 -0
- package/conventions/content-manifest.json +399 -0
- package/conventions/machine-generated-banner.md +130 -0
- package/conventions/references.md +120 -0
- package/conventions/rule-ownership.json +382 -0
- package/conventions/task-caching.md +43 -0
- package/conventions/vbrief-filenames.md +70 -0
- package/deployments/README.md +37 -0
- package/deployments/agentuity/README.md +138 -0
- package/deployments/agentuity/via-cli.md +380 -0
- package/deployments/agentuity/via-cloud.md +425 -0
- package/deployments/agentuity/via-github-actions.md +664 -0
- package/deployments/agentuity/via-gravity-network.md +606 -0
- package/deployments/agentuity/via-vpc.md +607 -0
- package/deployments/aws/README.md +38 -0
- package/deployments/aws/via-app-runner.md +612 -0
- package/deployments/aws/via-ecs-fargate.md +561 -0
- package/deployments/aws/via-elastic-beanstalk.md +628 -0
- package/deployments/aws/via-lambda.md +649 -0
- package/deployments/azure/README.md +37 -0
- package/deployments/azure/via-aks.md +390 -0
- package/deployments/azure/via-app-service.md +564 -0
- package/deployments/azure/via-container-apps.md +599 -0
- package/deployments/azure/via-functions.md +552 -0
- package/deployments/cloud-gov/README.md +63 -0
- package/deployments/cloud-gov/agents/compliance-docs.md +154 -0
- package/deployments/cloud-gov/agents.md +39 -0
- package/deployments/cloud-gov/cicd.md +64 -0
- package/deployments/cloud-gov/deployment.md +150 -0
- package/deployments/cloud-gov/logging.md +43 -0
- package/deployments/cloud-gov/manifest.md +121 -0
- package/deployments/cloud-gov/overview.md +58 -0
- package/deployments/cloud-gov/security.md +46 -0
- package/deployments/cloud-gov/services.md +72 -0
- package/deployments/cloud-gov/upstream/README.md +18 -0
- package/deployments/cloudflare/README.md +33 -0
- package/deployments/cloudflare/via-dashboard.md +83 -0
- package/deployments/cloudflare/via-git.md +90 -0
- package/deployments/cloudflare/via-github-actions.md +185 -0
- package/deployments/cloudflare/via-terraform.md +157 -0
- package/deployments/cloudflare/via-wrangler.md +165 -0
- package/deployments/fly-io/README.md +37 -0
- package/deployments/fly-io/via-dockerfile.md +648 -0
- package/deployments/fly-io/via-flyctl.md +653 -0
- package/deployments/fly-io/via-github-actions.md +695 -0
- package/deployments/fly-io/via-multi-region.md +598 -0
- package/deployments/google/README.md +34 -0
- package/deployments/google/via-app-engine.md +42 -0
- package/deployments/google/via-cloud-functions.md +23 -0
- package/deployments/google/via-cloud-run.md +330 -0
- package/deployments/google/via-gke.md +23 -0
- package/deployments/netlify/README.md +99 -0
- package/deployments/netlify/via-cli.md +17 -0
- package/deployments/netlify/via-functions.md +19 -0
- package/deployments/netlify/via-git.md +25 -0
- package/deployments/vercel/README.md +90 -0
- package/deployments/vercel/via-api.md +16 -0
- package/deployments/vercel/via-cli.md +17 -0
- package/deployments/vercel/via-git.md +24 -0
- package/docs/BROWNFIELD.md +179 -0
- package/docs/getting-started.md +137 -0
- package/docs/good-agents-md.md +137 -0
- package/events/README.md +89 -0
- package/events/event-record.schema.json +26 -0
- package/events/registry.json +166 -0
- package/events/registry.schema.json +71 -0
- package/glossary.md +145 -0
- package/incidents/README.md +81 -0
- package/incidents/_template.md +38 -0
- package/interfaces/cli.md +104 -0
- package/interfaces/rest.md +212 -0
- package/interfaces/tui.md +242 -0
- package/interfaces/web.md +123 -0
- package/languages/6502-DASM.md +132 -0
- package/languages/c.md +235 -0
- package/languages/commands.md +23 -0
- package/languages/cpp.md +132 -0
- package/languages/csharp.md +259 -0
- package/languages/dart.md +183 -0
- package/languages/delphi.md +218 -0
- package/languages/elixir.md +208 -0
- package/languages/go.md +78 -0
- package/languages/java.md +278 -0
- package/languages/javascript.md +163 -0
- package/languages/julia.md +175 -0
- package/languages/kotlin.md +193 -0
- package/languages/markdown.md +168 -0
- package/languages/mermaid.md +146 -0
- package/languages/officejs.md +392 -0
- package/languages/python.md +209 -0
- package/languages/r.md +163 -0
- package/languages/rust.md +216 -0
- package/languages/sql.md +216 -0
- package/languages/swift.md +153 -0
- package/languages/typescript.md +132 -0
- package/languages/vba.md +279 -0
- package/languages/vhdl.md +180 -0
- package/languages/visual-basic.md +151 -0
- package/languages/zig.md +196 -0
- package/meta/SOUL.md +27 -0
- package/meta/code-field.md +44 -0
- package/meta/morals.md +40 -0
- package/meta/philosophy.md +39 -0
- package/meta/project.md +49 -0
- package/meta/ralph.md +223 -0
- package/meta/security.md +80 -0
- package/meta/versioning.md +326 -0
- package/package.json +22 -0
- package/packs/lessons/lessons-pack-0.1.json +553 -0
- package/packs/patterns/patterns-pack-0.1.json +57 -0
- package/packs/rules/rules-pack-0.1.json +4767 -0
- package/packs/skills/skills-pack-0.1.json +262 -0
- package/packs/strategies/strategies-pack-0.1.json +167 -0
- package/packs/swarm-spec/swarm-spec-pack-0.1.json +17 -0
- package/patterns/executor-layer-credentials.md +227 -0
- package/patterns/llm-app.md +156 -0
- package/patterns/multi-agent.md +278 -0
- package/patterns/prompt-assembly-layer-ordering.md +154 -0
- package/patterns/role-as-overlay.md +179 -0
- package/platforms/2600.md +137 -0
- package/platforms/unity.md +329 -0
- package/references/composer-skill-porting.md +152 -0
- package/references/cost-models.md +163 -0
- package/references/ip-risk.md +246 -0
- package/references/plain-english-ux.md +275 -0
- package/resilience/context-pruning.md +67 -0
- package/resilience/continue-here.md +62 -0
- package/scm/changelog.md +276 -0
- package/scm/git.md +139 -0
- package/scm/github.md +265 -0
- package/secrets/.gitkeep +0 -0
- package/skills/deft-build/SKILL.md +20 -0
- package/skills/deft-directive-article-review/SKILL.md +156 -0
- package/skills/deft-directive-build/SKILL.md +302 -0
- package/skills/deft-directive-cost/SKILL.md +201 -0
- package/skills/deft-directive-debug/SKILL.md +140 -0
- package/skills/deft-directive-decompose/SKILL.md +96 -0
- package/skills/deft-directive-gh-arch/SKILL.md +160 -0
- package/skills/deft-directive-gh-slice/SKILL.md +199 -0
- package/skills/deft-directive-glossary/SKILL.md +118 -0
- package/skills/deft-directive-interview/SKILL.md +528 -0
- package/skills/deft-directive-pre-pr/SKILL.md +131 -0
- package/skills/deft-directive-probe/SKILL.md +127 -0
- package/skills/deft-directive-refinement/SKILL.md +403 -0
- package/skills/deft-directive-release/SKILL.md +266 -0
- package/skills/deft-directive-review-cycle/SKILL.md +401 -0
- package/skills/deft-directive-setup/SKILL.md +717 -0
- package/skills/deft-directive-swarm/SKILL.md +989 -0
- package/skills/deft-directive-sync/SKILL.md +288 -0
- package/skills/deft-directive-triage/SKILL.md +137 -0
- package/skills/deft-directive-write-skill/SKILL.md +169 -0
- package/skills/deft-interview/SKILL.md +16 -0
- package/skills/deft-pre-pr/SKILL.md +16 -0
- package/skills/deft-review-cycle/SKILL.md +16 -0
- package/skills/deft-roadmap-refresh/SKILL.md +16 -0
- package/skills/deft-setup/SKILL.md +20 -0
- package/skills/deft-swarm/SKILL.md +16 -0
- package/skills/deft-sync/SKILL.md +16 -0
- package/strategies/README.md +83 -0
- package/strategies/artifact-guards.md +85 -0
- package/strategies/bdd.md +115 -0
- package/strategies/brownfield.md +7 -0
- package/strategies/discuss.md +129 -0
- package/strategies/emit-hints.md +69 -0
- package/strategies/enterprise.md +193 -0
- package/strategies/interview.md +551 -0
- package/strategies/map.md +179 -0
- package/strategies/probe.md +151 -0
- package/strategies/rapid.md +155 -0
- package/strategies/research.md +155 -0
- package/strategies/roadmap.md +9 -0
- package/strategies/speckit.md +437 -0
- package/strategies/v0-20-contract.md +134 -0
- package/strategies/yolo.md +169 -0
- package/swarm/swarm.md +300 -0
- package/templates/COST-ESTIMATE.md +114 -0
- package/templates/PULL_REQUEST_TEMPLATE.md +35 -0
- package/templates/agent-prompt-preamble.md +409 -0
- package/templates/agents-entry.md +211 -0
- package/templates/agents-entry.placeholders.md +75 -0
- package/templates/embed.go +20 -0
- package/templates/embed_test.go +36 -0
- package/templates/make-spec-example.md +9 -0
- package/templates/make-spec.md +246 -0
- package/templates/project.md.template +52 -0
- package/templates/specification.md +1 -0
- package/templates/swarm-greptile-poller-prompt.md +556 -0
- package/templates/user.md.template +31 -0
- package/tools/RWLDL.md +80 -0
- package/tools/greptile.md +141 -0
- package/tools/installer.md +23 -0
- package/tools/taskfile-migration.md +32 -0
- package/tools/taskfile.md +185 -0
- package/tools/telemetry.md +285 -0
- package/vbrief/schemas/cache-meta.schema.json +137 -0
- package/vbrief/schemas/candidates.schema.json +130 -0
- package/vbrief/schemas/codebase-map.schema.json +213 -0
- package/vbrief/schemas/lessons-pack.schema.json +134 -0
- package/vbrief/schemas/patterns-pack.schema.json +84 -0
- package/vbrief/schemas/rules-pack.schema.json +105 -0
- package/vbrief/schemas/skills-pack.schema.json +94 -0
- package/vbrief/schemas/slices.schema.json +87 -0
- package/vbrief/schemas/strategies-pack.schema.json +89 -0
- package/vbrief/schemas/swarm-spec-pack.schema.json +84 -0
- package/vbrief/schemas/vbrief-core.schema.json +1022 -0
- package/vbrief/vbrief.md +684 -0
- package/verification/integration.md +76 -0
- package/verification/plan-checking.md +85 -0
- package/verification/uat.md +60 -0
- package/verification/verification.md +117 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Spec Deltas
|
|
2
|
+
|
|
3
|
+
Tracking how requirements evolve across changes using vBRIEF references.
|
|
4
|
+
|
|
5
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
6
|
+
|
|
7
|
+
**⚠️ See also**: [commands.md](../commands.md) | [vbrief/vbrief.md](../vbrief/vbrief.md) | [context/context.md](./context.md)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Core Principle
|
|
12
|
+
|
|
13
|
+
Code diffs show *what* changed. Spec deltas show *why* — how the system's requirements shifted. Reviewers can understand a change at the requirement level without reading implementation code.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## How It Works
|
|
18
|
+
|
|
19
|
+
When a change modifies existing requirements (or adds new ones), the change's `specs/` folder captures the delta as a vBRIEF file:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
history/changes/add-remember-me/
|
|
23
|
+
└── specs/
|
|
24
|
+
└── auth-session.delta.vbrief.json ← New/changed requirements for auth-session
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The spec delta is linked to the project's baseline spec via a vBRIEF reference in the change's `tasks.vbrief.json`:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"vBRIEFInfo": { "version": "0.5" },
|
|
32
|
+
"plan": {
|
|
33
|
+
"title": "add-remember-me",
|
|
34
|
+
"status": "draft",
|
|
35
|
+
"references": [
|
|
36
|
+
{
|
|
37
|
+
"uri": "file://./vbrief/specification.vbrief.json",
|
|
38
|
+
"type": "x-vbrief/plan",
|
|
39
|
+
"description": "Baseline spec this change modifies"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"items": [...]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Writing Spec Deltas
|
|
50
|
+
|
|
51
|
+
### Format
|
|
52
|
+
|
|
53
|
+
Spec delta files are vBRIEF v0.5 files with `plan.narratives` capturing requirement changes:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"vBRIEFInfo": { "version": "0.5" },
|
|
58
|
+
"plan": {
|
|
59
|
+
"title": "auth-session-delta",
|
|
60
|
+
"status": "draft",
|
|
61
|
+
"narratives": {
|
|
62
|
+
"Baseline": "specification.vbrief.json -- auth-session scope",
|
|
63
|
+
"NewRequirements": "FR-4: The system SHALL support configurable session expiration periods. GIVEN user checks 'Remember me' at login WHEN 30 days have passed THEN invalidate the session token AND clear the persistent cookie.",
|
|
64
|
+
"ModifiedRequirements": "FR-1 (Session expiration): was: The system SHALL expire sessions after 24 hours without activity. now: The system SHALL expire sessions after a configured duration. Default 24 hours; 30 days with 'Remember me'.",
|
|
65
|
+
"RemovedRequirements": ""
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Rules
|
|
72
|
+
|
|
73
|
+
- ! Each delta vBRIEF identifies its **Baseline** narrative — the spec or section it modifies
|
|
74
|
+
- ! Separate `NewRequirements` from `ModifiedRequirements` narratives
|
|
75
|
+
- ! For modified requirements, show **was** and **now** explicitly within the `ModifiedRequirements` narrative
|
|
76
|
+
- ! All narrative values MUST be plain strings — never objects or arrays
|
|
77
|
+
- ~ Organize spec deltas by capability: `specs/auth-session.delta.vbrief.json`
|
|
78
|
+
- ~ Use GIVEN/WHEN/THEN scenarios for behavioral requirements within narrative values
|
|
79
|
+
- ~ Use RFC 2119 language (MUST, SHOULD, MAY) within narrative values
|
|
80
|
+
- ⊗ Rewrite the full spec — only capture the delta
|
|
81
|
+
- ⊗ Omit the Baseline narrative — the delta is meaningless without it
|
|
82
|
+
- ⊗ Use markdown spec files (`spec.md`) — all spec deltas must be vBRIEF format
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## vBRIEF Chain
|
|
87
|
+
|
|
88
|
+
Spec deltas form a chain via vBRIEF `references`:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
specification.vbrief.json (baseline)
|
|
92
|
+
↑ referenced by
|
|
93
|
+
history/changes/add-auth/tasks.vbrief.json
|
|
94
|
+
↑ referenced by
|
|
95
|
+
history/changes/add-remember-me/tasks.vbrief.json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Each change's `tasks.vbrief.json` references what it builds on:
|
|
99
|
+
|
|
100
|
+
- For the first change: reference the project's `specification.vbrief.json`
|
|
101
|
+
- For subsequent changes: reference the prior change's `tasks.vbrief.json` if the changes are related, or the baseline spec if independent
|
|
102
|
+
|
|
103
|
+
### Reference Types
|
|
104
|
+
|
|
105
|
+
Use the vBRIEF `references` array with `type: "x-vbrief/plan"`:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
"references": [
|
|
109
|
+
{
|
|
110
|
+
"uri": "file://./vbrief/specification.vbrief.json",
|
|
111
|
+
"type": "x-vbrief/plan",
|
|
112
|
+
"description": "Baseline project specification"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"uri": "file://./history/changes/add-auth/tasks.vbrief.json",
|
|
116
|
+
"type": "x-vbrief/plan",
|
|
117
|
+
"description": "Prior change this builds on"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Narratives for Context
|
|
123
|
+
|
|
124
|
+
Use vBRIEF `narratives` on the plan to capture the **why** of the spec change:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
"narratives": {
|
|
128
|
+
"Proposal": "Add remember-me checkbox to extend session duration",
|
|
129
|
+
"Background": "Users report frustration with 24-hour session timeout"
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Reading Spec Deltas
|
|
136
|
+
|
|
137
|
+
When an agent needs to understand the current state of requirements:
|
|
138
|
+
|
|
139
|
+
1. ! Read the baseline `specification.vbrief.json` (or relevant scope vBRIEFs)
|
|
140
|
+
2. ! Scan `history/changes/*/specs/` for any `*.delta.vbrief.json` files that modify relevant sections
|
|
141
|
+
3. ! Apply deltas in chronological order (directory timestamps or vBRIEF chain order)
|
|
142
|
+
4. ~ Archived changes (`history/archive/`) represent already-merged deltas — skip unless investigating history
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## When to Create Spec Deltas
|
|
147
|
+
|
|
148
|
+
- ! When a change adds new behavioral requirements
|
|
149
|
+
- ! When a change modifies existing requirements
|
|
150
|
+
- ~ When a change has non-obvious acceptance criteria worth documenting as requirements
|
|
151
|
+
- ? Skip for pure refactors, dependency bumps, or infrastructure changes that don't alter behavior
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## After Archiving
|
|
156
|
+
|
|
157
|
+
When a change is archived via `/deft:change:archive`:
|
|
158
|
+
|
|
159
|
+
- ! Read each `*.delta.vbrief.json` file's narratives and apply to the target scope vBRIEF
|
|
160
|
+
- ! Apply `NewRequirements` narrative to the scope vBRIEF
|
|
161
|
+
- ! Apply `ModifiedRequirements` narrative — replace **was** with **now** in the scope vBRIEF
|
|
162
|
+
- ! Apply `RemovedRequirements` narrative — remove identified requirements from the scope vBRIEF
|
|
163
|
+
- ~ The archived delta vBRIEF remains as a historical record of *why* the spec changed
|
|
164
|
+
- ! The main spec (scope vBRIEFs) should always reflect the current state of requirements
|
|
165
|
+
- ⊗ Leave spec deltas unmerged after archiving — the scope vBRIEF drifts from reality
|
|
166
|
+
- ⊗ Parse markdown to extract delta content — read vBRIEF narratives directly
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Anti-Patterns
|
|
171
|
+
|
|
172
|
+
- ⊗ Rewriting the full spec in every delta (capture only what changed)
|
|
173
|
+
- ⊗ Spec deltas without a Baseline narrative (orphaned deltas are useless)
|
|
174
|
+
- ⊗ Skipping spec deltas for behavioral changes ("the code is the spec")
|
|
175
|
+
- ⊗ Modifying archived spec deltas (history is immutable)
|
|
176
|
+
- ⊗ Accumulating unmerged deltas after archiving (spec rot)
|
|
177
|
+
- ⊗ Using markdown spec files (`spec.md`) — all spec deltas must be vBRIEF format
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Tool Design for AI Consumption
|
|
2
|
+
|
|
3
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
|
+
|
|
5
|
+
Principles for designing tools that agents can use effectively.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Minimal, Non-Overlapping Tool Sets
|
|
10
|
+
|
|
11
|
+
- ~ Provide the **smallest set of tools** that covers required capabilities
|
|
12
|
+
- ≉ Offering multiple tools that do the same thing with slight variations
|
|
13
|
+
- ~ Each tool should have a **single, clear purpose**
|
|
14
|
+
|
|
15
|
+
## Token-Efficient Outputs
|
|
16
|
+
|
|
17
|
+
- ~ Support **filtering** — let the caller request only the fields they need
|
|
18
|
+
- ~ Support **pagination** — return bounded result sets with continuation tokens
|
|
19
|
+
- ? Offer a **summary mode** that returns counts/metadata instead of full payloads
|
|
20
|
+
- ≉ Tools that return **unbounded output** without truncation or pagination
|
|
21
|
+
- ~ Default to concise output; offer verbose mode only on request
|
|
22
|
+
|
|
23
|
+
## Clear Descriptions
|
|
24
|
+
|
|
25
|
+
- ! **Tool descriptions** should state what the tool does, when to use it, and what it returns
|
|
26
|
+
- ~ **Parameters** should be self-documenting — use descriptive names and include constraints in descriptions
|
|
27
|
+
- ≉ Relying on the agent to infer parameter semantics from names alone
|
|
28
|
+
|
|
29
|
+
## Error Messages
|
|
30
|
+
|
|
31
|
+
- ! Return **actionable error messages** — state what went wrong and what to do about it
|
|
32
|
+
- ~ Include the specific invalid input in the error so the agent can self-correct
|
|
33
|
+
- ≉ Returning generic "operation failed" without remediation guidance
|
|
34
|
+
- ? Suggest alternative tool calls or parameter values when possible
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Working Memory & Scratchpads
|
|
2
|
+
|
|
3
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
|
+
|
|
5
|
+
Patterns for externalizing intermediate state to files.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to Create a Scratchpad
|
|
10
|
+
|
|
11
|
+
- ~ **Multi-step tasks** — when a task has 3+ phases or steps that produce intermediate artifacts
|
|
12
|
+
- ~ **Large outputs** — when generated content exceeds what should stay in context
|
|
13
|
+
- ~ **Multi-agent handoffs** — when passing structured state between agents
|
|
14
|
+
- ? Single-step tasks with small outputs — usually not worth externalizing
|
|
15
|
+
|
|
16
|
+
## Recommended Format: vBRIEF
|
|
17
|
+
|
|
18
|
+
[vBRIEF](https://vbrief.org) is a token-efficient JSON format for task plans and progress tracking.
|
|
19
|
+
|
|
20
|
+
**Graduated complexity:**
|
|
21
|
+
1. ~ **Start minimal** — tasks with statuses are enough for simple work
|
|
22
|
+
2. ~ **Add narratives** when tasks need explanation or context for another agent
|
|
23
|
+
3. ~ **Add edges** (`blocks`, `informs`, `invalidates`, `suggests`) when task dependencies matter
|
|
24
|
+
4. ? Use TRON encoding for ultra-compact status representation
|
|
25
|
+
|
|
26
|
+
### Minimal Example
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"vBRIEFInfo": { "version": "0.5" },
|
|
31
|
+
"plan": {
|
|
32
|
+
"title": "Implement user avatar upload",
|
|
33
|
+
"status": "running",
|
|
34
|
+
"items": [
|
|
35
|
+
{ "id": "t1", "title": "Add upload endpoint to API", "status": "completed" },
|
|
36
|
+
{ "id": "t2", "title": "Write image resize utility", "status": "running" },
|
|
37
|
+
{ "id": "t3", "title": "Update user profile component", "status": "pending" },
|
|
38
|
+
{ "id": "t4", "title": "Add integration tests", "status": "blocked" }
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Cleanup
|
|
45
|
+
|
|
46
|
+
- ! **Remove scratch files** when the task is complete — they are working memory, not artifacts
|
|
47
|
+
- ~ **Persist durable learnings** to [meta/lessons.md](../../meta/lessons.md) before deleting scratch files
|
|
48
|
+
- ≉ Leaving stale scratchpads in the workspace after task completion
|
|
49
|
+
- ? Keep a scratchpad across sessions only if the task spans multiple sessions (see [long-horizon.md](./long-horizon.md))
|
|
50
|
+
|
|
51
|
+
## vBRIEF Plan, Spec, and Scope Files Are NOT Scratch
|
|
52
|
+
|
|
53
|
+
The cleanup rule above applies to **ad-hoc scratchpads**, not to vBRIEF files:
|
|
54
|
+
|
|
55
|
+
- ⊗ Delete `./vbrief/plan.vbrief.json` as a "scratch file" — it is the session-level tactical plan (the *how right now*); when scope vBRIEFs exist, it carries a `planRef` to the scope vBRIEF(s) being implemented
|
|
56
|
+
- ⊗ Delete `./vbrief/specification.vbrief.json` — it is the project-wide source-of-truth spec
|
|
57
|
+
- ⊗ Delete scope vBRIEFs in lifecycle folders (`proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`) — these are durable scope records
|
|
58
|
+
- ⊗ Delete `./vbrief/PROJECT-DEFINITION.vbrief.json` — it is the project identity gestalt
|
|
59
|
+
- ⊗ Delete `./vbrief/playbook-*.vbrief.json` — playbooks are permanent operational knowledge
|
|
60
|
+
- ! Only `./vbrief/continue.vbrief.json` is ephemeral — it is consumed on resume; when scope vBRIEFs exist, it carries a `planRef` to the scope vBRIEF(s) the agent was working on
|
|
61
|
+
|
|
62
|
+
**See [vbrief/vbrief.md](../vbrief/vbrief.md) for the full taxonomy of durable vs ephemeral vBRIEF files, lifecycle folders, and scope vBRIEF conventions.**
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Boundary Maps
|
|
2
|
+
|
|
3
|
+
Explicit interface contracts between work units — think interfaces before implementation.
|
|
4
|
+
|
|
5
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
6
|
+
|
|
7
|
+
**⚠️ See also**: [coding/coding.md](../coding/coding.md) (Contract-First) | [verification/verification.md](../verification/verification.md) (Key Links) | [core/glossary.md](../glossary.md)
|
|
8
|
+
|
|
9
|
+
> Adapted from [GSD](https://github.com/gsd-build/get-shit-done) boundary map model. Extends Deft's Contract-First principle to the planning level.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Core Principle
|
|
14
|
+
|
|
15
|
+
When planning multi-feature work, every feature declares **what it produces** and **what it consumes** from upstream — with concrete names. No vague references. No silent assumptions.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Boundary Map Format
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Feature 1 → Feature 2
|
|
23
|
+
Produces:
|
|
24
|
+
types.ts → User, Session, AuthToken (interfaces)
|
|
25
|
+
auth.ts → generateToken(), verifyToken(), refreshToken()
|
|
26
|
+
Consumes: nothing (leaf node)
|
|
27
|
+
|
|
28
|
+
Feature 2 → Feature 3
|
|
29
|
+
Produces:
|
|
30
|
+
api/auth/login.ts → POST handler
|
|
31
|
+
middleware.ts → authMiddleware()
|
|
32
|
+
Consumes from Feature 1:
|
|
33
|
+
auth.ts → generateToken(), verifyToken()
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Rules
|
|
37
|
+
|
|
38
|
+
- ! Every feature declares **produces** — functions, types, endpoints, with names
|
|
39
|
+
- ! Every feature declares **consumes** — what it needs from upstream, with source paths
|
|
40
|
+
- ! Leaf nodes (no upstream) explicitly state `Consumes: nothing`
|
|
41
|
+
- ! Before planning a downstream feature, **verify** that upstream actually produced what the map claims
|
|
42
|
+
- ⊗ Planning downstream work based on assumed/hoped-for upstream outputs
|
|
43
|
+
- ⊗ Vague produces ("auth module") — name the exports
|
|
44
|
+
|
|
45
|
+
## Verification at Boundaries
|
|
46
|
+
|
|
47
|
+
- ! On feature completion, check that all declared **produces** actually exist and are exported
|
|
48
|
+
- ! Before starting a consuming feature, check that declared **consumes** are importable
|
|
49
|
+
- ~ Use static verification (Tier 1 from [verification.md](../verification/verification.md)) for boundary checks
|
|
50
|
+
- ~ Flag mismatches immediately — don't let downstream work start on a broken contract
|
|
51
|
+
|
|
52
|
+
## vBRIEF Integration
|
|
53
|
+
|
|
54
|
+
- ~ Record boundary maps as narratives on the plan item in `./vbrief/plan.vbrief.json`
|
|
55
|
+
- ~ Use vBRIEF `blocks` edges in `./vbrief/plan.vbrief.json` to express produces/consumes dependencies
|
|
56
|
+
- ~ On boundary verification failure, set downstream items to `blocked` in `./vbrief/plan.vbrief.json` with narrative
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Anti-Patterns
|
|
61
|
+
|
|
62
|
+
- ⊗ "Feature 3 needs a function that feature 1 never exported"
|
|
63
|
+
- ⊗ Guessing what upstream built instead of checking the boundary map
|
|
64
|
+
- ⊗ Horizontal features ("implement the database layer") — prefer vertical features with demo sentences
|
|
65
|
+
- ⊗ Boundary maps without concrete names (functions, types, endpoints)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Deterministic Questions Contract
|
|
2
|
+
Canonical rule for every structured `ask_user_question` prompt and every numbered-menu prompt rendered in skill prose. Lives once here so individual skills can `!` cross-reference instead of duplicating the rule body. Surfaced by #767 after the 2026-04-30 swarm-planning session where users typed `discuss (user-provided)` to break out of a deterministic question and `wait` at a hard gate -- both honored by convention only.
|
|
3
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
|
+
**See also**: [main.md](../../main.md) | [glossary.md](../glossary.md) (deterministic mode entry) | [skills/deft-directive-interview/SKILL.md](../skills/deft-directive-interview/SKILL.md) (canonical interview loop) | [vbrief/completed/2026-04-20-431-deterministic-questions-rc2-defects.vbrief.json](../../vbrief/completed/2026-04-20-431-deterministic-questions-rc2-defects.vbrief.json) (RC2 prior art)
|
|
5
|
+
## Prior art reviewed (#431)
|
|
6
|
+
The RC2 work in #431 (closed; "Deterministic questions (RC2): confirm step, back nav, escape hatch distinct from Other") established three load-bearing properties this contract preserves rather than reimplements:
|
|
7
|
+
1. **Back navigation is a first-class numbered option** -- not a sub-choice of `Other`, not a free-text escape. The agent renders `Back` as the final option in the numbered list and returns to the prior question / decision point on selection.
|
|
8
|
+
2. **Escape hatch distinct from Other** -- `Other` collects free-text answers that fit the same question shape; the escape hatch is a SEPARATE option that exits the deterministic flow entirely.
|
|
9
|
+
3. **Confirmation step before destructive write** -- post-interview confirmation gates (e.g. `skills/deft-directive-setup/SKILL.md` Post-Interview Confirmation Gate) are independent of the option list and ride on top of every deterministic flow.
|
|
10
|
+
This contract EXTENDS that surface by promoting `Discuss` to a peer of `Back` (both are now mandatory final options) and by codifying the Discuss-pause semantic verbatim. It does NOT introduce a separate `Other` option; this contract is purely about adding `Discuss` + `Back` as canonical numbered options. The pre-#767 surface (back navigation, confirm step, Other-vs-escape distinction) remains intact.
|
|
11
|
+
## The rule
|
|
12
|
+
- ! Every structured `ask_user_question` prompt (single-select OR multi-select) and every numbered-menu prompt rendered in skill prose MUST include `Discuss` and `Back` as the final two numbered options, in that order. The numbering is local to the prompt (it does not need to be the literal "N-1" / "N" -- it just needs to be the last two entries presented to the user).
|
|
13
|
+
- ! `Discuss` MUST be a top-level numbered option, NOT a sub-choice of any `Other` / `Custom` option. Honoring #431's escape-hatch principle.
|
|
14
|
+
- ! `Back` MUST return to the prior question or decision point. Selecting `Back` from the very first question of a flow returns to the calling skill's entry-point (or surfaces "Nothing earlier to go back to" and re-asks the current question).
|
|
15
|
+
- ⊗ Render a deterministic numbered menu without `Discuss` and `Back` as the final two options.
|
|
16
|
+
- ⊗ Combine `Discuss` and `Other` into one option. They serve different roles -- `Other` widens the question's answer space; `Discuss` exits the question entirely.
|
|
17
|
+
- ⊗ Render `Discuss` or `Back` only in some skills -- the rule is universal across every deterministic-mode skill.
|
|
18
|
+
## Host-UI portability rule (#1563)
|
|
19
|
+
Host-native structured question tools are allowed only when they preserve the deterministic menu the user actually sees. The visible labels and the fallback mapping are the contract; host UI affordances are not.
|
|
20
|
+
- ! Deterministic flows MUST render the canonical numbered menu in plain chat text unless the host-native structured UI is known to visibly preserve the canonical numeric option labels and return numeric selections or exact displayed option text.
|
|
21
|
+
- ! When a host-native structured question tool is used, each option label MUST visibly include the canonical number (for example, `1. Accept`) and the final two visible labels MUST be `N-1. Discuss` and `N. Back`.
|
|
22
|
+
- ! Agents MUST accept fallback chat replies only when they match the displayed number or the exact displayed option text, after trimming surrounding whitespace and ignoring case for text labels.
|
|
23
|
+
- ⊗ Infer deterministic choices from alphabetic host UI affordances, keyboard shortcuts, or semantic guesses unless those letters were actually displayed as part of the canonical menu labels.
|
|
24
|
+
- ⊗ Treat a bare letter such as `d` or `b` as `Defer`, `Discuss`, or `Back` when the rendered deterministic menu was numbered and did not display those letters as choices.
|
|
25
|
+
## Backend-selection prompts (#1568)
|
|
26
|
+
Backend-selection prompts are deterministic questions. They ask for operator preference and MAY show probe availability as context, but availability is not a default or recommendation.
|
|
27
|
+
- ! A backend-selection prompt MUST render visible numbered options for each stable backend choice before `Discuss` and `Back`.
|
|
28
|
+
- ! The backend options MUST appear before the final two entries, with `Discuss` and `Back` remaining the final two numbered options in that order.
|
|
29
|
+
- ! Probe availability MUST be presented as status beside each backend choice, not as the ordering, recommendation, or default.
|
|
30
|
+
- ⊗ Treat `cursor-cloud` as the implicit default merely because it is probe-available.
|
|
31
|
+
## Discuss-pause semantic (verbatim)
|
|
32
|
+
Documented here as the single normative source so skill prose, tests, and downstream tooling all read the same words.
|
|
33
|
+
- ! When the user selects `Discuss`, the agent MUST pause IMMEDIATELY.
|
|
34
|
+
- ! The agent MUST halt the in-progress sequence -- no further tool calls beyond acknowledging the pause.
|
|
35
|
+
- ! The agent MUST prompt: `What would you like to discuss?`
|
|
36
|
+
- ! The agent MUST resume ONLY when the user explicitly signals readiness. The accepted explicit-resume signals are:
|
|
37
|
+
1. The user re-asks the original question (paraphrasing is allowed; the user must reference the question that was paused).
|
|
38
|
+
2. The user says `resume` or `continue` (case-insensitive, optionally followed by punctuation).
|
|
39
|
+
3. The user re-issues the prior selection (e.g. picks one of the numbered options again).
|
|
40
|
+
- ⊗ Implicit resumption -- the agent MUST NOT auto-resume after a Discuss pause based on time elapsed, topic drift, or its own inference of "the user seems ready". Implicit resumption is forbidden.
|
|
41
|
+
- ⊗ Continue executing the in-progress sequence after the user selects `Discuss`. Halting is unconditional.
|
|
42
|
+
- ⊗ Make additional tool calls during a Discuss pause beyond the single acknowledgment + the resume prompt.
|
|
43
|
+
- ~ The agent MAY ask focused clarification questions during the discussion -- those are part of the discussion, not the original deterministic flow.
|
|
44
|
+
- ~ When the user resumes, the agent SHOULD re-render the original numbered menu before accepting a selection so the user can see the same context they were on when they paused.
|
|
45
|
+
## Back semantic
|
|
46
|
+
- ! When the user selects `Back`, the agent MUST treat the prior question as un-answered and re-render its numbered menu.
|
|
47
|
+
- ! The agent MUST preserve any earlier captured values (the user is rewinding by one step, not aborting the flow).
|
|
48
|
+
- ⊗ Treat `Back` as a Discuss pause -- `Back` is structural rewind; `Discuss` is structural exit.
|
|
49
|
+
## Cross-references in skills
|
|
50
|
+
Each affected skill carries a `!` cross-reference pointing here, mirroring the Rule Authority [AXIOM] block in `main.md` ("deterministic > Taskfile > vBRIEF > RFC2119 > prose; prose is fallback only when no stronger encoding applies"):
|
|
51
|
+
- `skills/deft-directive-swarm/SKILL.md`
|
|
52
|
+
- `skills/deft-directive-setup/SKILL.md`
|
|
53
|
+
- `skills/deft-directive-refinement/SKILL.md`
|
|
54
|
+
- `skills/deft-directive-pre-pr/SKILL.md`
|
|
55
|
+
- `skills/deft-directive-review-cycle/SKILL.md`
|
|
56
|
+
- `skills/deft-directive-release/SKILL.md`
|
|
57
|
+
The `interview` and `build` skills are deliberately not edited under #767 (Agents 2 / 3 own those surfaces); the cross-reference will land there in their PRs and read this contract.
|
|
58
|
+
## Test surface
|
|
59
|
+
`tests/content/test_deterministic_questions.py` scans skill prose for documented numbered menus and asserts that `Discuss` and `Back` are the final two options. The test also asserts that this contract file exists, contains the verbatim Discuss-pause semantic, and is cross-referenced from each affected skill.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Contract Hierarchy
|
|
2
|
+
|
|
3
|
+
Two lenses for reasoning about what to invest in — durability (what survives) and generation (what to write first).
|
|
4
|
+
|
|
5
|
+
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
6
|
+
|
|
7
|
+
**⚠️ See also**: [contracts/boundary-maps.md](./boundary-maps.md) | [coding/coding.md](../coding/coding.md) | [meta/philosophy.md](../meta/philosophy.md) | [core/glossary.md](../glossary.md)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Durability Axis — What Survives
|
|
12
|
+
|
|
13
|
+
Rank artifacts by how long they remain valid. Invest maintenance effort accordingly.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Standards > APIs > Specifications > Code
|
|
17
|
+
(decades) (years) (months) (weeks)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- ! **Standards** — coding conventions, quality gates, testing policies. These outlive any single project and rarely change. Treat them as infrastructure.
|
|
21
|
+
- ! **APIs** — public interfaces, contracts, schemas. These outlive implementation cycles. Breaking changes are expensive; design them carefully.
|
|
22
|
+
- ~ **Specifications** — requirements, acceptance criteria, architectural decisions. These evolve per feature cycle but anchor the work.
|
|
23
|
+
- ~ **Code** — implementation. This is the most renewable layer. If the spec is clear, code can be regenerated.
|
|
24
|
+
|
|
25
|
+
### Implications
|
|
26
|
+
|
|
27
|
+
- ! When time is limited, invest in the higher layers first — a good spec with throwaway code beats polished code with no spec.
|
|
28
|
+
- ~ When refactoring, check whether the change belongs at a higher layer (API change? spec change?) before touching code.
|
|
29
|
+
- ⊗ Treat code as the primary intellectual property — specs and contracts are the real IP.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Generative Axis — What to Write First
|
|
34
|
+
|
|
35
|
+
Rank artifacts by creation order. Each layer generates the next.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Specification → Contracts → Code
|
|
39
|
+
(what/why) (boundaries) (how)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- ! **Specification first** — define what to build and why before anything else. The spec is the source of truth for intent.
|
|
43
|
+
- ! **Contracts second** — define the interfaces, data shapes, and boundaries between components. Contracts are derived from the spec.
|
|
44
|
+
- ! **Code last** — implement to satisfy the contracts. Code is derived from contracts.
|
|
45
|
+
|
|
46
|
+
### Implications
|
|
47
|
+
|
|
48
|
+
- ! Writing code before the spec exists is building without a blueprint — the result is accidental architecture.
|
|
49
|
+
- ~ Writing contracts before the spec is premature optimization of boundaries — the interfaces will shift when requirements clarify.
|
|
50
|
+
- ⊗ Skip straight to implementation when requirements are unclear — write the spec first, even if it's rough.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## When Each Axis Applies
|
|
55
|
+
|
|
56
|
+
**Use the durability axis** when deciding where to invest maintenance effort, what to review most carefully, and what to protect from churn.
|
|
57
|
+
|
|
58
|
+
**Use the generative axis** when deciding what to write next in a development cycle — spec → contracts → code, in that order.
|
|
59
|
+
|
|
60
|
+
Both axes reinforce the same core principle: **contracts are your IP, code is renewable.**
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
**Durability in practice:** A team spends 3 days on a REST API contract review but only 1 day reviewing the handler implementations. This is correct — the API outlives the handlers.
|
|
67
|
+
|
|
68
|
+
**Generative in practice:** Before implementing a new feature, the agent writes `specification.vbrief.json` (spec), then defines boundary maps between components (contracts), then writes tests and implementation (code). Each layer constrains the next.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Anti-Patterns
|
|
73
|
+
|
|
74
|
+
- ⊗ Treating code as the deliverable and specs as paperwork — specs outlive code
|
|
75
|
+
- ⊗ Designing APIs after implementation — APIs should be designed from the spec, not reverse-engineered from code
|
|
76
|
+
- ⊗ Investing equally in all layers — the higher the durability, the more review it deserves
|
|
77
|
+
- ⊗ Skipping the generative order — writing code before contracts leads to implicit, undocumented boundaries
|