@cofoundr/init 1.5.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 +140 -0
- package/bin/cofoundr.mjs +10 -0
- package/content/.claude-plugin/plugin.json +18 -0
- package/content/README.md +227 -0
- package/content/agents/brand-intake.md +129 -0
- package/content/agents/consolidate.md +154 -0
- package/content/agents/launch-kit-detect.md +109 -0
- package/content/agents/spec-phase.md +131 -0
- package/content/commands/audit.md +137 -0
- package/content/commands/constitution.md +107 -0
- package/content/commands/document.md +155 -0
- package/content/commands/implement.md +108 -0
- package/content/commands/new-feature.md +188 -0
- package/content/commands/new-project.md +243 -0
- package/content/commands/next.md +129 -0
- package/content/commands/onboard.md +176 -0
- package/content/commands/plan.md +138 -0
- package/content/commands/quick-brief.md +95 -0
- package/content/commands/resume.md +99 -0
- package/content/commands/review.md +76 -0
- package/content/commands/rules-check.md +54 -0
- package/content/commands/scope-guard.md +33 -0
- package/content/commands/setup-skills.md +109 -0
- package/content/commands/specify.md +53 -0
- package/content/commands/tasks.md +91 -0
- package/content/commands/translate.md +197 -0
- package/content/manifest.json +59 -0
- package/content/scaffold/.cofoundr/README.md +67 -0
- package/content/scaffold/.cofoundr/constitution.md.tmpl +54 -0
- package/content/scaffold/.cofoundr/manifest.json.tmpl +15 -0
- package/content/scaffold/.cofoundr/memory/decisions.md.tmpl +19 -0
- package/content/scaffold/.cofoundr/memory/knowledge.md.tmpl +23 -0
- package/content/scaffold/.cofoundr/memory/project.md.tmpl +27 -0
- package/content/scaffold/.cofoundr/specs/README.md +38 -0
- package/content/scaffold/AGENTS.md.tmpl +74 -0
- package/content/templates/agents.md +144 -0
- package/content/templates/brand.md +180 -0
- package/content/templates/feature.md +70 -0
- package/content/templates/phases/phase-template/README.md +65 -0
- package/content/templates/phases/phase-template/decisions.md +52 -0
- package/content/templates/phases/phase-template/research.md +59 -0
- package/content/templates/phases/phase-template/spec.md +90 -0
- package/content/templates/phases/phase-template/tests.md +65 -0
- package/content/templates/phases/phase-template/ui-spec.md +75 -0
- package/content/templates/phases.md +234 -0
- package/content/templates/prd.md +89 -0
- package/content/templates/product.md +73 -0
- package/content/templates/rules.md +99 -0
- package/content/templates/tech.md +129 -0
- package/package.json +39 -0
- package/src/adapters/aider.mjs +35 -0
- package/src/adapters/claude-code.mjs +114 -0
- package/src/adapters/cline.mjs +46 -0
- package/src/adapters/codex.mjs +29 -0
- package/src/adapters/copilot.mjs +54 -0
- package/src/adapters/cursor.mjs +69 -0
- package/src/adapters/gemini.mjs +41 -0
- package/src/adapters/index.mjs +14 -0
- package/src/adapters/windsurf.mjs +69 -0
- package/src/cli.mjs +124 -0
- package/src/commands/doctor.mjs +90 -0
- package/src/commands/init.mjs +190 -0
- package/src/commands/list.mjs +28 -0
- package/src/commands/onboard.mjs +130 -0
- package/src/commands/remove.mjs +89 -0
- package/src/commands/sync.mjs +81 -0
- package/src/core/detect.mjs +121 -0
- package/src/core/fs.mjs +42 -0
- package/src/core/license.mjs +170 -0
- package/src/core/log.mjs +32 -0
- package/src/core/prompts.mjs +62 -0
- package/src/core/scaffold.mjs +179 -0
- package/src/core/source.mjs +54 -0
- package/src/core/version.mjs +10 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >
|
|
3
|
+
Break the active phase or feature into ordered, dependency-aware, copy-paste-
|
|
4
|
+
ready tasks. SDD-canonical alias for /cofoundr:next phase [N]. Produces a
|
|
5
|
+
tasks.md file inside the phase or feature folder; never modifies code.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /cofoundr:tasks — Task Breakdown
|
|
9
|
+
|
|
10
|
+
You take a target (a phase, a feature, or "next") and produce a build-ready task list. You do not write code. You do not modify `phases.md` or `prd.md`. Your output is a `tasks.md` file scoped to the target.
|
|
11
|
+
|
|
12
|
+
## Argument parsing
|
|
13
|
+
|
|
14
|
+
- `/cofoundr:tasks` — operate on the **next unbuilt phase** (read `docs/phases.md`, find the first phase with unchecked tasks).
|
|
15
|
+
- `/cofoundr:tasks phase <N>` — operate on a specific phase.
|
|
16
|
+
- `/cofoundr:tasks feature <name>` — operate on a feature in `docs/features/`.
|
|
17
|
+
|
|
18
|
+
If the target cannot be resolved (phase doesn't exist, feature doesn't exist), echo back the available targets and stop.
|
|
19
|
+
|
|
20
|
+
## Step 1 — Read
|
|
21
|
+
|
|
22
|
+
Read in this order. Do not re-read.
|
|
23
|
+
|
|
24
|
+
1. `.cofoundr/constitution.md` (or `docs/rules.md`).
|
|
25
|
+
2. `docs/tech.md` — for stack and conventions.
|
|
26
|
+
3. `docs/phases.md` — for the target phase entry, its goal, its Boundary Map, its HALT conditions.
|
|
27
|
+
4. The phase or feature spec pack (`docs/phases/<slug>/spec.md`, `tests.md`, `decisions.md`) if it exists.
|
|
28
|
+
5. The current code state — run `git status` and `git log --oneline -10` so the task list does not duplicate work that's already done.
|
|
29
|
+
|
|
30
|
+
## Step 2 — Generate the task list
|
|
31
|
+
|
|
32
|
+
Write `docs/phases/<slug>/tasks.md` (or `docs/features/<slug>/tasks.md`). Use the structure below.
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
# Tasks — <phase or feature name>
|
|
36
|
+
|
|
37
|
+
## Preconditions
|
|
38
|
+
- [ ] Constitution v<version> is in effect.
|
|
39
|
+
- [ ] Spec pack at <path> is reviewed.
|
|
40
|
+
- [ ] All Boundary Map "Consumes" artifacts exist (list each one and how to verify).
|
|
41
|
+
|
|
42
|
+
## Ordered Tasks
|
|
43
|
+
|
|
44
|
+
### T1 — <short imperative>
|
|
45
|
+
- **File(s):** `path/to/file.ts`
|
|
46
|
+
- **Produces:** <function, type, route, or schema this introduces>
|
|
47
|
+
- **Depends on:** T0 (or "none")
|
|
48
|
+
- **Steps:**
|
|
49
|
+
1. <copy-paste-ready instruction>
|
|
50
|
+
2. <copy-paste-ready instruction>
|
|
51
|
+
- **<verify>** <one-line observable check the founder or AI can run>
|
|
52
|
+
|
|
53
|
+
### T2 — <short imperative>
|
|
54
|
+
...
|
|
55
|
+
|
|
56
|
+
## HALT conditions
|
|
57
|
+
Carry forward from `phases.md`. If a HALT condition fires, stop and write a note to `.cofoundr/memory/decisions.md`.
|
|
58
|
+
|
|
59
|
+
## Done when
|
|
60
|
+
- [ ] All `<verify>` checks pass.
|
|
61
|
+
- [ ] `git status` clean on the phase branch.
|
|
62
|
+
- [ ] Session Notes appended to the active feature doc (if feature work).
|
|
63
|
+
- [ ] Phase task in `phases.md` checked off.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Step 3 — Task quality rules
|
|
67
|
+
|
|
68
|
+
- **Imperative, not aspirational.** "Add `getUserById` to `lib/users.ts`" not "Consider adding a user lookup helper".
|
|
69
|
+
- **Files-first.** Every task names at least one file path. If a task does not touch a file, it is not a task — it is a check.
|
|
70
|
+
- **One verify per task.** A task without a `<verify>` line is incomplete.
|
|
71
|
+
- **Atomic.** A task that touches more than 3 files probably needs to split. Split it.
|
|
72
|
+
- **Boundary-aware.** A task may not consume an artifact that no prior task produced. If it must, mark it as a Precondition and stop.
|
|
73
|
+
- **Constitution-aware.** If a task would violate a Never rule, do not write it. Surface the conflict.
|
|
74
|
+
|
|
75
|
+
## Step 4 — Update `AGENTS.md`
|
|
76
|
+
|
|
77
|
+
Append the new tasks file path under the **Specs** section of `AGENTS.md` so all tools can find it:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
- Tasks: <path>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Step 5 — Confirm
|
|
84
|
+
|
|
85
|
+
Show the founder the task count and the first three tasks. Ask: *"Want me to dispatch `/cofoundr:implement` on T1, or are we still iterating?"* Wait.
|
|
86
|
+
|
|
87
|
+
## What you must not do
|
|
88
|
+
|
|
89
|
+
- Do not write code. Tasks are instructions, not implementations.
|
|
90
|
+
- Do not modify `phases.md` or `prd.md`. If the phase definition is wrong, surface it as a blocker and stop.
|
|
91
|
+
- Do not invent tasks for work the codebase already has. Cross-check `git log` and a quick `Grep` first.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >
|
|
3
|
+
Generate a plain-English companion to the six spec files. Reads product.md,
|
|
4
|
+
prd.md, tech.md, rules.md, phases.md, agents.md and writes
|
|
5
|
+
docs/plan-for-humans.md — no jargon, no P0/P1, no RLS, no boundary maps.
|
|
6
|
+
Just what you're building, in what order, and what can go wrong. Run this
|
|
7
|
+
after /cofoundr:new-project if you want a version you can share with
|
|
8
|
+
someone non-technical (or re-read yourself at 11pm without needing a
|
|
9
|
+
glossary).
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Translate — Plain-English Companion
|
|
13
|
+
|
|
14
|
+
Generate a plain-English version of the spec that a non-technical founder, advisor, spouse, or first hire can read end-to-end without looking anything up.
|
|
15
|
+
|
|
16
|
+
This does not replace the six canonical spec files — those are for your AI coder. This produces a **second** document alongside them, at `docs/plan-for-humans.md`, that says the same things in human language.
|
|
17
|
+
|
|
18
|
+
## Step 1 — Read the Spec
|
|
19
|
+
|
|
20
|
+
Read every file that exists, in this order:
|
|
21
|
+
|
|
22
|
+
1. `docs/product.md` (or `product.md` in root)
|
|
23
|
+
2. `docs/prd.md`
|
|
24
|
+
3. `docs/tech.md`
|
|
25
|
+
4. `docs/rules.md`
|
|
26
|
+
5. `docs/phases.md`
|
|
27
|
+
6. `docs/agents.md`
|
|
28
|
+
|
|
29
|
+
If any are missing, continue with what you have and note the gap in the output.
|
|
30
|
+
|
|
31
|
+
## Step 2 — Translate
|
|
32
|
+
|
|
33
|
+
Produce `docs/plan-for-humans.md` using the structure below. Every section is written for someone who has never heard the acronyms. Translate every technical term the first time it appears. Then use the plain term afterward.
|
|
34
|
+
|
|
35
|
+
### Translation rules
|
|
36
|
+
|
|
37
|
+
- **Replace jargon on first use, then drop the jargon.**
|
|
38
|
+
- `P0 / P1 / P2` → "must-have at launch / would like / nice to have"
|
|
39
|
+
- `RLS` → "database row-level security (only the right people can see the right rows)"
|
|
40
|
+
- `CSRF` → "a kind of attack where a malicious site tricks a user's browser into taking an action on your site"
|
|
41
|
+
- `HALT conditions` → "stop-and-ask moments — situations where the AI must pause and check with you"
|
|
42
|
+
- `Boundary Map` → "what this phase produces and what it depends on from earlier phases"
|
|
43
|
+
- `YAML frontmatter` → "a short settings block at the top of the file"
|
|
44
|
+
- `exec / eval / raw SQL` → "running text the user typed as if it were code (a common way apps get hacked)"
|
|
45
|
+
- `magic bytes` → "the actual file contents (not what the filename or upload form claims)"
|
|
46
|
+
- Version numbers (e.g. "Next.js 15 App Router") → keep the version, but add a one-line what-it-is ("a framework for building websites")
|
|
47
|
+
|
|
48
|
+
- **No acronym without its expansion on first use** — even common ones like API, URL, DB.
|
|
49
|
+
- **Prefer verbs over nouns.** "The app checks the user's login" beats "Authentication validation is performed."
|
|
50
|
+
- **One idea per sentence.** If a rules.md entry is a compound sentence, split it.
|
|
51
|
+
|
|
52
|
+
### Structure for `plan-for-humans.md`
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
# [Project Name] — The Plan, In Plain English
|
|
56
|
+
|
|
57
|
+
*This is a human-readable companion to the spec in `/docs`. The files in
|
|
58
|
+
`/docs` are for the AI coder. This file is for you (and anyone you show
|
|
59
|
+
the project to).*
|
|
60
|
+
|
|
61
|
+
**Last generated:** [today's date]
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## What We're Building
|
|
66
|
+
|
|
67
|
+
[2–3 paragraphs drawn from product.md. The TL;DR, the user, the problem,
|
|
68
|
+
why now. No jargon.]
|
|
69
|
+
|
|
70
|
+
## Who It's For
|
|
71
|
+
|
|
72
|
+
[From product.md Target User. Named role + situation.]
|
|
73
|
+
|
|
74
|
+
## What We're Deliberately NOT Building
|
|
75
|
+
|
|
76
|
+
[From product.md "What This Is NOT" and prd.md P2. Explicit non-goals,
|
|
77
|
+
each as one sentence starting with "Not".]
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## What It Will Do (Must-Haves at Launch)
|
|
82
|
+
|
|
83
|
+
[From prd.md P0. Each feature as:
|
|
84
|
+
|
|
85
|
+
### [Feature name]
|
|
86
|
+
**What it does:** [one sentence]
|
|
87
|
+
**What you'll see when it works:** [the observable behaviours, translated
|
|
88
|
+
from the acceptance criteria]
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
## What Comes After Launch
|
|
92
|
+
|
|
93
|
+
[From prd.md P1. Briefer — one line per item.]
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## The Build Order
|
|
98
|
+
|
|
99
|
+
[From phases.md. For each phase:
|
|
100
|
+
|
|
101
|
+
### Phase [N] — [Name]
|
|
102
|
+
**Goal:** [one sentence]
|
|
103
|
+
**What gets built:** [plain-English list of tasks, no file paths]
|
|
104
|
+
**Stop-and-ask moments:** [the HALT conditions, translated — situations
|
|
105
|
+
where the AI must pause and ask you before continuing]
|
|
106
|
+
**How you'll know the phase is done:** [success criteria, translated]
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
*Phase 0 always comes first — that's the groundwork: version control,
|
|
110
|
+
database setup, login, environment secrets. No visible product yet,
|
|
111
|
+
but everything after this depends on it.*
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## What We're Using To Build It
|
|
116
|
+
|
|
117
|
+
[From tech.md. As a simple bulleted list, not a table.
|
|
118
|
+
Each item: "[What it is] — [one-line description]. Version [X]."]
|
|
119
|
+
|
|
120
|
+
**Example:**
|
|
121
|
+
- Next.js 15 (App Router) — a framework for building websites with React.
|
|
122
|
+
- Supabase — the database and user-login system (so we don't have to
|
|
123
|
+
build our own).
|
|
124
|
+
- Tailwind CSS 4 — a styling system that lets you design right in the code.
|
|
125
|
+
|
|
126
|
+
## What We're Integrating With
|
|
127
|
+
|
|
128
|
+
[From tech.md Third-Party Integrations. For each: name, what it's for,
|
|
129
|
+
what it costs (if known), any secret keys that need to be set up.]
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## The Rules The AI Must Follow
|
|
134
|
+
|
|
135
|
+
[From rules.md. Grouped as:]
|
|
136
|
+
|
|
137
|
+
### Always
|
|
138
|
+
[Each Always rule in plain English, as a single sentence.]
|
|
139
|
+
|
|
140
|
+
### Pause and Check With You First
|
|
141
|
+
[Each "Ask first" rule in plain English.]
|
|
142
|
+
|
|
143
|
+
### Never — No Matter What
|
|
144
|
+
[Each Never rule in plain English, with its "because" reason translated.
|
|
145
|
+
Example: "Never put secret passwords into the website code — because
|
|
146
|
+
anyone viewing the page in their browser can read them."]
|
|
147
|
+
|
|
148
|
+
### Why These Rules Exist
|
|
149
|
+
|
|
150
|
+
[One paragraph: most of these rules exist because an AI coder, left
|
|
151
|
+
un-constrained, will do exactly the thing the rule forbids. The rules.md
|
|
152
|
+
file is what stops that.]
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## How This Gets Handed Off Between Sessions
|
|
157
|
+
|
|
158
|
+
[From agents.md Session Management + CLAUDE.md Session Start Protocol,
|
|
159
|
+
in plain English.]
|
|
160
|
+
|
|
161
|
+
Every time you start a new AI coding session, the AI will:
|
|
162
|
+
|
|
163
|
+
1. Read the plan files automatically (you don't paste them in).
|
|
164
|
+
2. Check if there's a feature in progress.
|
|
165
|
+
3. Show you a recap of where things stand.
|
|
166
|
+
4. Wait for you to confirm before writing any code.
|
|
167
|
+
|
|
168
|
+
If the AI starts hallucinating or gets confused mid-session, the right
|
|
169
|
+
move is to start a new chat — not to argue with the confused one.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Open Gaps
|
|
174
|
+
|
|
175
|
+
[Any rubric items that weren't answered during /cofoundr:plan and were
|
|
176
|
+
deferred to Clarifications Log in prd.md. List them as one-liners
|
|
177
|
+
with a note on why they matter.]
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
*The canonical spec — the one the AI actually reads — is in `/docs`.
|
|
182
|
+
If anything here contradicts those files, the files win. Re-run
|
|
183
|
+
`/cofoundr:translate` any time the spec changes to regenerate this
|
|
184
|
+
document.*
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Step 3 — Confirm
|
|
188
|
+
|
|
189
|
+
Show the file path and say:
|
|
190
|
+
|
|
191
|
+
> Generated `docs/plan-for-humans.md`. This is the share-able version — send it to a co-founder, an advisor, a spouse, or anyone who wants to know what you're building without reading the technical spec. Re-run `/cofoundr:translate` whenever the spec changes.
|
|
192
|
+
|
|
193
|
+
## Notes
|
|
194
|
+
|
|
195
|
+
- **This command does not modify the six spec files.** Only writes/overwrites `docs/plan-for-humans.md`.
|
|
196
|
+
- **Do not include this file in `CLAUDE.md` imports.** It is for humans, not the AI.
|
|
197
|
+
- If the spec is incomplete (e.g. `/cofoundr:quick-brief` was run but not `/cofoundr:new-project`), generate a partial plain-English version and clearly label the gaps.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://cofoundr.ai/schemas/manifest.schema.json",
|
|
3
|
+
"name": "cofoundr",
|
|
4
|
+
"version": "1.4.0",
|
|
5
|
+
"description": "Spec-driven development workflow for non-technical founders. Tool-agnostic — runs in Claude Code, Cursor, Windsurf, Cline, Codex, Aider, Copilot, Gemini, and any agent that reads AGENTS.md.",
|
|
6
|
+
"homepage": "https://cofoundr.ai",
|
|
7
|
+
"commands": [
|
|
8
|
+
{ "id": "resume", "file": "commands/resume.md", "category": "session", "summary": "Start of every session. Reads active feature docs and phases.md, presents a recap, asks for confirmation before code is written." },
|
|
9
|
+
{ "id": "quick-brief", "file": "commands/quick-brief.md", "category": "planning", "summary": "Fast 4-question pass that produces product.md only. First-time try-out path." },
|
|
10
|
+
{ "id": "new-project", "file": "commands/new-project.md", "category": "planning", "summary": "Full pipeline: planning conversation, research, six-file spec generation, agent context setup." },
|
|
11
|
+
{ "id": "plan", "file": "commands/plan.md", "category": "planning", "summary": "Standalone planning conversation with a 15-item sufficiency rubric." },
|
|
12
|
+
{ "id": "next", "file": "commands/next.md", "category": "planning", "summary": "Planning driver. Reads filesystem and dispatches to the right next step." },
|
|
13
|
+
{ "id": "new-feature", "file": "commands/new-feature.md", "category": "planning", "summary": "Add a feature to an existing project. Scope-check + 4-question planning + living feature doc." },
|
|
14
|
+
{ "id": "scope-guard", "file": "commands/scope-guard.md", "category": "guardrails","summary": "Check a proposed change against product.md non-goals and prd.md scope." },
|
|
15
|
+
{ "id": "rules-check", "file": "commands/rules-check.md", "category": "guardrails","summary": "Audit current work against the rules.md Always/Ask First/Never tiers." },
|
|
16
|
+
{ "id": "review", "file": "commands/review.md", "category": "guardrails","summary": "22-check quality audit of the spec bundle." },
|
|
17
|
+
{ "id": "translate", "file": "commands/translate.md", "category": "comms", "summary": "Generate docs/plan-for-humans.md — a plain-English companion to the six files." },
|
|
18
|
+
{ "id": "setup-skills", "file": "commands/setup-skills.md", "category": "setup", "summary": "Install the recommended skill packs based on the project's stack." },
|
|
19
|
+
|
|
20
|
+
{ "id": "constitution", "file": "commands/constitution.md", "category": "sdd", "summary": "Establish the project's governing principles and non-negotiables. SDD-canonical alias to /cofoundr:plan's rules pass.", "aliases": ["principles"] },
|
|
21
|
+
{ "id": "specify", "file": "commands/specify.md", "category": "sdd", "summary": "Produce or refresh the formal spec for a project or feature. SDD-canonical alias to /cofoundr:new-project + spec-phase.", "aliases": ["spec"] },
|
|
22
|
+
{ "id": "tasks", "file": "commands/tasks.md", "category": "sdd", "summary": "Break the active phase or feature into ordered, dependency-aware tasks. SDD-canonical alias to /cofoundr:next phase.", "aliases": [] },
|
|
23
|
+
{ "id": "implement", "file": "commands/implement.md", "category": "sdd", "summary": "Execute the next unchecked task with HALT enforcement, verify-each-step, and a session-notes write at the end.", "aliases": ["build", "ship"] },
|
|
24
|
+
|
|
25
|
+
{ "id": "onboard", "file": "commands/onboard.md", "category": "brownfield","summary": "Map an existing codebase. Produces .cofoundr/memory/codebase.md, drafts a back-filled spec, and surfaces gaps." },
|
|
26
|
+
{ "id": "document", "file": "commands/document.md", "category": "brownfield","summary": "Generate or refresh living documentation from the code itself. Architecture, modules, data model, surfaces." },
|
|
27
|
+
{ "id": "audit", "file": "commands/audit.md", "category": "brownfield","summary": "Codebase + spec consistency audit. Drift detection, dead surfaces, undocumented behavior, security smells." }
|
|
28
|
+
],
|
|
29
|
+
"agents": [
|
|
30
|
+
{ "id": "launch-kit-detect", "file": "agents/launch-kit-detect.md", "summary": "Detect whether the project is built on the CoFoundr Launch Kit." },
|
|
31
|
+
{ "id": "spec-phase", "file": "agents/spec-phase.md", "summary": "Produce the 6-file spec pack for a named phase." },
|
|
32
|
+
{ "id": "brand-intake", "file": "agents/brand-intake.md", "summary": "Run a 6-question brand intake and produce docs/brand.md." },
|
|
33
|
+
{ "id": "consolidate", "file": "agents/consolidate.md", "summary": "Produce roadmap-level consolidation artifacts (data model, API contracts, fixtures)." }
|
|
34
|
+
],
|
|
35
|
+
"templates": [
|
|
36
|
+
{ "id": "product", "file": "templates/product.md", "summary": "Plain-English product definition." },
|
|
37
|
+
{ "id": "prd", "file": "templates/prd.md", "summary": "P0/P1/P2 with acceptance criteria." },
|
|
38
|
+
{ "id": "tech", "file": "templates/tech.md", "summary": "Stack, data model, endpoints, integrations." },
|
|
39
|
+
{ "id": "rules", "file": "templates/rules.md", "summary": "Always/Ask first/Never constitution." },
|
|
40
|
+
{ "id": "phases", "file": "templates/phases.md", "summary": "Milestones and phases with HALT conditions." },
|
|
41
|
+
{ "id": "agents", "file": "templates/agents.md", "summary": "AI agent context. Imports the other five." },
|
|
42
|
+
{ "id": "feature", "file": "templates/feature.md", "summary": "Living feature doc scaffold." },
|
|
43
|
+
{ "id": "brand", "file": "templates/brand.md", "summary": "Visual and voice spec." }
|
|
44
|
+
],
|
|
45
|
+
"scaffold": {
|
|
46
|
+
"agentsFile": "scaffold/AGENTS.md.tmpl",
|
|
47
|
+
"cofoundrDir": "scaffold/.cofoundr"
|
|
48
|
+
},
|
|
49
|
+
"targets": [
|
|
50
|
+
{ "id": "claude-code", "name": "Claude Code", "kind": "ide-cli", "native": true, "config": [".claude/commands/", ".claude/agents/", "CLAUDE.md"] },
|
|
51
|
+
{ "id": "cursor", "name": "Cursor", "kind": "ide", "native": false, "config": [".cursor/rules/cofoundr.mdc"] },
|
|
52
|
+
{ "id": "windsurf", "name": "Windsurf", "kind": "ide", "native": false, "config": [".windsurfrules", ".windsurf/rules/cofoundr.md"] },
|
|
53
|
+
{ "id": "cline", "name": "Cline / Roo Code","kind": "ide", "native": false, "config": [".clinerules/cofoundr.md"] },
|
|
54
|
+
{ "id": "codex", "name": "OpenAI Codex CLI","kind": "cli", "native": false, "config": ["AGENTS.md"] },
|
|
55
|
+
{ "id": "aider", "name": "Aider", "kind": "cli", "native": false, "config": ["AGENTS.md", ".aider.conf.yml"] },
|
|
56
|
+
{ "id": "copilot", "name": "GitHub Copilot", "kind": "ide", "native": false, "config": [".github/copilot-instructions.md"] },
|
|
57
|
+
{ "id": "gemini", "name": "Gemini CLI", "kind": "cli", "native": false, "config": ["GEMINI.md"] }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# `.cofoundr/` — Project Workspace
|
|
2
|
+
|
|
3
|
+
This directory is the **source of truth** for everything an AI agent needs to work on this project. It is tool-agnostic by design — every modern coding agent reads from here.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.cofoundr/
|
|
9
|
+
├── constitution.md # The project's binding rules (Always / Ask first / Never)
|
|
10
|
+
├── manifest.json # Version stamp — what CoFoundr release this project is on
|
|
11
|
+
├── memory/
|
|
12
|
+
│ ├── project.md # Project-level facts that don't change often
|
|
13
|
+
│ ├── decisions.md # Append-only decision log
|
|
14
|
+
│ ├── knowledge.md # Patterns, gotchas, things learned the hard way
|
|
15
|
+
│ └── codebase.md # Generated by /cofoundr:onboard — the architecture map
|
|
16
|
+
├── specs/
|
|
17
|
+
│ ├── README.md
|
|
18
|
+
│ └── <feature-or-phase-id>/
|
|
19
|
+
│ ├── spec.md
|
|
20
|
+
│ ├── tasks.md
|
|
21
|
+
│ └── decisions.md
|
|
22
|
+
├── commands/ # Canonical workflow commands (read by every tool via AGENTS.md)
|
|
23
|
+
├── agents/ # Canonical agent definitions
|
|
24
|
+
├── templates/ # Project-local template overrides (optional)
|
|
25
|
+
├── docs/ # Generated documentation (from /cofoundr:document)
|
|
26
|
+
└── reports/ # Generated audit reports (from /cofoundr:audit)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Tool shims
|
|
30
|
+
|
|
31
|
+
`AGENTS.md` at the repository root tells **every** AI tool how to use this directory.
|
|
32
|
+
|
|
33
|
+
In addition, the following per-tool shims may exist:
|
|
34
|
+
|
|
35
|
+
- `.claude/commands/`, `.claude/agents/`, `CLAUDE.md` — Claude Code
|
|
36
|
+
- `.cursor/rules/cofoundr.mdc` — Cursor
|
|
37
|
+
- `.windsurfrules`, `.windsurf/rules/cofoundr.md` — Windsurf
|
|
38
|
+
- `.clinerules/cofoundr.md` — Cline / Roo
|
|
39
|
+
- `GEMINI.md` — Gemini CLI
|
|
40
|
+
- `.github/copilot-instructions.md` — GitHub Copilot
|
|
41
|
+
|
|
42
|
+
Each shim points back to `.cofoundr/` — there is **one** source of truth.
|
|
43
|
+
|
|
44
|
+
## How agents invoke a CoFoundr command
|
|
45
|
+
|
|
46
|
+
When the user says `/cofoundr:<name>` or `cofoundr <name>`:
|
|
47
|
+
|
|
48
|
+
1. Read `.cofoundr/commands/<name>.md`.
|
|
49
|
+
2. Follow it step-by-step. Do not paraphrase. Do not skip.
|
|
50
|
+
3. Honor the constitution at every step.
|
|
51
|
+
|
|
52
|
+
## Refresh
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Pull the latest commands, agents, templates, and shims into this project:
|
|
56
|
+
npx @cofoundr/init sync
|
|
57
|
+
|
|
58
|
+
# Re-map the codebase after architectural changes:
|
|
59
|
+
# (run inside your AI tool)
|
|
60
|
+
/cofoundr:onboard --refresh
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Hand-edits
|
|
64
|
+
|
|
65
|
+
Files inside `commands/`, `agents/`, and the bundled `templates/` are managed by `npx @cofoundr/init sync` — your edits will be overwritten on the next sync.
|
|
66
|
+
|
|
67
|
+
To customize a command, agent, or template **for this project only**, copy it to `.cofoundr/templates/overrides/` (for templates) or to `.cofoundr/commands.local/` (for commands). Sync respects these.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
last_amended: "{{TODAY}}"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{PROJECT_NAME}} — Constitution
|
|
7
|
+
|
|
8
|
+
> The non-negotiable rules for any human or AI agent that touches this codebase.
|
|
9
|
+
> Read in full before making any change. Run `/cofoundr:constitution` to amend.
|
|
10
|
+
|
|
11
|
+
## Always
|
|
12
|
+
|
|
13
|
+
- Validate input server-side. Client-side validation is a UX hint, never a security control.
|
|
14
|
+
- Pin exact major versions in `package.json` (or equivalent). No `^` for security-sensitive dependencies.
|
|
15
|
+
- Commit to git before any multi-file change.
|
|
16
|
+
- Read `.cofoundr/memory/decisions.md` before making an architecture decision; append a new entry after.
|
|
17
|
+
- Run `/cofoundr:rules-check` after a build session before declaring it done.
|
|
18
|
+
|
|
19
|
+
## Ask first
|
|
20
|
+
|
|
21
|
+
- Before adding any unlisted dependency.
|
|
22
|
+
- Before any database migration or schema change.
|
|
23
|
+
- Before deleting files or directories.
|
|
24
|
+
- Before changing authentication or authorization logic.
|
|
25
|
+
- Before running anything that touches production credentials.
|
|
26
|
+
- Before modifying functions outside the current task's scope.
|
|
27
|
+
|
|
28
|
+
## Never
|
|
29
|
+
|
|
30
|
+
<never>
|
|
31
|
+
|
|
32
|
+
- NEVER put secret keys in client bundles — because DevTools exposes them.
|
|
33
|
+
- NEVER deploy database tables without row-level security or equivalent server-side authorization — because the anon key is public.
|
|
34
|
+
- NEVER enforce authentication only client-side — because attackers bypass it.
|
|
35
|
+
- NEVER run `DROP`, `TRUNCATE`, `rm -rf`, or `--force` flags without explicit user confirmation — because agents have destroyed production databases.
|
|
36
|
+
- NEVER commit `.env`, key files, or secrets — because git history is permanent.
|
|
37
|
+
- NEVER pass user input directly to `exec`, `eval`, or raw SQL — because remote code execution.
|
|
38
|
+
- NEVER hardcode credentials — because scanners harvest them.
|
|
39
|
+
- NEVER use `any` in TypeScript — because it disables the type system.
|
|
40
|
+
- NEVER trust `Content-Type` headers for upload validation — because attackers spoof them.
|
|
41
|
+
- NEVER skip pre-commit hooks (`--no-verify`) without explicit user authorization — because the hook exists for a reason.
|
|
42
|
+
|
|
43
|
+
</never>
|
|
44
|
+
|
|
45
|
+
## How to maintain this file
|
|
46
|
+
|
|
47
|
+
- Every amendment bumps the version. Patch for new rules, minor for restructures, major for framework changes.
|
|
48
|
+
- Every amendment appends a line to the Amendment Log below.
|
|
49
|
+
- This file is **append-mostly**. Do not silently delete a rule. If a rule is being retired, mark it `[retired in vX.Y.Z]` and explain why in the Amendment Log.
|
|
50
|
+
- The `Never` list is wrapped in `<never>` XML tags so AI tools can parse it as binding.
|
|
51
|
+
|
|
52
|
+
## Amendment Log
|
|
53
|
+
|
|
54
|
+
- 1.0.0 — {{TODAY}} — Initial constitution scaffolded by `/cofoundr:init`. Confirm or amend with `/cofoundr:constitution`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://cofoundr.ai/schemas/project-manifest.schema.json",
|
|
3
|
+
"cofoundrVersion": "{{COFOUNDR_VERSION}}",
|
|
4
|
+
"initializedAt": "{{TODAY}}",
|
|
5
|
+
"tools": {{TOOLS_JSON}},
|
|
6
|
+
"layout": {
|
|
7
|
+
"constitution": ".cofoundr/constitution.md",
|
|
8
|
+
"memory": ".cofoundr/memory/",
|
|
9
|
+
"specs": ".cofoundr/specs/",
|
|
10
|
+
"commands": ".cofoundr/commands/",
|
|
11
|
+
"agents": ".cofoundr/agents/",
|
|
12
|
+
"docs": ".cofoundr/docs/",
|
|
13
|
+
"reports": ".cofoundr/reports/"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Decisions Log
|
|
2
|
+
|
|
3
|
+
> Append-only. Newest at the bottom. Every architecture decision, every HALT, every "we tried X, it broke Y, so we picked Z" goes here.
|
|
4
|
+
>
|
|
5
|
+
> Format:
|
|
6
|
+
> ```
|
|
7
|
+
> ## YYYY-MM-DD — <short title>
|
|
8
|
+
> Context: <one paragraph — what were we deciding>
|
|
9
|
+
> Decision: <one sentence>
|
|
10
|
+
> Alternatives: <one sentence>
|
|
11
|
+
> Consequences: <what changes because of this — links to specs that need updating>
|
|
12
|
+
> ```
|
|
13
|
+
|
|
14
|
+
## {{TODAY}} — Initialized CoFoundr workspace
|
|
15
|
+
|
|
16
|
+
Context: Bootstrapping the project's AI workspace.
|
|
17
|
+
Decision: Adopt CoFoundr as the spec-driven development framework. Constitution lives at `.cofoundr/constitution.md`. Workflow commands at `.cofoundr/commands/`. AGENTS.md at the repo root teaches every coding agent how to use them.
|
|
18
|
+
Alternatives: Ad-hoc prompting; one-tool-only setup (e.g. Claude Code only).
|
|
19
|
+
Consequences: Future sessions across any tool will read this directory. Non-CoFoundr-aware files in `docs/` are still respected, but new specs go under `.cofoundr/specs/`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Knowledge — Patterns and Gotchas
|
|
2
|
+
|
|
3
|
+
> Patterns we've adopted, mistakes we don't want to repeat, things an AI agent would otherwise have to learn the hard way.
|
|
4
|
+
>
|
|
5
|
+
> This is the file the founder pastes into when they say "remember this". Append-only by convention; entries can supersede earlier ones if marked.
|
|
6
|
+
|
|
7
|
+
## Patterns
|
|
8
|
+
<!-- What we do and why. Examples:
|
|
9
|
+
- We use server actions for all mutations because we want progressive enhancement.
|
|
10
|
+
- We use Zod schemas at every API boundary because the runtime types must match the static ones.
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
## Gotchas
|
|
14
|
+
<!-- Things that broke once and we don't want to repeat. Examples:
|
|
15
|
+
- Stripe webhook signing fails locally if the body is parsed as JSON before verification — must use the raw body.
|
|
16
|
+
- Supabase RLS policies require server-side `auth.uid()` to be set; client SDK does this automatically, server SDK does not.
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
## Idioms specific to this codebase
|
|
20
|
+
<!-- One-liners. e.g. "All async server functions return { data, error } never throw." -->
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
<sub>Append entries as you learn. Run `/cofoundr:document` periodically to refresh module docs from the same observations.</sub>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Project Memory
|
|
2
|
+
|
|
3
|
+
> Project-level facts that don't change often. Read at the start of every session.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
{{PROJECT_DESCRIPTION}}
|
|
7
|
+
|
|
8
|
+
## Who it's for
|
|
9
|
+
<!-- Filled by /cofoundr:plan or /cofoundr:onboard. The first user, named, with their role and the situation they're in when they open the product. -->
|
|
10
|
+
|
|
11
|
+
## Stage
|
|
12
|
+
<!-- pre-launch | private beta | public beta | shipped | maintained -->
|
|
13
|
+
|
|
14
|
+
## Stack at a glance
|
|
15
|
+
<!-- One-liner. Detail lives in docs/tech.md. -->
|
|
16
|
+
|
|
17
|
+
## Where things live
|
|
18
|
+
- Source: `<directory>`
|
|
19
|
+
- Tests: `<directory>`
|
|
20
|
+
- Docs: `docs/`
|
|
21
|
+
- AI workspace: `.cofoundr/`
|
|
22
|
+
|
|
23
|
+
## Domain glossary
|
|
24
|
+
<!-- Project-specific terms an AI agent must use correctly. Term — one-line definition. -->
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
<sub>Refresh with `/cofoundr:onboard --refresh` after a major change.</sub>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `.cofoundr/specs/` — Feature and Phase Specs
|
|
2
|
+
|
|
3
|
+
This directory holds the formal, machine-and-human-readable specifications for every feature and phase in the project.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
specs/
|
|
9
|
+
├── <feature-or-phase-id>/
|
|
10
|
+
│ ├── spec.md # What it is, what ships, who it's for
|
|
11
|
+
│ ├── tasks.md # Ordered, dependency-aware tasks (from /cofoundr:tasks)
|
|
12
|
+
│ ├── decisions.md # Append-only decision log scoped to this spec
|
|
13
|
+
│ └── (optional) ui-spec.md, research.md, tests.md, data-model.md
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The id is kebab-case. For phases, use the phase number: `phase-0-bootstrap`, `phase-1-meta-oauth`. For features, use the slug from `/cofoundr:new-feature`: `team-invitations`, `bulk-export`.
|
|
17
|
+
|
|
18
|
+
## How to add a spec
|
|
19
|
+
|
|
20
|
+
| Source | Command |
|
|
21
|
+
|----------------|--------------------------------------|
|
|
22
|
+
| New project | `/cofoundr:specify project` |
|
|
23
|
+
| New feature | `/cofoundr:specify feature <slug>` |
|
|
24
|
+
| Specific phase | `/cofoundr:specify phase <N>` |
|
|
25
|
+
|
|
26
|
+
## How to break a spec into tasks
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/cofoundr:tasks phase <N>
|
|
30
|
+
/cofoundr:tasks feature <slug>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## How to build from a spec
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
/cofoundr:implement T<N> # one task
|
|
37
|
+
/cofoundr:implement phase <N> # whole phase, pausing between tasks
|
|
38
|
+
```
|