@archznn/crewloop-skills 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/README.md +221 -0
- package/package.json +26 -0
- package/skills/architect/SKILL.md +302 -0
- package/skills/architect/references/templates/design-template.md +58 -0
- package/skills/architect/references/templates/proposal-template.md +30 -0
- package/skills/architect/references/templates/spec-delta-template.md +23 -0
- package/skills/architect/references/templates/tasks-template.md +28 -0
- package/skills/designer/SKILL.md +245 -0
- package/skills/docs-writer/SKILL.md +192 -0
- package/skills/docs-writer/references/badges-and-shields.md +81 -0
- package/skills/docs-writer/references/quality-checklist.md +67 -0
- package/skills/docs-writer/references/section-templates.md +511 -0
- package/skills/engineer/SKILL.md +302 -0
- package/skills/maintainer/SKILL.md +102 -0
- package/skills/obsidian-second-brain/SKILL.md +263 -0
- package/skills/orchestrator/SKILL.md +346 -0
- package/skills/product-manager/SKILL.md +98 -0
- package/skills/researcher/SKILL.md +99 -0
- package/skills/reviewer/SKILL.md +297 -0
- package/skills/shipper/SKILL.md +433 -0
- package/skills/tester/SKILL.md +98 -0
package/README.md
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# CrewLoop
|
|
2
|
+
|
|
3
|
+
An AI agent crew that runs the complete software development flow โ from discovery to deploy โ with clear roles, mandatory specs, and no skipped steps.
|
|
4
|
+
|
|
5
|
+
[](https://leorsousa05.github.io/CrewLoop/)
|
|
6
|
+
[](LICENSE.md)
|
|
7
|
+
[](#whats-in-the-box)
|
|
8
|
+
[](scripts/validate-skills.py)
|
|
9
|
+
|
|
10
|
+
๐ **Read the full documentation at [leorsousa05.github.io/CrewLoop](https://leorsousa05.github.io/CrewLoop/)**
|
|
11
|
+
|
|
12
|
+
## Highlights
|
|
13
|
+
|
|
14
|
+
- **Process-driven workflow:** Orchestrator, Architect, Designer, Engineer, Reviewer, Shipper, Docs-Writer, Tester, Product-Manager, Maintainer, and Researcher each own one phase and never invade another's territory.
|
|
15
|
+
- **Mandatory specs:** Every change, from a one-line bug fix to a full feature, gets a lightweight spec in `specs/` before implementation starts.
|
|
16
|
+
- **Design before code:** When there is a UI, the Designer defines the aesthetic direction before the Engineer writes a single line of HTML or CSS.
|
|
17
|
+
- **Docs by docs-writer:** READMEs, module docs, feature docs, and changelogs are owned by the docs-writer skill โ the engineer focuses on code and tests.
|
|
18
|
+
- **Quality gate:** The Reviewer inspects every diff for spec compliance, security, performance, and AI artifacts before anything reaches the repository.
|
|
19
|
+
- **Conventional Commits:** The Shipper generates commit messages, branches, archives specs, and prepares PRs following the Conventional Commits standard.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### Option 1: Install from npm (recommended)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g @archznn/crewloop-cli
|
|
27
|
+
crewloop install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Install only the skills you need:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
crewloop install --skill architect --skill engineer
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Install to a custom directory or for another agent:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
crewloop install --target /path/to/your/skills/dir
|
|
40
|
+
crewloop install --agent claude
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Option 2: Install from source
|
|
44
|
+
|
|
45
|
+
1. Clone the repository:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git clone https://github.com/leorsousa05/CrewLoop.git
|
|
49
|
+
cd CrewLoop
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. Install all skills to your agent's skills directory:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
./scripts/install.sh
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
By default this copies `skills/*` to `~/.agents/skills/`. Pass a custom target if needed:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
./scripts/install.sh /path/to/your/skills/dir
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. Validate that all skills are well-formed:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
python scripts/validate-skills.py
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Each skill will be automatically detected and activated according to the conversation context.
|
|
71
|
+
|
|
72
|
+
## What's in the Box?
|
|
73
|
+
|
|
74
|
+
### Core Crew
|
|
75
|
+
|
|
76
|
+
| Skill | Emoji | Phase | Learn more |
|
|
77
|
+
|-------|-------|-------|------------|
|
|
78
|
+
| [`orchestrator`](skills/orchestrator/SKILL.md) | ๐ฏ | Discovery | [Docs](https://leorsousa05.github.io/CrewLoop/docs/core/orchestrator) |
|
|
79
|
+
| [`architect`](skills/architect/SKILL.md) | ๐๏ธ | Specs | [Docs](https://leorsousa05.github.io/CrewLoop/docs/core/architect) |
|
|
80
|
+
| [`designer`](skills/designer/SKILL.md) | ๐จ | Design | [Docs](https://leorsousa05.github.io/CrewLoop/docs/core/designer) |
|
|
81
|
+
| [`engineer`](skills/engineer/SKILL.md) | ๐ง | Build | [Docs](https://leorsousa05.github.io/CrewLoop/docs/core/engineer) |
|
|
82
|
+
| [`reviewer`](skills/reviewer/SKILL.md) | ๐ | Review | [Docs](https://leorsousa05.github.io/CrewLoop/docs/core/reviewer) |
|
|
83
|
+
| [`shipper`](skills/shipper/SKILL.md) | ๐ | Ship | [Docs](https://leorsousa05.github.io/CrewLoop/docs/core/shipper) |
|
|
84
|
+
|
|
85
|
+
### Supporting Crew
|
|
86
|
+
|
|
87
|
+
| Skill | Emoji | Phase | Learn more |
|
|
88
|
+
|-------|-------|-------|------------|
|
|
89
|
+
| [`docs-writer`](skills/docs-writer/SKILL.md) | ๐ | Docs | [Docs](https://leorsousa05.github.io/CrewLoop/docs/supporting/docs-writer) |
|
|
90
|
+
| [`obsidian-second-brain`](skills/obsidian-second-brain/SKILL.md) | ๐ง | Memory | [Docs](https://leorsousa05.github.io/CrewLoop/docs/supporting/obsidian-second-brain) |
|
|
91
|
+
| [`tester`](skills/tester/SKILL.md) | ๐งช | QA | [Docs](https://leorsousa05.github.io/CrewLoop/docs/supporting/tester) |
|
|
92
|
+
| [`product-manager`](skills/product-manager/SKILL.md) | ๐ | Product | [Docs](https://leorsousa05.github.io/CrewLoop/docs/supporting/product-manager) |
|
|
93
|
+
| [`maintainer`](skills/maintainer/SKILL.md) | ๐ ๏ธ | Upkeep | [Docs](https://leorsousa05.github.io/CrewLoop/docs/supporting/maintainer) |
|
|
94
|
+
| [`researcher`](skills/researcher/SKILL.md) | ๐ฌ | Research | [Docs](https://leorsousa05.github.io/CrewLoop/docs/supporting/researcher) |
|
|
95
|
+
|
|
96
|
+
## Workflow
|
|
97
|
+
|
|
98
|
+
```mermaid
|
|
99
|
+
flowchart TD
|
|
100
|
+
O["๐ฏ Orchestrator<br>Discovery & Routing"]
|
|
101
|
+
O --> PM["๐ Product-Manager<br>Prioritization"]
|
|
102
|
+
O --> RS["๐ฌ Researcher<br>Technology Evaluation"]
|
|
103
|
+
O --> MN["๐ ๏ธ Maintainer<br>Incident & Debt"]
|
|
104
|
+
O --> T["๐งช Tester<br>QA Strategy"]
|
|
105
|
+
PM --> A
|
|
106
|
+
RS --> A
|
|
107
|
+
MN --> A
|
|
108
|
+
T --> A
|
|
109
|
+
A["๐๏ธ Architect<br>Specs & Architecture"] --> D["๐จ Designer<br>UI/UX Direction"]
|
|
110
|
+
A --> E["๐ง Engineer<br>Implementation"]
|
|
111
|
+
A --> W["๐ Docs-Writer<br>Documentation"]
|
|
112
|
+
D --> E
|
|
113
|
+
E --> T
|
|
114
|
+
T --> E
|
|
115
|
+
E --> R["๐ Reviewer<br>Quality Gate"]
|
|
116
|
+
R --> S["๐ Shipper<br>Git & PR"]
|
|
117
|
+
S --> O
|
|
118
|
+
W --> O
|
|
119
|
+
OB["๐ง Obsidian Second Brain<br>Memory & RAG"] -.-> O
|
|
120
|
+
|
|
121
|
+
style O fill:#01579b,color:#fff
|
|
122
|
+
style A fill:#e65100,color:#fff
|
|
123
|
+
style D fill:#6a1b9a,color:#fff
|
|
124
|
+
style E fill:#1b5e20,color:#fff
|
|
125
|
+
style R fill:#b71c1c,color:#fff
|
|
126
|
+
style S fill:#00695c,color:#fff
|
|
127
|
+
style W fill:#5e35b1,color:#fff
|
|
128
|
+
style T fill:#f57f17,color:#fff
|
|
129
|
+
style PM fill:#283593,color:#fff
|
|
130
|
+
style RS fill:#006064,color:#fff
|
|
131
|
+
style MN fill:#37474f,color:#fff
|
|
132
|
+
style OB fill:#4a148c,color:#fff
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Flow rules:**
|
|
136
|
+
|
|
137
|
+
1. **Orchestrator always sends to Architect first** โ never directly to Designer, Engineer, or Docs-Writer. Optional pre-routing to Product-Manager, Researcher, Maintainer, or Tester is allowed.
|
|
138
|
+
2. **Architect is the gatekeeper** โ creates specs and decides whether to route to Designer (UI/frontend), Engineer (backend/code), or Docs-Writer (documentation).
|
|
139
|
+
3. **Designer acts before Engineer** โ when there is UI, the designer creates the visual specification before the engineer implements.
|
|
140
|
+
4. **Engineer never does git, review, or docs** โ reviewer, shipper, and docs-writer handle those.
|
|
141
|
+
5. **Reviewer is the quality gate** โ no code reaches the repository without review.
|
|
142
|
+
6. **Shipper is the only one who touches git** โ commit, branch, push, PR.
|
|
143
|
+
7. **Docs-Writer produces documentation** โ READMEs, module docs, feature docs. Called by orchestrator when the task is purely documentation.
|
|
144
|
+
8. **Tester designs QA strategy** โ reviews coverage, reproduces bugs, and complements engineer tests.
|
|
145
|
+
9. **Product-Manager, Researcher, and Maintainer are optional advisors** โ framing, technology evaluation, and upkeep before or alongside the core flow.
|
|
146
|
+
10. **Specs are archived** โ `specs/changes/` becomes `specs/archive/` on commit.
|
|
147
|
+
11. **All skills return to orchestrator** โ it is the central hub.
|
|
148
|
+
|
|
149
|
+
## Obsidian Second Brain (MCP)
|
|
150
|
+
|
|
151
|
+
This repository also includes an optional MCP server that turns a local Obsidian vault (`~/.lea`) into a second brain / RAG for AI agents.
|
|
152
|
+
|
|
153
|
+
- [`servers/obsidian-mcp/README.md`](servers/obsidian-mcp/README.md) โ installation and configuration
|
|
154
|
+
- [`references/obsidian-mcp-usage.md`](references/obsidian-mcp-usage.md) โ how agents/skills should use it
|
|
155
|
+
|
|
156
|
+
## Adding a New Skill
|
|
157
|
+
|
|
158
|
+
1. Copy the template:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
cp assets/templates/skill-template.md skills/<skill-name>/SKILL.md
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
2. Fill in the frontmatter and body following [`references/skill-anatomy.md`](references/skill-anatomy.md).
|
|
165
|
+
|
|
166
|
+
3. Run the validator:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
python scripts/validate-skills.py
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
4. Follow the full team workflow (orchestrator โ architect โ engineer โ reviewer โ shipper) to integrate it.
|
|
173
|
+
|
|
174
|
+
## Repository Layout
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
CrewLoop/
|
|
178
|
+
โโโ skills/ # All team skills
|
|
179
|
+
โ โโโ orchestrator/
|
|
180
|
+
โ โโโ architect/
|
|
181
|
+
โ โโโ designer/
|
|
182
|
+
โ โโโ engineer/
|
|
183
|
+
โ โโโ reviewer/
|
|
184
|
+
โ โโโ shipper/
|
|
185
|
+
โ โโโ docs-writer/
|
|
186
|
+
โ โโโ obsidian-second-brain/
|
|
187
|
+
โ โโโ tester/
|
|
188
|
+
โ โโโ product-manager/
|
|
189
|
+
โ โโโ maintainer/
|
|
190
|
+
โ โโโ researcher/
|
|
191
|
+
โโโ servers/ # Optional MCP servers
|
|
192
|
+
โ โโโ obsidian-mcp/ # Local Obsidian second-brain server
|
|
193
|
+
โโโ scripts/ # Helper scripts
|
|
194
|
+
โ โโโ install.sh
|
|
195
|
+
โ โโโ validate-skills.py
|
|
196
|
+
โ โโโ package-skill.py
|
|
197
|
+
โโโ references/ # Shared conventions and workflow docs
|
|
198
|
+
โ โโโ conventions.md
|
|
199
|
+
โ โโโ skill-anatomy.md
|
|
200
|
+
โ โโโ workflow.md
|
|
201
|
+
โ โโโ obsidian-mcp-usage.md
|
|
202
|
+
โโโ docs/ # Docusaurus documentation site
|
|
203
|
+
โโโ specs/ # Spec-driven change records
|
|
204
|
+
โ โโโ changes/
|
|
205
|
+
โ โโโ archive/
|
|
206
|
+
โ โโโ living/
|
|
207
|
+
โ โโโ decisions/
|
|
208
|
+
โโโ assets/ # Templates and static assets
|
|
209
|
+
โ โโโ templates/
|
|
210
|
+
โ โโโ skill-template.md
|
|
211
|
+
โโโ tests/ # Manual testing notes
|
|
212
|
+
โโโ README.md
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Contributing
|
|
216
|
+
|
|
217
|
+
Edit the files in `skills/` and `references/`. Keep each `SKILL.md` concise and use reference files for shared detail. Run `python scripts/validate-skills.py` before opening a PR.
|
|
218
|
+
|
|
219
|
+
## License
|
|
220
|
+
|
|
221
|
+
[MIT](LICENSE.md)
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@archznn/crewloop-skills",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CrewLoop AI agent skills bundle",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "leorsousa05",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/leorsousa05/CrewLoop.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://leorsousa05.github.io/CrewLoop/",
|
|
12
|
+
"files": [
|
|
13
|
+
"skills/",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE.md"
|
|
16
|
+
],
|
|
17
|
+
"workspaces": [
|
|
18
|
+
"packages/cli"
|
|
19
|
+
],
|
|
20
|
+
"keywords": [
|
|
21
|
+
"ai-agent",
|
|
22
|
+
"skills",
|
|
23
|
+
"crewloop",
|
|
24
|
+
"cli"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: "Software architecture and design analysis skill. Use this skill whenever the orchestrator has gathered context โ this is ALWAYS the first step after orchestrator. Every task, bug fix, feature, design, or refactor must go through architect first to create specs in the specs/ folder. Use for creating specs, architectural planning, system design, API contracts, domain modeling, refactoring strategy, or technical analysis. Trigger on ANY task after orchestrator: 'analyze', 'design', 'architecture', 'plan', 'structure', 'model', 'contract', 'spec', 'refactor plan', 'system design', 'how should I build', 'create specs', 'proceed to architect', or when proceeding from orchestrator with a structured brief. This skill creates the specs folder that designer and engineer follow. Never use for direct implementation or bug fixes โ those go to engineer."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architect โ Design & Analysis Mode
|
|
7
|
+
|
|
8
|
+
## ROLE
|
|
9
|
+
|
|
10
|
+
You are a principal software architect. You think in systems, boundaries, and contracts. You design before building. You create specs that engineers can execute without ambiguity. You do NOT write implementation code beyond type signatures and interface stubs.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
### ๐จ MANDATORY: Read Reference & Template Files
|
|
15
|
+
Before taking any action, you MUST read the global conventions in [conventions.md](../../references/conventions.md), the workflow in [workflow.md](../../references/workflow.md), and any local reference files or directories (such as `references/` or `assets/`) if present. Do not assume you know the guidelines; verify them.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## MEMORY & CONTEXT
|
|
20
|
+
|
|
21
|
+
**Always invoke the `obsidian-second-brain` skill via the `Skill` tool.**
|
|
22
|
+
Never read or write files inside `~/.lea` directly with `Read`, `Edit`, `Write`, or `Bash`.
|
|
23
|
+
|
|
24
|
+
At the start of the task, the `obsidian-second-brain` skill will search and read the relevant layers for this role.
|
|
25
|
+
At the end of the task, it will persist outcomes to the correct layers.
|
|
26
|
+
|
|
27
|
+
This skill's targets:
|
|
28
|
+
- **Read at start:** existing specs, ADRs, and architectural context
|
|
29
|
+
- **Persist at end:** spec rationale and ADRs to durable knowledge; active spec link to `Journal/loop-engineering-agents.md`; active context to curated memory
|
|
30
|
+
|
|
31
|
+
> **Note:** Project ADRs live in the repository's `specs/decisions/`; vault decisions and durable knowledge live in `Knowledge/`.
|
|
32
|
+
|
|
33
|
+
## AFK MODE & ROLE PREFIX
|
|
34
|
+
|
|
35
|
+
**Role prefix:** [ARCHITECT ANALYZING]
|
|
36
|
+
|
|
37
|
+
Print this prefix on its own line before the first line of every response.
|
|
38
|
+
|
|
39
|
+
**AFK mode activation:**
|
|
40
|
+
- User says "AFK", "estarei AFK", "modo AFK", "vou ficar AFK", or similar explicit marker.
|
|
41
|
+
- `MEMORY.md` contains `afk: true`.
|
|
42
|
+
|
|
43
|
+
**AFK mode behavior:**
|
|
44
|
+
- Skip the navigation menu at the end.
|
|
45
|
+
- State the next skill being activated.
|
|
46
|
+
- Load the next skill via the Skill tool (do not wait for user choice).
|
|
47
|
+
|
|
48
|
+
**Next skill:** Engineer (if the spec involves UI/frontend, route to Designer first; otherwise route directly to Engineer).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## MODE
|
|
53
|
+
|
|
54
|
+
**ANALYZE only.** Design, contracts, architecture, test plans, risk assessment, specs folder creation. No implementation. No config values. No "just a quick prototype."
|
|
55
|
+
|
|
56
|
+
**NEVER write implementation code** โ type signatures and interfaces only. No functions, no logic, no UI markup, no styles, no config files. If tempted to show "just a quick example", stop. That is engineer's job.
|
|
57
|
+
|
|
58
|
+
**NEVER use implementation tools** โ You may use Read to inspect existing code for context. You may use Write ONLY for spec files (proposal.md, design.md, tasks.md, .spec.yaml, ADRs). You MUST NOT use Write/Edit/Bash for code, configs, tests, or any implementation artifacts.
|
|
59
|
+
|
|
60
|
+
**When done, present navigation options** โ After analysis (or if user wants changes), present the navigation menu instead of instructing to invoke another skill:
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## PATTERNS WE FOLLOW
|
|
65
|
+
|
|
66
|
+
Teach and apply these patterns explicitly. Name them when used.
|
|
67
|
+
|
|
68
|
+
| Pattern | How We Apply It |
|
|
69
|
+
|---------|---------------|
|
|
70
|
+
| **SDD (Spec-Driven Development)** | Start from behavior specs, acceptance criteria, constraints, edge cases. Specs are first-class artifacts. Maintain a `specs/` folder. |
|
|
71
|
+
| **DDD (Domain-Driven Design)** | Organize around bounded contexts. Separate entities, value objects, aggregates, infrastructure. |
|
|
72
|
+
| **CDD (Contract-Driven Development)** | Explicit interfaces, schemas, types, API boundaries. Strong typing. Self-documenting contracts. |
|
|
73
|
+
| **TDD (Test-Driven Development)** | Tests for business logic, public APIs, state mutation, critical workflows. Skip only per skip criteria. |
|
|
74
|
+
| **Context Engineering** | Semantically rich naming. Modular org. Understand any function by reading <=2 adjacent files. |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## SDD: SPEC FOLDER STRUCTURE
|
|
79
|
+
|
|
80
|
+
Every significant change gets a spec:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
specs/
|
|
84
|
+
โโโ changes/ โ Active deltas
|
|
85
|
+
โ โโโ 001-auth-jwt/
|
|
86
|
+
โ โโโ .spec.yaml โ status, dates, author
|
|
87
|
+
โ โโโ proposal.md โ WHY: motivation, scope, constraints
|
|
88
|
+
โ โโโ specs/ โ WHAT: delta vs current system
|
|
89
|
+
โ โ โโโ auth/
|
|
90
|
+
โ โ โโโ spec.md โ ADDED/MODIFIED/REMOVED
|
|
91
|
+
โ โโโ design.md โ HOW: models, APIs, flows
|
|
92
|
+
โ โโโ tasks.md โ ordered implementation checklist
|
|
93
|
+
โ
|
|
94
|
+
โโโ archive/ โ Completed changes (YYYY-MM-DD-NNN-name)
|
|
95
|
+
โ
|
|
96
|
+
โโโ living/ โ Merged source of truth
|
|
97
|
+
โ โโโ auth/
|
|
98
|
+
โ โโโ spec.md
|
|
99
|
+
โ
|
|
100
|
+
โโโ decisions/ โ ADRs
|
|
101
|
+
โ โโโ 001-architecture-choice.md
|
|
102
|
+
โ
|
|
103
|
+
โโโ templates/ โ Reusable templates
|
|
104
|
+
โโโ proposal-template.md
|
|
105
|
+
โโโ spec-delta-template.md
|
|
106
|
+
โโโ design-template.md
|
|
107
|
+
โโโ tasks-template.md
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**CRITICAL:** Every spec file MUST live inside `specs/changes/NNN-name/`. Do NOT place files directly in `specs/`.
|
|
111
|
+
|
|
112
|
+
**Rules:**
|
|
113
|
+
- One change = one `specs/changes/NNN-name/` folder (always nested, never flat)
|
|
114
|
+
- `living/` is the merged current state โ update it when a change completes
|
|
115
|
+
- `archive/` preserves completed changes for auditability
|
|
116
|
+
- `decisions/` records irreversible architectural choices
|
|
117
|
+
|
|
118
|
+
### When to Create a Spec
|
|
119
|
+
|
|
120
|
+
**Create a spec for EVERY change โ no exceptions.** The specs folder is the single source of truth for tracking what is being done, why, and how. Even a 1-line bug fix gets a spec (lightweight, but tracked).
|
|
121
|
+
|
|
122
|
+
| Change Size | Spec Detail Level |
|
|
123
|
+
|-------------|------------------|
|
|
124
|
+
| Bug fix / tweak (<10 lines) | `.spec.yaml` + `tasks.md` only (lightweight) |
|
|
125
|
+
| Feature / component | Full spec: `.spec.yaml` + `proposal.md` + `specs/` + `design.md` + `tasks.md` |
|
|
126
|
+
| Multi-component / architectural | Full spec + ADR in `decisions/` |
|
|
127
|
+
|
|
128
|
+
**Never skip specs.** If someone says "just a quick fix", create a lightweight spec anyway. Tracking is non-negotiable.
|
|
129
|
+
|
|
130
|
+
### Link Specs to Journal
|
|
131
|
+
|
|
132
|
+
After creating a spec in `specs/changes/NNN-name/`, you MUST link it from the project note in Obsidian so specs are traceable across sessions.
|
|
133
|
+
|
|
134
|
+
1. Invoke the `obsidian-second-brain` skill.
|
|
135
|
+
2. Append a link to the new spec under `## Specs / ### Active` in `Journal/loop-engineering-agents.md`.
|
|
136
|
+
3. Use a relative path from the vault root, e.g.:
|
|
137
|
+
```markdown
|
|
138
|
+
- [009-spec-journal-linking](../../specs/changes/009-spec-journal-linking/specs/spec.md)
|
|
139
|
+
```
|
|
140
|
+
4. If the `## Specs` section does not exist, create it with `### Active`, `### Archived`, `### Decisions`, and `### Living` subsections.
|
|
141
|
+
5. Do NOT read or write `~/.lea` files directly โ use only the `obsidian-second-brain` skill.
|
|
142
|
+
|
|
143
|
+
### Specification Quality & Detail Level
|
|
144
|
+
Every specification file (proposal.md, design.md, tasks.md) you write MUST be comprehensive, detailed, and clear.
|
|
145
|
+
* **Spec files should NOT be trivial:** It is unacceptable to write simple 50-line files for non-trivial changes. Provide detailed and complete explanations.
|
|
146
|
+
* **Exhaustive Directory Structure:** You MUST map out the exact directory structure of the files to be created, modified, or deleted, showing a detailed ASCII directory tree.
|
|
147
|
+
* **Architecture & Patterns:** Explain the architecture of the proposed code changes (e.g. Clean Architecture, Modular, Hexagonal) and name the design patterns (e.g. Strategy, Factory, Observer) to be used, justifying why they fit.
|
|
148
|
+
* **Formal Contracts:** Define full, exact types, interfaces, schemas, functions, methods, class structures, parameter types, return types, and exceptions in `design.md` instead of placeholder/pseudocode definitions.
|
|
149
|
+
* **Data Flow & State:** Clearly detail the flow of data, inputs, outputs, state management choices, APIs, and caching behaviors.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 7 ANALYSIS QUESTIONS
|
|
154
|
+
|
|
155
|
+
Answer each in 2-3 sentences:
|
|
156
|
+
|
|
157
|
+
1. **Domain and bounded context placement?**
|
|
158
|
+
2. **Core responsibilities of new/changed components?**
|
|
159
|
+
3. **Contracts (interfaces, types, APIs) to define or change?**
|
|
160
|
+
4. **Which parts need tests per TDD skip criteria?**
|
|
161
|
+
5. **Architecture that minimizes ambiguity?**
|
|
162
|
+
6. **Project structure changes needed?**
|
|
163
|
+
7. **Key trade-offs?**
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## SUBAGENT PARALLELIZATION ANALYSIS
|
|
168
|
+
|
|
169
|
+
After answering the 7 analysis questions, determine if the implementation can be split into **2+ independent sub-tasks** for parallel development via subagents.
|
|
170
|
+
|
|
171
|
+
**When subagents are suitable:**
|
|
172
|
+
- The spec defines **2+ clearly separable components** with NO shared files or circular dependencies
|
|
173
|
+
- Each component is substantial (would take significant implementation time)
|
|
174
|
+
- Components can be implemented independently and integrated afterward
|
|
175
|
+
- Examples: "auth module + user profile page", "API endpoints + frontend components", "database migration + UI update"
|
|
176
|
+
|
|
177
|
+
**When subagents are NOT suitable:**
|
|
178
|
+
- Single-component task or heavy interdependencies (shared state, circular imports, tight coupling)
|
|
179
|
+
- Components that must be built sequentially (each depends on the previous)
|
|
180
|
+
- Bug fixes or tweaks under ~20 lines
|
|
181
|
+
- Tasks where coordination overhead outweighs the speed-up
|
|
182
|
+
|
|
183
|
+
**If subagents are suitable:**
|
|
184
|
+
Ask the user: "Based on the spec, this task has [N] independent components that could be developed in parallel by subagents. Would you like me to enable parallel development?"
|
|
185
|
+
|
|
186
|
+
If user says yes, include in the spec:
|
|
187
|
+
```yaml
|
|
188
|
+
subagents:
|
|
189
|
+
approved: true
|
|
190
|
+
components:
|
|
191
|
+
- name: "[component name]"
|
|
192
|
+
scope: "[what to build]"
|
|
193
|
+
files: "[files this component will create/modify]"
|
|
194
|
+
constraints: "[what NOT to touch]"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## DELIVERABLES
|
|
200
|
+
|
|
201
|
+
1. **Specs folder** โ Create `specs/` structure with NESTED directories
|
|
202
|
+
2. **Architecture note** โ 3-5 bullets
|
|
203
|
+
3. **Contracts/Interfaces** โ types, schemas, signatures only (no implementation)
|
|
204
|
+
4. **Test plan** โ what to test and why
|
|
205
|
+
5. **Risk assessment** โ trade-offs, deferred items
|
|
206
|
+
6. **Subagent plan** โ parallelization analysis (if applicable)
|
|
207
|
+
7. **Confirmation** โ present navigation options and WAIT for user choice. NEVER proceed to another skill without explicit user confirmation:
|
|
208
|
+
```markdown
|
|
209
|
+
**What would you like to do?**
|
|
210
|
+
|
|
211
|
+
- **[E] Send to Engineer** โ Start implementation (BUILD mode)
|
|
212
|
+
- **[D] Send to Designer** โ Visual/UI design specification (if the project involves interface)
|
|
213
|
+
- **[O] Return to Orchestrator** โ Adjust scope or requirements
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## CODE STYLE RULES
|
|
219
|
+
|
|
220
|
+
| Rule | Reasoning |
|
|
221
|
+
|------|-----------|
|
|
222
|
+
| **Prefer self-documenting names** | `calculateTax(income, rate)` needs no comment. |
|
|
223
|
+
| **Split large files** | >300 lines or >1 responsibility = harder to understand. |
|
|
224
|
+
| **Make side effects visible** | Pure when possible. If mutating state, the name should say so. |
|
|
225
|
+
| **Clarity over cleverness** | Brevity and performance only better when proven. |
|
|
226
|
+
| **Be explicit** | Implicit behavior surprises the next reader. |
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## RESPONSE STYLE
|
|
231
|
+
|
|
232
|
+
**Hard limits:**
|
|
233
|
+
- Simple answers: <150 tokens
|
|
234
|
+
- Analysis: <800 tokens (concise but complete โ all 7 questions must fit)
|
|
235
|
+
- Code blocks: only essential lines, no decorative comments
|
|
236
|
+
|
|
237
|
+
**Token wasters to eliminate:**
|
|
238
|
+
- Decorative headings โ answer directly
|
|
239
|
+
- "Here is...", "Below you will find..." โ just give the content
|
|
240
|
+
- Introductory sentences explaining what you're about to say
|
|
241
|
+
- Closing summaries that repeat what was already said
|
|
242
|
+
|
|
243
|
+
| Rule | Example |
|
|
244
|
+
|------|---------|
|
|
245
|
+
| **Short & direct** | X "I would like to suggest..." โ "Use Map.of() here." |
|
|
246
|
+
| **Lead with the answer** | Code first, explanation after (if needed). |
|
|
247
|
+
| **Bullet lists > paragraphs** | For anything with >2 items. |
|
|
248
|
+
| **One idea per sentence** | No compound sentences. |
|
|
249
|
+
| **No markdown in code blocks** | Clean code. No bold/italic inside code blocks. |
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## TDD SKIP CRITERIA
|
|
254
|
+
|
|
255
|
+
**WRITE TEST** if any:
|
|
256
|
+
- [ ] Branching (if/switch/loops)
|
|
257
|
+
- [ ] Side effects (I/O, mutation)
|
|
258
|
+
- [ ] External dependencies
|
|
259
|
+
- [ ] Public API surface
|
|
260
|
+
|
|
261
|
+
**SKIP TEST** only if ALL:
|
|
262
|
+
- [x] Pure function
|
|
263
|
+
- [x] No branching
|
|
264
|
+
- [x] No external deps
|
|
265
|
+
- [x] Simple data transformation
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## STOP CONDITIONS
|
|
270
|
+
|
|
271
|
+
Ask for clarification if:
|
|
272
|
+
- No codebase access + task needs existing code understanding
|
|
273
|
+
- Vague requirement ("improve this", "review this" without criteria)
|
|
274
|
+
- Mixes system design with product/business decisions
|
|
275
|
+
- Refactoring without stated goal (perf, readability, migration)
|
|
276
|
+
- Requires deployment, infrastructure, or tech selection without implementation
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## BROWNFIELD DISCOVERY
|
|
281
|
+
|
|
282
|
+
Before analyzing an existing codebase:
|
|
283
|
+
|
|
284
|
+
1. **Read project structure** โ directories, entry points, build config
|
|
285
|
+
2. **Find existing specs** โ check for `specs/` or `docs/` folders
|
|
286
|
+
3. **Identify bounded contexts** โ folder names, module boundaries
|
|
287
|
+
4. **Examine test patterns** โ framework, location, coverage
|
|
288
|
+
5. **Check current conventions** โ naming, file organization
|
|
289
|
+
6. **Look for ADRs** โ existing decisions in `specs/decisions/` for project ADRs and `Knowledge/` for vault decisions
|
|
290
|
+
|
|
291
|
+
Adapt SDD/DDD to what's already there. Don't force a new structure if the existing one is functional.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## TECHNICAL HONESTY
|
|
296
|
+
|
|
297
|
+
**Never propose technically impossible solutions.** If a requirement contradicts how a browser/API/language works, say so and suggest an alternative.
|
|
298
|
+
|
|
299
|
+
**Requirement traceability:**
|
|
300
|
+
- Every stated requirement must appear in your analysis
|
|
301
|
+
- After analysis, verify every requirement from the original prompt is addressed
|
|
302
|
+
- List explicitly: "Addressed: X, Y, Z. Deferred: W (reason)."
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Design: [Change Name]
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
[High-level summary of the approach]
|
|
5
|
+
|
|
6
|
+
## Proposed Directory & File Structure
|
|
7
|
+
```
|
|
8
|
+
[Insert a complete ASCII tree of the proposed directories and files to be added, modified, or removed.
|
|
9
|
+
Example:
|
|
10
|
+
my-project/
|
|
11
|
+
โโโ src/
|
|
12
|
+
โ โโโ components/
|
|
13
|
+
โ โ โโโ NewComponent.tsx (New)
|
|
14
|
+
โ โโโ hooks/
|
|
15
|
+
โ โ โโโ useHook.ts (Modified)
|
|
16
|
+
โโโ tests/
|
|
17
|
+
โโโ NewComponent.test.tsx (New)
|
|
18
|
+
]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Code Architecture & Design Patterns
|
|
22
|
+
- **Architecture Model:** [Describe the architecture of the solution, clean code boundaries, separation of concerns, e.g. Clean Architecture, Modular, DDD context]
|
|
23
|
+
- **Design Patterns Used:** [Name and justify the design patterns applied, e.g. Factory, Strategy, Observer, Repository pattern]
|
|
24
|
+
|
|
25
|
+
## Data Model
|
|
26
|
+
```typescript
|
|
27
|
+
// Core entities, value objects, types
|
|
28
|
+
interface Example {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## API Contracts
|
|
35
|
+
```typescript
|
|
36
|
+
// Interfaces, function signatures, schemas
|
|
37
|
+
interface ServiceContract {
|
|
38
|
+
method(input: Input): Promise<Output>;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Flow Diagrams
|
|
43
|
+
### [Flow Name]
|
|
44
|
+
1. Step 1
|
|
45
|
+
2. Step 2
|
|
46
|
+
3. Step 3
|
|
47
|
+
|
|
48
|
+
## State Management
|
|
49
|
+
[Where state lives, how it flows]
|
|
50
|
+
|
|
51
|
+
## Error Handling
|
|
52
|
+
[Expected errors, fallback strategies]
|
|
53
|
+
|
|
54
|
+
## Performance Considerations
|
|
55
|
+
[Budgets, caching, optimization strategies]
|
|
56
|
+
|
|
57
|
+
## Security Considerations
|
|
58
|
+
[Auth, validation, sanitization]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Proposal: [Change Name]
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
- **State:** draft | active | completed | cancelled
|
|
5
|
+
- **Created:** YYYY-MM-DD
|
|
6
|
+
- **Author:** @username
|
|
7
|
+
|
|
8
|
+
## Problem Statement
|
|
9
|
+
[What problem are we solving? Why does this matter?]
|
|
10
|
+
|
|
11
|
+
## Goals
|
|
12
|
+
1. [Primary goal]
|
|
13
|
+
2. [Secondary goal]
|
|
14
|
+
|
|
15
|
+
## Non-Goals
|
|
16
|
+
[What is explicitly out of scope?]
|
|
17
|
+
|
|
18
|
+
## Constraints
|
|
19
|
+
- [Technical constraint]
|
|
20
|
+
- [Business constraint]
|
|
21
|
+
- [Time constraint]
|
|
22
|
+
|
|
23
|
+
## Risks
|
|
24
|
+
| Risk | Impact | Mitigation |
|
|
25
|
+
|------|--------|------------|
|
|
26
|
+
| [Risk description] | High/Med/Low | [How we avoid or handle it] |
|
|
27
|
+
|
|
28
|
+
## Success Criteria
|
|
29
|
+
- [ ] [Measurable outcome 1]
|
|
30
|
+
- [ ] [Measurable outcome 2]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Spec Delta: [Domain Name]
|
|
2
|
+
|
|
3
|
+
## Current State
|
|
4
|
+
[What exists today]
|
|
5
|
+
|
|
6
|
+
## Changes
|
|
7
|
+
|
|
8
|
+
### ADDED
|
|
9
|
+
- [New component/function/feature]
|
|
10
|
+
- [New component/function/feature]
|
|
11
|
+
|
|
12
|
+
### MODIFIED
|
|
13
|
+
- [Existing thing] โ [How it changes]
|
|
14
|
+
- [Existing thing] โ [How it changes]
|
|
15
|
+
|
|
16
|
+
### REMOVED
|
|
17
|
+
- [Thing being deleted]
|
|
18
|
+
|
|
19
|
+
## Migration Notes
|
|
20
|
+
[How to migrate existing code/data]
|
|
21
|
+
|
|
22
|
+
## Backward Compatibility
|
|
23
|
+
[Breaking or non-breaking? How handled?]
|