@yemi33/squad 0.1.5 → 0.1.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/squad",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.squad/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "squad": "bin/squad.js"
@@ -0,0 +1,49 @@
1
+ # Ask Playbook
2
+
3
+ > Agent: {{agent_name}} | Question from user | ID: {{task_id}}
4
+
5
+ ## Context
6
+
7
+ Team root: {{team_root}}
8
+ {{scope_section}}
9
+
10
+ ## Mission
11
+
12
+ The user has asked a question. Answer it thoroughly and clearly, writing your response to the inbox so they can read it.
13
+
14
+ ## Question
15
+
16
+ {{question}}
17
+
18
+ ## Steps
19
+
20
+ ### 1. Understand the Question
21
+ - Read the question carefully
22
+ - If it references specific files, code, or concepts — go read them first
23
+ - If it references a project, use the project context above to orient yourself
24
+
25
+ ### 2. Research
26
+ - Read relevant source files, docs, configs, or history as needed
27
+ - Use the codebase — don't guess when you can look
28
+ - If the question is about "this" (ambiguous reference), check recent git history and agent activity for context
29
+
30
+ ### 3. Write Your Answer
31
+ Write your answer to `{{team_root}}/notes/inbox/{{agent_id}}-answer-{{task_id}}-{{date}}.md` with:
32
+
33
+ - **Question**: (restate briefly)
34
+ - **Answer**: (clear, direct answer)
35
+ - **References**: (files, links, or code snippets that support the answer)
36
+
37
+ Keep it concise but complete. Write for a senior engineer who wants the real answer, not fluff.
38
+
39
+ ### 4. Status
40
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
41
+
42
+ ## Rules
43
+ - Do NOT modify any code unless the question explicitly asks you to.
44
+ - Do NOT create PRs or branches — this is a read-only task.
45
+ - Do NOT checkout branches in the main working tree.
46
+ - Read `notes.md` for all team rules before starting.
47
+
48
+ ## Team Decisions
49
+ {{notes_content}}
@@ -0,0 +1,68 @@
1
+ # Playbook: Implement (Shared Branch)
2
+
3
+ You are {{agent_name}}, the {{agent_role}} on the {{project_name}} project.
4
+ TEAM ROOT: {{team_root}}
5
+
6
+ Repository ID comes from `.squad/config.json` under `project.repositoryId`.
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+
9
+ ## Your Task
10
+
11
+ Implement PRD item **{{item_id}}: {{item_name}}**
12
+ - Priority: {{item_priority}}
13
+ - Complexity: {{item_complexity}}
14
+ - Shared branch: `{{branch_name}}`
15
+
16
+ ## Context
17
+
18
+ This is part of a **shared-branch plan**. Other agents may have already committed work to this branch before you. Your job is to build on top of their work.
19
+
20
+ ## Git Workflow (SHARED BRANCH — CRITICAL)
21
+
22
+ Your worktree is already set up. Pull latest before starting:
23
+
24
+ ```bash
25
+ cd {{worktree_path}}
26
+ git pull origin {{branch_name}} || true
27
+ ```
28
+
29
+ Check what's already on this branch:
30
+ ```bash
31
+ git log --oneline {{main_branch}}..HEAD
32
+ ```
33
+
34
+ Do ALL work in the worktree. When done:
35
+
36
+ ```bash
37
+ git add <specific files>
38
+ git commit -m "{{commit_message}}"
39
+ git push origin {{branch_name}}
40
+ ```
41
+
42
+ **Do NOT:**
43
+ - Create a new branch — use `{{branch_name}}`
44
+ - Create a PR — one will be created automatically when all plan items complete
45
+ - Remove the worktree — the next plan item needs it
46
+ - Create a new worktree — one already exists at `{{worktree_path}}`
47
+
48
+ ## Instructions
49
+
50
+ 1. Read relevant source code and reference implementations before writing anything
51
+ 2. Check what prior plan items already committed on this branch (`git log {{main_branch}}..HEAD`)
52
+ 3. Follow existing patterns exactly — check `CLAUDE.md` for conventions
53
+ 4. Build on existing work — don't duplicate or conflict with prior commits
54
+
55
+ ## Build and Verify
56
+
57
+ After implementation, you MUST:
58
+ 1. Build the project using the repo's build system (check CLAUDE.md, package.json, README)
59
+ 2. Verify the build succeeds with your changes AND all prior commits on this branch
60
+ 3. If the build fails:
61
+ - Read the error output carefully
62
+ - Fix the issue (including issues from prior commits if needed)
63
+ - Re-run the build
64
+ - If it fails 3 times, report the build errors in your findings and stop
65
+
66
+ ## Signal Completion
67
+
68
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -16,6 +16,19 @@ Keep branch names lowercase, use hyphens, max 60 chars.
16
16
  Implement PRD item **{{item_id}}: {{item_name}}**
17
17
  - Priority: {{item_priority}}
18
18
  - Complexity: {{item_complexity}}
19
+ - Description: {{item_description}}
20
+
21
+ ## Projects
22
+
23
+ Primary repo: **{{repo_name}}** ({{ado_org}}/{{ado_project}}) at `{{project_path}}`
24
+
25
+ {{related_projects}}
26
+
27
+ If this feature spans multiple projects, you may need to:
28
+ 1. Read code from all listed project paths to understand integration points
29
+ 2. Make changes in the primary project (your worktree)
30
+ 3. If changes are needed in other projects, create separate worktrees and PRs for each
31
+ 4. Note cross-repo dependencies in PR descriptions (e.g., "Requires office-bohemia PR #123")
19
32
 
20
33
  ## Instructions
21
34
 
@@ -33,6 +33,8 @@ This file is NOT checked into the repo. The engine reads it on every tick and di
33
33
  "generated_by": "{{agent_id}}",
34
34
  "generated_at": "{{date}}",
35
35
  "plan_summary": "{{plan_summary}}",
36
+ "branch_strategy": "shared-branch|parallel",
37
+ "feature_branch": "feat/plan-short-name",
36
38
  "missing_features": [
37
39
  {
38
40
  "id": "P001",
@@ -54,6 +56,24 @@ This file is NOT checked into the repo. The engine reads it on every tick and di
54
56
  }
55
57
  ```
56
58
 
59
+ ## Branch Strategy
60
+
61
+ Choose one of the following strategies based on how the items relate to each other:
62
+
63
+ - **`shared-branch`** — All items share a single feature branch. Agents work sequentially, respecting `depends_on` order. One PR is created at the end with all changes. **Use this when items build on each other** (most common for feature plans).
64
+ - **`parallel`** — Each item gets its own branch and PR. Items are dispatched independently. **Use this when items are fully independent** and can be reviewed/merged separately.
65
+
66
+ {{branch_strategy_hint}}
67
+
68
+ When using `shared-branch`:
69
+ - Generate a `feature_branch` name: `feat/plan-<short-kebab-description>` (max 60 chars, lowercase)
70
+ - Use `depends_on` to express the ordering — items execute in dependency order
71
+ - Each item should be able to build on the prior items' work
72
+
73
+ When using `parallel`:
74
+ - Omit `feature_branch` (the engine generates per-item branches)
75
+ - `depends_on` is still respected but items can dispatch concurrently if no deps
76
+
57
77
  Rules for items:
58
78
  - IDs are `P001`, `P002`, etc. (P for plan-derived)
59
79
  - All items start with `status: "missing"` — the engine picks these up automatically
@@ -67,7 +87,8 @@ Rules for items:
67
87
  - Do NOT create a git branch, worktree, or PR — this playbook writes squad-internal state only
68
88
  - Do NOT modify any files in the project repo
69
89
  - The engine will dispatch implementation agents automatically once this file exists
70
- - Each implementation agent will create its own branch and PR for its assigned item
90
+ - For `shared-branch`: agents commit to a single branch one PR is created automatically when all items are done
91
+ - For `parallel`: each agent creates its own branch and PR
71
92
 
72
93
  ## Signal Completion
73
94
 
@@ -0,0 +1,99 @@
1
+ # Playbook: Feature Plan
2
+
3
+ > Agent: {{agent_name}} | Task: {{task_description}} | ID: {{task_id}}
4
+
5
+ ## Context
6
+
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+ Team root: {{team_root}}
9
+ Project path: {{project_path}}
10
+
11
+ ## Mission
12
+
13
+ A user has described a feature they want built. Your job is to create a detailed implementation plan that a separate agent will later convert into a structured PRD for automatic dispatch to the agent pool.
14
+
15
+ ## The Feature Request
16
+
17
+ {{plan_content}}
18
+
19
+ ## Steps
20
+
21
+ ### 1. Understand the Request
22
+ - Read the feature description carefully
23
+ - Identify the core goal, constraints, and success criteria
24
+ - Note any ambiguities that need to be called out
25
+
26
+ ### 2. Explore the Codebase
27
+ - Read `CLAUDE.md` at repo root and relevant directories
28
+ - Map the areas of code that this feature will touch
29
+ - Identify existing patterns, conventions, and extension points
30
+ - Note dependencies and potential conflicts with in-progress work
31
+
32
+ ### 3. Design the Approach
33
+ - Outline the high-level architecture for the feature
34
+ - Identify what needs to be created vs modified
35
+ - Consider edge cases, error handling, and backwards compatibility
36
+ - Note any prerequisites or migrations needed
37
+
38
+ ### 4. Break Down into Work Items
39
+ - Decompose into discrete, PR-sized chunks of work
40
+ - Order by dependency (foundations first)
41
+ - Estimate complexity: `small` (1 file), `medium` (2-5 files), `large` (6+ files)
42
+ - Each item should be independently testable
43
+
44
+ ### 5. Write the Plan
45
+
46
+ Write the plan to: `{{team_root}}/plans/{{plan_file}}`
47
+
48
+ Use this format:
49
+
50
+ ```markdown
51
+ # Plan: {{plan_title}}
52
+
53
+ **Project:** {{project_name}}
54
+ **Author:** {{agent_name}}
55
+ **Date:** {{date}}
56
+
57
+ ## Goal
58
+ What this feature achieves and why it matters.
59
+
60
+ ## Codebase Analysis
61
+ What exists today, what needs to change, key files involved.
62
+
63
+ ## Approach
64
+ High-level design decisions and rationale.
65
+
66
+ ## Work Breakdown
67
+
68
+ ### Phase 1: Foundation
69
+ 1. **Item name** (complexity: small/medium/large)
70
+ - What to build
71
+ - Files to create/modify
72
+ - Acceptance criteria
73
+
74
+ ### Phase 2: Core Implementation
75
+ 2. **Item name** ...
76
+
77
+ ### Phase 3: Polish & Integration
78
+ 3. **Item name** ...
79
+
80
+ ## Risks & Open Questions
81
+ - Risk or question that needs user input
82
+
83
+ ## Dependencies
84
+ - External dependencies or prerequisites
85
+ ```
86
+
87
+ ## Important
88
+
89
+ - Do NOT create a git branch, worktree, or PR — this playbook writes squad-internal state only
90
+ - Do NOT modify any files in the project repo
91
+ - The engine will automatically chain this plan into a PRD conversion step
92
+ - Focus on being thorough but actionable — the PRD agent needs clear items to convert
93
+
94
+ ## Signal Completion
95
+
96
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
97
+
98
+ ## Team Notes
99
+ {{notes_content}}
package/routing.md CHANGED
@@ -11,9 +11,11 @@ How the engine decides who handles what. Parsed by engine.js — keep the table
11
11
  | implement:large | rebecca | dallas |
12
12
  | review | ripley | lambert |
13
13
  | fix | _author_ | dallas |
14
+ | plan | ripley | rebecca |
14
15
  | plan-to-prd | lambert | rebecca |
15
16
  | explore | ripley | rebecca |
16
17
  | test | dallas | ralph |
18
+ | ask | ripley | rebecca |
17
19
 
18
20
  Notes:
19
21
  - `_author_` means route to the PR author