@abranjith/spec-lite 0.0.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/LICENSE +21 -0
- package/README.md +244 -0
- package/dist/index.js +903 -0
- package/dist/index.js.map +1 -0
- package/dist/stacks/dotnet.md +84 -0
- package/dist/stacks/java.md +76 -0
- package/dist/stacks/python.md +76 -0
- package/dist/stacks/react.md +79 -0
- package/dist/stacks/typescript.md +67 -0
- package/package.json +60 -0
- package/prompts/brainstorm.md +265 -0
- package/prompts/code_review.md +181 -0
- package/prompts/devops.md +227 -0
- package/prompts/feature.md +294 -0
- package/prompts/fix.md +195 -0
- package/prompts/implement.md +210 -0
- package/prompts/integration_tests.md +216 -0
- package/prompts/memorize.md +369 -0
- package/prompts/orchestrator.md +371 -0
- package/prompts/performance_review.md +202 -0
- package/prompts/planner.md +301 -0
- package/prompts/readme.md +232 -0
- package/prompts/security_audit.md +212 -0
- package/prompts/spec_help.md +230 -0
- package/prompts/technical_docs.md +219 -0
- package/prompts/unit_tests.md +339 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ranjith A B
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# spec-lite
|
|
2
|
+
|
|
3
|
+
> Lightweight, modular, LLM-agnostic prompt collection for structured software engineering — with a CLI installer.
|
|
4
|
+
|
|
5
|
+
## What Is This?
|
|
6
|
+
|
|
7
|
+
spec-lite is a set of **modular prompt files** — each defining a specialist AI sub-agent for one phase of the software development lifecycle. Install once, and spec-lite configures your workspace for your AI coding assistant of choice.
|
|
8
|
+
|
|
9
|
+
**No frameworks. No lock-in. Just markdown prompts that work everywhere.**
|
|
10
|
+
|
|
11
|
+
### Design Principles
|
|
12
|
+
|
|
13
|
+
- **Lightweight** — Plain markdown files. Minimal CLI.
|
|
14
|
+
- **Modular** — Use one sub-agent or all of them. Skip what you don't need.
|
|
15
|
+
- **Unopinionated** — Adapts to any project type (web, CLI, library, desktop, pipeline), any language, any stack.
|
|
16
|
+
- **Finite-scoped** — Each sub-agent has one job, clear inputs, and a concrete output artifact.
|
|
17
|
+
- **Memory-first** — Cross-cutting standards (coding conventions, architecture, testing, security) live in `.spec/memory.md` — the single source of truth read by every sub-agent.
|
|
18
|
+
- **Provider-agnostic** — Works with GitHub Copilot, Claude Code, or any LLM via generic mode.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g spec-lite
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Requires Node.js 18+.
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
Navigate to your project workspace and run:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# For GitHub Copilot users
|
|
36
|
+
spec-lite init --ai copilot
|
|
37
|
+
|
|
38
|
+
# For Claude Code users
|
|
39
|
+
spec-lite init --ai claude-code
|
|
40
|
+
|
|
41
|
+
# For any other LLM (raw prompts you can copy-paste)
|
|
42
|
+
spec-lite init --ai generic
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The CLI will walk you through a short **project profile questionnaire** (language, frameworks, test framework, architecture style, and coding conventions). Your answers are used to:
|
|
46
|
+
|
|
47
|
+
1. Write agent prompt files to the correct location for your AI tool
|
|
48
|
+
2. Inject your tech-stack context into every prompt's `<!-- project-context -->` block
|
|
49
|
+
3. Copy a curated **best-practice snippet** for your stack into `.spec-lite/stacks/`
|
|
50
|
+
4. Create the `.spec/` directory structure for agent outputs
|
|
51
|
+
5. Save a `.spec-lite.json` config (including your project profile) to track your setup
|
|
52
|
+
|
|
53
|
+
After init completes, run **`/memorize bootstrap`** (see below) to let the LLM auto-generate a comprehensive `memory.md` from your codebase.
|
|
54
|
+
|
|
55
|
+
### Exclude specific agents
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
spec-lite init --ai copilot --exclude brainstorm,readme
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Skip the profile questionnaire
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
spec-lite init --ai copilot --skip-profile
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `--skip-profile` to skip the interactive questionnaire and install prompts without project-specific context.
|
|
68
|
+
|
|
69
|
+
### Update prompts to latest version
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
spec-lite update
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This pulls the latest prompt versions while **preserving your Project Context edits**.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Supported AI Providers
|
|
80
|
+
|
|
81
|
+
| Provider | Flag | Files Written To | Format |
|
|
82
|
+
|----------|------|-----------------|--------|
|
|
83
|
+
| GitHub Copilot | `--ai copilot` | `.github/copilot/*.prompt.md` | Slash-command prompts |
|
|
84
|
+
| Claude Code | `--ai claude-code` | `.claude/prompts/*.md` + `CLAUDE.md` | Markdown |
|
|
85
|
+
| Generic | `--ai generic` | `.spec-lite/prompts/*.md` | Raw markdown (copy-paste) |
|
|
86
|
+
|
|
87
|
+
More providers (Cursor, Windsurf, Cline, Zed) coming soon.
|
|
88
|
+
|
|
89
|
+
## Memory-First Architecture
|
|
90
|
+
|
|
91
|
+
spec-lite uses a **memory-first** approach: cross-cutting concerns that every sub-agent needs — coding standards, architecture patterns, testing conventions, security guidelines, logging strategy — live in a single file: **`.spec/memory.md`**.
|
|
92
|
+
|
|
93
|
+
| Source | Purpose | Authority |
|
|
94
|
+
|--------|---------|-----------|
|
|
95
|
+
| `.spec/memory.md` | Cross-cutting standards & conventions | **Primary** — authoritative for all sub-agents |
|
|
96
|
+
| `.spec/plan.md` or `.spec/plan_<name>.md` | Project-specific blueprint(s) & task breakdown | Overrides memory only with explicit justification |
|
|
97
|
+
| User instruction | Ad-hoc guidance in chat | Highest priority (trumps both) |
|
|
98
|
+
|
|
99
|
+
### Bootstrap Flow
|
|
100
|
+
|
|
101
|
+
After running `spec-lite init`, bootstrap your memory in one step:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/memorize bootstrap
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The memorize sub-agent will:
|
|
108
|
+
1. Read your project profile from `.spec-lite.json`
|
|
109
|
+
2. Scan your repository structure, configs, and existing code
|
|
110
|
+
3. Load the curated best-practice snippet for your stack (from `.spec-lite/stacks/`)
|
|
111
|
+
4. Optionally look up community standards via web search
|
|
112
|
+
5. Synthesize everything into a comprehensive `memory.md`
|
|
113
|
+
6. Present the draft for your confirmation before saving
|
|
114
|
+
|
|
115
|
+
Once memory is bootstrapped, the **Planner** focuses on project-specific architecture and task breakdown — it no longer re-derives coding standards, testing conventions, or security guidelines.
|
|
116
|
+
|
|
117
|
+
## The Sub-Agent Pipeline
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
spec_help (anytime)
|
|
121
|
+
|
|
122
|
+
┌─ /memorize bootstrap (one-time setup)
|
|
123
|
+
▼
|
|
124
|
+
Brainstorm ─→ Planner ─→ Feature (×N) ─→ Reviews ─→ Tests ─→ DevOps ─→ Docs
|
|
125
|
+
│ ├─ Code Review
|
|
126
|
+
│ ├─ Security Audit
|
|
127
|
+
▼ └─ Performance Review
|
|
128
|
+
TODO.md (living backlog)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
All sub-agents read `.spec/memory.md` first for standing instructions, then the relevant plan (`.spec/plan.md` or `.spec/plan_<name>.md`) for project-specific context. Complex projects can have multiple named plans — one per domain (e.g., `plan_order_management.md`, `plan_catalog.md`). Not every project needs every sub-agent. Start with the Planner if you already have requirements. Use `spec-lite list` or the spec_help sub-agent to understand the pipeline.
|
|
132
|
+
|
|
133
|
+
## Sub-Agent Prompt Files
|
|
134
|
+
|
|
135
|
+
| File | Sub-Agent | What It Does | Output |
|
|
136
|
+
|------|-----------|-------------|--------|
|
|
137
|
+
| [spec_help.md](prompts/spec_help.md) | Spec Help | Navigator — explains which sub-agent to use and when | Interactive guidance |
|
|
138
|
+
| [brainstorm.md](prompts/brainstorm.md) | Brainstorm | Back-and-forth ideation partner that refines vague ideas | `.spec/brainstorm.md` |
|
|
139
|
+
| [planner.md](prompts/planner.md) | Planner | Creates a detailed technical blueprint (living document) | `.spec/plan.md` or `.spec/plan_<name>.md` |
|
|
140
|
+
| [feature.md](prompts/feature.md) | Feature | 3-phase lifecycle: explore → tasks → implement+test+docs | `.spec/features/feature_<name>.md` |
|
|
141
|
+
| [code_review.md](prompts/code_review.md) | Code Review | Reviews code for correctness, architecture, readability | `.spec/reviews/code_review_<name>.md` |
|
|
142
|
+
| [security_audit.md](prompts/security_audit.md) | Security Audit | Threat-models and scans for vulnerabilities | `.spec/reviews/security_audit.md` |
|
|
143
|
+
| [performance_review.md](prompts/performance_review.md) | Performance Review | Identifies bottlenecks and optimization opportunities | `.spec/reviews/performance_review.md` |
|
|
144
|
+
| [integration_tests.md](prompts/integration_tests.md) | Integration Tests | Writes traceable integration test scenarios from feature specs | `.spec/features/integration_tests_<name>.md` |
|
|
145
|
+
| [unit_tests.md](prompts/unit_tests.md) | Unit Tests | Generates comprehensive unit tests with edge-case coverage and smart coverage exclusions | `.spec/features/unit_tests_<name>.md` |
|
|
146
|
+
| [devops.md](prompts/devops.md) | DevOps | Sets up Docker, CI/CD, environments, and deployment | `.spec/devops/` + infra files |
|
|
147
|
+
| [fix.md](prompts/fix.md) | Fix | Debugs issues with root cause analysis + regression tests | `.spec/reviews/fix_<issue>.md` |
|
|
148
|
+
| [technical_docs.md](prompts/technical_docs.md) | Technical Docs | Creates architecture docs, API references, setup guides | Technical documentation |
|
|
149
|
+
| [readme.md](prompts/readme.md) | README | Writes the project README | `README.md` |
|
|
150
|
+
| [memorize.md](prompts/memorize.md) | Memorize | Manages `.spec/memory.md` — standing instructions for all agents. Use `/memorize bootstrap` to auto-generate. | `.spec/memory.md` |
|
|
151
|
+
| [orchestrator.md](prompts/orchestrator.md) | — | Meta-document: pipeline, memory protocol, conflict resolution | Reference only |
|
|
152
|
+
|
|
153
|
+
## Output Directory Structure
|
|
154
|
+
|
|
155
|
+
spec-lite sub-agents produce artifacts in the `.spec/` directory (version-controlled project metadata):
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
.spec/
|
|
159
|
+
├── memory.md # Cross-cutting standards — authoritative source
|
|
160
|
+
├── brainstorm.md
|
|
161
|
+
├── plan.md # Default plan (simple projects) — user-modifiable
|
|
162
|
+
├── plan_<name>.md # Named plans (complex projects, e.g., plan_order_management.md)
|
|
163
|
+
├── TODO.md # Enhancement backlog — maintained by planner + feature
|
|
164
|
+
├── features/
|
|
165
|
+
│ ├── feature_user_management.md
|
|
166
|
+
│ ├── feature_billing.md
|
|
167
|
+
│ ├── unit_tests_user_management.md
|
|
168
|
+
│ └── integration_tests_user_management.md
|
|
169
|
+
├── reviews/
|
|
170
|
+
│ ├── code_review_user_management.md
|
|
171
|
+
│ ├── security_audit.md
|
|
172
|
+
│ ├── performance_review.md
|
|
173
|
+
│ └── fix_create_order_null.md
|
|
174
|
+
└── devops/
|
|
175
|
+
└── ... # Infrastructure artifacts
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Implementation artifacts (tests, docs, infra configs) are written to standard project directories.
|
|
179
|
+
|
|
180
|
+
## Workflow & Conflict Resolution
|
|
181
|
+
|
|
182
|
+
See [orchestrator.md](prompts/orchestrator.md) for the complete workflow documentation, including:
|
|
183
|
+
|
|
184
|
+
- The full sub-agent pipeline DAG
|
|
185
|
+
- Memory protocol — which artifacts each sub-agent reads
|
|
186
|
+
- Conflict resolution rules (user instruction > plan > sub-agent expertise)
|
|
187
|
+
- Enhancement tracking via `.spec/TODO.md`
|
|
188
|
+
- Invocation patterns for different scenarios (new project, feature addition, bug fix)
|
|
189
|
+
|
|
190
|
+
## CLI Commands
|
|
191
|
+
|
|
192
|
+
### `spec-lite init`
|
|
193
|
+
|
|
194
|
+
Initialize spec-lite prompts in your workspace.
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
Options:
|
|
198
|
+
--ai <provider> AI provider: copilot, claude-code, generic
|
|
199
|
+
--exclude <prompts> Comma-separated prompts to skip (e.g., brainstorm,readme)
|
|
200
|
+
--skip-profile Skip the interactive project profile questionnaire
|
|
201
|
+
--force Overwrite existing files without prompting
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### `spec-lite update`
|
|
205
|
+
|
|
206
|
+
Update prompts to the latest version. Reads `.spec-lite.json` to know your provider and installed prompts. Preserves your Project Context edits.
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
Options:
|
|
210
|
+
--force Overwrite all files including user-modified ones
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### `spec-lite list`
|
|
214
|
+
|
|
215
|
+
List all available sub-agents with their purpose and output artifacts.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
spec-lite list
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Versioning
|
|
224
|
+
|
|
225
|
+
spec-lite relies on **git** for artifact versioning. When a plan or review is updated, commit with a meaningful message. Each prompt includes a version metadata comment (`<!-- spec-lite v0.0.1 | ... -->`) for traceability.
|
|
226
|
+
|
|
227
|
+
## Adapting & Contributing
|
|
228
|
+
|
|
229
|
+
spec-lite is designed to be forked and adapted:
|
|
230
|
+
|
|
231
|
+
- **Bootstrap memory first** — run `/memorize bootstrap` after init to populate `.spec/memory.md` with your project's standards.
|
|
232
|
+
- **Edit memory directly** — `.spec/memory.md` is the standing-instruction file. Your edits persist across all sub-agent invocations.
|
|
233
|
+
- **Add project-specific conventions** to the Project Context blocks or directly to memory.
|
|
234
|
+
- **Remove sub-agents** you don't need.
|
|
235
|
+
- **Add new sub-agents** following the same pattern (Persona → Required Context → Process → Output Template → Constraints).
|
|
236
|
+
- **Modify output paths** to match your project's directory structure.
|
|
237
|
+
- **Edit the plan** — `.spec/plan.md` (or `.spec/plan_<name>.md` for named plans) is a living document. Your edits take priority over sub-agent defaults.
|
|
238
|
+
- **Add stack snippets** — drop a `<language>.md` file into `src/stacks/` to add best-practice snippets for additional languages.
|
|
239
|
+
|
|
240
|
+
Contributions welcome — especially for new sub-agent types, improvements to existing prompts, and real-world usage feedback.
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
MIT. See [LICENSE](LICENSE) for details.
|