km-spec-driven-development 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +25 -0
- package/README.md +282 -0
- package/bin/km-spec +995 -0
- package/package.json +25 -0
- package/templates/.specs/codebase/CONVENTIONS.md +125 -0
- package/templates/.specs/features/.gitkeep +0 -0
- package/templates/.specs/project/PROJECT.md +36 -0
- package/templates/.specs/project/ROADMAP.md +26 -0
- package/templates/.specs/project/STATE.md +37 -0
- package/templates/.specs/quick/.gitkeep +0 -0
- package/templates/AGENTS.md +42 -0
- package/templates/SDD.md +1873 -0
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "km-spec-driven-development",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A lightweight Spec Driven Development CLI for AI-assisted software projects",
|
|
5
|
+
"bin": {
|
|
6
|
+
"km-spec": "bin/km-spec"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin",
|
|
10
|
+
"templates",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"spec-driven-development",
|
|
16
|
+
"sdd",
|
|
17
|
+
"ai-assisted-development",
|
|
18
|
+
"bash",
|
|
19
|
+
"cli",
|
|
20
|
+
"claude-code",
|
|
21
|
+
"codex",
|
|
22
|
+
"cursor"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT"
|
|
25
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Codebase Conventions
|
|
2
|
+
|
|
3
|
+
## 1. Technical Context
|
|
4
|
+
|
|
5
|
+
Describe the language, framework, runtime, package manager, database, infrastructure, and main tools used by the project.
|
|
6
|
+
|
|
7
|
+
Suggested fields:
|
|
8
|
+
|
|
9
|
+
- Language:
|
|
10
|
+
- Framework:
|
|
11
|
+
- Runtime:
|
|
12
|
+
- Package manager:
|
|
13
|
+
- Database:
|
|
14
|
+
- Main libraries:
|
|
15
|
+
- Deployment:
|
|
16
|
+
- CI/CD:
|
|
17
|
+
|
|
18
|
+
## 2. Architecture
|
|
19
|
+
|
|
20
|
+
Describe the general architecture, layers, modules, data flow, and important technical decisions.
|
|
21
|
+
|
|
22
|
+
Include:
|
|
23
|
+
|
|
24
|
+
- Main modules:
|
|
25
|
+
- Data flow:
|
|
26
|
+
- Architectural patterns:
|
|
27
|
+
- Important decisions:
|
|
28
|
+
|
|
29
|
+
## 3. Project Structure
|
|
30
|
+
|
|
31
|
+
Explain the project folder structure and where new files should be created.
|
|
32
|
+
|
|
33
|
+
Example:
|
|
34
|
+
|
|
35
|
+
```txt
|
|
36
|
+
src/
|
|
37
|
+
├── ...
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Rules:
|
|
41
|
+
|
|
42
|
+
- [Where API files go]
|
|
43
|
+
- [Where components go]
|
|
44
|
+
- [Where services go]
|
|
45
|
+
- [Where tests go]
|
|
46
|
+
|
|
47
|
+
## 4. Coding Standards
|
|
48
|
+
|
|
49
|
+
Define naming conventions, import organization, error handling, logging, environment variables, and coding style.
|
|
50
|
+
|
|
51
|
+
Include:
|
|
52
|
+
|
|
53
|
+
- Naming:
|
|
54
|
+
- Imports:
|
|
55
|
+
- Error handling:
|
|
56
|
+
- Logging:
|
|
57
|
+
- Environment variables:
|
|
58
|
+
- Comments:
|
|
59
|
+
- Formatting:
|
|
60
|
+
|
|
61
|
+
## 5. Testing
|
|
62
|
+
|
|
63
|
+
Describe how tests should be written, where they should live, which commands should be run, and which validation gates are required.
|
|
64
|
+
|
|
65
|
+
Include:
|
|
66
|
+
|
|
67
|
+
- Test framework:
|
|
68
|
+
- Test file pattern:
|
|
69
|
+
- Unit test rules:
|
|
70
|
+
- Integration test rules:
|
|
71
|
+
- E2E test rules:
|
|
72
|
+
- Required commands:
|
|
73
|
+
|
|
74
|
+
Validation gates:
|
|
75
|
+
|
|
76
|
+
- [ ] Build
|
|
77
|
+
- [ ] Lint
|
|
78
|
+
- [ ] Typecheck
|
|
79
|
+
- [ ] Tests
|
|
80
|
+
- [ ] Manual check when needed
|
|
81
|
+
|
|
82
|
+
## 6. Integrations
|
|
83
|
+
|
|
84
|
+
List external services, APIs, SDKs, webhooks, authentication methods, and integration concerns.
|
|
85
|
+
|
|
86
|
+
Include:
|
|
87
|
+
|
|
88
|
+
- Service name:
|
|
89
|
+
- Purpose:
|
|
90
|
+
- Auth method:
|
|
91
|
+
- Environment variables:
|
|
92
|
+
- Risks or limits:
|
|
93
|
+
|
|
94
|
+
## 7. Concerns
|
|
95
|
+
|
|
96
|
+
List technical risks, tech debt, fragile areas, limitations, and parts of the codebase that agents should modify carefully.
|
|
97
|
+
|
|
98
|
+
Include:
|
|
99
|
+
|
|
100
|
+
- Known risks:
|
|
101
|
+
- Technical debt:
|
|
102
|
+
- Fragile areas:
|
|
103
|
+
- Low test coverage areas:
|
|
104
|
+
- Deprecated patterns:
|
|
105
|
+
|
|
106
|
+
## 8. AI Rules
|
|
107
|
+
|
|
108
|
+
- Do not invent files, APIs, functions, or behavior.
|
|
109
|
+
- Read existing code before modifying it.
|
|
110
|
+
- Follow existing project patterns.
|
|
111
|
+
- Do not refactor unrelated code.
|
|
112
|
+
- Keep changes small and reviewable.
|
|
113
|
+
- Validate before marking work as done.
|
|
114
|
+
- Update `.specs/project/STATE.md` at the end of the session.
|
|
115
|
+
|
|
116
|
+
## 9. Optional Expansion
|
|
117
|
+
|
|
118
|
+
If one section becomes too large, it may be extracted into a dedicated optional file, such as:
|
|
119
|
+
|
|
120
|
+
- `.specs/codebase/ARCHITECTURE.md`
|
|
121
|
+
- `.specs/codebase/TESTING.md`
|
|
122
|
+
- `.specs/codebase/INTEGRATIONS.md`
|
|
123
|
+
- `.specs/codebase/CONCERNS.md`
|
|
124
|
+
|
|
125
|
+
These files are optional and should not be generated by default.
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Project
|
|
2
|
+
|
|
3
|
+
## Name
|
|
4
|
+
|
|
5
|
+
[Project name]
|
|
6
|
+
|
|
7
|
+
## One-Line Description
|
|
8
|
+
|
|
9
|
+
[Describe the project in one sentence.]
|
|
10
|
+
|
|
11
|
+
## Problem
|
|
12
|
+
|
|
13
|
+
[What problem does this project solve?]
|
|
14
|
+
|
|
15
|
+
## Target Users
|
|
16
|
+
|
|
17
|
+
- [User type 1]
|
|
18
|
+
- [User type 2]
|
|
19
|
+
|
|
20
|
+
## Goals
|
|
21
|
+
|
|
22
|
+
- [Goal 1]
|
|
23
|
+
- [Goal 2]
|
|
24
|
+
- [Goal 3]
|
|
25
|
+
|
|
26
|
+
## Non-Negotiables
|
|
27
|
+
|
|
28
|
+
- [Security, performance, compliance, UX, business, or technical constraint]
|
|
29
|
+
|
|
30
|
+
## Out of Scope
|
|
31
|
+
|
|
32
|
+
- [What should not be built now]
|
|
33
|
+
|
|
34
|
+
## Key Terms
|
|
35
|
+
|
|
36
|
+
- **[Term]:** [Definition]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
## Current Phase
|
|
4
|
+
|
|
5
|
+
[Discovery | Setup | MVP | Active Development | Stabilization | Maintenance]
|
|
6
|
+
|
|
7
|
+
## Milestones
|
|
8
|
+
|
|
9
|
+
### Milestone 1 — [Name]
|
|
10
|
+
|
|
11
|
+
**Status:** Planned
|
|
12
|
+
**Goal:** [What this milestone should achieve]
|
|
13
|
+
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
- [ ] [Feature 1]
|
|
17
|
+
- [ ] [Feature 2]
|
|
18
|
+
- [ ] [Feature 3]
|
|
19
|
+
|
|
20
|
+
## Backlog
|
|
21
|
+
|
|
22
|
+
- [ ] [Backlog item]
|
|
23
|
+
|
|
24
|
+
## Deferred
|
|
25
|
+
|
|
26
|
+
- [ ] [Deferred idea or feature]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Project State
|
|
2
|
+
|
|
3
|
+
## Last Updated
|
|
4
|
+
|
|
5
|
+
[YYYY-MM-DD HH:MM]
|
|
6
|
+
|
|
7
|
+
## Current Focus
|
|
8
|
+
|
|
9
|
+
[Describe what is being worked on now.]
|
|
10
|
+
|
|
11
|
+
## Last Completed Task
|
|
12
|
+
|
|
13
|
+
None.
|
|
14
|
+
|
|
15
|
+
## Current Task
|
|
16
|
+
|
|
17
|
+
None.
|
|
18
|
+
|
|
19
|
+
## Suggested Next Steps
|
|
20
|
+
|
|
21
|
+
1. Complete `.specs/project/PROJECT.md`.
|
|
22
|
+
2. Complete `.specs/codebase/CONVENTIONS.md`.
|
|
23
|
+
3. Create the first feature spec under `.specs/features/[feature-name]/`.
|
|
24
|
+
|
|
25
|
+
## Decisions
|
|
26
|
+
|
|
27
|
+
No decisions recorded yet.
|
|
28
|
+
|
|
29
|
+
## Blockers
|
|
30
|
+
|
|
31
|
+
No blockers.
|
|
32
|
+
|
|
33
|
+
## Notes for Future Agents
|
|
34
|
+
|
|
35
|
+
- Always read this file before starting work.
|
|
36
|
+
- Always update this file at the end of a session.
|
|
37
|
+
- Record decisions, blockers, deviations, and next steps here.
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
This project uses Spec Driven Development.
|
|
4
|
+
|
|
5
|
+
## Always Read First
|
|
6
|
+
|
|
7
|
+
Before changing code, always read:
|
|
8
|
+
|
|
9
|
+
1. `.specs/project/STATE.md`
|
|
10
|
+
2. `.specs/project/PROJECT.md`
|
|
11
|
+
3. `.specs/codebase/CONVENTIONS.md`
|
|
12
|
+
|
|
13
|
+
For feature work, also read:
|
|
14
|
+
|
|
15
|
+
- `.specs/features/[feature]/spec.md`
|
|
16
|
+
- `.specs/features/[feature]/tasks.md`
|
|
17
|
+
- `.specs/features/[feature]/validation.md`
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Do not invent files, APIs, functions, or behavior.
|
|
22
|
+
- Read existing code before modifying it.
|
|
23
|
+
- Implement only the current task scope.
|
|
24
|
+
- Keep changes small and reviewable.
|
|
25
|
+
- Do not refactor unrelated code.
|
|
26
|
+
- Follow `.specs/codebase/CONVENTIONS.md`.
|
|
27
|
+
- Update task status after implementation.
|
|
28
|
+
- Run validation before marking work as done.
|
|
29
|
+
- Record validation evidence.
|
|
30
|
+
- Update `.specs/project/STATE.md` at the end of the session.
|
|
31
|
+
|
|
32
|
+
## Done Means
|
|
33
|
+
|
|
34
|
+
A task is only complete when:
|
|
35
|
+
|
|
36
|
+
- Build passes.
|
|
37
|
+
- Lint passes, if available.
|
|
38
|
+
- Typecheck passes, if available.
|
|
39
|
+
- Tests pass, if available.
|
|
40
|
+
- Acceptance criteria are verified.
|
|
41
|
+
- Validation result is recorded.
|
|
42
|
+
- Project state is updated.
|