@eskoubar95/spec 0.1.3 → 0.1.5

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.
Files changed (39) hide show
  1. package/dist/lib/copy-template.js +6 -6
  2. package/dist/lib/copy-template.js.map +1 -1
  3. package/package.json +2 -2
  4. package/template/.cursor/MCP-SETUP.md +16 -0
  5. package/template/.cursor/agents/batch-runner.md +52 -0
  6. package/template/.cursor/agents/verifier.md +40 -0
  7. package/template/.cursor/commands/_shared/branch-detection.md +78 -0
  8. package/template/.cursor/commands/_shared/git-workflow.md +3 -1
  9. package/template/.cursor/commands/_shared/github-workflows.md +7 -5
  10. package/template/.cursor/commands/_shared/helper-metadata.md +20 -0
  11. package/template/.cursor/commands/_shared/linear-automation.md +14 -6
  12. package/template/.cursor/commands/_shared/linear-helpers.md +26 -14
  13. package/template/.cursor/commands/_shared/pr-description.md +11 -2
  14. package/template/.cursor/commands/spec/init.md +249 -15
  15. package/template/.cursor/commands/spec/plan.md +302 -7
  16. package/template/.cursor/commands/spec/refine.md +80 -2
  17. package/template/.cursor/commands/task/batch.md +112 -0
  18. package/template/.cursor/commands/task/start.md +318 -5
  19. package/template/.cursor/commands/task/validate.md +396 -1
  20. package/template/.cursor/rules/02-work-mode.mdc +71 -0
  21. package/template/.cursor/rules/openmemory.mdc +1 -1
  22. package/template/.cursor/scripts/{validate-helpers.js → validate-helpers.cjs} +30 -32
  23. package/template/.cursor/skills/sdd-commit-unit/SKILL.md +42 -0
  24. package/template/.cursor/skills/sdd-design-system-bootstrap/SKILL.md +35 -0
  25. package/template/.cursor/skills/sdd-git-default-branch/SKILL.md +49 -0
  26. package/template/.cursor/skills/sdd-pr-create-or-update/SKILL.md +41 -0
  27. package/template/.cursor/skills/sdd-task-preflight/SKILL.md +47 -0
  28. package/template/.cursor/skills/sdd-validation-suite/SKILL.md +47 -0
  29. package/template/spec/00-root-spec.md +9 -0
  30. package/template/spec/templates/02-architecture.md +64 -0
  31. package/template/spec/templates/06-acceptance.md +59 -0
  32. package/template/spec/templates/07-design-system.md +145 -0
  33. package/template/spec/templates/08-infrastructure.md +76 -0
  34. package/template/spec/templates/09-sitemap.md +50 -0
  35. package/template/work/backlog/tasks.local.md +6 -0
  36. package/template/work/linear/FALLBACK-STRATEGY.md +84 -0
  37. package/template/work/linear/LABEL-MAPPING-GUIDE.md +72 -0
  38. package/template/work/linear/SETUP.md +75 -0
  39. package/template/work/linear/sync-config.md +86 -0
@@ -0,0 +1,145 @@
1
+ # Design System (Tailwind + shadcn/ui default)
2
+
3
+ This document defines the **visual direction, tokens, component conventions, and UI quality gates** for this project.
4
+ It is intended to reduce “design babysitting” by making decisions explicit early.
5
+
6
+ ## Design goals (1–3 bullets)
7
+
8
+ - [e.g., “Calm, professional dashboard UI with strong information hierarchy.”]
9
+ - [e.g., “Fast to build with shadcn/ui primitives, customized via tokens.”]
10
+
11
+ ## References (2–3 links)
12
+
13
+ - [Link 1]
14
+ - [Link 2]
15
+ - [Link 3] (optional)
16
+
17
+ ## Style direction
18
+
19
+ - **Adjectives**: [e.g., minimal, calm, premium, technical, playful]
20
+ - **Do**: [e.g., subtle borders, low saturation, consistent spacing]
21
+ - **Don’t**: [e.g., heavy shadows everywhere, inconsistent radii, random colors]
22
+
23
+ ## Target surfaces
24
+
25
+ - **Primary**: [e.g., dashboard, editor, settings]
26
+ - **Secondary**: [e.g., marketing pages, onboarding]
27
+ - **Dense data UI?**: [yes/no] (tables, filters, bulk actions)
28
+
29
+ ## UI stack assumptions (edit if different)
30
+
31
+ - **Styling**: Tailwind CSS
32
+ - **Component library**: shadcn/ui
33
+ - **Icons**: [lucide-react / other]
34
+ - **Typography**: [Inter / other]
35
+
36
+ ## Tokens
37
+
38
+ ### Color tokens (semantic-first)
39
+
40
+ Define tokens by meaning, not by raw hex usage.
41
+
42
+ #### Neutral scale
43
+
44
+ - `background`: [hex]
45
+ - `surface`: [hex]
46
+ - `surfaceMuted`: [hex]
47
+ - `border`: [hex]
48
+ - `textPrimary`: [hex]
49
+ - `textSecondary`: [hex]
50
+ - `textMuted`: [hex]
51
+
52
+ #### Brand / accent
53
+
54
+ - `primary`: [hex]
55
+ - `primaryForeground`: [hex]
56
+ - `secondary`: [hex] (optional)
57
+ - `secondaryForeground`: [hex] (optional)
58
+
59
+ #### Semantic colors
60
+
61
+ - `success`: [hex]
62
+ - `successForeground`: [hex]
63
+ - `warning`: [hex]
64
+ - `warningForeground`: [hex]
65
+ - `error`: [hex]
66
+ - `errorForeground`: [hex]
67
+ - `info`: [hex]
68
+ - `infoForeground`: [hex]
69
+
70
+ #### States
71
+
72
+ - **Focus ring**: [color + thickness]
73
+ - **Disabled**: [opacity + cursor rules]
74
+ - **Hover/active**: [rule of thumb]
75
+
76
+ ### Typography tokens
77
+
78
+ - **Font family**: [e.g., Inter]
79
+ - **Scale**:
80
+ - `xs`: [size/line-height]
81
+ - `sm`: [size/line-height]
82
+ - `base`: [size/line-height]
83
+ - `lg`: [size/line-height]
84
+ - `xl`: [size/line-height]
85
+ - **Weights**: [regular/medium/semibold/bold]
86
+
87
+ ### Spacing tokens
88
+
89
+ - **Base unit**: 4px (default)
90
+ - **Scale**: 4, 8, 12, 16, 24, 32, 48, 64 (edit as needed)
91
+
92
+ ### Radius + shadow tokens
93
+
94
+ - **Radius**: `sm`, `md`, `lg` with definitions (or “use shadcn defaults”)
95
+ - **Shadow**: [subtle / medium / none] (define when to use which)
96
+
97
+ ### Motion (optional)
98
+
99
+ - **Animation duration**: [e.g., 150–250ms]
100
+ - **Easing**: [e.g., ease-out]
101
+
102
+ ## Component conventions (shadcn/ui)
103
+
104
+ ### Phase 1 “must-have” components
105
+
106
+ - Button, Input, Textarea, Select, Checkbox, RadioGroup, Switch
107
+ - Dialog, Sheet/Drawer, DropdownMenu, Tooltip
108
+ - Tabs, Table, Badge, Card, Skeleton
109
+ - Toast/Sonner, Separator
110
+
111
+ ### Component rules
112
+
113
+ - Variants must be token-driven (no ad-hoc colors).
114
+ - Every interactive component must have:
115
+ - hover/active/disabled
116
+ - focus-visible state
117
+ - loading state (if async)
118
+ - error state (if form-related)
119
+
120
+ ## UI patterns
121
+
122
+ - **Navigation**: [sidebar/topbar/breadcrumb rules]
123
+ - **Forms**: validation rules, error copy tone, required vs optional
124
+ - **Tables**: empty state, loading skeleton, pagination, bulk actions
125
+ - **Empty/error/loading states**: required for primary flows
126
+
127
+ ## Accessibility (minimum)
128
+
129
+ - **Target**: WCAG AA
130
+ - **Contrast**: document minimum ratios for text and UI elements
131
+ - **Keyboard**: all interactive UI must be reachable and operable
132
+ - **Focus**: visible focus ring everywhere, no focus traps
133
+ - **Screen readers**: labels/roles for inputs, dialogs, menus
134
+
135
+ ## UI Definition of Done (copy into tasks)
136
+
137
+ - [ ] Matches tokens and component conventions
138
+ - [ ] Responsive: mobile (320px), tablet (768px), desktop (1024px+)
139
+ - [ ] No horizontal scrolling in primary flows
140
+ - [ ] Keyboard navigation works end-to-end
141
+ - [ ] Focus states are visible and consistent
142
+ - [ ] Contrast meets WCAG AA
143
+ - [ ] Empty/loading/error states implemented for the flow
144
+ - [ ] No UI regressions in common paths (verify key screens)
145
+
@@ -0,0 +1,76 @@
1
+ # Infrastructure
2
+
3
+ ## Technology Stack
4
+
5
+ Document the technologies, frameworks, and tools used in this project. This is the source of truth for framework/tool detection and rule activation.
6
+
7
+ **Format:**
8
+ - Frontend Framework: [Framework name, e.g., Next.js, Vite, React]
9
+ - Backend Framework: [Framework name, e.g., Express, FastAPI, Flask]
10
+ - CMS: [CMS name, e.g., Payload CMS, Strapi]
11
+ - Database: [Database name, e.g., PostgreSQL, MongoDB]
12
+ - Build Tool: [Build tool name, e.g., Vite, Webpack]
13
+ - Language: [Language name, e.g., TypeScript, Python]
14
+ - Other: [List other tools/libraries]
15
+
16
+ **Example:**
17
+ - Frontend Framework: Next.js
18
+ - CMS: Payload CMS
19
+ - Database: PostgreSQL
20
+ - Build Tool: Vite (for admin)
21
+ - Language: TypeScript
22
+
23
+ ## Monorepo / Workspaces (if applicable)
24
+
25
+ If this repository is a **monorepo**, document the workspace boundaries explicitly so tasks, validation, and rules can be scoped correctly.
26
+
27
+ **Workspace map (recommended):**
28
+
29
+ - Workspace: [path, e.g., `apps/storefront`]
30
+ - Frontend Framework: [e.g., Next.js]
31
+ - Language: [e.g., TypeScript]
32
+ - Build Tool: [e.g., pnpm / npm / yarn]
33
+ - Notes: [scripts, deployment target, env vars]
34
+
35
+ - Workspace: [path, e.g., `apps/backend`]
36
+ - Backend Framework: [e.g., Medusa / FastAPI]
37
+ - Language: [e.g., TypeScript / Python]
38
+ - Notes: [DB, services, migrations]
39
+
40
+ ## Hosting
41
+ - Provider: [Provider name]
42
+ - Region: [Region]
43
+ - Pricing: [Free tier/Paid/etc.]
44
+ - URL: [production URL]
45
+
46
+ ## Database
47
+ - Provider: [Provider name]
48
+ - Type: [PostgreSQL/MySQL/MongoDB/etc.]
49
+ - Connection: [Managed/Self-hosted/etc.]
50
+ - Pricing: [Free tier/Paid/etc.]
51
+
52
+ ## External Services
53
+ - Newsletter: [Platform name, API quality, pricing, webhook support]
54
+ - Analytics: [Platform name]
55
+ - Payment: [Platform name]
56
+ - Other: [list]
57
+
58
+ ## CI/CD
59
+ - Provider: [Provider name, e.g., GitHub Actions, CircleCI, GitLab CI]
60
+ - Deployment strategy: [Automatic/Manual/etc.]
61
+ - Branch strategy: [main only/main + staging/etc.]
62
+
63
+ ## GitHub Actions (if using GitHub)
64
+ - Workflows: [List workflow files, e.g., ci.yml, deploy.yml, pr-checks.yml]
65
+ - CI checks: [List checks, e.g., tests, linting, type checking, build]
66
+ - Deployment: [Describe deployment workflow if applicable]
67
+ - PR requirements: [List required PR checks, e.g., tests passing, code review]
68
+
69
+ ## Environment Variables
70
+ - Required: [list of required env vars]
71
+ - Secrets: [list of secret env vars]
72
+ - Optional: [list of optional env vars]
73
+
74
+ ## Known Issues
75
+ - [List any known infrastructure issues or limitations]
76
+
@@ -0,0 +1,50 @@
1
+ # Sitemap / Information Architecture
2
+
3
+ This document prevents “missing pages” by making the UI surface area explicit **before implementation**.
4
+
5
+ ## MVP sitemap (required)
6
+
7
+ Write the MVP navigation as a tree. Keep it user-facing (not technical routes).
8
+
9
+ Example:
10
+
11
+ ```text
12
+ /
13
+ - Landing
14
+ - Pricing
15
+ - Sign in
16
+ - Sign up
17
+
18
+ /app
19
+ - Dashboard
20
+ - Projects
21
+ - Project details
22
+ - Settings
23
+ ```
24
+
25
+ ## Route notes (optional)
26
+
27
+ - **Auth-gated areas**: [list pages]
28
+ - **Roles**: [who can see what]
29
+ - **SEO pages**: [list]
30
+ - **Deep links**: [list]
31
+
32
+ ## Page inventory (MVP)
33
+
34
+ For each page, define the minimum:
35
+
36
+ - **Page**: [name]
37
+ - **Goal**: [what user achieves]
38
+ - **Primary actions**: [1–3]
39
+ - **Data**: [entities needed]
40
+ - **States required**: loading / empty / error
41
+
42
+ ## Future pages / Roadmap (park here)
43
+
44
+ - [Page]
45
+
46
+ ## Planning rule
47
+
48
+ - Every MVP feature must map to **at least one page** (or an explicit API-only surface).
49
+ - Every page must be represented in tasks (at least: scaffold + basic states).
50
+
@@ -17,6 +17,8 @@ Each task follows this structure:
17
17
 
18
18
  **Tags:** [comma-separated tags, e.g., design, frontend, infrastructure]
19
19
 
20
+ **Workspace:** [path within repo, e.g., apps/storefront] (optional; REQUIRED for monorepos)
21
+
20
22
  **Milestone:** [Milestone ID, e.g., M1]
21
23
 
22
24
  **Sprint:** [Sprint ID, e.g., Sprint 1] (optional)
@@ -51,6 +53,8 @@ Each task follows this structure:
51
53
 
52
54
  **Tags:** infrastructure, setup
53
55
 
56
+ **Workspace:** (optional; for monorepos)
57
+
54
58
  **Milestone:** M1
55
59
 
56
60
  **Acceptance:**
@@ -75,6 +79,8 @@ Each task follows this structure:
75
79
 
76
80
  **Tags:** engineering, backend, security
77
81
 
82
+ **Workspace:** (optional; for monorepos)
83
+
78
84
  **Milestone:** M1
79
85
 
80
86
  **Acceptance:**
@@ -0,0 +1,84 @@
1
+ # Linear MCP Fallback Strategy
2
+
3
+ This document defines how the SDD workflow should behave when Linear integration is unavailable or a Linear operation fails.
4
+
5
+ ## Goals
6
+
7
+ - **Never block the SDD workflow** if Linear is unavailable.
8
+ - **Log clearly** what failed (operation + error), and what fallback is used.
9
+ - **Keep local artifacts authoritative** (`work/backlog/*`) even when Linear sync is enabled.
10
+
11
+ ## Detecting Linear mode
12
+
13
+ Linear mode is enabled when:
14
+ - `work/linear/sync-config.md` exists, and
15
+ - it contains `MODE=linear`
16
+
17
+ If Linear mode is not enabled, operate in local mode only.
18
+
19
+ ## Connectivity verification
20
+
21
+ Before critical Linear operations:
22
+ - Read `MCP_CONNECTION_NAME` from `work/linear/sync-config.md` (optional).
23
+ - Run a simple “health” call (e.g. `list_teams`).
24
+
25
+ If the call fails or times out → treat Linear MCP as unavailable for this run.
26
+
27
+ ## Fallback cases
28
+
29
+ ### 1) MCP connection unavailable
30
+
31
+ **Behavior:**
32
+ - Continue with **local mode only**.
33
+ - Report: “Linear MCP is unavailable. Continuing in local mode.”
34
+ - Skip all Linear operations (projects/issues/documents/comments/status updates).
35
+
36
+ ### 2) A specific Linear operation fails
37
+
38
+ **Behavior:**
39
+ - Log the failure clearly:
40
+ - operation name (e.g. `create_issue`, `update_issue`, `create_project`)
41
+ - the error message
42
+ - Continue the workflow in **local mode** for the rest of the run (do not retry endlessly).
43
+ - Allow a user-initiated retry later (next command run).
44
+
45
+ ### 3) Resource not found (status/label/project/issue)
46
+
47
+ **Behavior:**
48
+ - **Status not found**: guide user to create the status in Linear (or update `sync-config.md` to use a status ID).
49
+ - **Label not found**: try to create the label automatically; if that fails, guide user to create it manually in Linear.
50
+ - **Project not found**: create it only if `AUTO_CREATE_PROJECTS=true` and user confirmed creation.
51
+ - **Issue not found**: guide user to verify the issue exists or re-run `/spec/plan` to re-sync tasks.
52
+
53
+ ### 4) Partial failure (some operations succeed)
54
+
55
+ **Behavior:**
56
+ - Keep the successful operations.
57
+ - Log what failed.
58
+ - Do not rollback.
59
+
60
+ ## Recovery strategy
61
+
62
+ When Linear becomes available again:
63
+ - Re-run `/spec/plan` to ensure milestones/projects and tasks/issues are in sync.
64
+ - Re-run `/task/start` or `/task/validate` to re-apply status/comments for the active task.
65
+
66
+ ## Where to log
67
+
68
+ When in Linear mode:
69
+ - Add a brief **Linear comment** on the issue for:
70
+ - task start
71
+ - task validation result
72
+ - errors (if any)
73
+
74
+ Always keep local artifacts updated:
75
+ - `work/backlog/tasks.local.md` remains the primary source of truth for tasks and status in local mode.
76
+
77
+ ## Related docs
78
+
79
+ - `work/linear/SETUP.md`
80
+ - `work/linear/sync-config.md`
81
+ - `work/linear/LABEL-MAPPING-GUIDE.md`
82
+ - `.cursor/commands/_shared/linear-automation.md`
83
+ - `.cursor/commands/_shared/linear-helpers.md`
84
+
@@ -0,0 +1,72 @@
1
+ # Linear Label + Status Mapping Guide
2
+
3
+ This guide defines how SDD task metadata maps to Linear statuses, labels, and projects.
4
+
5
+ ## Status mapping
6
+
7
+ SDD status values (from `work/backlog/tasks.local.md`) map to Linear issue statuses via `work/linear/sync-config.md`:
8
+
9
+ - `backlog` → `STATUS_BACKLOG`
10
+ - `in-progress` → `STATUS_IN_PROGRESS`
11
+ - `done` → `STATUS_DONE`
12
+ - `blocked` → `STATUS_BLOCKED`
13
+
14
+ Use **status names** (recommended) unless you need fixed status IDs.
15
+
16
+ ## Label strategy (project-agnostic)
17
+
18
+ ### 1) Source of truth: task tags
19
+
20
+ Prefer using `**Tags:**` in `work/backlog/tasks.local.md`.
21
+
22
+ Example:
23
+
24
+ ```markdown
25
+ **Tags:** backend, security, documentation
26
+ ```
27
+
28
+ **Rule:** Each tag can be used as a Linear label name.
29
+
30
+ - If `LABEL_PREFIX` is set in `sync-config.md`, prepend it to every auto-assigned label.
31
+ - If a label does not exist, the system may try to create it. If creation fails, guide the user to create it manually.
32
+
33
+ ### 2) Recommended label groups (optional)
34
+
35
+ These are suggestions, not requirements. Your team can rename them freely.
36
+
37
+ - **Core / domain labels**: `backend`, `frontend`, `infrastructure`, `security`, `design`, `documentation`, `performance`, `observability`, `integration`
38
+ - **Type labels (only when true)**: `feature`, `bug`, `improvement`
39
+ - **Decision label**: `decision` (for explicit choices / comparisons)
40
+ - **Release label**: `release`
41
+
42
+ ### 3) Avoid default “Feature everywhere”
43
+
44
+ Do **not** auto-add a “feature” label to all issues by default.
45
+ Only add `feature` if the task is actually a new feature (best: include `feature` explicitly in `**Tags:**`).
46
+
47
+ ## Projects / milestones
48
+
49
+ If `AUTO_CREATE_PROJECTS=true` in `sync-config.md`:
50
+ - Each milestone in `work/backlog/milestones.md` can be represented as a Linear project.
51
+ - Tasks link to projects via `**Milestone:** Mx` in `tasks.local.md`.
52
+
53
+ ## Comment templates (recommended)
54
+
55
+ ### Task started
56
+
57
+ - “Started `<task-id>` via SDD. Branch: `<branch>`. Plan: `<1–3 bullets>`.”
58
+
59
+ ### Task validated
60
+
61
+ - “Validated `<task-id>` via SDD: `<pass/fail>`. Evidence: `<lint/tests/build>`. PR: `<url>` (if any).”
62
+
63
+ ### Error / fallback
64
+
65
+ - “Linear operation `<op>` failed: `<error>`. Continuing in local mode.”
66
+
67
+ ## Related docs
68
+
69
+ - `work/linear/SETUP.md`
70
+ - `work/linear/sync-config.md`
71
+ - `work/linear/FALLBACK-STRATEGY.md`
72
+
@@ -0,0 +1,75 @@
1
+ # Linear Setup Guide
2
+
3
+ This guide walks you through setting up Linear integration with the SDD workflow.
4
+
5
+ ## Prerequisites
6
+
7
+ - A Linear workspace + team
8
+ - Linear MCP configured in Cursor
9
+ - Access to Linear Settings
10
+
11
+ ## Hard stop (recommended)
12
+
13
+ If you enable Linear mode (`MODE=linear`), `/spec/plan` treats missing required status mappings as a **hard stop** for Linear sync:
14
+
15
+ - Required keys in `work/linear/sync-config.md`:
16
+ - `STATUS_BACKLOG`
17
+ - `STATUS_IN_PROGRESS`
18
+ - `STATUS_DONE`
19
+ - `STATUS_BLOCKED`
20
+
21
+ ## Step 1: Create/choose a Linear team
22
+
23
+ 1. Create a team (if needed)
24
+ 2. Note the team ID for `work/linear/sync-config.md` (optional)
25
+
26
+ ## Step 2: Ensure statuses exist
27
+
28
+ 1. Go to Linear Settings → Statuses
29
+ 2. Ensure you have statuses that match your desired mapping (defaults: Backlog, In Progress, Done, Blocked)
30
+ 3. Use status **names** in `sync-config.md` (recommended), or IDs if you need fixed UUIDs
31
+
32
+ ## Step 3: Ensure labels exist (optional)
33
+
34
+ Labels can be created automatically when missing, but you can also create them manually in Linear Settings → Labels.
35
+
36
+ ## Step 4: Configure sync config
37
+
38
+ 1. Create/update `work/linear/sync-config.md`
39
+ 2. Set `MODE=linear`
40
+ 3. Optionally set:
41
+ - `MCP_CONNECTION_NAME` (if you have multiple Linear MCP connections)
42
+ - `DEFAULT_TEAM_ID`
43
+ 4. Set status mapping keys:
44
+ - `STATUS_BACKLOG`, `STATUS_IN_PROGRESS`, `STATUS_DONE`, `STATUS_BLOCKED`
45
+ 5. Enable optional automation:
46
+ - `AUTO_ASSIGN_LABELS=true`
47
+ - `AUTO_CREATE_PROJECTS=true`
48
+ - `AUTO_CREATE_DOCUMENTS=true`
49
+
50
+ ## Step 5: Tag-driven label mapping (recommended)
51
+
52
+ Use `**Tags:**` in `work/backlog/tasks.local.md` to drive labels:
53
+ - See `work/linear/LABEL-MAPPING-GUIDE.md`
54
+
55
+ ## Step 6: Test
56
+
57
+ - Run `/spec/plan` (creates projects/issues/docs if enabled)
58
+ - Run `/task/start` and `/task/validate` on a Linear issue ID to verify status + comments
59
+
60
+ ## Troubleshooting
61
+
62
+ - Fallback behavior: `work/linear/FALLBACK-STRATEGY.md`
63
+
64
+ ## What SDD can do automatically (once configured)
65
+
66
+ - **/spec/plan**: create milestone projects (optional), create/update task issues, create/update spec documents (optional)
67
+ - **/task/start**: update status + add a structured “Started …” comment
68
+ - **/task/validate**: update status + add a structured “Validated …” comment
69
+
70
+ ## What the user must do manually
71
+
72
+ - Configure the Linear MCP connection in Cursor (and provide `MCP_CONNECTION_NAME` if multiple)
73
+ - Ensure your desired statuses exist in Linear (or adjust mappings)
74
+ - Decide label taxonomy (recommended: `**Tags:**` in `work/backlog/tasks.local.md` → labels; see `LABEL-MAPPING-GUIDE.md`)
75
+
@@ -0,0 +1,86 @@
1
+ # Linear Sync Configuration
2
+
3
+ This file configures Linear MCP integration with the SDD workflow.
4
+
5
+ ## Mode
6
+
7
+ Create this file and set:
8
+
9
+ ```
10
+ MODE=linear
11
+ ```
12
+
13
+ If the file does not exist (or MODE is not `linear`), the system runs in local mode only.
14
+
15
+ ## MCP Connection Configuration (optional)
16
+
17
+ If you have multiple Linear MCP connections in Cursor, specify which one to use:
18
+
19
+ ```
20
+ MCP_CONNECTION_NAME=linear
21
+ ```
22
+
23
+ ## Team Configuration (optional)
24
+
25
+ Assign projects/issues to a default team:
26
+
27
+ ```
28
+ DEFAULT_TEAM_ID=[team-id]
29
+ ```
30
+
31
+ ## Status Mapping
32
+
33
+ Map SDD statuses to Linear statuses (names recommended):
34
+
35
+ **Required when `MODE=linear` (hard requirement for `/spec/plan` Linear sync):**
36
+ - `STATUS_BACKLOG`
37
+ - `STATUS_IN_PROGRESS`
38
+ - `STATUS_DONE`
39
+ - `STATUS_BLOCKED`
40
+
41
+ ```
42
+ STATUS_BACKLOG=Backlog
43
+ STATUS_IN_PROGRESS=In Progress
44
+ STATUS_DONE=Done
45
+ STATUS_BLOCKED=Blocked
46
+ ```
47
+
48
+ ## Labels
49
+
50
+ Enable tag-driven label assignment:
51
+
52
+ ```
53
+ AUTO_ASSIGN_LABELS=true
54
+ LABEL_PREFIX=
55
+ ```
56
+
57
+ See `work/linear/LABEL-MAPPING-GUIDE.md`.
58
+
59
+ ## Projects
60
+
61
+ Enable milestone → Linear project automation:
62
+
63
+ ```
64
+ AUTO_CREATE_PROJECTS=true
65
+ ```
66
+
67
+ ## Documents
68
+
69
+ Enable spec → Linear document automation:
70
+
71
+ ```
72
+ AUTO_CREATE_DOCUMENTS=true
73
+ ```
74
+
75
+ ## Cycles (optional)
76
+
77
+ ```
78
+ USE_CYCLES=false
79
+ ACTIVE_CYCLE_ID=[cycle-id]
80
+ ```
81
+
82
+ ## Fallbacks + troubleshooting
83
+
84
+ - `work/linear/FALLBACK-STRATEGY.md`
85
+ - `work/linear/SETUP.md`
86
+