@alexandrealvaro/agentic 0.4.0-beta.1 → 0.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/WORKFLOW.md +14 -5
- package/package.json +1 -1
- package/src/commands/init.js +2 -0
- package/src/lib/rootdoc.js +2 -0
- package/src/skills/claude-code/agentic-spec/SKILL.md +125 -0
- package/src/skills/claude-code/agentic-task/SKILL.md +3 -1
- package/src/skills/codex/agentic-spec/SKILL.md +105 -0
- package/src/skills/codex/agentic-spec/agents/openai.yaml +5 -0
- package/src/skills/codex/agentic-task/SKILL.md +3 -1
- package/templates/task.md +2 -1
package/README.md
CHANGED
|
@@ -31,7 +31,8 @@ Two categories ([ADR-0007](doc/adr/0007-workflow-operational-skills.md)) and two
|
|
|
31
31
|
| `agentic-bootstrap` | spec-driven | universal | Scans the repo, writes `AGENTS.md` ≤150 lines | `/agentic-bootstrap` |
|
|
32
32
|
| `agentic-architecture` | spec-driven | universal | Scans the code, writes `ARCHITECTURE.md` | `/agentic-architecture` |
|
|
33
33
|
| `agentic-adr` | spec-driven | universal | Drafts `doc/adr/NNNN-<slug>.md` from the conversation | `/agentic-adr` |
|
|
34
|
-
| `agentic-
|
|
34
|
+
| `agentic-spec` | spec-driven | universal | Drafts `doc/specs/NNNN-<slug>.md` — feature-level spec (User Scenarios, Requirements, Success Criteria) layer 2 of the four-layer stack | `/agentic-spec` |
|
|
35
|
+
| `agentic-task` | spec-driven | universal | Drafts `doc/tasks/NNNN-<slug>.md` (checkbox + Notes format; carries `Spec ref` to link the implementing spec) | `/agentic-task` |
|
|
35
36
|
| `agentic-audit` | spec-driven | universal | Read-only drift report (AGENTS.md / ARCHITECTURE.md / ADRs) | `/agentic-audit` |
|
|
36
37
|
| `agentic-philosophy` | workflow-operational | universal | Universal agent guardrails — auto-loads on non-trivial work | implicit |
|
|
37
38
|
| `agentic-review` | workflow-operational | universal | Fresh-context code review per WORKFLOW §10; structured findings, no "approve" | `/agentic-review <range>` |
|
|
@@ -122,6 +123,8 @@ Prompts reference templates by relative path. Two ways to give your agent access
|
|
|
122
123
|
|
|
123
124
|
**Researching before implementation.** Run `/agentic-ground` (or let it auto-trigger on non-trivial work). The skill runs a four-source levantamento — official docs, validated open-source examples, in-repo patterns, and git history — synthesizes a happy path with citations from each source, and gates any deviation behind an irrefutable justification before code is written (WORKFLOW §4 + §5). Output is the input to whatever produces the implementation plan; the skill does not write code.
|
|
124
125
|
|
|
126
|
+
**Specifying a feature.** Run `/agentic-spec` (or `/agentic-spec` with a feature name). The skill scaffolds `doc/specs/NNNN-<slug>.md` with industry-aligned mandatory sections (User Scenarios, Functional / Non-functional Requirements, Success Criteria, Edge Cases, Out of Scope, Open Questions, Related). Specs are layer 2 of the four-layer artifact stack — Constitution → Spec → Plan/Decisions → Code. One spec per feature; multiple tasks (`/agentic-task`) implement one spec; the task template carries a `Spec ref` field linking back to the spec.
|
|
127
|
+
|
|
125
128
|
**Project already built with agents.** Treat missing artifacts as brownfield (run the relevant skill) and existing artifacts as audit (`/agentic-audit`).
|
|
126
129
|
|
|
127
130
|
## What ends up in your target project
|
package/WORKFLOW.md
CHANGED
|
@@ -30,15 +30,24 @@ What to keep in mind:
|
|
|
30
30
|
|
|
31
31
|
## 1. Spec-Driven Design
|
|
32
32
|
|
|
33
|
-
Define the rules before the agent writes a line. The temptation is to dump everything into `AGENTS.md` and hope it works — but bloat causes the model to ignore the file. Keep one topic per Markdown file: lean and focused.
|
|
33
|
+
Define the rules before the agent writes a line. The temptation is to dump everything into `AGENTS.md` and hope it works — but bloat causes the model to ignore the file. Keep one topic per Markdown file: lean and focused.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
There are two complementary frames for the artifacts the kit produces. The first is **purpose** — what each artifact is *for*. The second is **loading mechanism** — when each artifact reaches the agent's context.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
### Four-layer artifact stack (purpose)
|
|
38
38
|
|
|
39
|
-
**
|
|
39
|
+
1. **Constitution** — `AGENTS.md` (operational guide) and `WORKFLOW.md` (engineering philosophy). Tells the agent how the project works and how the team thinks. Read every session.
|
|
40
|
+
2. **Spec** — `doc/specs/NNNN-<slug>.md`. Feature-level requirements: who the feature is for, what it must do, the measurable success criteria, the explicit non-goals. One spec per feature; multiple tasks implement one spec; ADRs may be driven by spec constraints. Industry-aligned with [GitHub Spec Kit](https://github.com/github/spec-kit).
|
|
41
|
+
3. **Plan / Decisions** — `ARCHITECTURE.md` (system patterns and boundaries), `doc/adr/NNNN-*.md` (binding architectural decisions in Michael Nygard's pattern), `doc/tasks/NNNN-*.md` (per-work-unit plan with checkbox acceptance criteria). The *how* of building what the spec asked for.
|
|
42
|
+
4. **Code** — the implementation. Code is the primary documentation of behavior; comments justify non-obvious choices.
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
### Three context types (loading mechanism)
|
|
45
|
+
|
|
46
|
+
- **Operational context is advisory.** `AGENTS.md` (or `CLAUDE.md` for Claude Code, which can mirror or import the same content via `@AGENTS.md`) tells the agent how to build, test, follow conventions, and where the security boundaries are. The agent reads it as a guide, not a contract. Open standard `AGENTS.md` is native in most agentic IDEs.
|
|
47
|
+
- **Canonical specs are constraints, not advice.** `DESIGN.md` (the visual contract — YAML tokens plus Markdown rationale, per Google Labs' open standard), `ARCHITECTURE.md`, ADRs in `doc/adr/*.md`, and feature specs in `doc/specs/*.md` are facts the agent must obey. If a token, pattern, or success criterion isn't declared here, it doesn't exist. The agent must never invent one.
|
|
48
|
+
- **On-demand context is `SKILL.md`.** Description loads at session start (the listing is capped at 1,536 characters per the spec) and body loads only when the skill is invoked. Use it for repeatable workflows or domain knowledge that shouldn't pay a token cost on every turn.
|
|
49
|
+
|
|
50
|
+
Two rules apply across all of the above:
|
|
42
51
|
|
|
43
52
|
- **Acceptance criteria must be measurable.** "Build a dashboard" fails. "Loads in under 2 seconds, shows 6 months of history, passes axe accessibility" succeeds.
|
|
44
53
|
- **Prune.** If removing a line wouldn't make the agent fail, cut it.
|
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -48,6 +48,7 @@ export const REQUIRED_SKILLS = [
|
|
|
48
48
|
'agentic-philosophy',
|
|
49
49
|
'agentic-architecture',
|
|
50
50
|
'agentic-adr',
|
|
51
|
+
'agentic-spec',
|
|
51
52
|
'agentic-task',
|
|
52
53
|
'agentic-audit',
|
|
53
54
|
'agentic-review',
|
|
@@ -264,6 +265,7 @@ export async function initCommand(opts) {
|
|
|
264
265
|
'/agentic-bootstrap (AGENTS.md)',
|
|
265
266
|
'/agentic-architecture (ARCHITECTURE.md)',
|
|
266
267
|
'/agentic-adr',
|
|
268
|
+
'/agentic-spec (doc/specs/)',
|
|
267
269
|
'/agentic-task',
|
|
268
270
|
'/agentic-audit',
|
|
269
271
|
'/agentic-review (WORKFLOW §10)',
|
package/src/lib/rootdoc.js
CHANGED
|
@@ -17,6 +17,8 @@ export const SKILL_DESCRIPTIONS = {
|
|
|
17
17
|
'Universal agent guardrails (think before coding, verify before claiming done). Auto-loads on non-trivial work.',
|
|
18
18
|
'agentic-architecture': 'Generate or audit `ARCHITECTURE.md` at the repo root.',
|
|
19
19
|
'agentic-adr': 'Draft a new ADR at `doc/adr/NNNN-<slug>.md`.',
|
|
20
|
+
'agentic-spec':
|
|
21
|
+
'Draft a feature spec at `doc/specs/NNNN-<slug>.md` (Spec Kit-aligned mandatory sections). Layer 2 of the four-layer artifact stack.',
|
|
20
22
|
'agentic-task': 'Draft a new task at `doc/tasks/NNNN-<slug>.md`.',
|
|
21
23
|
'agentic-audit':
|
|
22
24
|
'Read-only drift report comparing AGENTS.md / ARCHITECTURE.md / ADRs against the code.',
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-spec
|
|
3
|
+
description: Draft a feature-level specification at doc/specs/NNNN-<slug>.md following the kit's four-layer artifact stack (Constitution → Spec → Plan/Decisions → Code). Adapts GitHub Spec Kit's mandatory sections (User Scenarios, Requirements, Success Criteria) to the kit's documentation discipline. Use when the user wants to write, draft, scaffold, or open a feature spec, PRD, product requirements, feature brief, user stories, or success criteria for a feature multiple tasks will implement. Status starts at draft; the file is the binding feature contract once accepted.
|
|
4
|
+
allowed-tools: Read, Write, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /agentic-spec
|
|
8
|
+
|
|
9
|
+
Drafts `doc/specs/<NNNN>-<short-slug>.md` for one feature. Status lifecycle: `draft` → `accepted` → `shipped` | `superseded by SPEC-NNNN`. Spec is the layer-2 artifact in the kit's four-layer stack — Constitution (`AGENTS.md` + `WORKFLOW.md`) → **Spec (this skill)** → Plan/Decisions (`ARCHITECTURE.md` + `doc/adr/` + `doc/tasks/`) → Code. Multiple tasks implement one spec; ADRs may be driven by spec constraints.
|
|
10
|
+
|
|
11
|
+
## Step 1 — Determine NNNN and slug
|
|
12
|
+
|
|
13
|
+
List `doc/specs/`. NNNN = next available 4-digit number after the highest existing (mirrors the ADR and task conventions). If `doc/specs/` does not exist, create it; start at `0001`. Slug: kebab-case, ≤6 words, derived from the feature title.
|
|
14
|
+
|
|
15
|
+
## Step 2 — Confirm scope
|
|
16
|
+
|
|
17
|
+
The spec captures **one** feature. If the user's request implies multiple features, ask which one to write first; the others become follow-up specs. A "feature" here is the smallest user-visible outcome that has its own success criteria — not a task (work unit) and not a binding architectural decision (ADR).
|
|
18
|
+
|
|
19
|
+
## Step 3 — Interview to fill
|
|
20
|
+
|
|
21
|
+
Ask one question per missing field, in this order. Skip the philosophical questions and the questions whose answers are already obvious from the conversation.
|
|
22
|
+
|
|
23
|
+
* **Context:** business context first per ADR-0008. *Why* the feature exists, the user / constraint / problem it addresses, the cost of *not* building it.
|
|
24
|
+
* **User Scenarios:** Given-When-Then for the key flows. Each scenario must be independently testable. Multiple scenarios when the feature has more than one path.
|
|
25
|
+
* **Functional Requirements:** testable statements. Each as a checkbox. *"User can sign in with email and password"* — yes. *"Authentication should be secure"* — no, that's not a requirement, it's a hope.
|
|
26
|
+
* **Non-functional Requirements:** performance, security, accessibility, observability — only the constraints that bind. Skip when there are none.
|
|
27
|
+
* **Success Criteria:** measurable per [`WORKFLOW.md` §1](../../WORKFLOW.md). Each as a checkbox. Pass/fail must be observable, not aspirational. *"Loads in under 2 seconds at p95 over 7 days"* — yes. *"Loads fast"* — no.
|
|
28
|
+
* **Edge Cases:** empty inputs, large inputs, concurrent access, missing prerequisites, permission errors. Surface them before code is written, not after a bug report.
|
|
29
|
+
* **Out of Scope:** explicit non-goals. Anything readers might assume is in scope but isn't. Prevents scope creep without an audit trail.
|
|
30
|
+
* **Open Questions:** deferred decisions. Each becomes a follow-up ADR or an explicit punt with a rationale.
|
|
31
|
+
* **Related:** ADRs touched by this spec, tasks implementing it (filled lazily as tasks are created), other specs this one supersedes or depends on.
|
|
32
|
+
|
|
33
|
+
Status starts at `draft`. Created: today, ISO format. Owner: ask. Do **not** invent values — when the user does not know, leave `<TODO>` and ask.
|
|
34
|
+
|
|
35
|
+
## Step 4 — Write the file
|
|
36
|
+
|
|
37
|
+
Path: `doc/specs/<NNNN>-<short-slug>.md`. Use the template below.
|
|
38
|
+
|
|
39
|
+
Stop after writing. Do **not** flip status to `accepted` — that requires user review.
|
|
40
|
+
|
|
41
|
+
## Step 5 — Editing guidance for later turns
|
|
42
|
+
|
|
43
|
+
When the user later works on the spec, edit the file by:
|
|
44
|
+
|
|
45
|
+
* Toggling Success Criteria checkboxes as feature lands incrementally.
|
|
46
|
+
* Appending to **Open Questions** (close them with the resolution; never delete them).
|
|
47
|
+
* Flipping `Status` to `accepted` once the user signs off and tasks start being created.
|
|
48
|
+
* Flipping `Status` to `shipped` after release.
|
|
49
|
+
* Flipping `Status` to `superseded by SPEC-NNNN` when a later spec replaces this one.
|
|
50
|
+
* Adding `Tasks` entries to `Related` as tasks are created against this spec.
|
|
51
|
+
|
|
52
|
+
Never rewrite existing prose — append rationale to **Open Questions** as a resolution paragraph rather than mutating the original requirement text.
|
|
53
|
+
|
|
54
|
+
## Template — `doc/specs/NNNN-<slug>.md`
|
|
55
|
+
|
|
56
|
+
````markdown
|
|
57
|
+
# Spec `<NNNN>`: `<short imperative title>`
|
|
58
|
+
|
|
59
|
+
**Status:** `<draft | accepted | shipped | superseded by SPEC-NNNN>`
|
|
60
|
+
**Created:** `<YYYY-MM-DD>`
|
|
61
|
+
**Owner:** `<name or role>`
|
|
62
|
+
|
|
63
|
+
## Context
|
|
64
|
+
|
|
65
|
+
`<Why this feature exists. The user, the constraint, the problem. What would break if this feature did not ship.>`
|
|
66
|
+
|
|
67
|
+
## User Scenarios
|
|
68
|
+
|
|
69
|
+
`<Given-When-Then for the key flows. Each scenario independently testable.>`
|
|
70
|
+
|
|
71
|
+
- **Scenario 1:** `<short title>`
|
|
72
|
+
- Given `<starting state>`
|
|
73
|
+
- When `<action>`
|
|
74
|
+
- Then `<observable outcome>`
|
|
75
|
+
|
|
76
|
+
## Requirements
|
|
77
|
+
|
|
78
|
+
### Functional
|
|
79
|
+
|
|
80
|
+
- [ ] `<R1: testable statement>`
|
|
81
|
+
- [ ] `<R2>`
|
|
82
|
+
|
|
83
|
+
### Non-functional
|
|
84
|
+
|
|
85
|
+
- [ ] `<perf / security / a11y / observability — only when binding>`
|
|
86
|
+
|
|
87
|
+
## Success Criteria
|
|
88
|
+
|
|
89
|
+
Measurable conditions. Each as a checkbox; pass/fail observable, not aspirational.
|
|
90
|
+
|
|
91
|
+
- [ ] `<criterion 1: measurable, observable>`
|
|
92
|
+
- [ ] `<criterion 2>`
|
|
93
|
+
|
|
94
|
+
## Edge Cases
|
|
95
|
+
|
|
96
|
+
- `<empty input behavior>`
|
|
97
|
+
- `<large input / failure modes>`
|
|
98
|
+
- `<permission / concurrency / state-restoration cases>`
|
|
99
|
+
|
|
100
|
+
## Out of Scope
|
|
101
|
+
|
|
102
|
+
`<Explicit non-goals. Anything readers might assume is in scope but isn't.>`
|
|
103
|
+
|
|
104
|
+
## Open Questions
|
|
105
|
+
|
|
106
|
+
`<Deferred decisions. Each becomes an ADR or a documented punt.>`
|
|
107
|
+
|
|
108
|
+
## Related
|
|
109
|
+
|
|
110
|
+
- ADRs: `<list with links — written as the spec is accepted>`
|
|
111
|
+
- Tasks: `<doc/tasks/NNNN-... — appended as tasks are created>`
|
|
112
|
+
- Supersedes / Depends on: `<other spec links if any>`
|
|
113
|
+
````
|
|
114
|
+
|
|
115
|
+
## Output contract
|
|
116
|
+
|
|
117
|
+
A single new file at `doc/specs/<NNNN>-<short-slug>.md`. Status `draft`. Tasks list empty (filled lazily as tasks land). No existing specs modified. No invented values.
|
|
118
|
+
|
|
119
|
+
The spec is a narrative document but is exempt from ADR-0008's no-dates rule for the same reason ADRs and tasks are: the `Status` lifecycle and `Created` field are part of the auditability primitive. The remaining documentation discipline rules apply at write time:
|
|
120
|
+
|
|
121
|
+
- No emoji anywhere in the file.
|
|
122
|
+
- `Context` is the business-context-first section — *why* the feature exists before *what* it does.
|
|
123
|
+
- One scope: one feature per spec. Multiple features implies multiple specs.
|
|
124
|
+
- No speculation. Open Questions go in their named section; everywhere else captures decisions.
|
|
125
|
+
- No commented-out requirements or TODO/FIXME — every deferred item references a tracked work item or lives under Open Questions.
|
|
@@ -20,6 +20,7 @@ Ask one question per missing field, in this order:
|
|
|
20
20
|
* **Acceptance Criteria:** measurable conditions. Each is a checkbox; pass/fail must be observable, not aspirational ("loads in under 2s", not "fast enough").
|
|
21
21
|
* **Plan:** concrete sequential steps with file paths where applicable. Each is a checkbox.
|
|
22
22
|
* **Owner:** ask.
|
|
23
|
+
* **Spec ref:** ask; leave blank when no spec drives this task. When a feature spec exists at `doc/specs/NNNN-<slug>.md`, link it here so the spec's `Related → Tasks` list reciprocates.
|
|
23
24
|
* **Board ref:** ask; leave blank if solo work.
|
|
24
25
|
|
|
25
26
|
Status starts at `proposed`. Created: today, ISO format. Notes: empty (filled during execution). Definition of Done section: copy verbatim from the template.
|
|
@@ -48,7 +49,8 @@ Status flips to `done` only when every Acceptance Criterion and every Definition
|
|
|
48
49
|
**Status:** `<proposed | in-progress | blocked | done>`
|
|
49
50
|
**Created:** `<YYYY-MM-DD>`
|
|
50
51
|
**Owner:** `<name or role>`
|
|
51
|
-
**
|
|
52
|
+
**Spec ref:** `<doc/specs/NNNN-<slug>.md or SPEC-NNNN — blank when no spec drives this task>`
|
|
53
|
+
**Board ref:** `<external ticket URL or ID — blank for solo work>`
|
|
52
54
|
|
|
53
55
|
## Context
|
|
54
56
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-spec
|
|
3
|
+
description: Draft a feature-level specification at doc/specs/NNNN-<slug>.md following the four-layer artifact stack (Constitution → Spec → Plan/Decisions → Code). Adapts GitHub Spec Kit's mandatory sections (User Scenarios, Requirements, Success Criteria) to the kit's documentation discipline. Use when the user wants to write, draft, scaffold, or open a feature spec, PRD, product requirements, feature brief, user stories, or success criteria. Status starts at draft.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<background_information>
|
|
7
|
+
Drafts `doc/specs/<NNNN>-<short-slug>.md` for one feature. Status lifecycle: draft → accepted → shipped | superseded by SPEC-NNNN. Spec is the layer-2 artifact in the kit's four-layer stack — Constitution (`AGENTS.md` + `WORKFLOW.md`) → Spec (this skill) → Plan/Decisions (`ARCHITECTURE.md` + `doc/adr/` + `doc/tasks/`) → Code. Multiple tasks implement one spec; ADRs may be driven by spec constraints.
|
|
8
|
+
|
|
9
|
+
Codex auto-trigger on description keywords is less mature than Claude Code's. If auto-invocation does not fire when the user asks to "draft a spec" or "write a PRD" on a non-trivial feature, invoke this skill manually.
|
|
10
|
+
</background_information>
|
|
11
|
+
|
|
12
|
+
<instructions>
|
|
13
|
+
Step 1 — determine NNNN and slug. List `doc/specs/`. NNNN = next available 4-digit number after the highest existing (mirrors ADR and task conventions). If `doc/specs/` does not exist, create it; start at 0001. Slug: kebab-case, ≤6 words, derived from the feature title.
|
|
14
|
+
|
|
15
|
+
Step 2 — confirm scope. The spec captures one feature. If the user's request implies multiple, ask which to write first; the others become follow-up specs. A "feature" here is the smallest user-visible outcome that has its own success criteria — not a task (work unit) and not a binding architectural decision (ADR).
|
|
16
|
+
|
|
17
|
+
Step 3 — interview to fill. Ask one question per missing field, in this order:
|
|
18
|
+
- Context: business context first per ADR-0008. Why the feature exists, the user / constraint / problem it addresses, the cost of not building it.
|
|
19
|
+
- User Scenarios: Given-When-Then for the key flows. Each scenario independently testable.
|
|
20
|
+
- Functional Requirements: testable statements. Each as a checkbox.
|
|
21
|
+
- Non-functional Requirements: perf / security / a11y / observability — only when binding.
|
|
22
|
+
- Success Criteria: measurable per WORKFLOW.md §1. Each as a checkbox; pass/fail observable, not aspirational.
|
|
23
|
+
- Edge Cases: empty inputs, large inputs, concurrent access, missing prerequisites, permission errors.
|
|
24
|
+
- Out of Scope: explicit non-goals.
|
|
25
|
+
- Open Questions: deferred decisions. Each becomes an ADR or a documented punt.
|
|
26
|
+
- Related: ADRs touched, tasks implementing it (lazy), other specs this one supersedes or depends on.
|
|
27
|
+
|
|
28
|
+
Status starts at draft. Created: today, ISO format. Owner: ask. Do NOT invent values; leave `<TODO>` and ask.
|
|
29
|
+
|
|
30
|
+
Step 4 — write the file. Path: `doc/specs/<NNNN>-<short-slug>.md`. Use the template below.
|
|
31
|
+
|
|
32
|
+
Stop after writing. Do NOT flip status to accepted — that requires user review.
|
|
33
|
+
|
|
34
|
+
Step 5 — editing guidance for later turns. Toggle Success Criteria checkboxes as feature lands. Append to Open Questions; close with resolution paragraphs, never delete. Flip Status to accepted on user sign-off, shipped after release, superseded when replaced. Add tasks to Related as they are created. Never rewrite existing prose — append rationale to Open Questions rather than mutating original requirement text.
|
|
35
|
+
</instructions>
|
|
36
|
+
|
|
37
|
+
<template path="doc/specs/NNNN-<slug>.md">
|
|
38
|
+
# Spec `<NNNN>`: `<short imperative title>`
|
|
39
|
+
|
|
40
|
+
**Status:** `<draft | accepted | shipped | superseded by SPEC-NNNN>`
|
|
41
|
+
**Created:** `<YYYY-MM-DD>`
|
|
42
|
+
**Owner:** `<name or role>`
|
|
43
|
+
|
|
44
|
+
## Context
|
|
45
|
+
|
|
46
|
+
`<Why this feature exists. The user, the constraint, the problem. What would break if this feature did not ship.>`
|
|
47
|
+
|
|
48
|
+
## User Scenarios
|
|
49
|
+
|
|
50
|
+
`<Given-When-Then for the key flows. Each scenario independently testable.>`
|
|
51
|
+
|
|
52
|
+
- **Scenario 1:** `<short title>`
|
|
53
|
+
- Given `<starting state>`
|
|
54
|
+
- When `<action>`
|
|
55
|
+
- Then `<observable outcome>`
|
|
56
|
+
|
|
57
|
+
## Requirements
|
|
58
|
+
|
|
59
|
+
### Functional
|
|
60
|
+
|
|
61
|
+
- [ ] `<R1: testable statement>`
|
|
62
|
+
- [ ] `<R2>`
|
|
63
|
+
|
|
64
|
+
### Non-functional
|
|
65
|
+
|
|
66
|
+
- [ ] `<perf / security / a11y / observability — only when binding>`
|
|
67
|
+
|
|
68
|
+
## Success Criteria
|
|
69
|
+
|
|
70
|
+
Measurable conditions. Each as a checkbox; pass/fail observable, not aspirational.
|
|
71
|
+
|
|
72
|
+
- [ ] `<criterion 1: measurable, observable>`
|
|
73
|
+
- [ ] `<criterion 2>`
|
|
74
|
+
|
|
75
|
+
## Edge Cases
|
|
76
|
+
|
|
77
|
+
- `<empty input behavior>`
|
|
78
|
+
- `<large input / failure modes>`
|
|
79
|
+
- `<permission / concurrency / state-restoration cases>`
|
|
80
|
+
|
|
81
|
+
## Out of Scope
|
|
82
|
+
|
|
83
|
+
`<Explicit non-goals. Anything readers might assume is in scope but isn't.>`
|
|
84
|
+
|
|
85
|
+
## Open Questions
|
|
86
|
+
|
|
87
|
+
`<Deferred decisions. Each becomes an ADR or a documented punt.>`
|
|
88
|
+
|
|
89
|
+
## Related
|
|
90
|
+
|
|
91
|
+
- ADRs: `<list with links — written as the spec is accepted>`
|
|
92
|
+
- Tasks: `<doc/tasks/NNNN-... — appended as tasks are created>`
|
|
93
|
+
- Supersedes / Depends on: `<other spec links if any>`
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<output_contract>
|
|
97
|
+
A single new file at `doc/specs/<NNNN>-<short-slug>.md`. Status draft. Tasks list empty (filled lazily as tasks land). No existing specs modified. No invented values.
|
|
98
|
+
|
|
99
|
+
Spec is a narrative document but is exempt from ADR-0008's no-dates rule for the same reason ADRs and tasks are: the Status lifecycle and Created field are part of the auditability primitive. Remaining documentation discipline rules apply at write time:
|
|
100
|
+
- No emoji anywhere in the file.
|
|
101
|
+
- Context is the business-context-first section — why the feature exists before what it does.
|
|
102
|
+
- One scope: one feature per spec.
|
|
103
|
+
- No speculation. Open Questions go in their named section.
|
|
104
|
+
- No commented-out requirements or TODO/FIXME — every deferred item references a tracked work item or lives under Open Questions.
|
|
105
|
+
</output_contract>
|
|
@@ -15,6 +15,7 @@ Step 2 — interview to fill. Ask one question per missing field, in this order:
|
|
|
15
15
|
- Acceptance Criteria: measurable conditions. Each is a checkbox; pass/fail must be observable, not aspirational ("loads in under 2s", not "fast enough").
|
|
16
16
|
- Plan: concrete sequential steps with file paths where applicable. Each is a checkbox.
|
|
17
17
|
- Owner: ask.
|
|
18
|
+
- Spec ref: ask; leave blank when no spec drives this task. When a feature spec exists at `doc/specs/NNNN-<slug>.md`, link it here so the spec's Related → Tasks list reciprocates.
|
|
18
19
|
- Board ref: ask; leave blank if solo work.
|
|
19
20
|
|
|
20
21
|
Status starts at proposed. Created: today, ISO format. Notes: empty. Definition of Done section: copy verbatim from the template.
|
|
@@ -37,7 +38,8 @@ Status flips to done only when every Acceptance Criterion and every Definition o
|
|
|
37
38
|
**Status:** `<proposed | in-progress | blocked | done>`
|
|
38
39
|
**Created:** `<YYYY-MM-DD>`
|
|
39
40
|
**Owner:** `<name or role>`
|
|
40
|
-
**
|
|
41
|
+
**Spec ref:** `<doc/specs/NNNN-<slug>.md or SPEC-NNNN — blank when no spec drives this task>`
|
|
42
|
+
**Board ref:** `<external ticket URL or ID — blank for solo work>`
|
|
41
43
|
|
|
42
44
|
## Context
|
|
43
45
|
|
package/templates/task.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
**Status:** `<proposed | in-progress | blocked | done>`
|
|
4
4
|
**Created:** `<YYYY-MM-DD>`
|
|
5
5
|
**Owner:** `<name or role>`
|
|
6
|
-
**
|
|
6
|
+
**Spec ref:** `<doc/specs/NNNN-<slug>.md or SPEC-NNNN — blank when no spec drives this task>`
|
|
7
|
+
**Board ref:** `<external ticket URL or ID — blank for solo work>`
|
|
7
8
|
|
|
8
9
|
## Context
|
|
9
10
|
|