@yemi33/squad 0.1.20 → 0.1.21

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/README.md CHANGED
@@ -87,7 +87,7 @@ Run `squad status` and tell me what my squad is doing
87
87
  ### What happens on first run
88
88
 
89
89
  1. The engine starts ticking every 60 seconds
90
- 2. It scans each linked project for work: PRs needing review, PRD gaps, queued work items
90
+ 2. It scans each linked project for work: PRs needing review, plan items, queued work items
91
91
  3. If it finds work and an agent is idle, it spawns a Claude Code session with the right playbook
92
92
  4. You can watch progress on the dashboard or via `squad status`
93
93
 
@@ -130,7 +130,8 @@ You can also run scripts directly: `node ~/.squad/engine.js start`, `node ~/.squ
130
130
  │ config.json ← projects │
131
131
  │ agents/ ← 5 agents │
132
132
  │ playbooks/ ← templates │
133
- prd.json squad PRD
133
+ plans/ approved plans
134
+ │ knowledge/ ← KB store │
134
135
  │ skills/ ← workflows │
135
136
  │ notes/ ← knowledge │
136
137
  └──────┬────────────────────────┘
@@ -149,9 +150,16 @@ You can also run scripts directly: `node ~/.squad/engine.js start`, `node ~/.squ
149
150
 
150
151
  ## What It Does
151
152
 
152
- - **Auto-discovers work** from squad-level PRD (multi-project), pull requests, and work queues across all linked projects
153
+ - **Auto-discovers work** from plans (`plans/*.json`), pull requests, and work queues across all linked projects
154
+ - **Plan pipeline** — `/plan` spawns a plan agent, chains to plan-to-prd, produces `plans/{project}-{date}.json` with `status: "awaiting-approval"`. Supports shared-branch and parallel strategies.
155
+ - **Human approval gate** — plans require approval before materializing as work items. Dashboard provides Approve / Discuss & Revise / Reject. Discussion launches an interactive Claude Code session.
153
156
  - **Dispatches AI agents** (Claude CLI) with full project context, git worktrees, and MCP server access
154
157
  - **Routes intelligently** — fixes first, then reviews, then implementation, matched to agent strengths
158
+ - **LLM-powered consolidation** — Haiku summarizes notes (threshold: 3 files). Regex fallback. Source references required.
159
+ - **Knowledge base** — `knowledge/` with categories: architecture, conventions, project-notes, build-reports, reviews. Full notes preserved. Dashboard browsable with inline Q&A.
160
+ - **Token tracking** — per-agent and per-day usage. Dashboard Token Usage panel.
161
+ - **Engine watchdog** — dashboard auto-restarts dead engine.
162
+ - **Agent re-attachment** — on restart, finds surviving agent processes via PID files.
155
163
  - **Learns from itself** — agents write findings, engine consolidates into institutional knowledge
156
164
  - **Tracks quality** — approval rates, error rates, and task metrics per agent
157
165
  - **Shares workflows** — agents create reusable skills (Claude Code-compatible) that all other agents can follow
@@ -167,16 +175,19 @@ You can also run scripts directly: `node ~/.squad/engine.js start`, `node ~/.squ
167
175
  The web dashboard at `http://localhost:7331` provides:
168
176
 
169
177
  - **Projects bar** — all linked projects with descriptions (hover for full text)
170
- - **Command Center** — add work items, notes, plans, and PRD items (multi-project via `#project` tags)
171
- - **Squad Members** — agent cards with status, click for charter/history/output detail panel
178
+ - **Command Center** — add work items, notes, plans (multi-project via `#project` tags). "make a plan for..." auto-detection, "remember" keyword, `--parallel`/`--shared` flags, arrow key history, Past Commands modal.
179
+ - **Squad Members** — agent cards with status and result summary, click for charter/history/output detail panel
172
180
  - **Live Output tab** — real-time streaming output for working agents (auto-refreshes every 3s)
173
181
  - **Work Items** — paginated table with status, source, type, priority, assigned agent, linked PRs, fan-out badges, and retry button for failed items
174
- - **PRD** — gap analysis stats + progress bar with item-level breakdown and linked PRs per item
182
+ - **Plans** — plan approval UI with Approve / Discuss & Revise / Reject
183
+ - **Knowledge Base** — browsable by category with inline Q&A (Haiku-powered)
184
+ - **Token Usage** — per-agent and per-day token tracking
175
185
  - **Pull Requests** — paginated PR tracker sorted by date, with review/build/merge status
176
186
  - **Skills** — agent-created reusable workflows (squad-wide + project-specific), click to view full content
177
- - **Notes Inbox + Team Notes** — learnings and team rules
187
+ - **Notes Inbox + Team Notes** — learnings and team rules, editable from dashboard modal
178
188
  - **Dispatch Queue + Engine Log** — active/pending work and audit trail
179
189
  - **Agent Metrics** — tasks completed, errors, PRs created/approved/rejected, approval rates
190
+ - **Document modals** — inline Q&A with Haiku on any document modal
180
191
 
181
192
  ## Project Config
182
193
 
@@ -288,7 +299,7 @@ The engine discovers work from 5 sources, in priority order:
288
299
  |----------|--------|---------------|
289
300
  | 1 | PRs with changes-requested | `fix` |
290
301
  | 2 | PRs pending review | `review` |
291
- | 3 | Squad PRD items (missing/planned, multi-project) | `implement` |
302
+ | 3 | Plan items (`plans/*.json`, approved) | `implement` |
292
303
  | 4 | Per-project work items | item's `type` |
293
304
  | 5 | Central work items | item's `type` |
294
305
 
@@ -310,8 +321,8 @@ No bash or shell involved — Node spawns Node directly. Prompts with special ch
310
321
 
311
322
  ### What Each Agent Gets
312
323
 
313
- - **System prompt** — identity, charter, history, project context, critical rules, skill index, team notes
314
- - **Task prompt** — rendered playbook with `{{variables}}` filled from config
324
+ - **System prompt** — lean (~2-4KB) identity + rules only
325
+ - **Task prompt** — rendered playbook with `{{variables}}` filled from config, plus bulk context (charter, history, project context, skill index, team notes)
315
326
  - **Working directory** — project root (agent creates worktrees as needed)
316
327
  - **MCP servers** — inherited from `~/.claude.json` (no extra config needed)
317
328
  - **Full tool access** — all built-in tools plus all MCP tools
@@ -356,6 +367,9 @@ Routing rules in `routing.md`. Charters in `agents/{name}/charter.md`. Both are
356
367
  | `test.md` | Run tests and report results |
357
368
  | `build-and-test.md` | Build project and run test suite |
358
369
  | `plan-to-prd.md` | Convert a plan into PRD gap items |
370
+ | `plan.md` | Generate a plan from user request |
371
+ | `implement-shared.md` | Implement on a shared branch (multiple agents) |
372
+ | `ask.md` | Answer a question about the codebase |
359
373
 
360
374
  All playbooks use `{{template_variables}}` filled from project config. The `work-item.md` playbook uses `{{scope_section}}` to inject project-specific or multi-project context. Playbooks are fully customizable — edit them to match your workflow.
361
375
 
@@ -385,10 +399,13 @@ Manual cleanup: `squad cleanup`
385
399
 
386
400
  ## Self-Improvement Loop
387
401
 
388
- Five mechanisms that make the squad get better over time:
402
+ Six mechanisms that make the squad get better over time:
389
403
 
390
404
  ### 1. Learnings Inbox → notes.md
391
- Agents write findings to `notes/inbox/`. Engine consolidates at 5+ files into `notes.md` — categorized (reviews, feedback, learnings, other) with one-line summaries. Auto-prunes at 50KB. Injected into every future playbook.
405
+ Agents write findings to `notes/inbox/`. Engine consolidates at 3+ files using Haiku LLM summarization (regex fallback) into `notes.md` — categorized with source references. Auto-prunes at 50KB. Injected into every future playbook.
406
+
407
+ ### 6. Knowledge Base
408
+ `knowledge/` stores full notes by category: architecture, conventions, project-notes, build-reports, reviews. Browsable in dashboard with inline Q&A (Haiku-powered).
392
409
 
393
410
  ### 2. Per-Agent History
394
411
  `agents/{name}/history.md` tracks last 20 tasks with timestamps, results, projects, and branches. Injected into the agent's system prompt so it remembers past work.
@@ -412,11 +429,11 @@ Engine behavior is controlled via `config.json`. Key settings:
412
429
  {
413
430
  "engine": {
414
431
  "tickInterval": 60000,
415
- "maxConcurrent": 3,
432
+ "maxConcurrent": 5,
416
433
  "agentTimeout": 600000,
417
434
  "staleThreshold": 1800000,
418
435
  "maxTurns": 100,
419
- "inboxConsolidateThreshold": 5
436
+ "inboxConsolidateThreshold": 3
420
437
  }
421
438
  }
422
439
  ```
@@ -424,11 +441,11 @@ Engine behavior is controlled via `config.json`. Key settings:
424
441
  | Setting | Default | Description |
425
442
  |---------|---------|-------------|
426
443
  | `tickInterval` | 60000 (1min) | Milliseconds between engine ticks |
427
- | `maxConcurrent` | 3 | Max agents running simultaneously |
444
+ | `maxConcurrent` | 5 | Max agents running simultaneously |
428
445
  | `agentTimeout` | 600000 (10min) | Kill agents silent longer than this |
429
446
  | `staleThreshold` | 1800000 (30min) | Kill stale dispatch entries |
430
447
  | `maxTurns` | 100 | Max Claude CLI turns per agent session |
431
- | `inboxConsolidateThreshold` | 5 | Inbox files needed before consolidation |
448
+ | `inboxConsolidateThreshold` | 3 | Inbox files needed before consolidation |
432
449
 
433
450
  ## Node.js Upgrade Caution
434
451
 
@@ -466,8 +483,9 @@ To move to a new machine: `npm install -g @yemi33/squad && squad init --force`,
466
483
  dashboard.js <- Web dashboard server
467
484
  dashboard.html <- Dashboard UI (single-file)
468
485
  config.json <- projects[], agents, engine, claude settings
469
- prd.json <- Squad-level PRD (multi-project items)
470
486
  config.template.json <- Template for new installs
487
+ plans/ <- Approved plans (plans/{project}-{date}.json)
488
+ knowledge/ <- KB: architecture, conventions, project-notes, build-reports, reviews
471
489
  package.json <- npm package definition
472
490
  routing.md <- Dispatch rules table (editable)
473
491
  team.md <- Team roster
@@ -482,6 +500,9 @@ To move to a new machine: `npm install -g @yemi33/squad && squad init --force`,
482
500
  test.md <- Run tests
483
501
  build-and-test.md <- Build project and run test suite
484
502
  plan-to-prd.md <- Convert plan to PRD gap items
503
+ plan.md <- Generate a plan from user request
504
+ implement-shared.md <- Implement on a shared branch
505
+ ask.md <- Answer a question about the codebase
485
506
  skills/
486
507
  README.md <- Skill format guide
487
508
  <name>.md <- Agent-created reusable workflows