spec-feature 1.0.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 +145 -0
- package/bin/cli.js +32 -0
- package/package.json +8 -0
- package/spec/core/hotfix.md +35 -0
- package/spec/core/plan.md +55 -0
- package/spec/core/spec.md +51 -0
- package/spec/core/tasks.md +59 -0
- package/spec/core/verify.md +80 -0
- package/spec/feature.md +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# SpecFeature
|
|
2
|
+
|
|
3
|
+
SpecFeature is a sequential process for preparing and maintaining features: from formulating business context to verifying completed tasks. It helps synchronize product, engineering, and QA teams, reduce the number of "on-the-fly" changes, and establish success criteria before development begins. All artifacts are generated by LLM based on a single input context.
|
|
4
|
+
|
|
5
|
+
## Directory structure `/spec`
|
|
6
|
+
|
|
7
|
+
### Initial structure (created during initialization)
|
|
8
|
+
```
|
|
9
|
+
/spec
|
|
10
|
+
├── README.md ← this guide
|
|
11
|
+
├── feature.md ← main template that launches spec-feature
|
|
12
|
+
└── core ← base templates for specific stages
|
|
13
|
+
├── spec.md ← specification structure
|
|
14
|
+
├── plan.md ← technical plan structure
|
|
15
|
+
├── tasks.md ← task list structure
|
|
16
|
+
├── verify.md ← verification report structure
|
|
17
|
+
└── hotfix.md ← hotfix and artifact update structure
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Full structure (after creating the first feature)
|
|
21
|
+
```
|
|
22
|
+
/spec
|
|
23
|
+
├── README.md ← this guide
|
|
24
|
+
├── feature.md ← main template that launches spec-feature
|
|
25
|
+
├── core ← base templates for specific stages
|
|
26
|
+
│ ├── spec.md ← specification structure
|
|
27
|
+
│ ├── plan.md ← technical plan structure
|
|
28
|
+
│ ├── tasks.md ← task list structure
|
|
29
|
+
│ ├── verify.md ← verification report structure
|
|
30
|
+
│ └── hotfix.md ← hotfix and artifact update structure
|
|
31
|
+
└── features ← directory with feature materials (created automatically)
|
|
32
|
+
├── <feature> ← specific feature folder (e.g., `user-auth`)
|
|
33
|
+
│ ├── spec.md ← current specification
|
|
34
|
+
│ ├── plan.md ← technical plan
|
|
35
|
+
│ ├── tasks.md ← implementation checklist
|
|
36
|
+
│ └── verify-report.md (optional) — verification log
|
|
37
|
+
└── ... ← other features created from templates
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> **Note:** The `features` folder is created automatically when creating the first feature through `spec/feature.md`.
|
|
41
|
+
|
|
42
|
+
## Getting started
|
|
43
|
+
|
|
44
|
+
To launch specification creation, use `spec/feature.md`. It will create a specification, plan, and task list in one request.
|
|
45
|
+
|
|
46
|
+
**Usage example:**
|
|
47
|
+
```
|
|
48
|
+
Use the template from spec/feature.md.
|
|
49
|
+
@user-auth@ Need to add user authentication via email and password. The user should be able to register, log in, and recover their password. Integration with the existing notification system is mandatory.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This will create the `spec/features/user-auth/` folder with three files: `spec.md`, `plan.md`, and `tasks.md`.
|
|
53
|
+
|
|
54
|
+
## Input parameter format
|
|
55
|
+
|
|
56
|
+
Pass parameters in one line in the format `@<feature>@ <context>`:
|
|
57
|
+
|
|
58
|
+
- the value between the first two `@` symbols is used as **FEATURE** and determines the feature folder (`@payments@` → `spec/features/payments`);
|
|
59
|
+
- everything following the second `@` is **CONTEXT**. It can span multiple lines, include lists, links, and additional clarifications.
|
|
60
|
+
|
|
61
|
+
## How to launch specification creation
|
|
62
|
+
|
|
63
|
+
Use any AI Assistant that can create folders and files, such as: `Claude Code`, `Gemini CLI`, `Codex CLI`, `Copilot`, `Cursor`, etc.
|
|
64
|
+
|
|
65
|
+
1. **Pass it a prompt in this format**
|
|
66
|
+
```
|
|
67
|
+
Use the template from spec/feature.md.
|
|
68
|
+
@<feature>@ <context>
|
|
69
|
+
```
|
|
70
|
+
2. **What happens next**
|
|
71
|
+
The AI assistant generates three Markdown documents in sequence:
|
|
72
|
+
- `spec/features/{FEATURE}/spec.md` — specification describing value and user scenarios.
|
|
73
|
+
- `spec/features/{FEATURE}/plan.md` — technical plan based on specification and context.
|
|
74
|
+
- `spec/features/{FEATURE}/tasks.md` — checklist of tasks for implementation and testing.
|
|
75
|
+
|
|
76
|
+
## How to launch task execution based on created specifications
|
|
77
|
+
|
|
78
|
+
After creating the specification and plan, you can proceed with implementation:
|
|
79
|
+
|
|
80
|
+
1. **Launch task execution**
|
|
81
|
+
```
|
|
82
|
+
Execute all tasks in `spec/features/{FEATURE}/tasks.md`
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. **What happens during execution**
|
|
86
|
+
- AI assistant sequentially executes tasks from the checklist
|
|
87
|
+
- Each completed task is marked as finished
|
|
88
|
+
- When problems arise, the assistant may request clarifications
|
|
89
|
+
- Progress can be tracked by updating checkboxes in `tasks.md`
|
|
90
|
+
|
|
91
|
+
3. **Example for user-auth feature**
|
|
92
|
+
```
|
|
93
|
+
Execute all tasks in `spec/features/user-auth/tasks.md`
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## What happens after task execution
|
|
97
|
+
|
|
98
|
+
After completing all tasks, automatic verification is launched:
|
|
99
|
+
|
|
100
|
+
1. **Automatic verification**
|
|
101
|
+
- AI assistant uses the `spec/core/verify.md` template
|
|
102
|
+
- Compares implemented functionality with requirements from `spec.md`
|
|
103
|
+
- Checks compliance with the technical plan from `plan.md`
|
|
104
|
+
|
|
105
|
+
2. **Verification results**
|
|
106
|
+
- A report `spec/features/{FEATURE}/verify-report.md` is created
|
|
107
|
+
- Task statuses in `tasks.md` are updated (✅ completed / ❌ requires refinement)
|
|
108
|
+
- Found discrepancies and recommendations are recorded
|
|
109
|
+
|
|
110
|
+
3. **Verification report content**
|
|
111
|
+
- Summary of completed tasks
|
|
112
|
+
- List of found problems
|
|
113
|
+
- Recommendations for fixes
|
|
114
|
+
- Assessment of feature readiness for production
|
|
115
|
+
|
|
116
|
+
## Updating existing feature
|
|
117
|
+
|
|
118
|
+
To update an existing feature, reuse `spec/feature.md`, specifying the name of the required feature folder and a list of changes:
|
|
119
|
+
|
|
120
|
+
**Update example:**
|
|
121
|
+
```
|
|
122
|
+
Use the template from spec/feature.md.
|
|
123
|
+
@user-auth@ Add two-factor authentication (2FA) via SMS. The user should be able to enable/disable 2FA in profile settings. Integration with existing SMS provider.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The AI assistant will correctly overwrite `spec.md`, `plan.md`, and `tasks.md`, preserving the structure and updating the content for new requirements.
|
|
127
|
+
|
|
128
|
+
## Troubleshooting
|
|
129
|
+
|
|
130
|
+
### Common problems and solutions
|
|
131
|
+
|
|
132
|
+
**Problem:** AI assistant doesn't create feature folder
|
|
133
|
+
- **Solution:** Make sure you're using the correct format `@feature@ context` and that the assistant has file creation permissions
|
|
134
|
+
|
|
135
|
+
**Problem:** Tasks are executed in wrong order
|
|
136
|
+
- **Solution:** Check task numbering in `tasks.md` and reorder if necessary
|
|
137
|
+
|
|
138
|
+
**Problem:** Verification doesn't launch automatically
|
|
139
|
+
- **Solution:** Make sure all tasks in `tasks.md` are marked as completed, then manually launch verification:
|
|
140
|
+
```
|
|
141
|
+
Use the template from spec/core/verify.md to verify spec/features/{FEATURE}/
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Problem:** Conflict when updating existing feature
|
|
145
|
+
- **Solution:** Create a backup of current files before updating or use git to track changes
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
const command = args[0];
|
|
12
|
+
|
|
13
|
+
if (command === "init") {
|
|
14
|
+
const targetDir = process.cwd();
|
|
15
|
+
const templatesDir = path.join(__dirname, "../spec");
|
|
16
|
+
|
|
17
|
+
fs.readdirSync(templatesDir).forEach(file => {
|
|
18
|
+
const src = path.join(templatesDir, file);
|
|
19
|
+
const dest = path.join(targetDir, file);
|
|
20
|
+
|
|
21
|
+
if (!fs.existsSync(dest)) {
|
|
22
|
+
fs.copyFileSync(src, dest);
|
|
23
|
+
console.log(`Created file: ${file}`);
|
|
24
|
+
} else {
|
|
25
|
+
console.log(`Skipped (already exists): ${file}`);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
console.log("✅ SpecFeature initialized!");
|
|
30
|
+
} else {
|
|
31
|
+
console.log("Usage: npx spec-feature init");
|
|
32
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- spec-feature: feature hotfix -->
|
|
2
|
+
|
|
3
|
+
Template automates feature maintenance after release: records hotfixes and synchronously updates **spec-feature** artifacts (spec, plan, and tasks).
|
|
4
|
+
|
|
5
|
+
**Parameters**
|
|
6
|
+
|
|
7
|
+
- **FEATURE** — name of the folder with feature artifacts. Determined by the value between the first two `@` symbols (e.g., `@billing@` → `billing`).
|
|
8
|
+
- **CONTEXT** — essence of the hotfix and expected result. This is everything passed after the second `@`; multi-line descriptions with links to incidents or PRs are allowed.
|
|
9
|
+
|
|
10
|
+
**General rules**
|
|
11
|
+
|
|
12
|
+
- Work only in the `spec/features/{FEATURE}/` directory: allowed to edit `spec.md`, `plan.md`, and `tasks.md`.
|
|
13
|
+
- Do not create new files in the feature folder (including `hotfix.md` and verification reports).
|
|
14
|
+
- Preserve the structure of existing documents: do not delete sections, do not leave empty headers and hints from templates.
|
|
15
|
+
- All changes should consider requirements from specification and plan, maintaining consistency of terms and references.
|
|
16
|
+
- Actual task state must be reflected in `tasks.md`: do not allow desynchronization between checkboxes and actual state.
|
|
17
|
+
- Ensure all modified documents are complete and properly formatted.
|
|
18
|
+
|
|
19
|
+
**Automatic update logic**
|
|
20
|
+
|
|
21
|
+
- `spec.md` — update sections affected by the hotfix: clarify user scenarios, rules, or non-functional requirements, add new Assumptions when open questions arise.
|
|
22
|
+
- `plan.md` — adjust technical solutions: data sources, contracts, architectural constraints, and risks, so the plan reflects the current feature structure.
|
|
23
|
+
- `tasks.md` —
|
|
24
|
+
- Add new checkboxes for work required by the hotfix, group them in appropriate sections. Names should start with prefix `hotfix_<date>` in `YYYY-MM-DD` format.
|
|
25
|
+
- Update statuses of existing tasks (`[ ]`/`[x]`), considering actual execution and hotfix results.
|
|
26
|
+
- For each task, specify necessary checks: tests, manual scenarios, documentation updates.
|
|
27
|
+
|
|
28
|
+
**Steps**
|
|
29
|
+
|
|
30
|
+
1. Read `spec.md`, `plan.md`, and `tasks.md` to understand the current feature state.
|
|
31
|
+
2. Form a list of changes that the hotfix should introduce and reflect them in corresponding documents. Maintain unified terms and component references.
|
|
32
|
+
3. Update `tasks.md`: add or adjust tasks, set checkboxes based on actual execution, supplement with verification requirements.
|
|
33
|
+
4. Ensure all modified documents are complete and ready for implementation.
|
|
34
|
+
|
|
35
|
+
Write strictly in Markdown. Goal — automatically bring all feature artifacts up to date under the hotfix and synchronize checklists with actual state.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!-- spec-feature: implementation plan -->
|
|
2
|
+
|
|
3
|
+
Template helps format the feature implementation plan in the **spec-feature** process.
|
|
4
|
+
|
|
5
|
+
**Parameters**
|
|
6
|
+
|
|
7
|
+
- **FEATURE** — name of the folder where the plan will be saved. Taken from the value between the first two `@` symbols (e.g., `@payments@` → `payments`).
|
|
8
|
+
- **CONTEXT** — main context for preparing the plan. Consider everything after the second `@` in the parameter line; context can span multiple lines and include additional clarifications.
|
|
9
|
+
|
|
10
|
+
**General rules**
|
|
11
|
+
|
|
12
|
+
- Work only with specification files within `/spec` directory: automatically create necessary directories and files.
|
|
13
|
+
- Use `spec/core/spec.md` as the specification source on which the plan is formed.
|
|
14
|
+
- Use `spec/features/{FEATURE}/spec.md` as additional context. If the file is unavailable, continue working based on **CONTEXT**.
|
|
15
|
+
- Substitute specific values instead of placeholders (`{FEATURE}`, `{CONTEXT}`, etc.). If a section is not applicable — explicitly write `Not required — reason: <explanation>`.
|
|
16
|
+
- Form meaningful paragraphs or lists: do not leave empty headers, hint comments, and `...` markers.
|
|
17
|
+
- Follow basic software development principles: KISS, DRY, and YAGNI, so solutions remain simple, without duplication and unnecessary logic.
|
|
18
|
+
- Ensure all sections are complete and properly formatted.
|
|
19
|
+
|
|
20
|
+
**What needs to be revealed in the plan**
|
|
21
|
+
|
|
22
|
+
- `## Data sources / schemas` — storage, migrations, indexes, data handling, and external sources.
|
|
23
|
+
- `## Contracts and interfaces` — public APIs, events, queues, UI/CLI, error formats, and validation expectations.
|
|
24
|
+
- `## Architecture / Components` — services, modules, integrations, constraints, and chosen stack (DB, API, UI, queues, background processes, etc.).
|
|
25
|
+
- `## Risks` — potential problems and mitigation methods.
|
|
26
|
+
- `## Assumptions` — explicit assumptions and missing information.
|
|
27
|
+
|
|
28
|
+
**Steps**
|
|
29
|
+
|
|
30
|
+
1. Create the directory structure `spec/features/{FEATURE}/` if it doesn't exist.
|
|
31
|
+
2. Form the plan according to the sections above, based on **CONTEXT** and available additional context. For each section, fix what exactly needs to be done, not just list components.
|
|
32
|
+
3. Create/update the file `spec/features/{FEATURE}/plan.md` with the complete plan content.
|
|
33
|
+
4. Check that the document contains no unfilled placeholders and that the output is formatted in valid Markdown.
|
|
34
|
+
5. Ensure the document is complete and ready for implementation.
|
|
35
|
+
|
|
36
|
+
**Result template**
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
# Implementation Plan
|
|
40
|
+
|
|
41
|
+
**Plan:** {CONTEXT}
|
|
42
|
+
|
|
43
|
+
## Data sources / schemas
|
|
44
|
+
|
|
45
|
+
## Contracts and interfaces
|
|
46
|
+
|
|
47
|
+
## Architecture / Components
|
|
48
|
+
|
|
49
|
+
## Risks
|
|
50
|
+
|
|
51
|
+
## Assumptions
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Write strictly in Markdown and automatically create/update the plan file. **Goal** — create/update file `/spec/features/{FEATURE}/plan.md` describing HOW we implement the feature based on **CONTEXT**.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- spec-feature: specification -->
|
|
2
|
+
|
|
3
|
+
Template helps describe a feature before implementation in the **spec-feature** process.
|
|
4
|
+
|
|
5
|
+
**Parameters**
|
|
6
|
+
|
|
7
|
+
- **FEATURE** — name of the folder where the specification will be saved. Taken from the value between the first two `@` symbols (e.g., `@payments@` → `payments`).
|
|
8
|
+
- **CONTEXT** — main context for describing the feature. Consider everything after the second `@` in the parameter line; context can span multiple lines and include additional clarifications.
|
|
9
|
+
|
|
10
|
+
**General rules**
|
|
11
|
+
|
|
12
|
+
- Work only with specification files within `/spec` directory: automatically create necessary directories and files.
|
|
13
|
+
- Substitute specific values instead of placeholders (`{FEATURE}`, `{CONTEXT}`, etc.). The final document should not contain hints, examples, or `...` markers.
|
|
14
|
+
- The specification header should contain a clear feature name (adapt the **FEATURE** value if necessary).
|
|
15
|
+
- The structure from the template below needs to be filled with content: theses, lists, and tables are allowed, empty sections are not.
|
|
16
|
+
- If there's insufficient data for a section, explicitly write `No data — needs clarification: <what exactly>` instead of an empty header.
|
|
17
|
+
- Ensure all sections are complete and properly formatted.
|
|
18
|
+
|
|
19
|
+
**What needs to be revealed in the specification**
|
|
20
|
+
|
|
21
|
+
- `## User Stories` — minimum three completed stories. For each, fix the role, action, and result/value.
|
|
22
|
+
- `## Main scenarios and rules` — key usage scenarios, constraints, error variants.
|
|
23
|
+
- `## Non-functional requirements` — SLA, performance, security, localization, accessibility, and other non-functional criteria.
|
|
24
|
+
- `## Assumptions` — explicit assumptions and questions that need clarification before development.
|
|
25
|
+
|
|
26
|
+
**Steps**
|
|
27
|
+
|
|
28
|
+
1. Create the directory structure `spec/features/{FEATURE}/` if it doesn't exist.
|
|
29
|
+
2. Form the specification according to the sections above, based on **CONTEXT** and available additional context.
|
|
30
|
+
3. Create/update the file `spec/features/{FEATURE}/spec.md` with the complete specification content.
|
|
31
|
+
4. Check that the document is formatted in Markdown and contains no unfilled placeholders.
|
|
32
|
+
5. Ensure the document is complete and ready for implementation.
|
|
33
|
+
|
|
34
|
+
**Result template**
|
|
35
|
+
|
|
36
|
+
```md
|
|
37
|
+
# {FEATURE}
|
|
38
|
+
|
|
39
|
+
**Specification:** {CONTEXT}
|
|
40
|
+
|
|
41
|
+
## User Stories
|
|
42
|
+
|
|
43
|
+
## Main scenarios and rules
|
|
44
|
+
|
|
45
|
+
## Non-functional requirements
|
|
46
|
+
|
|
47
|
+
## Assumptions
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Write strictly in Markdown and automatically create/update the specification file. **Goal** — create/update file `/spec/features/{FEATURE}/spec.md` describing WHAT we do and WHY, based on **CONTEXT**.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- spec-feature: task list -->
|
|
2
|
+
|
|
3
|
+
Template helps form a task list for feature implementation in the **spec-feature** process.
|
|
4
|
+
|
|
5
|
+
**Parameters**
|
|
6
|
+
|
|
7
|
+
- **FEATURE** — name of the folder where the task list will be saved. Taken from the value between the first two `@` symbols (e.g., `@payments@` → `payments`).
|
|
8
|
+
- **CONTEXT** — main context for preparing tasks. Consider everything after the second `@` in the parameter line; context can span multiple lines and include additional clarifications.
|
|
9
|
+
|
|
10
|
+
**General rules**
|
|
11
|
+
|
|
12
|
+
- Work only with specification files within `/spec` directory: automatically create necessary directories and files.
|
|
13
|
+
- Use `spec/core/spec.md` and `spec/core/plan.md` as base sources of specification and plan when preparing tasks.
|
|
14
|
+
- Use `spec/features/{FEATURE}/spec.md` and `spec/features/{FEATURE}/plan.md` as additional context. If any file is missing, continue working based on available materials and **CONTEXT**.
|
|
15
|
+
- Substitute specific values instead of placeholders (`{FEATURE}`, `{CONTEXT}`, etc.). The final document should not contain hints, examples, or `...` markers.
|
|
16
|
+
- Each task is a checkbox with result formulation and description of mandatory checks/tests.
|
|
17
|
+
- If a direction is not required, explicitly indicate under the corresponding subheading `Not required — reason: <explanation>`.
|
|
18
|
+
- After filling the document, mark self-check checkboxes in the "Instruction execution control" section.
|
|
19
|
+
|
|
20
|
+
**What needs to be revealed in tasks**
|
|
21
|
+
|
|
22
|
+
- `## Main directions` — group tasks by key directions from **CONTEXT** (API, UI, integrations, infrastructure, etc.). For each direction, allocate a separate subheading and list tasks within it.
|
|
23
|
+
- `## Supporting tasks` — documentation, observability, quality, and other cross-cutting activities. If an item is not needed, replace it with an explanation of why it can be omitted.
|
|
24
|
+
- `## Definition of Done` — feature completion criteria: tests, documentation, and other mandatory conditions.
|
|
25
|
+
|
|
26
|
+
**Steps**
|
|
27
|
+
|
|
28
|
+
1. Create the directory structure `spec/features/{FEATURE}/` if it doesn't exist.
|
|
29
|
+
2. Form the task list according to the sections above, based on **CONTEXT** and available additional context.
|
|
30
|
+
3. Create/update the file `spec/features/{FEATURE}/tasks.md` with the complete task list content.
|
|
31
|
+
4. Ensure that tasks cover implementation, verification, and release of the feature. The final Markdown should not contain unfilled placeholders.
|
|
32
|
+
5. Record in the `## Definition of Done` section that `/spec/core/verify.md` execution is performed after completing all tasks, so executors do this automatically upon completion of the list.
|
|
33
|
+
6. Ensure the document is complete and ready for implementation.
|
|
34
|
+
|
|
35
|
+
**Result template**
|
|
36
|
+
|
|
37
|
+
```md
|
|
38
|
+
# Tasks
|
|
39
|
+
|
|
40
|
+
**Context:** {CONTEXT}
|
|
41
|
+
|
|
42
|
+
## Main directions
|
|
43
|
+
|
|
44
|
+
## Supporting tasks
|
|
45
|
+
|
|
46
|
+
- [ ] Documentation: update relevant instructions and descriptions.
|
|
47
|
+
- [ ] Observability: add or clarify metrics, alerts, and/or logging.
|
|
48
|
+
- [ ] Code review and PR: prepare changes for review and accompanying information.
|
|
49
|
+
|
|
50
|
+
## Definition of Done
|
|
51
|
+
|
|
52
|
+
- [ ] All tasks are completed and tested.
|
|
53
|
+
- [ ] Relevant unit/e2e/integration tests pass successfully.
|
|
54
|
+
- [ ] Documentation and operational instructions are updated.
|
|
55
|
+
- [ ] `/spec/core/verify.md` is executed after completing all tasks to verify the task list.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Write strictly in Markdown and automatically create/update the task list file. Do not proceed to task execution without a separate request. **Goal** — create/update file `/spec/features/{FEATURE}/tasks.md` with a list of WHAT we do and how we verify the result, based on **CONTEXT** and prepared materials.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!-- spec-feature: task verification -->
|
|
2
|
+
|
|
3
|
+
Template helps format the results of automatic task execution verification and make a decision about feature archiving in the **spec-feature** process.
|
|
4
|
+
|
|
5
|
+
**Parameters**
|
|
6
|
+
|
|
7
|
+
- **FEATURE** — name of the folder where the verification report will be saved. Taken from the value between the first two `@` symbols (e.g., `@payments@` → `payments`).
|
|
8
|
+
- **CONTEXT** — main context and verification purpose. Consider everything after the second `@` in the parameter line; context can span multiple lines and include additional clarifications.
|
|
9
|
+
|
|
10
|
+
**General rules**
|
|
11
|
+
|
|
12
|
+
- Work only with specification files: do not create code and new directories.
|
|
13
|
+
- **REQUIRED:** Always create `spec/features/{FEATURE}/verify-report.md` file as the main output of verification process.
|
|
14
|
+
- Use `spec/features/{FEATURE}/spec.md`, `plan.md`, and `tasks.md` as source data for verification.
|
|
15
|
+
- Check tasks sequentially: after successful verification, mark the corresponding checkbox in `spec/features/{FEATURE}/tasks.md` as `[x]`; when discrepancies are found, leave `[ ]` and record details in the report file.
|
|
16
|
+
- Save discrepancy logs in `spec/features/{FEATURE}/verify-report.md`, adding new entries with timestamps and brief problem descriptions.
|
|
17
|
+
- If there are no discrepancies, explicitly add an entry "No discrepancies detected" in the appropriate section.
|
|
18
|
+
- Ensure the report is complete and properly formatted.
|
|
19
|
+
|
|
20
|
+
**What needs to be revealed in the verification document**
|
|
21
|
+
|
|
22
|
+
- `## Task verification results` — list of verified tasks with final status and links to supporting artifacts/proofs.
|
|
23
|
+
- `## Discrepancy log` — brief summary of new entries added to `verify-report.md`, with steps to resolve problems.
|
|
24
|
+
- `## Archiving decision` — final status of verify launch: moving feature to `spec/archived/{FEATURE}` or list of actions for re-verification.
|
|
25
|
+
|
|
26
|
+
**Steps**
|
|
27
|
+
|
|
28
|
+
1. **MANDATORY:** Create the verification report file `spec/features/{FEATURE}/verify-report.md` using the template below.
|
|
29
|
+
2. Add a comment at the beginning of the result to specify the save path:
|
|
30
|
+
```md
|
|
31
|
+
<!-- SAVE_AS: spec/features/{FEATURE}/verify-report.md -->
|
|
32
|
+
```
|
|
33
|
+
3. Go through tasks in `spec/features/{FEATURE}/tasks.md` in order and update checkboxes according to actual execution status.
|
|
34
|
+
4. Record results in `spec/features/{FEATURE}/verify-report.md` with logs for all tasks (completed and uncompleted).
|
|
35
|
+
5. Check that Markdown is formatted correctly and contains no unfilled placeholders.
|
|
36
|
+
6. Ensure the report is complete and ready for archiving decision.
|
|
37
|
+
|
|
38
|
+
**verify-report.md template**
|
|
39
|
+
|
|
40
|
+
```md
|
|
41
|
+
# Verify Report - {FEATURE}
|
|
42
|
+
|
|
43
|
+
**Date:** YYYY-MM-DD
|
|
44
|
+
**Context:** {CONTEXT}
|
|
45
|
+
|
|
46
|
+
## Discrepancy log
|
|
47
|
+
|
|
48
|
+
### YYYY-MM-DD - [General status description]
|
|
49
|
+
|
|
50
|
+
#### 1. [Problem name]
|
|
51
|
+
|
|
52
|
+
**Problem:** [Problem description]
|
|
53
|
+
**Status:** [Criticality: critical/not critical/low priority]
|
|
54
|
+
**Action:** [What needs to be done]
|
|
55
|
+
|
|
56
|
+
#### 2. [Next problem]
|
|
57
|
+
|
|
58
|
+
...
|
|
59
|
+
|
|
60
|
+
### YYYY-MM-DD - Positive results
|
|
61
|
+
|
|
62
|
+
#### Fully implemented components:
|
|
63
|
+
|
|
64
|
+
- ✅ [Component 1 (file path)]
|
|
65
|
+
- ✅ [Component 2 (file path)]
|
|
66
|
+
- ❌ [Uncompleted component (reason)]
|
|
67
|
+
- ⚠️ [Partially completed component (what remains)]
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Log entry structure:**
|
|
72
|
+
|
|
73
|
+
- **Date and general status** — grouping by verification time
|
|
74
|
+
- **Problems** — numbered list with problem indication, criticality status, and required actions
|
|
75
|
+
- **Positive results** — list of completed tasks with emoji statuses:
|
|
76
|
+
- ✅ — fully completed
|
|
77
|
+
- ❌ — not completed
|
|
78
|
+
- ⚠️ — partially completed
|
|
79
|
+
|
|
80
|
+
Write strictly in Markdown and add nothing outside the document. **Goal** — verify all tasks in `spec/features/{FEATURE}/tasks.md`, mark completed ones in the task file, create a detailed report `verify-report.md` with logs of all tasks and their statuses, or recommend moving the feature to `spec/archived/{FEATURE}` if all tasks passed.
|
package/spec/feature.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- spec-feature: unified launch -->
|
|
2
|
+
|
|
3
|
+
Template allows creating a complete set of feature documents in one request during the **spec-feature** process.
|
|
4
|
+
|
|
5
|
+
**Parameters**
|
|
6
|
+
|
|
7
|
+
- **FEATURE** — name of the folder where artifacts will be saved. Determined by the value between the first two `@` symbols (e.g., `@payments@` → `payments`).
|
|
8
|
+
- **CONTEXT** — detailed feature description: goals, functional and non-functional requirements, constraints, implementation plan. Consider everything after the second `@` in the parameter line; text can span multiple lines and include lists.
|
|
9
|
+
|
|
10
|
+
Parameters are passed in one line in the format `@<feature>@ <context>` without XML-like tags.
|
|
11
|
+
|
|
12
|
+
**General rules**
|
|
13
|
+
|
|
14
|
+
- Work only with specification files in the `spec/features/{FEATURE}` directory: automatically create necessary directories and files within `/spec` folder only.
|
|
15
|
+
- If the **FEATURE** value matches an already existing feature, update its current materials instead of creating a new folder and use the `spec/core/hotfix.md` template when making changes.
|
|
16
|
+
- Within one request, create/update three separate Markdown documents: `spec.md`, `plan.md`, and `tasks.md` in the appropriate directory structure.
|
|
17
|
+
- Automatically create the directory structure `spec/features/{FEATURE}/` if it doesn't exist.
|
|
18
|
+
- All sections from templates must be filled with content: do not leave empty headers, placeholders, or hint comments.
|
|
19
|
+
- Use sequence: first specification, then plan (based on specification), then task list (based on specification and plan).
|
|
20
|
+
- Follow KISS, DRY, and YAGNI requirements: solutions should be implementable without excessive complexity and duplication.
|
|
21
|
+
|
|
22
|
+
**Steps**
|
|
23
|
+
|
|
24
|
+
1. Check if `spec/features/{FEATURE}/` directory exists, create it if necessary.
|
|
25
|
+
2. Prepare and create/update specification `spec/features/{FEATURE}/spec.md` using the template from `spec/core/spec.md`, using **CONTEXT** as primary context.
|
|
26
|
+
3. Based on the completed specification and **CONTEXT**, form and create/update plan `spec/features/{FEATURE}/plan.md` using the structure from `spec/core/plan.md`.
|
|
27
|
+
4. Considering specification, plan, and **CONTEXT**, compile and create/update task list `spec/features/{FEATURE}/tasks.md` according to requirements from `spec/core/tasks.md`.
|
|
28
|
+
5. Check that each document is formatted in valid Markdown and contains no unfilled sections.
|
|
29
|
+
|
|
30
|
+
**Result structure**
|
|
31
|
+
|
|
32
|
+
The process should automatically create/update the following files:
|
|
33
|
+
|
|
34
|
+
1. `spec/features/{FEATURE}/spec.md` - Feature specification document
|
|
35
|
+
2. `spec/features/{FEATURE}/plan.md` - Implementation plan document
|
|
36
|
+
3. `spec/features/{FEATURE}/tasks.md` - Task list document
|
|
37
|
+
|
|
38
|
+
Each document should be created with complete content based on the templates from `spec/core/` and the provided **CONTEXT**.
|
|
39
|
+
|
|
40
|
+
Write strictly in Markdown and automatically create/update the three documents. **Goal** — create a complete set of feature materials (what we do, how we implement, and what tasks we perform) in one request based on **CONTEXT**, with automatic file creation and directory structure management.
|