Windsurf rules
.windsurf/rules/map-codebase.mdDerives the tech-stack doc from scratch by scanning the codebase — analyzes stack, architecture, and gray areas (error handling, API shapes) and persists findings into specs/tech-architecture/tech-stack.md. Run when the tech doc doesn't exist yet; use survey-context to consume it once it does.
Windsurf rules
Quality
62/100
Scores the file, not the repository.Length
439 words
13 headings · 1 code blocksRepository
114
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Map Codebase89Perform a deep architectural and structural analysis of the codebase. Unlike `survey-context` which identifies "where we are", `map-codebase` identifies "what we are dealing with" and "how things are done".1011> **Use this vs survey-context:** `map-codebase` BUILDS the tech-stack doc by scanning the codebase from scratch. `survey-context` READS existing specs/tech-architecture docs without re-deriving them. Run `map-codebase` when `specs/tech-architecture/tech-stack.md` doesn't exist yet; run `survey-context` when it does.1213> **HARD GATE** — Cold analysis only. Do NOT assume architectural patterns without reading the code. If the codebase structure surprises you, call out the delta.1415## Process1617### 1. Identify Core Stack & Dependencies18- Scan `package.json`, `Cargo.toml`, `requirements.txt`, etc.19- Identify primary framework, runtime, and critical libraries (ORM, Auth, State, UI).20- Note version constraints and any deprecated or unusual dependencies.2122### 2. Map High-Level Architecture23- Identify the entry points (CLI, Web, API).24- Map the primary data flow (e.g., Controller → Service → Repository).25- Identify where business logic lives vs. where I/O lives.26- Look for established patterns (e.g., hexagonal, layered, feature-folders).2728### 3. Analyze "Gray Areas" (The "How")29Search for patterns and anti-patterns in these categories:30- **Error Handling:** Are exceptions caught early or bubbled? Is there a global error handler? Are error messages structured?31- **API Shapes:** Is it REST, GraphQL, or RPC? What is the casing (camelCase, snake_case)? How are responses structured?32- **Type Safety:** Is it strictly typed? Are there many `any` or `unsafe` blocks? Are interfaces used for DIP?33- **Observability:** Is there structured logging? Are there health checks? Where do logs go?34- **Testing:** What is the test coverage strategy? Are mocks used? Where do tests live?3536### 4. Identify Planning "Signals"37Look for signals that will influence upcoming plans:38- **Consistency Gaps:** "Half the project uses async/await, the other half uses Promises."39- **Debt Hotspots:** "The `AuthManager` is 1500 lines and handles both JWT and session logic."40- **Integration Points:** "We need to talk to the Stripe API, but there's no wrapper yet."41- **Conventions:** "The team always uses functional components over classes."4243### 5. Persist to specs/tech-architecture/tech-stack.md44Compile all findings into `specs/tech-architecture/tech-stack.md`. This file serves as the project's "Long-Term Memory".4546```markdown47# Project Context4849## Stack50- [Framework/Language]51- [Key Libraries]5253## Architecture54- [Pattern Description]55- [Data Flow]5657## Conventions (Observed)58- [Error Handling Pattern]59- [API Design]60- [Type System]6162## Signals / Active Considerations63- [Gap 1]64- [Hotspot 2]65```6667## When to Use68- When first joining a project.69- Before a major refactor or architectural change.70- When `survey-context` reveals a lack of domain knowledge.71- To refresh `specs/tech-architecture/tech-stack.md` after significant changes.72
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 |
