You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add granary worker
* feat: daemon polish phase - logging, auth, pruning, process groups
Implements Phase 5 daemon polish items:
- File-based logging with tracing-subscriber and daily rotation
- Worker pruning operation to clean up stopped/errored workers
- Log streaming with follow support (has_more indicator)
- IPC auth token authentication (auto-generated UUID, 0600 perms)
- Log retention and rotation (7-day max age, 100 files per worker)
- Process groups for clean process tree termination (setsid/kill -PID)
New dependencies: tracing, tracing-subscriber, tracing-appender, libc
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: Windows build errors in daemon and CLI
- Add Windows support to granaryd.rs with named pipes and Ctrl+C handling
- Move Stdio import inside #[cfg(unix)] block in auto_start.rs
- Add #[cfg_attr] to suppress unused variable warnings on Windows in run.rs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: show blocked_by dependencies in task output
Add blocked_by field to task output across all formatters (JSON, YAML,
Markdown, Prompt, Table). This shows unmet task dependencies so agents
can understand why tasks are blocked.
Also update skill documentation to emphasize trusting the granary
scheduler for parallelism decisions and using --format=prompt for
LLM-friendly output.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: add claude skills for commonly missed steps
* feat: task/project.next
* fix: migrate in sync + improve failure modes
* fix: spawn runners in workspace dir
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
description: Plan and organize multi-project initiatives. Use when work spans multiple services, repositories, or has natural project boundaries.
3
+
description: Plan and organize multi-project initiatives or significant, substantial projects. Use when work spans multiple services, repositories, or has natural project boundaries.
4
4
---
5
5
6
6
# Planning Multi-Project Initiatives
7
7
8
8
Use this skill when work naturally spans multiple projects or services. **Do NOT use for single-feature work**—use `/granary:plan-work` instead.
9
9
10
-
**Your role:** High-level architecture, separation of concerns, dependency analysis, and spawning sub-agents for project planning. You do NOT plan individual project tasks yourself.
10
+
**Your role:** High-level architecture, separation of concerns, dependency analysis, and spawning sub-agents for project planning. You do NOT plan individual project tasks yourself—you coordinate and synthesize.
11
+
12
+
## Your Focus as Initiative Planner
13
+
14
+
You are a **high-level coordinator**. Your job is to:
15
+
16
+
1.**Collect broad context** before any planning begins
17
+
2.**Design the project structure** with clear boundaries
18
+
3.**Spawn sub-agents** to handle detailed project planning
19
+
4.**Synthesize cross-project dependencies** from sub-agent reports
20
+
21
+
**You do NOT:**
22
+
23
+
- Plan detailed tasks within projects (sub-agents do this)
24
+
- Implement anything directly
25
+
- Make low-level technical decisions
11
26
12
27
## When to Use Initiatives
13
28
@@ -24,23 +39,55 @@ Use this skill when work naturally spans multiple projects or services. **Do NOT
24
39
- There are no cross-project dependencies
25
40
- It's a single feature in one service
26
41
27
-
## Step 1: Research and Assess
42
+
## Step 1: Comprehensive Context Collection
43
+
44
+
**This is your most important step.** Before creating an initiative, gather broad context to inform the entire planning process. You are building the foundation that sub-agents will rely on.
28
45
29
-
Before creating an initiative, do high-level research to understand the scope:
46
+
### 1.1 Search for Prior Art
30
47
31
48
```bash
32
-
# Search for related existing work
49
+
# Search granary for related existing work
33
50
granary search "feature keywords"
34
51
granary initiatives # Check existing initiatives
52
+
granary projects # See all projects
53
+
```
54
+
55
+
### 1.2 Understand Current Implementation
56
+
57
+
Research the codebase at a high level:
58
+
59
+
- What services/modules exist that will be affected?
60
+
- What boundaries already exist in the architecture?
61
+
- What shared dependencies or interfaces might be needed?
62
+
- What are the current **limitations** of the system?
63
+
64
+
```bash
65
+
# Example: understand existing architecture
66
+
ls -la src/
67
+
grep -r "mod " src/lib.rs
68
+
cat README.md
35
69
```
36
70
37
-
Research the codebase to understand:
71
+
### 1.3 Gather External Context
38
72
39
-
- What services/modules exist that will be affected
40
-
- What boundaries already exist in the architecture
41
-
- What shared dependencies or interfaces might be needed
73
+
**Use web search and documentation lookup** to understand:
42
74
43
-
**Decision tree:**
75
+
- Industry best practices for similar features
76
+
- Framework/library documentation for relevant technologies
77
+
- Potential pitfalls or known issues others have encountered
78
+
79
+
This external research provides valuable context that sub-agents will benefit from when planning their projects.
**Do NOT plan project tasks yourself.** Spawn sub-agents to handle detailed project planning.
194
+
**Do NOT plan project tasks yourself.** Spawn sub-agents to handle detailed project planning. Each sub-agent focuses deeply on one project while you maintain the high-level view.
148
195
149
-
For each unblocked project, spawn a sub-agent with `/granary:plan-work`:
196
+
### 7.1 Get Projects Ready for Planning
150
197
151
198
```bash
152
-
# Get unblocked projects
153
-
granary initiative <initiative-id> next --all
199
+
# Get all projects in the initiative
200
+
granary initiative <initiative-id> projects
201
+
202
+
# Identify which projects are unblocked (no project dependencies)
203
+
granary initiative <initiative-id> graph
154
204
```
155
205
156
-
Then spawn sub-agents (using the Task tool) with prompts like:
206
+
### 7.2 Spawn Sub-Agents with Large Context Models
207
+
208
+
**Critical:** Use the **largest context model available** (e.g., `claude-opus-4-5-20250101` or `opus`) for sub-agents. These planning tasks benefit from deep reasoning and extensive context windows.
157
209
158
-
> "Use /granary:plan-work to plan the project `auth-token-service-abc1`.
159
-
> This project is part of the User Authentication System initiative.
160
-
> It should implement JWT token generation and validation.
161
-
> Create detailed tasks for implementation."
210
+
For each unblocked project, spawn a sub-agent using the Task tool:
211
+
212
+
```
213
+
Use Task tool with:
214
+
prompt: [see template below]
215
+
subagent_type: "general-purpose"
216
+
model: "claude-opus-4-5-20250101" # Use largest available context model
217
+
run_in_background: true # Spawn in parallel when multiple projects are unblocked
218
+
```
162
219
163
-
Spawn agents for all unblocked projects in parallel when possible.
220
+
### 7.3 Sub-Agent Prompt Template
221
+
222
+
Provide each sub-agent with:
223
+
224
+
1.**Project context** from your high-level research
225
+
2.**Clear directive** to use `/granary:plan-work`
226
+
3.**Instruction to report back** with cross-project dependencies
227
+
228
+
**Example prompt:**
229
+
230
+
```
231
+
Use /granary:plan-work to plan the project `auth-token-service-abc1`.
232
+
233
+
## Context
234
+
This project is part of the "User Authentication System" initiative.
235
+
Goal: Implement JWT token generation and validation service.
236
+
237
+
## High-Level Context from Initiative Planning
238
+
- The API will consume tokens via middleware (future project: api-auth-integration)
239
+
- Token format should be JWT with RS256 signing
240
+
- Existing auth patterns found in src/middleware/ use Bearer tokens
241
+
- Reference: https://jwt.io/introduction for JWT best practices
242
+
243
+
## Your Task
244
+
1. Research the project scope thoroughly
245
+
2. Create detailed tasks with file paths, implementation details, and acceptance criteria
246
+
3. Set up task dependencies within the project
247
+
248
+
## Required Report Back
249
+
When planning is complete, summarize:
250
+
1. **Tasks created** - List of tasks with brief descriptions
251
+
2. **Cross-project interfaces** - What APIs, types, or contracts does this project expose that other projects will depend on?
252
+
3. **Cross-project dependencies identified** - Did you discover dependencies on other initiative projects not yet captured?
253
+
4. **Risks or blockers** - Any concerns that affect the broader initiative
254
+
```
255
+
256
+
### 7.4 Spawn in Parallel
257
+
258
+
Spawn sub-agents for **all unblocked projects simultaneously**:
259
+
260
+
```
261
+
# If projects A, B, C have no project dependencies, spawn all three at once:
262
+
263
+
Use Task tool (all in ONE message):
264
+
1. prompt: [Project A planning prompt]
265
+
model: "claude-opus-4-5-20250101"
266
+
run_in_background: true
267
+
268
+
2. prompt: [Project B planning prompt]
269
+
model: "claude-opus-4-5-20250101"
270
+
run_in_background: true
271
+
272
+
3. prompt: [Project C planning prompt]
273
+
model: "claude-opus-4-5-20250101"
274
+
run_in_background: true
275
+
```
276
+
277
+
### 7.5 Collect and Synthesize Reports
278
+
279
+
After sub-agents complete, review their reports for:
280
+
281
+
-**Cross-project dependencies** they identified (update initiative dependency graph if needed)
282
+
-**Shared interfaces** that need coordination between projects
283
+
-**Risks** that affect multiple projects
284
+
285
+
```bash
286
+
# Update dependencies if sub-agents identified new ones
**Your output:** A well-structured initiative with projects and dependencies. Sub-agents handle detailed task planning within each project and report back cross-project dependencies they discover.
227
358
228
-
**Your output:**A well-structured initiative with projects and dependencies. Sub-agents handle detailed task planning within each project.
359
+
**Key principle:**You are a high-level coordinator. Gather broad context, design the structure, delegate deep planning to sub-agents, then synthesize their findings.
0 commit comments