@leeovery/claude-technical-workflows 2.0.15 → 2.0.16

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.
@@ -0,0 +1,170 @@
1
+ ---
2
+ description: Scan all plans and wire up cross-topic dependencies. Finds unresolved external dependencies, matches them to tasks in other plans, and updates both the plan index and output format.
3
+ ---
4
+
5
+ Link cross-topic dependencies across all existing plans.
6
+
7
+ ## Instructions
8
+
9
+ Follow these steps EXACTLY as written. Do not skip steps or combine them.
10
+
11
+ ## Important
12
+
13
+ Use simple, individual commands. Never combine multiple operations into bash loops or one-liners. Execute commands one at a time.
14
+
15
+ ## Step 1: Discover All Plans
16
+
17
+ Scan the codebase for existing plans:
18
+
19
+ 1. **Find plan files**: Look in `docs/workflow/planning/`
20
+ - Run `ls docs/workflow/planning/` to list plan files
21
+ - Each file is named `{topic}.md`
22
+
23
+ 2. **Extract plan metadata**: For each plan file
24
+ - Read the frontmatter to get the `format:` field
25
+ - Note the format used by each plan
26
+
27
+ **If no plans exist:**
28
+
29
+ ```
30
+ ⚠️ No plans found in docs/workflow/planning/
31
+
32
+ There are no plans to link. Create plans using /start-planning first.
33
+ ```
34
+
35
+ Stop here.
36
+
37
+ **If only one plan exists:**
38
+
39
+ ```
40
+ ⚠️ Only one plan found: {topic}
41
+
42
+ Cross-topic dependency linking requires at least two plans. Create more plans using /start-planning first.
43
+ ```
44
+
45
+ Stop here.
46
+
47
+ ## Step 2: Check Output Format Consistency
48
+
49
+ Compare the `format:` field across all discovered plans.
50
+
51
+ **If plans use different output formats:**
52
+
53
+ ```
54
+ ⚠️ Mixed output formats detected:
55
+
56
+ - authentication: beads
57
+ - billing-system: linear
58
+ - notifications: beads
59
+
60
+ Cross-topic dependencies can only be wired within the same output format.
61
+ Please consolidate your plans to use a single output format before linking dependencies.
62
+ ```
63
+
64
+ Stop here.
65
+
66
+ ## Step 3: Extract External Dependencies
67
+
68
+ For each plan, find the External Dependencies section:
69
+
70
+ 1. **Read the External Dependencies section** from each plan index file
71
+ 2. **Categorize each dependency**:
72
+ - **Unresolved**: `- {topic}: {description}` (no arrow, no task ID)
73
+ - **Resolved**: `- {topic}: {description} → {task-id}` (has task ID)
74
+ - **Satisfied externally**: `- ~~{topic}: {description}~~ → satisfied externally`
75
+
76
+ 3. **Build a summary**:
77
+
78
+ ```
79
+ 📋 Dependency Summary
80
+
81
+ Plan: authentication (format: beads)
82
+ - billing-system: Invoice generation (unresolved)
83
+ - user-management: User profiles → beads-7x2k (resolved)
84
+
85
+ Plan: billing-system (format: beads)
86
+ - authentication: User context (unresolved)
87
+ - ~~payment-gateway: Payment processing~~ → satisfied externally
88
+
89
+ Plan: notifications (format: beads)
90
+ - authentication: User lookup (unresolved)
91
+ - billing-system: Invoice events (unresolved)
92
+ ```
93
+
94
+ ## Step 4: Match Dependencies to Plans
95
+
96
+ For each unresolved dependency:
97
+
98
+ 1. **Search for matching plan**: Does `docs/workflow/planning/{dependency-topic}.md` exist?
99
+ - If no match: Mark as "no plan exists" - cannot resolve yet
100
+
101
+ 2. **If plan exists**: Load the output format reference file
102
+ - Read `format:` from the dependency plan's frontmatter
103
+ - Load `skills/technical-planning/references/output-{format}.md`
104
+ - Follow the "Querying Dependencies" section to search for matching tasks
105
+
106
+ 3. **Handle ambiguous matches**:
107
+ - If multiple tasks could satisfy the dependency, present options to user
108
+ - Allow selecting multiple if the dependency requires multiple tasks
109
+
110
+ ## Step 5: Wire Up Dependencies
111
+
112
+ For each resolved match:
113
+
114
+ 1. **Update the plan index file**:
115
+ - Change `- {topic}: {description}` to `- {topic}: {description} → {task-id}`
116
+
117
+ 2. **Create dependency in output format**:
118
+ - Load `skills/technical-planning/references/output-{format}.md`
119
+ - Follow the "Cross-Epic Dependencies" or equivalent section to create the blocking relationship
120
+
121
+ ## Step 6: Bidirectional Check
122
+
123
+ For each plan that was a dependency target (i.e., other plans depend on it):
124
+
125
+ 1. **Check reverse dependencies**: Are there other plans that should have this wired up?
126
+ 2. **Offer to update**: "Plan X depends on tasks you just linked. Update its External Dependencies section?"
127
+
128
+ ## Step 7: Report Results
129
+
130
+ Present a summary:
131
+
132
+ ```
133
+ ✅ Dependency Linking Complete
134
+
135
+ RESOLVED (newly linked):
136
+ - authentication → billing-system: beads-b7c2.1.1 (Invoice generation)
137
+ - notifications → authentication: beads-a3f8.1.2 (Session management)
138
+
139
+ ALREADY RESOLVED (no action needed):
140
+ - authentication → user-management: beads-9m3p
141
+
142
+ SATISFIED EXTERNALLY (no action needed):
143
+ - billing-system → payment-gateway
144
+
145
+ UNRESOLVED (no matching plan exists):
146
+ - notifications → email-service: Email delivery
147
+
148
+ ⚠️ These dependencies have no corresponding plan. Either:
149
+ - Create a plan for the topic using /start-planning
150
+ - Mark as "satisfied externally" if already implemented
151
+
152
+ UPDATED FILES:
153
+ - docs/workflow/planning/authentication.md
154
+ - docs/workflow/planning/notifications.md
155
+ ```
156
+
157
+ ## Step 8: Commit Changes
158
+
159
+ If any files were updated:
160
+
161
+ ```
162
+ Shall I commit these dependency updates? (y/n)
163
+ ```
164
+
165
+ If yes, commit with message:
166
+ ```
167
+ Link cross-topic dependencies
168
+
169
+ - {summary of what was linked}
170
+ ```
@@ -5,7 +5,7 @@ description: Start an implementation session from an existing plan. Discovers av
5
5
  ## IMPORTANT: Follow these steps EXACTLY. Do not skip steps.
6
6
 
7
7
  - Ask each question and WAIT for a response before proceeding
8
- - Do NOT install anything or invoke tools until Step 5
8
+ - Do NOT install anything or invoke tools until Step 6
9
9
  - Even if the user's initial prompt seems to answer a question, still confirm with them at the appropriate step
10
10
  - Do NOT make assumptions about what the user wants
11
11
  - Complete each step fully before moving to the next
@@ -49,7 +49,66 @@ Plans found:
49
49
  Which plan would you like to implement?
50
50
  ```
51
51
 
52
- ## Step 3: Check Environment Setup
52
+ ## Step 3: Check External Dependencies
53
+
54
+ **This step is a gate.** Implementation cannot proceed if dependencies are not satisfied.
55
+
56
+ See **[dependencies.md](../skills/technical-planning/references/dependencies.md)** for dependency format and states.
57
+
58
+ After the user selects a plan:
59
+
60
+ 1. **Read the External Dependencies section** from the plan index file
61
+ 2. **Check each dependency** according to its state:
62
+ - **Unresolved**: Block
63
+ - **Resolved**: Check if task is complete (load output format reference, follow "Querying Dependencies" section)
64
+ - **Satisfied externally**: Proceed
65
+
66
+ ### Blocking Behavior
67
+
68
+ If ANY dependency is unresolved or incomplete, **stop and present**:
69
+
70
+ ```
71
+ ⚠️ Implementation blocked. Missing dependencies:
72
+
73
+ UNRESOLVED (not yet planned):
74
+ - billing-system: Invoice generation for order completion
75
+ → No plan exists for this topic. Create with /start-planning or mark as satisfied externally.
76
+
77
+ INCOMPLETE (planned but not implemented):
78
+ - beads-7x2k (authentication): User context retrieval
79
+ → Status: in_progress. This task must be completed first.
80
+
81
+ These dependencies must be completed before this plan can be implemented.
82
+
83
+ OPTIONS:
84
+ 1. Implement the blocking dependencies first
85
+ 2. Mark a dependency as "satisfied externally" if it was implemented outside this workflow
86
+ 3. Run /link-dependencies to wire up any recently completed plans
87
+ ```
88
+
89
+ ### Escape Hatch
90
+
91
+ If the user says a dependency has been implemented outside the workflow:
92
+
93
+ 1. Ask which dependency to mark as satisfied
94
+ 2. Update the plan index file:
95
+ - Change `- {topic}: {description}` to `- ~~{topic}: {description}~~ → satisfied externally`
96
+ 3. Commit the change
97
+ 4. Re-check dependencies
98
+
99
+ ### All Dependencies Satisfied
100
+
101
+ If all dependencies are resolved and complete (or satisfied externally), proceed to Step 4.
102
+
103
+ ```
104
+ ✅ External dependencies satisfied:
105
+ - billing-system: Invoice generation → beads-b7c2.1.1 (complete)
106
+ - authentication: User context → beads-a3f8.1.2 (complete)
107
+
108
+ Proceeding with environment setup...
109
+ ```
110
+
111
+ ## Step 4: Check Environment Setup
53
112
 
54
113
  > **IMPORTANT**: This step is for **information gathering only**. Do NOT execute any setup commands at this stage. The technical-implementation skill will handle execution when invoked.
55
114
 
@@ -62,7 +121,7 @@ After the user selects a plan:
62
121
  - If the user says no, create `docs/workflow/environment-setup.md` with "No special setup required." and commit. This prevents asking again in future sessions.
63
122
  - See `skills/technical-implementation/references/environment-setup.md` for format guidance
64
123
 
65
- ## Step 4: Ask About Scope
124
+ ## Step 5: Ask About Scope
66
125
 
67
126
  Ask the user about implementation scope:
68
127
 
@@ -81,7 +140,7 @@ If they choose a specific phase or task, ask them to specify which one.
81
140
 
82
141
  > **Note:** Do NOT verify that the phase or task exists. Accept the user's answer and pass it to the skill. Validation happens during the implementation phase.
83
142
 
84
- ## Step 5: Invoke Implementation Skill
143
+ ## Step 6: Invoke Implementation Skill
85
144
 
86
145
  Invoke the **technical-implementation** skill for this conversation.
87
146
 
@@ -89,6 +148,7 @@ Pass to the technical-implementation skill:
89
148
  - Plan: `docs/workflow/planning/{topic}.md`
90
149
  - Format: (from frontmatter)
91
150
  - Scope: (all phases | specific phase | specific task | next-available)
151
+ - Dependencies: (all satisfied - verified in Step 3)
92
152
  - Environment setup: (completed | not needed)
93
153
 
94
154
  **Example handoff:**
@@ -98,6 +158,7 @@ Plan: docs/workflow/planning/{topic}.md
98
158
  Format: {format}
99
159
  Scope: All phases
100
160
 
161
+ Dependencies: All satisfied ✓
101
162
  Environment setup: Completed (or: Not needed)
102
163
 
103
164
  Begin implementation using the technical-implementation skill.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeovery/claude-technical-workflows",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -0,0 +1,69 @@
1
+ # Dependencies
2
+
3
+ *Reference for dependency handling across the technical workflow*
4
+
5
+ ---
6
+
7
+ ## Internal Dependencies
8
+
9
+ Internal dependencies are dependencies within a single topic/epic - where one task depends on another task in the same plan. These are handled by the planning output format's native dependency system.
10
+
11
+ During planning, structure tasks in the correct order with appropriate dependencies so work proceeds logically. The output format manages these relationships and ensures tasks are worked in the right sequence.
12
+
13
+ See the relevant output format reference for how to create and query internal dependencies.
14
+
15
+ ## External Dependencies
16
+
17
+ External dependencies are things a feature needs from other topics or systems that are outside the current plan's scope. They come from the specification's Dependencies section.
18
+
19
+ ## Format
20
+
21
+ In plan index files, external dependencies appear in a dedicated section:
22
+
23
+ ```markdown
24
+ ## External Dependencies
25
+
26
+ - billing-system: Invoice generation for order completion
27
+ - user-authentication: User context for permissions → beads-9m3p (resolved)
28
+ - ~~payment-gateway: Payment processing~~ → satisfied externally
29
+ ```
30
+
31
+ If there are no external dependencies, still include the section:
32
+
33
+ ```markdown
34
+ ## External Dependencies
35
+
36
+ No external dependencies.
37
+ ```
38
+
39
+ This makes it explicit for downstream stages that dependencies were considered and none exist.
40
+
41
+ ## States
42
+
43
+ | State | Format | Meaning |
44
+ |-------|--------|---------|
45
+ | Unresolved | `- {topic}: {description}` | Dependency exists but not yet linked to a task |
46
+ | Resolved | `- {topic}: {description} → {task-id}` | Linked to specific task in another plan |
47
+ | Satisfied externally | `- ~~{topic}: {description}~~ → satisfied externally` | Implemented outside workflow |
48
+
49
+ ## Lifecycle
50
+
51
+ ```
52
+ SPECIFICATION PLANNING
53
+ ───────────────────────────────────────────────────────────────────
54
+ Dependencies section → Copied to plan index as unresolved
55
+ (natural language) ↓
56
+ Resolved when linked to specific task ID
57
+ (via planning or /link-dependencies)
58
+ ```
59
+
60
+ ## Resolution
61
+
62
+ Dependencies move from unresolved → resolved when:
63
+ - The dependency topic is planned and you identify the specific task
64
+ - The `/link-dependencies` command finds and wires the match
65
+
66
+ Dependencies become "satisfied externally" when:
67
+ - The user confirms it was implemented outside the workflow
68
+ - It already exists in the codebase
69
+ - It's a third-party system that's already available
@@ -19,9 +19,29 @@ From the specification (`docs/workflow/specification/{topic}.md`), extract:
19
19
  - Architectural choices
20
20
  - Edge cases identified
21
21
  - Constraints and requirements
22
+ - **External dependencies** (from the Dependencies section)
22
23
 
23
24
  **The specification is your sole input.** Discussion documents and other source materials have already been validated, filtered, and enriched during the specification phase. Everything you need is in the specification - do not reference other documents.
24
25
 
26
+ #### Extract External Dependencies
27
+
28
+ The specification's Dependencies section lists things this feature needs from other topics/systems. These are **external dependencies** - things outside this plan's scope that must exist for implementation to proceed.
29
+
30
+ Copy these into the plan index file (see "External Dependencies Section" below). During planning:
31
+
32
+ 1. **Check for existing plans**: For each dependency, search `docs/workflow/planning/` for a matching topic
33
+ 2. **If plan exists**: Try to identify specific tasks that satisfy the dependency. Query the output format to find relevant tasks. If ambiguous, ask the user which tasks apply.
34
+ 3. **If no plan exists**: Record the dependency in natural language - it will be linked later via `/link-dependencies` or when that topic is planned.
35
+
36
+ **Optional reverse check**: Ask the user: "Would you like me to check if any existing plans depend on this topic?"
37
+
38
+ If yes:
39
+ 1. Scan other plan indexes for External Dependencies that reference this topic
40
+ 2. For each match, identify which task(s) in the current plan satisfy that dependency
41
+ 3. Update the other plan's dependency entry with the task ID (unresolved → resolved)
42
+
43
+ Alternatively, the user can run `/link-dependencies` later to resolve dependencies across all plans in bulk.
44
+
25
45
  ### 2. Define Phases
26
46
 
27
47
  Break into logical phases:
@@ -106,6 +126,11 @@ Before handing off to implementation:
106
126
  - [ ] Each task has micro acceptance (test name)
107
127
  - [ ] All edge cases mapped to tasks
108
128
  - [ ] Gaps flagged with `[needs-info]`
129
+ - [ ] External dependencies documented in plan index
130
+
131
+ ## External Dependencies Section
132
+
133
+ The plan index file must include an External Dependencies section. See **[dependencies.md](dependencies.md)** for the format, states, and how they affect implementation.
109
134
 
110
135
  ## Commit Frequently
111
136
 
@@ -71,9 +71,10 @@ This plan is managed via Backlog.md. Tasks are stored in the `backlog/` director
71
71
 
72
72
  **Implementation will**:
73
73
  1. Read this file to identify the plan
74
- 2. Query backlog via MCP or read task files directly
75
- 3. Work through tasks by status/priority
76
- 4. Update task status as work completes
74
+ 2. Check External Dependencies below
75
+ 3. Query backlog via MCP or read task files directly
76
+ 4. Work through tasks by status/priority
77
+ 5. Update task status as work completes
77
78
 
78
79
  **To add tasks**: Run `backlog add "Task title"` or create task files directly.
79
80
 
@@ -86,8 +87,17 @@ Tasks are organized with labels/priorities:
86
87
  ## Key Decisions
87
88
 
88
89
  [Summary of key decisions from specification]
90
+
91
+ ## External Dependencies
92
+
93
+ [Dependencies on other topics - copy from specification's Dependencies section]
94
+
95
+ - {topic}: {description}
96
+ - {topic}: {description} → {task-id} (resolved)
89
97
  ```
90
98
 
99
+ The External Dependencies section tracks what this plan needs from other topics. See `formal-planning.md` for the format and states (unresolved, resolved, satisfied externally).
100
+
91
101
  ### Task File Format
92
102
 
93
103
  Each task is a separate file: `backlog/task-{id} - {title}.md`
@@ -138,7 +148,68 @@ Specification reference: `docs/workflow/specification/{topic}.md` (for ambiguity
138
148
  | `priority` | Importance | high, medium, low |
139
149
  | `labels` | Categories | `[phase-1, api, edge-case, needs-info]` |
140
150
  | `assignee` | Who's working on it | (optional) |
141
- | `dependencies` | Blocking tasks | `[task-1, task-3]` |
151
+ | `dependencies` | Blocking tasks (internal) | `[task-1, task-3]` |
152
+ | `external_deps` | Cross-topic dependencies | `[billing-system#task-5]` |
153
+
154
+ ## Cross-Topic Dependencies
155
+
156
+ Cross-topic dependencies link tasks between different plan topics. This is how you express "this task depends on the billing system being implemented."
157
+
158
+ ### In Task Frontmatter
159
+
160
+ Use the `external_deps` field with the format `{topic}#{task-id}`:
161
+
162
+ ```yaml
163
+ ---
164
+ status: To Do
165
+ priority: high
166
+ labels: [phase-1]
167
+ external_deps: [billing-system#task-5, authentication#task-3]
168
+ ---
169
+ ```
170
+
171
+ ### In Plan Reference File
172
+
173
+ The plan reference file at `docs/workflow/planning/{topic}.md` tracks external dependencies in a dedicated section (see template below).
174
+
175
+ ## Querying Dependencies
176
+
177
+ Use these queries to understand the dependency graph for implementation blocking and `/link-dependencies`.
178
+
179
+ ### Find Tasks With External Dependencies
180
+
181
+ ```bash
182
+ # Find all tasks with external dependencies
183
+ grep -l "external_deps:" backlog/*.md
184
+
185
+ # Find tasks depending on a specific topic
186
+ grep -l "billing-system#" backlog/*.md
187
+ ```
188
+
189
+ ### Check Internal Dependencies
190
+
191
+ ```bash
192
+ # Find tasks with dependencies
193
+ grep -l "dependencies:" backlog/*.md
194
+
195
+ # Show dependency values
196
+ grep "dependencies:" backlog/*.md
197
+ ```
198
+
199
+ ### Check if a Dependency is Complete
200
+
201
+ Read the task file and check the frontmatter:
202
+ - `status: Done` means the dependency is met
203
+ - Any other status means it's still blocking
204
+
205
+ ### Parse Frontmatter Programmatically
206
+
207
+ For more complex queries, parse the YAML frontmatter:
208
+
209
+ ```bash
210
+ # Extract frontmatter from a task file
211
+ sed -n '/^---$/,/^---$/p' backlog/task-5*.md
212
+ ```
142
213
 
143
214
  ### Using `needs-info` Label
144
215
 
@@ -78,10 +78,13 @@ This creates `.beads/config.yaml` with the appropriate `no-db` setting.
78
78
 
79
79
  | Planning Concept | Beads Entity |
80
80
  |------------------|--------------|
81
- | Plan | Epic issue |
81
+ | Specification/Topic | Epic issue |
82
82
  | Phase | Sub-issue under epic |
83
83
  | Task | Sub-task under phase |
84
- | Dependency | `bd dep add` relationship |
84
+ | Internal dependency | `bd dep add` within same epic |
85
+ | Cross-topic dependency | `bd dep add` across epics |
86
+
87
+ Each specification topic becomes its own epic. All epics live in one beads database, enabling cross-topic dependencies.
85
88
 
86
89
  Example hierarchy:
87
90
  ```
@@ -91,8 +94,85 @@ bd-a3f8 (Epic: User Authentication)
91
94
  │ └── bd-a3f8.1.2 (Task: Session management)
92
95
  └── bd-a3f8.2 (Phase 2: OAuth)
93
96
  └── bd-a3f8.2.1 (Task: Google provider)
97
+
98
+ bd-b7c2 (Epic: Billing System) ← Different topic, same database
99
+ ├── bd-b7c2.1 (Phase 1: Invoicing)
100
+ │ └── bd-b7c2.1.1 (Task: Invoice generation)
101
+ ```
102
+
103
+ ## Cross-Epic Dependencies
104
+
105
+ Cross-topic dependencies link tasks between different epics (different specifications/topics). This is how you express "billing depends on authentication being complete."
106
+
107
+ ### Creating Cross-Epic Dependencies
108
+
109
+ Use the same `bd dep add` command - it works across epics:
110
+
111
+ ```bash
112
+ # Invoice generation (in billing epic) depends on user authentication (in auth epic)
113
+ bd dep add bd-b7c2.1.1 bd-a3f8.1.1
114
+ ```
115
+
116
+ After adding, `bd ready` will not show `bd-b7c2.1.1` until `bd-a3f8.1.1` is closed.
117
+
118
+ ### Viewing Cross-Epic Dependencies
119
+
120
+ ```bash
121
+ # Show what a task depends on
122
+ bd show bd-b7c2.1.1
123
+
124
+ # Show what depends on a task
125
+ bd show bd-a3f8.1.1 --deps
126
+ ```
127
+
128
+ ## Querying Dependencies
129
+
130
+ Use these queries to understand the dependency graph for implementation blocking and `/link-dependencies`.
131
+
132
+ ### Find Ready Tasks (No Open Blockers)
133
+
134
+ ```bash
135
+ bd ready
94
136
  ```
95
137
 
138
+ Returns tasks with no incomplete dependencies - these are safe to implement.
139
+
140
+ ### Find All Tasks Blocked By a Specific Task
141
+
142
+ ```bash
143
+ bd show bd-a3f8.1.1 --deps
144
+ ```
145
+
146
+ Shows what will be unblocked when this task completes.
147
+
148
+ ### Find What a Task Depends On
149
+
150
+ ```bash
151
+ bd show bd-b7c2.1.1
152
+ ```
153
+
154
+ The output includes a "Blocked by" section listing dependencies.
155
+
156
+ ### Query Via JSONL (Advanced)
157
+
158
+ For programmatic queries, read `.beads/issues.jsonl` directly:
159
+
160
+ ```bash
161
+ # Find all dependencies (grep for blocked_by field)
162
+ grep -o '"blocked_by":\[[^]]*\]' .beads/issues.jsonl
163
+
164
+ # Find tasks depending on a specific ID
165
+ grep '"bd-a3f8.1.1"' .beads/issues.jsonl | grep blocked_by
166
+ ```
167
+
168
+ ### Check if a Task is Complete
169
+
170
+ ```bash
171
+ bd show bd-a3f8.1.1
172
+ ```
173
+
174
+ Look for `status: closed` in the output. A dependency is "met" when the task is closed.
175
+
96
176
  ## Output Process
97
177
 
98
178
  ### 1. Create Epic for Plan
@@ -180,9 +260,10 @@ This plan is managed via Beads. Tasks are stored in `.beads/` and tracked as a d
180
260
 
181
261
  **Implementation will**:
182
262
  1. Read this file to identify the epic
183
- 2. Query `bd ready` for unblocked tasks
184
- 3. Work through tasks respecting dependencies
185
- 4. Close tasks with `bd close bd-{id} "reason"`
263
+ 2. Check External Dependencies below
264
+ 3. Query `bd ready` for unblocked tasks
265
+ 4. Work through tasks respecting dependencies
266
+ 5. Close tasks with `bd close bd-{id} "reason"`
186
267
 
187
268
  ## Key Decisions
188
269
 
@@ -194,8 +275,17 @@ This plan is managed via Beads. Tasks are stored in `.beads/` and tracked as a d
194
275
  |-------|------|---------|
195
276
  | Phase 1 | {Goal} | bd-{id}.1 |
196
277
  | Phase 2 | {Goal} | bd-{id}.2 |
278
+
279
+ ## External Dependencies
280
+
281
+ [Dependencies on other topics - copy from specification's Dependencies section]
282
+
283
+ - {topic}: {description}
284
+ - {topic}: {description} → {task-id} (resolved)
197
285
  ```
198
286
 
287
+ The External Dependencies section tracks what this plan needs from other topics. See `formal-planning.md` for the format and states (unresolved, resolved, satisfied externally).
288
+
199
289
  ## Frontmatter
200
290
 
201
291
  The `format: beads` frontmatter tells implementation to use beads CLI:
@@ -18,9 +18,52 @@ Ask the user: **Which team should own this project?**
18
18
 
19
19
  | Planning Concept | Linear Entity |
20
20
  |------------------|---------------|
21
- | Plan | Project |
21
+ | Specification/Topic | Project |
22
22
  | Phase | Label (e.g., `phase-1`, `phase-2`) |
23
23
  | Task | Issue |
24
+ | Internal dependency | Issue blocking relationship (within project) |
25
+ | Cross-topic dependency | Issue blocking relationship (across projects) |
26
+
27
+ Each specification topic becomes its own Linear project. Cross-topic dependencies link issues between projects.
28
+
29
+ ## Cross-Project Dependencies
30
+
31
+ Cross-topic dependencies link issues between different Linear projects (different specifications/topics). This is how you express "billing depends on authentication being complete."
32
+
33
+ ### Creating Cross-Project Dependencies
34
+
35
+ Linear supports blocking relationships between issues, even across projects. Via MCP or the Linear UI:
36
+
37
+ 1. Open the dependent issue (the one that's blocked)
38
+ 2. Add a "Blocked by" relationship to the issue in the other project
39
+ 3. Linear will show this issue as blocked until the dependency is complete
40
+
41
+ ## Querying Dependencies
42
+
43
+ Use these queries to understand the dependency graph for implementation blocking and `/link-dependencies`.
44
+
45
+ ### Via MCP
46
+
47
+ Query Linear for issues with blocking relationships:
48
+
49
+ ```
50
+ # Get all issues in a project
51
+ linear_getIssues(projectId: "{project_id}")
52
+
53
+ # Check if an issue has blockers
54
+ linear_getIssue(issueId: "{issue_id}")
55
+ # Look for blockedByIssues in the response
56
+ ```
57
+
58
+ ### Check if a Dependency is Complete
59
+
60
+ Query the blocking issue and check its state:
61
+ - `state.type === "completed"` means the dependency is met
62
+ - Any other state means it's still blocking
63
+
64
+ ### Find Issues Blocked by a Specific Issue
65
+
66
+ Via the Linear API or MCP, query for issues where `blockedByIssues` contains the issue ID.
24
67
 
25
68
  ## Output Process
26
69
 
@@ -125,17 +168,27 @@ This plan is managed in Linear. The source of truth for tasks and progress is th
125
168
 
126
169
  **Implementation will**:
127
170
  1. Read this file to find the Linear project
128
- 2. Query Linear for project issues
129
- 3. Work through tasks in phase order (by label)
130
- 4. Update issue status as tasks complete
171
+ 2. Check External Dependencies below
172
+ 3. Query Linear for project issues
173
+ 4. Work through tasks in phase order (by label)
174
+ 5. Update issue status as tasks complete
131
175
 
132
176
  **To add tasks**: Create issues in the Linear project. They'll be picked up automatically.
133
177
 
134
178
  ## Key Decisions
135
179
 
136
180
  [Summary of key decisions from specification - for quick reference]
181
+
182
+ ## External Dependencies
183
+
184
+ [Dependencies on other topics - copy from specification's Dependencies section]
185
+
186
+ - {topic}: {description}
187
+ - {topic}: {description} → {issue-id} (resolved)
137
188
  ```
138
189
 
190
+ The External Dependencies section tracks what this plan needs from other topics. See `formal-planning.md` for the format and states (unresolved, resolved, satisfied externally).
191
+
139
192
  ## Frontmatter
140
193
 
141
194
  The frontmatter contains all information needed to query Linear:
@@ -124,11 +124,18 @@ Map edge cases from specification to specific tasks:
124
124
 
125
125
  Tables, schemas, API contracts
126
126
 
127
- ## Dependencies
127
+ ## Internal Dependencies
128
128
 
129
129
  - Prerequisites for Phase 1
130
- - Phase dependencies
131
- - External blockers
130
+ - Phase dependencies (Phase 2 depends on Phase 1, etc.)
131
+
132
+ ## External Dependencies
133
+
134
+ [Dependencies on other topics - copy from specification's Dependencies section]
135
+
136
+ - {topic}: {description}
137
+ - {topic}: {description} → {task-reference} (resolved)
138
+ - ~~{topic}: {description}~~ → satisfied externally
132
139
 
133
140
  ## Rollback (if applicable)
134
141
 
@@ -141,6 +148,67 @@ Triggers and steps
141
148
  | YYYY-MM-DD | Created from specification |
142
149
  ```
143
150
 
151
+ ## Cross-Topic Dependencies
152
+
153
+ Cross-topic dependencies link tasks between different plan files. This is how you express "this feature depends on the billing system being implemented."
154
+
155
+ ### In the External Dependencies Section
156
+
157
+ Use the format `{topic}: {description} → {task-reference}` where task-reference points to a specific task in another plan file:
158
+
159
+ ```markdown
160
+ ## External Dependencies
161
+
162
+ - billing-system: Invoice generation → billing-system.md#phase-1-task-2 (resolved)
163
+ - authentication: User context → authentication.md#phase-2-task-1 (resolved)
164
+ - payment-gateway: Payment processing (unresolved - not yet planned)
165
+ ```
166
+
167
+ ### Task References
168
+
169
+ For local markdown plans, reference tasks using:
170
+ - `{topic}.md#phase-{n}-task-{m}` - references a specific task by phase and number
171
+ - Consider adding nano IDs to task headers for more stable references
172
+
173
+ ## Querying Dependencies
174
+
175
+ Use these queries to understand the dependency graph for implementation blocking and `/link-dependencies`.
176
+
177
+ ### Find Plans With External Dependencies
178
+
179
+ ```bash
180
+ # Find all plans with external dependencies
181
+ grep -l "## External Dependencies" docs/workflow/planning/*.md
182
+
183
+ # Find unresolved dependencies (no arrow →)
184
+ grep -A 10 "## External Dependencies" docs/workflow/planning/*.md | grep "^- " | grep -v "→"
185
+ ```
186
+
187
+ ### Find Dependencies on a Specific Topic
188
+
189
+ ```bash
190
+ # Find plans that depend on billing-system
191
+ grep -l "billing-system:" docs/workflow/planning/*.md
192
+ ```
193
+
194
+ ### Check if a Dependency Task Exists
195
+
196
+ Read the referenced plan file and verify the task exists:
197
+
198
+ ```bash
199
+ # Check if a task exists in another plan
200
+ grep "Phase 1.*Task 2" docs/workflow/planning/billing-system.md
201
+ ```
202
+
203
+ ### Check if a Dependency is Complete
204
+
205
+ For local markdown, check if the task's acceptance criteria are checked off:
206
+
207
+ ```bash
208
+ # Look for completed acceptance criteria
209
+ grep -A 5 "### Phase 1" docs/workflow/planning/billing-system.md | grep "\[x\]"
210
+ ```
211
+
144
212
  ## Frontmatter
145
213
 
146
214
  The `format: local-markdown` frontmatter tells implementation that the full plan content is in this file.