Windsurf rules
.windsurf/rules/seed-conventions.mdGenerate CLAUDE.md and CONVENTIONS.md for a brand-new project through a brief interview, and create the specs/ directory with evolved bigpowers structure (product/, tech-architecture/, verifications/, epics/archive/). Entry point for greenfield projects. Use when starting a new project from scratch, when user asks to set up AI agent conventions, or when there is no CLAUDE.md yet.
Windsurf rules
Quality
76/100
Scores the file, not the repository.Length
1,897 words
38 headings · 9 code blocksRepository
114
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# story: e10s018# story: e47s029# story: e10s0210# story: e51s0211# story: e45s2112# story: e79s03131415# Seed Conventions16> **HARD GATE** — Before any new code lands, confirm the project conventions are understood. Ask: 'What does a good commit message look like in this project?'1718Bootstrap a new project with the AI agent conventions it needs. Run this once at the start of a greenfield project.1920## What this creates2122- `CLAUDE.md` — Claude Code session config (project-specific)23- `CONVENTIONS.md` — shared rules for all AI agents24- `specs/` — the specs directory where all planning output will live25- `AGENTS.md` — for OpenCode and other agents (optional)26- `GEMINI.md` — for Gemini CLI (optional)2728## Interview2930Ask the user these questions (one at a time, wait for each answer):31321. **Project name and one-sentence description** — "What is this project? One sentence."332. **Stack** — "What language, framework, and runtime? (e.g. TypeScript / Next.js / Node 22)"342b. **Stack profile (optional)** — Offer: `swift`, `typescript-vue`, `node-service`, or none. If chosen, merge the matching fragment from `profiles/<name>.md` into generated `CONVENTIONS.md`.353. **Commands** — "What commands do you use for: run, test, build, lint?"363b. **Preflight (optional)** — "What command runs test, lint, and build together? If none, chain Test + Lint + Build into one **Preflight** row."374. **Architecture** — "Key modules and relationships in 1–2 sentences."385. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"396. **Never-do list** — "What are the hard stops? Things an agent must never touch?"407. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"418. **Local tool wiring (optional)** — "Wire bigpowers for project-local tools? (Cursor, OpenCode, Cline, Aider, Codex CLI)" If yes, generate AGENTS.md spine artifacts per [REFERENCE.md](REFERENCE.md) §Local tool wiring and §AGENTS.md spine. If no, skip — standard seed output unchanged (no AGENTS.md spine unless opted in).4243## Agentic STE for generated prose (e79s03)4445When writing instructional lines in `CLAUDE.md`, `AGENTS.md`, or `CONVENTIONS.md`, follow [AGENTIC-STE.md](../../docs/AGENTIC-STE.md):4647- Use directive vocabulary: MUST, MUST NOT, NEVER, ALWAYS, DO, DO NOT48- Do NOT use hedge modals listed in AGENTIC-STE.md Rule 349- Cap each instruction sentence at 20 words50- Write imperative, active-voice lines — one instruction per line51- Do NOT apply Agentic STE to `terse-mode` (output compression is out of scope)5253After generation, run `bash scripts/validate-agentic-ste.sh --strict CLAUDE.md CONVENTIONS.md` when those files exist in the target project.5455## Generate files5657After the interview, generate each file using the templates in [REFERENCE.md](REFERENCE.md):58- `AGENTS.md` — from `docs/templates/AGENTS.md` Reach Template (canonical spine source)59- `CLAUDE.md` — symlink to `AGENTS.md` (copy fallback on Windows when symlink fails)60- `GEMINI.md` — symlink to `AGENTS.md` when Gemini wiring opted in61- `opencode.json` — with `"instructions": ["AGENTS.md"]` when OpenCode opted in62- `.aider.conf.yml` — with `read: AGENTS.md` when Aider opted in63- `CONVENTIONS.md` — bigpowers standard template + project defensive code categories6465### `specs/` directory6667```bash68mkdir -p specs/product specs/product/snapshots specs/epics/archive69mkdir -p specs/tech-architecture specs/adr specs/verifications specs/bugs70touch specs/product/SCOPE_LATEST.yaml specs/product/VISION_LATEST.yaml specs/product/GLOSSARY_LATEST.yaml71touch specs/release-plan.yaml specs/execution-status.yaml specs/planning-status.yaml specs/state.yaml72touch specs/tech-architecture/tech-stack.md specs/tech-architecture/SECURITY_PLAN_LATEST.md73touch specs/tech-architecture/TEST_PLAN_LATEST.md specs/tech-architecture/DESIGN_PLAN_LATEST.md74touch specs/tech-architecture/REFACTOR_LATEST.md specs/tech-architecture/IMPACT_LATEST.md75touch specs/bugs/registry.yaml76echo "# Specs\n\nAll planning documents for this project." > specs/README.md77```7879**Note:** `specs/state.yaml.lock` is NOT pre-created — acquired/released dynamically.8081`specs/state.yaml` carries top-level `workflow_mode` (`team-pr` | `solo-git`, default `solo-git`).82This is the **canonical integrate-mode signal** for all skills.83Set it once here. Skills such as `release-branch` read this file instead of sniffing profiles.8485When generating `CLAUDE.md`, chain Test + Lint + Build into one **Preflight** row if the user named no Preflight command.8687### Self-installing fenced markers (e45s21)8889Skills that write into `CLAUDE.md` or `AGENTS.md` MUST use **fenced HTML comment markers** so handwritten content outside the fence is never clobbered:9091```markdown92<!-- BEGIN bigpowers:section-id -->93…agent-managed content only…94<!-- END bigpowers:section-id -->95```9697**Merge rule:** On update, replace only content between matching `BEGIN`/`END` pairs.98If a marker pair is missing, append a new fenced block at file end.99Never rewrite the whole file.100101**Standard marker IDs** for seeded projects (see [REFERENCE.md](REFERENCE.md) § Fenced markers):102103| Marker ID | Owner skill | Purpose |104|-----------|-------------|---------|105| `project` | seed-conventions | Project, Commands, Architecture |106| `context-routing` | seed-conventions | Glob → sub-AGENTS.md routing table |107| `learned-preferences` | session-state | Learned User Preferences + Workspace Facts |108| `tooling` | setup-environment, guard-git | sqz/rtk/hook blocks installed by tooling skills |109110Emit these fences in `AGENTS.md` (and therefore `CLAUDE.md` symlink) from `docs/templates/AGENTS.md`. User prose outside fences is sacred.111112- [ ] CLAUDE.md exists and is populated113- [ ] CONVENTIONS.md exists and includes specs/ output convention114- [ ] specs/product/ exists with SCOPE_LATEST.yaml, VISION_LATEST.yaml, GLOSSARY_LATEST.yaml115- [ ] specs/tech-architecture/ exists with tech-stack.md, security.md, test.md, design.md116- [ ] specs/verifications/ exists117- [ ] specs/epics/archive/ exists118- [ ] specs/bugs/registry.yaml exists119- [ ] Confirm with user: "Does CLAUDE.md accurately describe your project?"120121---122123# story: e51s02 e37s01 e37s03 e37s14124# story: e45s21125# Seed Conventions — Reference Templates126127## Navigation128129| Lines | Section |130|-------|---------|131| 1 | Title |132| 5–29 | Navigation |133| 30–53 | Fenced markers (e45s21) |134| 54–65 | AGENTS.md spine (Reach Template — e37s01) |135| 66–77 | Agent config template (legacy — prefer AGENTS.md spine) |136| 78–81 | Project |137| 82–91 | Commands |138| 92–94 | Architecture |139| 95–98 | Conventions |140| 99–104 | Never |141| 105–114 | Agent Rules |142| 115–123 | opencode.json template |143| 124–133 | Aider — `.aider.conf.yml` bridge (e37s03) |144| 134–146 | Codex CLI — project-local `.codex/config.toml` + AGENTS.md (e37s14) |145| 147–156 | CONVENTIONS.md |146| 157–160 | Stack profile fragments |147| 161–164 | Local tool wiring (optional interview step 8) |148| 165–173 | Cursor — project-local `.cursor/rules` symlink |149| 174–187 | OpenCode — project-local `opencode.json` + `AGENTS.md` |150| 188–190 | When to offer |151152## Fenced markers (e45s21)153154Self-installing blocks prevent skills from overwriting user-authored prose. Pattern:155156```markdown157<!-- BEGIN bigpowers:section-id -->158…managed content…159<!-- END bigpowers:section-id -->160```161162**Merge algorithm:**1631641. If `BEGIN bigpowers:<id>` exists → replace inner content only.1652. If missing → append new fenced block at EOF.1663. Never delete content outside fences.167168Seed these marker IDs in generated `AGENTS.md`:169170| ID | Initial content |171|----|-----------------|172| `project` | Project, Commands, Architecture, Conventions, Never, Agent Rules |173| `context-routing` | Glob → sub-AGENTS.md table (see CLAUDE.md e45s22) |174| `learned-preferences` | Empty Learned User Preferences + Workspace Facts lists |175176## AGENTS.md spine (Reach Template — e37s01)177178Canonical source: copy from `docs/templates/AGENTS.md` in the bigpowers repo (Reach Template).179Do not invent structure ad hoc — the template includes multi-agent preamble, Preflight, Test/Lint/Build sections.180181When local tool wiring is opted in:1821. Copy Reach Template → project root `AGENTS.md`, fill interview placeholders1832. `ln -sf AGENTS.md CLAUDE.md` (or content copy on Windows when symlink fails)1843. Write `opencode.json` with `"instructions": ["AGENTS.md"]`185186When user **opts out** of local tool wiring, do not emit AGENTS.md spine artifacts.187188## Agent config template (legacy — prefer AGENTS.md spine)189190All three files use the same structure — only the header differs:191- `CLAUDE.md` → `# [Project Name] — Claude Code` (or symlink to AGENTS.md)192- `GEMINI.md` → `# [Project Name] — Gemini CLI`193- `AGENTS.md` → `# [Project Name] — AI Agents` (Reach Template header)194195```markdown196# [Project Name] — [Agent]197198Read CONVENTIONS.md before any GitHub or git operation.199200## Project201[One sentence description]202Stack: [language, framework, runtime]203204## Commands205| Action | Command |206|--------|---------|207| Run | `[cmd]` |208| Test | `[cmd]` |209| Build | `[cmd]` |210| Lint | `[cmd]` |211| Preflight | `[test && lint && build chain — or user-named full-green cmd]` |212| CI | `gh pr checks` (when a PR is open) |213214## Architecture215[1–2 sentences. Key modules and their relationships.]216217## Conventions218- [convention 1]219- [convention 2]220221## Never222- Never dismiss reproducible gate failures as pre-existing or out of scope223- Never proceed on red Preflight or red CI — invoke quick-fix or fix-bug first224- [hard stop 1]225- [hard stop 2]226227## Agent Rules228- **Workflow Mandate:** You MUST use the bigpowers skills (e.g. `plan-work`, `develop-tdd`, `orchestrate-project`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".229- **Always Green:** Preflight and CI must be green before forward work. Reproducible gate failures require **fix-or-log** (quick-fix → fix-bug) per CONVENTIONS § Discovered Defects.230- Read specs/ before writing code.231- All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.232- Write the minimum code that solves the stated problem. Nothing extra.233- Run tests after every change. Show evidence before declaring done.234- One clarifying question beats a wrong assumption baked into 200 lines.235```236237## opencode.json template238239```json240{241 "$schema": "https://opencode.ai/config.json",242 "instructions": ["AGENTS.md"]243}244```245246## Aider — `.aider.conf.yml` bridge (e37s03)247248When Aider wiring is opted in:249250```yaml251read: AGENTS.md252```253254Upstream: [Aider-AI/aider](https://github.com/Aider-AI/aider) (not paul-gauthier/aider).255256## Codex CLI — project-local `.codex/config.toml` + AGENTS.md (e37s14)257258Source: https://developers.openai.com/codex/guides/agents-md259260Codex is instruction-file-only — no slash skills. When Codex wiring is opted in:261262```toml263# .codex/config.toml264instructions = ["AGENTS.md"]265```266267Use AGENTS.md header `# [Project Name] — AI Agents` (shared with OpenCode/Cline). Single AGENTS.md serves dual-tool projects.268269## CONVENTIONS.md270271Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-specific defensive code categories from the interview answers.272273**Always embed** these doctrine sections from bigpowers (adapt commands only):274275- **§ Always Green / Shift Left** — 1-10-100 rationale, Preflight + CI green definitions276- **§ Discovered Defects** — fix-or-log ladder (quick-fix → fix-bug), separate commits for discovered fixes277- **Banned dismissive phrases** table — pre-existing, unrelated to session, not introduced by my changes, out of scope (ignoring a red gate)278279## Stack profile fragments280281If the user selected a stack profile, merge the matching `profiles/<name>.md` fragment into the generated `CONVENTIONS.md` under a `## Stack Conventions` section. Profiles supply language-specific commands, architecture patterns, and never-do additions.282283## Local tool wiring (optional interview step 8)284285Offered after the standard interview. Covers the two tools that global install (`scripts/install.sh`) structurally cannot reach because they read project-root config, not global paths.286287### Cursor — project-local `.cursor/rules` symlink288289```bash290# From the project root:291ln -sfn <bigpowers-install-path>/.cursor/rules .cursor/rules292```293294Cursor reads `.cursor/rules/` from the project root. This symlink gives every project access to bigpowers skills as Cursor rules without duplicating the files. Run once per project.295296### OpenCode — project-local `opencode.json` + `AGENTS.md`297298`opencode.json` (project root):299```json300{301 "$schema": "https://opencode.ai/config.json",302 "instructions": [".cursor/rules/*.mdc", "AGENTS.md"]303}304```305306OpenCode reads `opencode.json` from the project root, NOT from a global path. The `instructions` array points to the local `.cursor/rules` symlink (from the Cursor step above) and the project's `AGENTS.md`. Both must exist in the project for OpenCode to see bigpowers skills.307308`AGENTS.md` is already generated by the standard interview (step 2 of Generate Files). When local tool wiring is opted in, ensure `AGENTS.md` includes the standard agent-config template header `# [Project Name] — OpenCode`.309310### When to offer311312Only offer local tool wiring when the user's project will be opened in Cursor or OpenCode. These tools are project-root scoped by design — no global installer can solve them. Global install (`install.sh`) already handles Claude Code, Gemini CLI, and pi globally. Do not offer for tools that read global config.313
Also in danielvm-git/bigpowers
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| danielvm-git/bigpowers.cursor/rules/align-grid.mdc · 114 | Cursor rules | lint-formatdo-notagent-behaviour | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/assess-impact.mdc · 114 | Cursor rules | testtesting-strategydeployment | 66/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/audit-code.mdc · 114 | Cursor rules | setuptestlint-formatstyle+4 | 66/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/audit-plan.mdc · 114 | Cursor rules | buildteststylegit | 74/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/build-epic.mdc · 114 | Cursor rules | buildgit | 58/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/change-request.mdc · 114 | Cursor rules | no sections | 48/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/commit-message.mdc · 114 | Cursor rules | lint-formatstyletypesgit+3 | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/compose-workflow.mdc · 114 | Cursor rules | styledo-notagent-behaviour | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/context7-mcp.mdc · 114 | Cursor rules | style | 54/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/craft-skill.mdc · 114 | Cursor rules | stylearchgitdo-not | 69/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/deepen-architecture.mdc · 114 | Cursor rules | testtesting-strategydo-not | 57/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/define-language.mdc · 114 | Cursor rules | lint-formatdo-not | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/define-success.mdc · 114 | Cursor rules | no sections | 4/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/delegate-task.mdc · 114 | Cursor rules | git | 62/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/deploy.mdc · 114 | Cursor rules | setupbuildtestdeployment | 77/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/design-interface.mdc · 114 | Cursor rules | styleagent-behaviour | 58/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/develop-tdd.mdc · 114 | Cursor rules | teststylearchtesting-strategy+5 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/diagnose-root.mdc · 114 | Cursor rules | no sections | 39/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/diagnose-stall.mdc · 114 | Cursor rules | no sections | 44/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/dispatch-agents.mdc · 114 | Cursor rules | git | 54/100 | 3 days ago |
Diff against .cursor/rules/align-grid.mdc Diff against .cursor/rules/assess-impact.mdc Diff against .cursor/rules/audit-code.mdc Diff against .cursor/rules/audit-plan.mdc Diff against .cursor/rules/build-epic.mdc Diff against .cursor/rules/change-request.mdc Diff against .cursor/rules/commit-message.mdc Diff against .cursor/rules/compose-workflow.mdc Diff against .cursor/rules/context7-mcp.mdc Diff against .cursor/rules/craft-skill.mdc Diff against .cursor/rules/deepen-architecture.mdc Diff against .cursor/rules/define-language.mdc Diff against .cursor/rules/define-success.mdc Diff against .cursor/rules/delegate-task.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/design-interface.mdc Diff against .cursor/rules/develop-tdd.mdc Diff against .cursor/rules/diagnose-root.mdc Diff against .cursor/rules/diagnose-stall.mdc Diff against .cursor/rules/dispatch-agents.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| danielvm-git/bigpowers.windsurf/rules/organize-workspace.md · 114 | Windsurf rules | buildstylegitdeployment+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/guard-git.md · 114 | Windsurf rules | stylearchgitsecurity+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/quick-fix.md · 114 | Windsurf rules | teststylegitdeployment+1 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/develop-tdd.md · 114 | Windsurf rules | teststylearchtesting-strategy+5 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/session-state.md · 114 | Windsurf rules | lint-formatstyleagent-behaviour | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/commit-message.md · 114 | Windsurf rules | lint-formatstyletypesgit+3 | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/extract-design.md · 114 | Windsurf rules | lint-formatstyledependenciesui | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/setup-environment.md · 114 | Windsurf rules | setupstylesecuritydo-not+1 | 81/100 | 3 days ago |
