@yemi33/minions 0.1.1883 → 0.1.1884
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/agents/lambert/charter.md +1 -2
- package/agents/ripley/charter.md +1 -1
- package/docs/command-center.md +3 -155
- package/package.json +1 -1
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
## How I Work
|
|
41
41
|
|
|
42
|
-
- Read
|
|
43
|
-
- Read Dallas's build summary from `{{team_root}}/notes/inbox/dallas-build-*.md`
|
|
42
|
+
- Read recent teammate findings under `{{team_root}}/notes/inbox/` — filenames follow the engine-injected "Write Learnings" contract in each agent's dispatch prompt, so defer to that contract rather than matching ad-hoc filename globs here
|
|
44
43
|
- Cross-reference against all `docs/`, agent `CLAUDE.md` files, and prototype instructions
|
|
45
44
|
- Be exhaustive on missing features — better to over-document than under-document
|
|
46
45
|
- Output the JSON to `{{team_root}}/prd/<plan-slug>.json` (the engine's `materializePlansAsWorkItems()` reads from that directory)
|
package/agents/ripley/charter.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
- Always read `CLAUDE.md` files (root + per-agent) before anything else
|
|
23
23
|
- Map the repo structure: `agents/`, `modules/`, `.devtools/`, `docs/`, `eval/`
|
|
24
24
|
- Look for prototype instructions in: `docs/`, `agents/*/CLAUDE.md`, `README.md`, inline comments
|
|
25
|
-
- Document findings in
|
|
25
|
+
- Document findings in the inbox file the dispatch prompt assigns under "Write Learnings" — that section is the single source of truth for the path and filename; do not re-derive it here
|
|
26
26
|
- Never guess — if something is unclear, note it explicitly for human review
|
|
27
27
|
|
|
28
28
|
## Boundaries
|
package/docs/command-center.md
CHANGED
|
@@ -1,159 +1,7 @@
|
|
|
1
1
|
# Command Center
|
|
2
2
|
|
|
3
|
-
The Command Center (CC) is the
|
|
3
|
+
The Command Center (CC) is the dashboard's conversational chat panel. It opens from the **CC** button in the top-right header and lets you drive the engine — dispatching work items, saving notes, approving plans, and asking questions about minions state — through a persistent Claude/Copilot session with full repo awareness.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
CC is intentionally a thin wrapper around the runtime CLI: state changes happen via `Bash`-tool `curl` calls to the dashboard's own REST API, not via parsed delimiter blocks. The end-to-end flow is `dashboard/js/command-center.js` `_ccDoSend()` → `POST /api/command-center` (or `/api/command-center/stream`) in `dashboard.js` (`handleCommandCenter`) → `engine/llm.js` `callLLM({ direct: true })` → claude/copilot CLI session persisted in `engine/cc-sessions.json`. Per-turn API mutations are correlated via the `X-CC-Turn-Id` header and surfaced as standalone `role='action'` chips rendered outside the assistant bubble (`_ccActionResultLine` + `addMsg('action', ...)`).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Persistent Sessions
|
|
10
|
-
|
|
11
|
-
CC maintains a true multi-turn session using Claude CLI's `--resume` flag. Unlike a typical stateless API call, each message resumes the same conversation — Claude retains full history including tool calls, intermediate reasoning, and file contents from prior turns.
|
|
12
|
-
|
|
13
|
-
**Session lifecycle:**
|
|
14
|
-
- **Created** on first message (or after the system prompt changes, or when you click **New Session**)
|
|
15
|
-
- **Resumed** on subsequent messages via `--resume <sessionId>`
|
|
16
|
-
- **Invalidated** only when the CC system prompt changes — detected by hashing `CC_STATIC_SYSTEM_PROMPT` into `_ccPromptHash` and comparing on each call. CC chat sessions do **not** auto-expire by TTL or turn count; `ENGINE_DEFAULTS.ccMaxTurns` (default 50) is a per-call tool-use cap inside the Claude CLI, not a session lifetime cap.
|
|
17
|
-
- **Persisted** to `engine/cc-session.json` (legacy global session) and `engine/cc-sessions.json` (per-tab sessions) — both survive dashboard restarts and engine cleanup ticks
|
|
18
|
-
- **Frontend messages** saved to `localStorage` — survive page refresh
|
|
19
|
-
- **Removed** only when the user explicitly closes a tab via the **×** button on the tab strip — that fires `DELETE /api/cc-sessions/:id` to evict the persisted session
|
|
20
|
-
|
|
21
|
-
Click **New Session** in the drawer header to start fresh; click the **×** on a tab to remove it permanently.
|
|
22
|
-
|
|
23
|
-
### Fresh State Each Turn
|
|
24
|
-
|
|
25
|
-
The system prompt is baked into the session at creation (persona, rules, action format, tool access). Dynamic minions state is injected as a preamble in each user message, so CC always sees current data even in a resumed session.
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
Turn 1: system prompt (static) + [Current Minions State] + user message
|
|
29
|
-
Turn 2+: [Updated Minions State] + user message (system prompt already in session)
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## What It Knows
|
|
33
|
-
|
|
34
|
-
Full minions context is injected every turn:
|
|
35
|
-
|
|
36
|
-
| Context | Details |
|
|
37
|
-
|---------|---------|
|
|
38
|
-
| Agents | Statuses, current tasks, full charters (expertise/roles) |
|
|
39
|
-
| Routing | Who's preferred/fallback for each work type |
|
|
40
|
-
| Config | Tick interval, max concurrent, timeouts, max turns |
|
|
41
|
-
| Work items | Active, pending, failed across all projects with failure reasons |
|
|
42
|
-
| Pull requests | Status, review status, build status, branch, URL |
|
|
43
|
-
| Plans | Full `.md` plan contents + PRD JSON summaries + archived plans |
|
|
44
|
-
| PRD items | All items with status, priority, dependencies |
|
|
45
|
-
| Dispatch | Active agents + last 15 completions with result summaries |
|
|
46
|
-
| Skills | All reusable agent workflows with triggers |
|
|
47
|
-
| Knowledge base | Recent entries (architecture, conventions, build reports, reviews) |
|
|
48
|
-
| Team notes | Recent consolidated notes |
|
|
49
|
-
|
|
50
|
-
## Tool Access
|
|
51
|
-
|
|
52
|
-
CC can use tools to look beyond the pre-loaded context:
|
|
53
|
-
|
|
54
|
-
- **Bash** — Run shell commands (git, build tools, scripts)
|
|
55
|
-
- **Read** — Open any file (agent output logs, code, config, plans)
|
|
56
|
-
- **Write** — Create or overwrite files
|
|
57
|
-
- **Edit** — Make targeted edits to existing files
|
|
58
|
-
- **Glob** — Find files by pattern (e.g., `agents/*/output.log`)
|
|
59
|
-
- **Grep** — Search file contents (find functions, search agent outputs)
|
|
60
|
-
- **WebFetch/WebSearch** — Look up external resources
|
|
61
|
-
|
|
62
|
-
## Unified Brain
|
|
63
|
-
|
|
64
|
-
All LLM-powered features in the dashboard route through the same CC session:
|
|
65
|
-
|
|
66
|
-
| Feature | Endpoint | How It Works |
|
|
67
|
-
|---------|----------|-------------|
|
|
68
|
-
| **CC chat panel** | `POST /api/command-center` | Direct CC interaction |
|
|
69
|
-
| **Doc chat modal** | `POST /api/doc-chat` | Routes through CC via `ccDocCall()` |
|
|
70
|
-
| **Doc steer** | `POST /api/steer-document` | Routes through CC via `ccDocCall()` |
|
|
71
|
-
| **Plan revision** | `POST /api/plans/revise` | Routes through CC via `ccDocCall()` |
|
|
72
|
-
|
|
73
|
-
This means:
|
|
74
|
-
- A question in the doc chat modal shares context with the CC panel
|
|
75
|
-
- CC remembers what you discussed in a document editing session
|
|
76
|
-
- Doc modals can cross-reference other minions knowledge, PRs, work items
|
|
77
|
-
- All turns accumulate in the same session
|
|
78
|
-
|
|
79
|
-
## Actions
|
|
80
|
-
|
|
81
|
-
When you ask CC to *do* something, it includes structured action blocks in its response.
|
|
82
|
-
|
|
83
|
-
| Action | What It Does | Example Prompt |
|
|
84
|
-
|--------|-------------|----------------|
|
|
85
|
-
| `dispatch` | Create a work item | "Have dallas fix the login bug" |
|
|
86
|
-
| `note` | Save a decision/reminder | "Remember we need to migrate to v3" |
|
|
87
|
-
| `plan` | Create an implementation plan | "Plan the GitHub integration feature" |
|
|
88
|
-
| `cancel` | Stop a running agent | "Cancel whatever ripley is doing" |
|
|
89
|
-
| `retry` | Retry failed work items | "Retry the three failed tasks" |
|
|
90
|
-
| `pause-plan` | Pause a PRD | "Pause the officeagent PRD" |
|
|
91
|
-
| `approve-plan` | Approve a PRD | "Approve the new plan" |
|
|
92
|
-
| `edit-prd-item` | Edit a PRD item | "Change P003's priority to high" |
|
|
93
|
-
| `remove-prd-item` | Remove a PRD item | "Remove P011 from the plan" |
|
|
94
|
-
| `delete-work-item` | Delete a work item | "Delete work item W025" |
|
|
95
|
-
|
|
96
|
-
For endpoints without a named action, CC may emit a local API fallback action with `endpoint`, `method`, and `params`. The server only invokes safe local `/api/...` paths, validates the requested method against the route index when available, sends GET params as query strings, and rejects streaming/recursive CC/doc-chat endpoints.
|
|
97
|
-
|
|
98
|
-
## Error Handling
|
|
99
|
-
|
|
100
|
-
- **Frontend timeout**: 10-minute `AbortSignal` on the fetch — prevents infinite "thinking" spinner
|
|
101
|
-
- **Backend timeout**: 5-minute kill timer on the claude process
|
|
102
|
-
- **Resume failure**: If `--resume` fails (corrupted/deleted session), automatically retries with a fresh session
|
|
103
|
-
- **Concurrency guard**: Only one CC call at a time — concurrent requests get a 429 "CC is busy" response
|
|
104
|
-
- **Phase indicators**: Thinking indicator shows progressive phases ("Thinking..." → "Analyzing..." → "Timing out soon...")
|
|
105
|
-
|
|
106
|
-
## Architecture
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
User message (CC panel, doc modal, or steer)
|
|
110
|
-
│
|
|
111
|
-
▼
|
|
112
|
-
POST /api/command-center (or /api/doc-chat, /api/steer-document)
|
|
113
|
-
│
|
|
114
|
-
├── Validate session (prompt-hash check — invalidate if `_ccPromptHash` drifted)
|
|
115
|
-
├── Build dynamic state preamble (buildCCStatePreamble)
|
|
116
|
-
├── callLLM() with sessionId (resume) or without (new)
|
|
117
|
-
│ model: sonnet
|
|
118
|
-
│ maxTurns: 25 (CC) or 10 (doc-plan) or 1 (doc-other)
|
|
119
|
-
│ allowedTools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch
|
|
120
|
-
│ timeout: 600s (CC) or 300s (doc-plan) or 60s (doc-other)
|
|
121
|
-
│
|
|
122
|
-
▼
|
|
123
|
-
engine/llm.js callLLM({ direct: true }) (bypasses engine/spawn-agent.js — CC + doc-chat only)
|
|
124
|
-
│
|
|
125
|
-
├── Resolves claude CLI binary path from engine/claude-caps.json
|
|
126
|
-
├── If --resume: pass -p --resume <id> (no system prompt file)
|
|
127
|
-
├── If new: pass -p --system-prompt-file <file>
|
|
128
|
-
│
|
|
129
|
-
▼
|
|
130
|
-
claude CLI (persistent session on disk)
|
|
131
|
-
│
|
|
132
|
-
▼
|
|
133
|
-
Parse response
|
|
134
|
-
├── Extract sessionId from stream-json result
|
|
135
|
-
├── Extract ===ACTIONS=== block (CC)
|
|
136
|
-
├── Extract ---DOCUMENT--- block (doc chat/steer)
|
|
137
|
-
├── Update cc-session.json
|
|
138
|
-
│
|
|
139
|
-
▼
|
|
140
|
-
Frontend
|
|
141
|
-
├── Render chat message
|
|
142
|
-
├── Execute actions / apply doc edits
|
|
143
|
-
├── Save sessionId + messages to localStorage
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## Key Files
|
|
147
|
-
|
|
148
|
-
| File | Role |
|
|
149
|
-
|------|------|
|
|
150
|
-
| `engine/llm.js` | `callLLM()` / `callLLMStreaming()` — single LLM function with optional `sessionId` for resume; `direct: true` spawns claude CLI directly (used by CC + doc-chat) |
|
|
151
|
-
| `engine/spawn-agent.js` | Agent dispatch wrapper — resolves claude CLI path and invokes it. **Not used by CC/doc-chat** (direct spawn path). |
|
|
152
|
-
| `engine/shared.js` | `parseStreamJsonOutput()` extracts `sessionId` from result |
|
|
153
|
-
| `engine/cc-session.json` | Persisted session state (sessionId, turnCount, timestamps) |
|
|
154
|
-
| `dashboard.js` | CC endpoint, `buildCCStatePreamble()`, `ccDocCall()`, `parseCCActions()` |
|
|
155
|
-
| `dashboard/js/` | Frontend: localStorage persistence, session indicator, New Session button |
|
|
156
|
-
|
|
157
|
-
## Command Bar
|
|
158
|
-
|
|
159
|
-
The command bar at the top of the dashboard routes all input to the CC panel. Typing in the command bar opens the CC drawer and sends the message as a CC turn.
|
|
7
|
+
For canonical detail (system prompt, session lifecycle, turn-ID surfacing pipeline, doc-chat integration, and CC API contract), read [`CLAUDE.md`](../CLAUDE.md) — see the **CC API Contract** and **Sessions** sections — and the source in [`dashboard/js/command-center.js`](../dashboard/js/command-center.js), [`dashboard.js`](../dashboard.js) (`handleCommandCenter`), and [`prompts/cc-system.md`](../prompts/cc-system.md). This pointer file exists so the docs index has an entry for "Command Center"; the implementation details are deliberately not duplicated here because they drift.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1884",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|