leancraft 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/.claude/skills/leancraft/SKILL.md +90 -0
- package/.cursor/rules/leancraft.mdc +70 -0
- package/.leancraft/README.md +26 -0
- package/.leancraft/SKILL.md +90 -0
- package/.leancraft/agent/context.md +37 -0
- package/.leancraft/agent/proposals/README.md +24 -0
- package/.leancraft/agent/status.md +31 -0
- package/.leancraft/config.json +357 -0
- package/.leancraft/human/definition/features/042-example-feature.md +32 -0
- package/.leancraft/human/definition/guardrails.md +37 -0
- package/.leancraft/human/definition/intent.md +31 -0
- package/.leancraft/human/definition/system.md +48 -0
- package/.leancraft/human/discovery/00-index.md +40 -0
- package/.leancraft/human/discovery/00-overview.md +31 -0
- package/.leancraft/human/discovery/01-vision.md +29 -0
- package/.leancraft/human/discovery/02-research.md +104 -0
- package/.leancraft/human/discovery/03-competitive.md +28 -0
- package/.leancraft/human/discovery/04-personas.md +24 -0
- package/.leancraft/human/discovery/05-jtbd.md +27 -0
- package/.leancraft/human/discovery/06-prd.md +101 -0
- package/.leancraft/human/sprint/map.md +22 -0
- package/.leancraft/joint/decisions.log.md +21 -0
- package/.leancraft/joint/ledger.jsonl +3 -0
- package/.leancraft/joint/test-report.md +20 -0
- package/.leancraft/templates/definition/feature.md +32 -0
- package/.leancraft/templates/definition/guardrails.md +39 -0
- package/.leancraft/templates/definition/intent.md +33 -0
- package/.leancraft/templates/definition/system.md +47 -0
- package/.leancraft/templates/discovery/00-index.md +40 -0
- package/.leancraft/templates/discovery/00-overview.md +31 -0
- package/.leancraft/templates/discovery/01-vision.md +28 -0
- package/.leancraft/templates/discovery/02-research.md +104 -0
- package/.leancraft/templates/discovery/03-competitive.md +27 -0
- package/.leancraft/templates/discovery/04-personas.md +26 -0
- package/.leancraft/templates/discovery/05-jtbd.md +27 -0
- package/.leancraft/templates/discovery/06-prd.md +102 -0
- package/.leancraft/templates/sprint/map.md +23 -0
- package/.mcp.json +10 -0
- package/AGENTS.md +70 -0
- package/CLAUDE.md +5 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/bin/leancraft.js +128 -0
- package/package.json +55 -0
- package/scripts/install-hooks.mjs +27 -0
- package/scripts/leancraft-lock.mjs +30 -0
- package/scripts/leancraft-sync.mjs +105 -0
- package/scripts/leancraft-validate.mjs +159 -0
- package/scripts/mcp-server.mjs +122 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# 02 — Research — 12 Pain Themes (P1-P12)
|
|
2
|
+
|
|
3
|
+
> Status: DRAFT — Agent drafts, human verifies quotes. Min 12 themes (no max — add P13-P20 if needed). Sources Inventory holds your 50–100 raw posts — more sources = stronger themes. Validator checks ≥12.
|
|
4
|
+
|
|
5
|
+
## P1: [Theme]
|
|
6
|
+
|
|
7
|
+
- **Quote:** "[verbatim]"
|
|
8
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
9
|
+
- **Frequency:**
|
|
10
|
+
- **Severity:** high/medium/low
|
|
11
|
+
|
|
12
|
+
## P2: [Theme]
|
|
13
|
+
|
|
14
|
+
- **Quote:** "[verbatim]"
|
|
15
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
16
|
+
- **Frequency:**
|
|
17
|
+
- **Severity:** high/medium/low
|
|
18
|
+
|
|
19
|
+
## P3: [Theme]
|
|
20
|
+
|
|
21
|
+
- **Quote:** "[verbatim]"
|
|
22
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
23
|
+
- **Frequency:**
|
|
24
|
+
- **Severity:** high/medium/low
|
|
25
|
+
|
|
26
|
+
## P4: [Theme]
|
|
27
|
+
|
|
28
|
+
- **Quote:** "[verbatim]"
|
|
29
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
30
|
+
- **Frequency:**
|
|
31
|
+
- **Severity:** high/medium/low
|
|
32
|
+
|
|
33
|
+
## P5: [Theme]
|
|
34
|
+
|
|
35
|
+
- **Quote:** "[verbatim]"
|
|
36
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
37
|
+
- **Frequency:**
|
|
38
|
+
- **Severity:** high/medium/low
|
|
39
|
+
|
|
40
|
+
## P6: [Theme]
|
|
41
|
+
|
|
42
|
+
- **Quote:** "[verbatim]"
|
|
43
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
44
|
+
- **Frequency:**
|
|
45
|
+
- **Severity:** high/medium/low
|
|
46
|
+
|
|
47
|
+
## P7: [Theme]
|
|
48
|
+
|
|
49
|
+
- **Quote:** "[verbatim]"
|
|
50
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
51
|
+
- **Frequency:**
|
|
52
|
+
- **Severity:** high/medium/low
|
|
53
|
+
|
|
54
|
+
## P8: [Theme]
|
|
55
|
+
|
|
56
|
+
- **Quote:** "[verbatim]"
|
|
57
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
58
|
+
- **Frequency:**
|
|
59
|
+
- **Severity:** high/medium/low
|
|
60
|
+
|
|
61
|
+
## P9: [Theme]
|
|
62
|
+
|
|
63
|
+
- **Quote:** "[verbatim]"
|
|
64
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
65
|
+
- **Frequency:**
|
|
66
|
+
- **Severity:** high/medium/low
|
|
67
|
+
|
|
68
|
+
## P10: [Theme]
|
|
69
|
+
|
|
70
|
+
- **Quote:** "[verbatim]"
|
|
71
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
72
|
+
- **Frequency:**
|
|
73
|
+
- **Severity:** high/medium/low
|
|
74
|
+
|
|
75
|
+
## P11: [Theme]
|
|
76
|
+
|
|
77
|
+
- **Quote:** "[verbatim]"
|
|
78
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
79
|
+
- **Frequency:**
|
|
80
|
+
- **Severity:** high/medium/low
|
|
81
|
+
|
|
82
|
+
## P12: [Theme]
|
|
83
|
+
|
|
84
|
+
- **Quote:** "[verbatim]"
|
|
85
|
+
- **Source:** https://... — Date: YYYY-MM-DD — Platform: Reddit/X/HN/G2
|
|
86
|
+
- **Frequency:**
|
|
87
|
+
- **Severity:** high/medium/low
|
|
88
|
+
|
|
89
|
+
## Sources Inventory (50–100 raw posts — more = stronger)
|
|
90
|
+
|
|
91
|
+
| # | URL | Platform | Date | Pain |
|
|
92
|
+
|---|---|---|---|---|
|
|
93
|
+
| 1 | | | | P1 |
|
|
94
|
+
| ... | | | | |
|
|
95
|
+
|
|
96
|
+
## Synthesis
|
|
97
|
+
|
|
98
|
+
- Top 3 by frequency:
|
|
99
|
+
|
|
100
|
+
## Validation
|
|
101
|
+
|
|
102
|
+
- [ ] P1-P12 headings present (add P13+ if needed — validator checks ≥12)
|
|
103
|
+
- [ ] Each has Quote + URL + Date
|
|
104
|
+
- [ ] ≥12 unique URLs (50–100 recommended)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 03 — Competitive Teardown
|
|
2
|
+
|
|
3
|
+
> Status: DRAFT — Min 9 competitors, pricing must have $, min 5 wedges
|
|
4
|
+
|
|
5
|
+
## Competitors
|
|
6
|
+
|
|
7
|
+
| # | Name | URL | Pricing | Strength | Weakness |
|
|
8
|
+
|---|---|---|---|---|---|
|
|
9
|
+
| 1 | [Competitor 1] | https://... | $X/mo | | |
|
|
10
|
+
|
|
11
|
+
## Pricing Table (must have $)
|
|
12
|
+
|
|
13
|
+
| Competitor | Free | Starter | Pro |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| | $0 | $ | $ |
|
|
16
|
+
|
|
17
|
+
## Our Wedges
|
|
18
|
+
|
|
19
|
+
1.
|
|
20
|
+
2.
|
|
21
|
+
3.
|
|
22
|
+
4.
|
|
23
|
+
5.
|
|
24
|
+
|
|
25
|
+
## Validation
|
|
26
|
+
|
|
27
|
+
- [ ] ≥9 competitors with URLs
|
|
28
|
+
- [ ] Pricing has $/€/£
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 04 — Personas — 5 Personas + Affinity Map
|
|
2
|
+
|
|
3
|
+
> Status: DRAFT — Min 5 personas
|
|
4
|
+
|
|
5
|
+
## Persona 1: [Name] — [Role]
|
|
6
|
+
|
|
7
|
+
- **Demographics:**
|
|
8
|
+
- **Goals:**
|
|
9
|
+
- **Pains:** (link to P# from 02-research.md)
|
|
10
|
+
- **JTBD:** When ... I want ... So ...
|
|
11
|
+
- **Quote:** "[from research]"
|
|
12
|
+
|
|
13
|
+
## Persona 2–5: [same structure]
|
|
14
|
+
|
|
15
|
+
## Affinity Map
|
|
16
|
+
|
|
17
|
+
| Theme | P1 | P2 | P3 | P4 | P5 |
|
|
18
|
+
|---|---|---|---|---|---|
|
|
19
|
+
| | ● | | ● | | |
|
|
20
|
+
|
|
21
|
+
## Validation
|
|
22
|
+
|
|
23
|
+
- [ ] 5 personas with goals/pains/jtbd
|
|
24
|
+
- [ ] Each pain links to P#
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# 05 — JTBD + Empathy Maps + Pain Matrix
|
|
2
|
+
|
|
3
|
+
> Status: DRAFT
|
|
4
|
+
|
|
5
|
+
## JTBD Statements
|
|
6
|
+
|
|
7
|
+
- When [situation] I want [motivation] So I can [outcome] — Persona: [Name] — Pain: P#
|
|
8
|
+
|
|
9
|
+
## Empathy Maps (1 per persona)
|
|
10
|
+
|
|
11
|
+
### Persona: [Name]
|
|
12
|
+
- **Says:**
|
|
13
|
+
- **Thinks:**
|
|
14
|
+
- **Does:**
|
|
15
|
+
- **Feels:**
|
|
16
|
+
|
|
17
|
+
## Pain Matrix
|
|
18
|
+
|
|
19
|
+
| Pain | P1 | P2 | P3 | P4 | P5 | Priority |
|
|
20
|
+
|---|---|---|---|---|---|---|
|
|
21
|
+
| | 3 | 1 | 3 | 2 | 1 | P0 |
|
|
22
|
+
|
|
23
|
+
## Validation
|
|
24
|
+
|
|
25
|
+
- [ ] JTBD per persona
|
|
26
|
+
- [ ] 5 empathy maps
|
|
27
|
+
- [ ] Pain matrix
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# 06 — PRD — Goals, Flows, Reqs
|
|
2
|
+
|
|
3
|
+
> Status: DRAFT — Min 3 flows, 10 FRs. Lean overview, not 20 pages — founder thinks through, agent fills from discovery.
|
|
4
|
+
|
|
5
|
+
## Goals (P0/P1)
|
|
6
|
+
|
|
7
|
+
- P0:
|
|
8
|
+
- P1:
|
|
9
|
+
|
|
10
|
+
## Non-Goals
|
|
11
|
+
|
|
12
|
+
- Not building:
|
|
13
|
+
|
|
14
|
+
## Success Metrics (North Star + Activation)
|
|
15
|
+
|
|
16
|
+
| Metric | Target | Source (from 01-vision) |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| North Star | [e.g., Weekly infobots created] | 01-vision.md |
|
|
19
|
+
| Activation | [e.g., 1 infobot in 5 min] | 04-personas.md P1 |
|
|
20
|
+
| Retention | [e.g., D7 return] | 05-jtbd.md |
|
|
21
|
+
|
|
22
|
+
## Assumptions + Open Questions (test in next sprint)
|
|
23
|
+
|
|
24
|
+
| Assumption | How to test | Owner |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| [e.g., Solo founders will pay $10] | 5 interviews (02-research P3) | PM |
|
|
27
|
+
| [Open: Do agencies need multi-brand?] | Ask 3 agencies in 04-personas | PM |
|
|
28
|
+
|
|
29
|
+
## User Flows (≥3)
|
|
30
|
+
|
|
31
|
+
### Flow 1: [Name] — Persona: [Name]
|
|
32
|
+
1. User ...
|
|
33
|
+
2. System ...
|
|
34
|
+
3. ...
|
|
35
|
+
|
|
36
|
+
## Functional Reqs (≥10)
|
|
37
|
+
|
|
38
|
+
| ID | Req | Persona | Flow | Priority |
|
|
39
|
+
|---|---|---|---|---|
|
|
40
|
+
| FR-01 | As [persona] I can ... | P1 | F1 | P0 |
|
|
41
|
+
|
|
42
|
+
## NFRs
|
|
43
|
+
|
|
44
|
+
- Performance:
|
|
45
|
+
- Security:
|
|
46
|
+
- A11y: WCAG AA
|
|
47
|
+
|
|
48
|
+
## Stakeholders / Dependencies (overview)
|
|
49
|
+
|
|
50
|
+
| Role / System | Person / API | Dependency | Risk if missing |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| [e.g., Stripe] | api.stripe.com | Payments | Cannot charge |
|
|
53
|
+
|
|
54
|
+
## RACI (light — who decides)
|
|
55
|
+
|
|
56
|
+
| Decision | R (Does) | A (Owns) | C (Consult) | I (Inform) |
|
|
57
|
+
|---|---|---|---|---|
|
|
58
|
+
| Pricing | PM | Founder | Eng | Users |
|
|
59
|
+
| Ship | Eng | CTO | PM | — |
|
|
60
|
+
|
|
61
|
+
## PESTEL (light — 1 line each)
|
|
62
|
+
|
|
63
|
+
- P (Political):
|
|
64
|
+
- E (Economic):
|
|
65
|
+
- S (Social):
|
|
66
|
+
- T (Tech):
|
|
67
|
+
- E (Env):
|
|
68
|
+
- L (Legal):
|
|
69
|
+
|
|
70
|
+
## 4 Whys (founder thinks, agent maps)
|
|
71
|
+
|
|
72
|
+
- Why now:
|
|
73
|
+
- Why us:
|
|
74
|
+
- Why this problem:
|
|
75
|
+
- Why not others:
|
|
76
|
+
|
|
77
|
+
## Timeline / Milestones (light Gantt — P0/P1, not waterfall dates)
|
|
78
|
+
|
|
79
|
+
| Milestone | Target | Owner | Depends on |
|
|
80
|
+
|---|---|---|---|
|
|
81
|
+
| M1: Alpha (P0 flows) | Wk 4 | Eng | 06-prd FR-01-05 |
|
|
82
|
+
| M2: Beta | Wk 8 | PM | User tests |
|
|
83
|
+
|
|
84
|
+
## Legal / Compliance (overview)
|
|
85
|
+
|
|
86
|
+
- Data / PII: (from 07-data.md if exists)
|
|
87
|
+
- IP / License:
|
|
88
|
+
- Regulatory:
|
|
89
|
+
|
|
90
|
+
## Risks
|
|
91
|
+
|
|
92
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| | | | |
|
|
95
|
+
|
|
96
|
+
## Validation
|
|
97
|
+
|
|
98
|
+
- [ ] ≥3 flows + ≥10 FRs with IDs
|
|
99
|
+
- [ ] Success Metrics (North Star + Activation)
|
|
100
|
+
- [ ] Assumptions + Open Questions
|
|
101
|
+
- [ ] RACI, PESTEL, 4 Whys, Timeline, Legal present (overview, 3-5 lines each)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Sprint — Map (Day 1)
|
|
2
|
+
|
|
3
|
+
> Human owns, agent READ-ONLY
|
|
4
|
+
|
|
5
|
+
## How-Might-We
|
|
6
|
+
|
|
7
|
+
- HMW ...
|
|
8
|
+
|
|
9
|
+
## Target
|
|
10
|
+
|
|
11
|
+
- Persona:
|
|
12
|
+
- Moment:
|
|
13
|
+
- Metric:
|
|
14
|
+
|
|
15
|
+
## Map
|
|
16
|
+
|
|
17
|
+
1. ...
|
|
18
|
+
2. ...
|
|
19
|
+
|
|
20
|
+
## Validation
|
|
21
|
+
|
|
22
|
+
- [ ] HMW + target with metric
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Decisions Log — Joint (Human + Agent Append)
|
|
2
|
+
|
|
3
|
+
> Both can append. Human decisions are final. Agent must cite source.
|
|
4
|
+
|
|
5
|
+
## 2026-08-30 — Init
|
|
6
|
+
|
|
7
|
+
- Decision: Adopted Leancraft doc-first structure
|
|
8
|
+
- Why: Solve vibe coding ownership/context drift
|
|
9
|
+
- By: human
|
|
10
|
+
|
|
11
|
+
## Template
|
|
12
|
+
|
|
13
|
+
### YYYY-MM-DD — [Title]
|
|
14
|
+
|
|
15
|
+
- Decision:
|
|
16
|
+
- Why:
|
|
17
|
+
- Alternatives rejected:
|
|
18
|
+
- By: human | agent (source: human/definition/intent.md I2)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
*Append only. Never delete.*
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{"ts":"2026-08-30T00:00:00Z","spec":"init","model":"human","cost":0,"calls":0,"sources":[],"event":"leancraft init"}
|
|
2
|
+
{"ts":"2026-08-30T20:27:03.798Z","commit":"no-git","event":"sync","validate":"FAIL — fix errors before Lock"}
|
|
3
|
+
{"ts":"2026-08-30T21:57:01.235Z","commit":"4c68032","event":"sync","validate":"FAIL — fix errors before Lock"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Test Report — Joint (Human + Agent)
|
|
2
|
+
|
|
3
|
+
> Sprint Day 3 — Human observes 5 real users, agent synthesizes patterns (human validates)
|
|
4
|
+
|
|
5
|
+
## User 1 — [Name, Persona]
|
|
6
|
+
|
|
7
|
+
- Task:
|
|
8
|
+
- Observed:
|
|
9
|
+
- Quote:
|
|
10
|
+
|
|
11
|
+
## User 2–5 — [same]
|
|
12
|
+
|
|
13
|
+
## Synthesis (agent proposes, human validates)
|
|
14
|
+
|
|
15
|
+
- Pattern:
|
|
16
|
+
- Fix:
|
|
17
|
+
|
|
18
|
+
## Validation
|
|
19
|
+
|
|
20
|
+
- [ ] ≥5 real user notes (validator checks)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Feature — [NNN-kebab-case, e.g., 042-pdf-export]
|
|
2
|
+
|
|
3
|
+
> REQUIRED: intent, invariants, oracles, acceptance. 1 per flow from 06-prd.md. Ephemeral — delete when shipped.
|
|
4
|
+
|
|
5
|
+
## Intent
|
|
6
|
+
|
|
7
|
+
[1 paragraph, distilled from 06-prd.md Flow N]
|
|
8
|
+
|
|
9
|
+
## Invariants (scoped to this feature)
|
|
10
|
+
|
|
11
|
+
- **I1:** [feature-specific, e.g., PDF contains all line items for scopeId]
|
|
12
|
+
- **I2:** ...
|
|
13
|
+
|
|
14
|
+
## Oracles
|
|
15
|
+
|
|
16
|
+
- **O1:** Property test: ...
|
|
17
|
+
- **O2:** e2e: ...
|
|
18
|
+
|
|
19
|
+
## Acceptance (human-checkable)
|
|
20
|
+
|
|
21
|
+
- [ ] Given ... When ... Then ...
|
|
22
|
+
- [ ] Axe passes
|
|
23
|
+
- [ ] Perf <2s
|
|
24
|
+
|
|
25
|
+
## Source Trace
|
|
26
|
+
|
|
27
|
+
- FR-05, Persona: Solo Sree
|
|
28
|
+
|
|
29
|
+
## Validation
|
|
30
|
+
|
|
31
|
+
- [ ] Invariants have Check
|
|
32
|
+
- [ ] Source trace present
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Guardrails — Security, Perf, A11y, i18n
|
|
2
|
+
|
|
3
|
+
> REQUIRED: security, performance, a11y, i18n
|
|
4
|
+
|
|
5
|
+
## Security (from discovery/07-data.md if exists)
|
|
6
|
+
|
|
7
|
+
- **CWE-89 SQLi:** Never string-concat SQL, use `scopedQuery()` / parameterized
|
|
8
|
+
- **CWE-79 XSS:** Never `innerHTML`, use framework escape
|
|
9
|
+
- **Secrets:** Never commit `.env`, use `wrangler secret`
|
|
10
|
+
- **AuthZ:** Every query scoped by `userId + brandId`
|
|
11
|
+
- **Checks:** `semgrep`, `codeql`
|
|
12
|
+
|
|
13
|
+
## Performance
|
|
14
|
+
|
|
15
|
+
- Budget: LCP <2.5s, TTFB <600ms
|
|
16
|
+
- No N+1, paginate >100 rows
|
|
17
|
+
- Check: `autocannon`, `lighthouse`
|
|
18
|
+
|
|
19
|
+
## A11y
|
|
20
|
+
|
|
21
|
+
- WCAG AA, axe-core must pass
|
|
22
|
+
- No color-only indicators, ARIA labels required
|
|
23
|
+
|
|
24
|
+
## i18n
|
|
25
|
+
|
|
26
|
+
- No hardcoded strings, use `t()` keys
|
|
27
|
+
- Check: `i18n:check` script
|
|
28
|
+
|
|
29
|
+
## Legal / Privacy (from 06-prd Legal)
|
|
30
|
+
|
|
31
|
+
- Data / PII: (from 07-data.md if exists)
|
|
32
|
+
- IP / License:
|
|
33
|
+
- Regulatory: (GDPR, etc.)
|
|
34
|
+
- Checks: legal review
|
|
35
|
+
|
|
36
|
+
## Validation
|
|
37
|
+
|
|
38
|
+
- [ ] 5 sections present
|
|
39
|
+
- [ ] Each has Check command
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Intent — Global Executable Spec
|
|
2
|
+
|
|
3
|
+
> REQUIRED: intent, invariants (≥3), oracles (≥2), non-goals. This is the contract agents code against.
|
|
4
|
+
|
|
5
|
+
## Intent
|
|
6
|
+
|
|
7
|
+
[1 paragraph: what we are building, distilled from 06-prd.md]
|
|
8
|
+
|
|
9
|
+
## Invariants (≥3, machine-checkable)
|
|
10
|
+
|
|
11
|
+
- **I1:** [e.g., totalChargesInScope == SUM(lineItems where scopeId==X)] — Check: `npm run test:invariants`
|
|
12
|
+
- **I2:** [e.g., PDF must be WCAG AA] — Check: `axe-core`
|
|
13
|
+
- **I3:** [e.g., Never string-concat SQL] — Check: `semgrep --config guardrails`
|
|
14
|
+
|
|
15
|
+
## Oracles (≥2, how we prove invariants)
|
|
16
|
+
|
|
17
|
+
- **O1:** Property test — `fast-check` generates 500 random inputs, invariant holds
|
|
18
|
+
- **O2:** Security — CodeQL/Semgrep passes
|
|
19
|
+
- **O3:** Perf — `autocannon` <2s for 100 rows, no N+1
|
|
20
|
+
|
|
21
|
+
## Non-Goals
|
|
22
|
+
|
|
23
|
+
- Not: ...
|
|
24
|
+
|
|
25
|
+
## Source Trace
|
|
26
|
+
|
|
27
|
+
- Derived from: 06-prd.md FR-01, FR-05; Success Metric: Activation; Assumption: [from 06-prd.md]; 04-personas.md P1
|
|
28
|
+
|
|
29
|
+
## Validation
|
|
30
|
+
|
|
31
|
+
- [ ] ≥3 invariants with Check command
|
|
32
|
+
- [ ] ≥2 oracles with tool name
|
|
33
|
+
- [ ] Source trace to PRD/persona
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# System — Architecture & Decisions
|
|
2
|
+
|
|
3
|
+
> REQUIRED: stack, architecture, decisions, data-model
|
|
4
|
+
|
|
5
|
+
## Stack (pinned versions)
|
|
6
|
+
|
|
7
|
+
- Frontend: [e.g., Next.js 15.0.0, React 19]
|
|
8
|
+
- Backend: [e.g., Cloudflare Workers]
|
|
9
|
+
- DB: [e.g., D1, `wrangler.jsonc`]
|
|
10
|
+
- Infra:
|
|
11
|
+
|
|
12
|
+
## Architecture
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
[diagram: client → worker → D1, with boundaries]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Decisions (ADRs distilled)
|
|
19
|
+
|
|
20
|
+
| Decision | Chosen | Rejected | Why |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| Auth | ... | ... | ... |
|
|
23
|
+
|
|
24
|
+
## Integrations / Dependencies (from 06-prd Stakeholders)
|
|
25
|
+
|
|
26
|
+
| System | API / Host | Why | Allowlist |
|
|
27
|
+
|---|---|---|---|
|
|
28
|
+
| ... | ... | ... | → config |
|
|
29
|
+
|
|
30
|
+
## Deployment / Infra (light)
|
|
31
|
+
|
|
32
|
+
- Hosting: ...
|
|
33
|
+
- Env: dev / staging / prod
|
|
34
|
+
- CI: ...
|
|
35
|
+
|
|
36
|
+
## Data Model
|
|
37
|
+
|
|
38
|
+
- Tables: ...
|
|
39
|
+
- PII handling: (links to discovery/07-data.md if exists)
|
|
40
|
+
- Agents: (links to 08-agents.md if exists)
|
|
41
|
+
- UX: (links to 10-ux.md if exists)
|
|
42
|
+
|
|
43
|
+
## Validation
|
|
44
|
+
|
|
45
|
+
- [ ] Pinned versions listed
|
|
46
|
+
- [ ] Architecture diagram present
|
|
47
|
+
- [ ] Decisions have why
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# 00 — Index — Reading Order & Conventions
|
|
2
|
+
|
|
3
|
+
> REQUIRED SECTIONS: reading-order, conventions, status-legend, agent-usage
|
|
4
|
+
|
|
5
|
+
## Reading Order
|
|
6
|
+
|
|
7
|
+
1. `00-overview.md` → elevator pitch
|
|
8
|
+
2. `01-vision.md` → north star
|
|
9
|
+
3. `02-research.md` → pain themes (P1-P12)
|
|
10
|
+
4. `03-competitive.md` → teardown
|
|
11
|
+
5. `04-personas.md` → who we serve
|
|
12
|
+
6. `05-jtbd.md` → jobs + empathy maps
|
|
13
|
+
7. `06-prd.md` → goals, flows, reqs
|
|
14
|
+
8. `../definition/intent.md` → invariants + oracles (executable)
|
|
15
|
+
9. `../definition/system.md` → architecture
|
|
16
|
+
10. `../definition/guardrails.md` → security/perf/a11y
|
|
17
|
+
11. `../definition/features/*.md` → per-flow specs (ephemeral)
|
|
18
|
+
|
|
19
|
+
## Conventions
|
|
20
|
+
|
|
21
|
+
- `human/discovery/**` — PM-owned, agent READ-ONLY
|
|
22
|
+
- `human/definition/**` — Tech-owned, agent READ-ONLY (distilled from discovery)
|
|
23
|
+
- `agent/**` — Agent-owned, auto-generated
|
|
24
|
+
- `joint/**` — Both append
|
|
25
|
+
|
|
26
|
+
## Status Legend
|
|
27
|
+
|
|
28
|
+
- `DRAFT` — agent drafted, human not yet approved
|
|
29
|
+
- `LOCKED` — human approved, agent cannot edit (needs `proposals/` + human unlock)
|
|
30
|
+
- `AUTO` — agent-owned, regenerated on `leancraft sync`
|
|
31
|
+
|
|
32
|
+
## Agent Usage
|
|
33
|
+
|
|
34
|
+
Agent MUST read `config.json` → `00-index.md` → `00-overview.md` → target doc, in order. Never skip.
|
|
35
|
+
Run `npm run leancraft:validate` before asking to Lock.
|
|
36
|
+
|
|
37
|
+
## Validation
|
|
38
|
+
|
|
39
|
+
- [ ] All 4 sections present
|
|
40
|
+
- [ ] No `TODO` / `TBD` placeholders
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 00 — Overview — Elevator Pitch & Stack
|
|
2
|
+
|
|
3
|
+
> REQUIRED: elevator-pitch, brand-shape, tech-stack, cost-ceiling
|
|
4
|
+
|
|
5
|
+
## Elevator Pitch
|
|
6
|
+
|
|
7
|
+
[1 paragraph: what it is, for whom, why now]
|
|
8
|
+
|
|
9
|
+
## Brand Shape
|
|
10
|
+
|
|
11
|
+
- Parent brand:
|
|
12
|
+
- Sub-brands:
|
|
13
|
+
- Brand promise:
|
|
14
|
+
|
|
15
|
+
## Tech Stack
|
|
16
|
+
|
|
17
|
+
- Frontend:
|
|
18
|
+
- Backend:
|
|
19
|
+
- DB:
|
|
20
|
+
- Infra:
|
|
21
|
+
|
|
22
|
+
## Cost Ceiling
|
|
23
|
+
|
|
24
|
+
- Target infra cost: $____/mo
|
|
25
|
+
- Per-user cost ceiling:
|
|
26
|
+
- Cost tracker lives in: `joint/decisions.log.md` or `agent/status.md`
|
|
27
|
+
|
|
28
|
+
## Validation
|
|
29
|
+
|
|
30
|
+
- [ ] Cost ceiling has $ value with currency
|
|
31
|
+
- [ ] Stack lists pinned versions
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 01 — Vision — North Star & 3-Year
|
|
2
|
+
|
|
3
|
+
> REQUIRED: north-star, 10x-vs-parity, 3-year-vision
|
|
4
|
+
|
|
5
|
+
## North Star
|
|
6
|
+
|
|
7
|
+
[1 sentence: world with product vs without]
|
|
8
|
+
|
|
9
|
+
## 10x vs Parity Matrix
|
|
10
|
+
|
|
11
|
+
| Capability | Parity (must match) | 10x (our wedge) |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| | | |
|
|
14
|
+
|
|
15
|
+
## 3-Year Vision
|
|
16
|
+
|
|
17
|
+
- Year 1:
|
|
18
|
+
- Year 2:
|
|
19
|
+
- Year 3:
|
|
20
|
+
|
|
21
|
+
## Non-Goals (explicit)
|
|
22
|
+
|
|
23
|
+
- Not building:
|
|
24
|
+
|
|
25
|
+
## Validation
|
|
26
|
+
|
|
27
|
+
- [ ] 10x column has ≥3 wedges
|
|
28
|
+
- [ ] Non-goals listed
|