@rryando/arcs 3.0.0 → 3.1.1
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 +246 -340
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +4 -3
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/commands/next.js +26 -5
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +14 -2
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/retrieval/graph-builder.d.ts.map +1 -1
- package/dist/retrieval/graph-builder.js +18 -0
- package/dist/retrieval/graph-builder.js.map +1 -1
- package/dist/retrieval/graph-types.d.ts +1 -1
- package/dist/retrieval/graph-types.d.ts.map +1 -1
- package/dist/retrieval/graph-types.js +1 -0
- package/dist/retrieval/graph-types.js.map +1 -1
- package/dist/utils/diagram-generator.d.ts +3 -2
- package/dist/utils/diagram-generator.d.ts.map +1 -1
- package/dist/utils/diagram-generator.js +67 -6
- package/dist/utils/diagram-generator.js.map +1 -1
- package/dist/utils/errors.d.ts +2 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +6 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/task-store.d.ts +3 -0
- package/dist/utils/task-store.d.ts.map +1 -1
- package/dist/utils/task-store.js +35 -1
- package/dist/utils/task-store.js.map +1 -1
- package/dist/utils/toposort.d.ts +21 -0
- package/dist/utils/toposort.d.ts.map +1 -0
- package/dist/utils/toposort.js +126 -0
- package/dist/utils/toposort.js.map +1 -0
- package/dist/utils/workflow-policy.d.ts +1 -0
- package/dist/utils/workflow-policy.d.ts.map +1 -1
- package/dist/utils/workflow-policy.js +18 -2
- package/dist/utils/workflow-policy.js.map +1 -1
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +4 -3
- package/opencode/arcs/prompts/arcs-orchestrate.txt +4 -3
- package/opencode/arcs/skills/brainstorming/SKILL.md +2 -0
- package/opencode/arcs/skills/executing-plans/SKILL.md +2 -0
- package/opencode/arcs/skills/to-diagram/SKILL.md +2 -0
- package/package.json +4 -3
- package/scripts/arcs-init.mjs +81 -0
- package/scripts/build-opencode-bundle.mjs +178 -0
- package/scripts/deploy-opencode-bundle.mjs +203 -0
- package/scripts/lib/bundle-helpers.mjs +172 -0
- package/scripts/lint-bundle.mjs +206 -0
package/README.md
CHANGED
|
@@ -1,217 +1,249 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# ARCS
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Agent Routing & Context System**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@rryando/arcs)
|
|
8
|
+
[](https://nodejs.org/)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
[](LICENSE)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
*Persistent workflow continuity for AI agents — start from context, not a blank slate.*
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
</div>
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
---
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
graph LR
|
|
17
|
-
CTX["arcs context\n──────────\noperating brief\ncurrent focus\nnext action"]
|
|
18
|
-
|
|
19
|
-
subgraph Q["Queue (tasks.md + tasks/index.json)"]
|
|
20
|
-
QD["backlog → in_progress → done\nimmediate work items"]
|
|
21
|
-
end
|
|
22
|
-
subgraph P["Plan (plans/*.md + .diagram.mmd)"]
|
|
23
|
-
PD["proposed → in_progress → done\nmulti-step feature work"]
|
|
24
|
-
end
|
|
25
|
-
subgraph M["Memory (knowledge/*.md)"]
|
|
26
|
-
MD["lessons · patterns · gotchas · architecture\ndurable, searchable, BM25-indexed"]
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
CTX --> Q
|
|
30
|
-
CTX --> P
|
|
31
|
-
CTX --> M
|
|
32
|
-
```
|
|
18
|
+
ARCS gives AI coding agents a queryable project DAG so they never start cold. Instead of scanning a codebase from scratch, an agent calls `arcs brief` and gets back: what to work on, what was decided, and what went wrong last time — in a single ~1 KB JSON envelope.
|
|
33
19
|
|
|
34
|
-
|
|
20
|
+
> **arcs** `/ɑːrks/` — Directed edges in graph theory. Also: **A**gent **R**outing & **C**ontext **S**ystem.
|
|
35
21
|
|
|
36
22
|
---
|
|
37
23
|
|
|
38
|
-
##
|
|
24
|
+
## The Problem
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
Every AI coding session starts fresh. The agent doesn't know:
|
|
27
|
+
- What task to pick up next (and which tasks are blocked by incomplete work)
|
|
28
|
+
- What was already tried and failed
|
|
29
|
+
- What architectural decisions were made
|
|
30
|
+
- What the current plan looks like
|
|
41
31
|
|
|
42
|
-
|
|
43
|
-
flowchart TD
|
|
44
|
-
User(["User / Agent Request"])
|
|
45
|
-
Orch{"ARCS Orchestrator\nClassify intent"}
|
|
32
|
+
ARCS solves this with three persistent surfaces:
|
|
46
33
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Multi["MULTI\nChain workflows\nin parallel or sequence"]
|
|
34
|
+
| Surface | Storage | Purpose |
|
|
35
|
+
|---------|---------|---------|
|
|
36
|
+
| **Queue** | `tasks/index.json` | Work items with dependency ordering via `dependsOn` |
|
|
37
|
+
| **Plan** | `plans/*.md` + `.diagram.mmd` | Multi-step feature work with Mermaid execution maps |
|
|
38
|
+
| **Memory** | `knowledge/*.md` | Durable discoveries: lessons, patterns, gotchas, architecture |
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
---
|
|
55
41
|
|
|
56
|
-
|
|
57
|
-
Orch -- "new project" --> Init
|
|
58
|
-
Orch -- "plan features" --> Brain
|
|
59
|
-
Orch -- "do work" --> Exec
|
|
60
|
-
Orch -- "update docs" --> Sync
|
|
61
|
-
Orch -- "inspect" --> Explore
|
|
62
|
-
Orch -- "compound" --> Multi
|
|
42
|
+
## How It Works
|
|
63
43
|
|
|
64
|
-
|
|
44
|
+
### The Core Loop
|
|
65
45
|
|
|
66
|
-
Init & Brain & Exec & Sync & Explore --> DAG
|
|
67
46
|
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
47
|
+
arcs next → [agent works] → arcs done <id> → arcs remember "..."
|
|
48
|
+
│ │ │
|
|
49
|
+
│ returns first task │ completes task, │ captures durable
|
|
50
|
+
│ whose dependencies │ unblocks dependents │ knowledge for
|
|
51
|
+
│ are ALL satisfied │ │ future sessions
|
|
52
|
+
▼ ▼ ▼
|
|
53
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
54
|
+
│ ~/.arcs/projects/{slug}/ │
|
|
55
|
+
│ │
|
|
56
|
+
│ tasks/index.json ──dependsOn──→ topological sort → next task │
|
|
57
|
+
│ knowledge/ ──BM25+graph──→ related context │
|
|
58
|
+
│ plans/ ──diagram.mmd──→ execution map │
|
|
59
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
74
60
|
```
|
|
75
61
|
|
|
76
|
-
|
|
62
|
+
Three commands: `arcs next` → work → `arcs done`. The DAG handles ordering.
|
|
77
63
|
|
|
78
|
-
###
|
|
64
|
+
### Task Dependencies — The Actual DAG
|
|
79
65
|
|
|
80
|
-
|
|
66
|
+
Tasks declare dependencies. ARCS enforces acyclicity and uses topological sort to determine execution order:
|
|
81
67
|
|
|
82
|
-
|
|
68
|
+
```bash
|
|
69
|
+
arcs task create myapp "Design database schema" --priority=high
|
|
70
|
+
arcs task create myapp "Build REST API" --dependsOn=design-database-schema
|
|
71
|
+
arcs task create myapp "Write integration tests" --dependsOn=build-rest-api
|
|
72
|
+
arcs task create myapp "Deploy to staging" --dependsOn=build-rest-api,write-integration-tests
|
|
73
|
+
```
|
|
83
74
|
|
|
84
|
-
|
|
75
|
+
```mermaid
|
|
76
|
+
flowchart TD
|
|
77
|
+
T001["Design database schema"]:::done
|
|
78
|
+
T002["Build REST API"]:::inProgress
|
|
79
|
+
T003["Write integration tests"]:::backlog
|
|
80
|
+
T004["Deploy to staging"]:::blocked
|
|
81
|
+
|
|
82
|
+
T001 --> T002
|
|
83
|
+
T002 --> T003
|
|
84
|
+
T002 --> T004
|
|
85
|
+
T003 --> T004
|
|
86
|
+
|
|
87
|
+
classDef done fill:#22c55e,color:#fff
|
|
88
|
+
classDef inProgress fill:#f59e0b,color:#fff
|
|
89
|
+
classDef backlog fill:#94a3b8,color:#fff
|
|
90
|
+
classDef blocked fill:#ef4444,color:#fff
|
|
91
|
+
```
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
`arcs next` returns "Write integration tests" (T003) — it's the first task whose dependencies are all done. T004 is blocked because T003 isn't done yet. Priority is a tiebreaker within the same topological level, not the primary sort.
|
|
87
94
|
|
|
88
|
-
|
|
95
|
+
### The Orchestrator
|
|
89
96
|
|
|
90
|
-
|
|
91
|
-
|---|---|---|
|
|
92
|
-
| [Node.js](https://nodejs.org/) | v18+ | Required |
|
|
93
|
-
| [OpenCode](https://opencode.ai/) | latest | Required for agent integration |
|
|
94
|
-
| [gh (GitHub CLI)](https://cli.github.com/) | any | Required — used by skills like `deep-pr-review` |
|
|
95
|
-
| [graphify](https://github.com/safishamsi/graphify) | any | Optional — AST code-graph analysis |
|
|
96
|
-
| [rtk](https://github.com/rtk-ai/rtk) | any | Optional — improves AI command usage tracking |
|
|
97
|
+
When used with [OpenCode](https://opencode.ai/), ARCS ships a full orchestrator that automates the loop:
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
```mermaid
|
|
100
|
+
flowchart TD
|
|
101
|
+
User(["User Request"])
|
|
102
|
+
T0["arcs brief → T0 envelope"]
|
|
103
|
+
Classify{"Classify Intent"}
|
|
104
|
+
|
|
105
|
+
Init["INIT\nScan repo → populate DAG"]
|
|
106
|
+
Brain["BRAINSTORM\nCreate plan → wire dependsOn\n→ generate diagram"]
|
|
107
|
+
Exec["EXECUTE\narcs next → dispatch sub-agent\n→ arcs done → unblock dependents"]
|
|
108
|
+
Sync["SYNC\nAudit DAG → reconcile drift"]
|
|
109
|
+
|
|
110
|
+
DAG[("Project DAG\ntasks + plans + knowledge\n+ dependency graph")]
|
|
111
|
+
|
|
112
|
+
User --> T0 --> Classify
|
|
113
|
+
Classify -- "new project" --> Init
|
|
114
|
+
Classify -- "plan features" --> Brain
|
|
115
|
+
Classify -- "do work" --> Exec
|
|
116
|
+
Classify -- "update docs" --> Sync
|
|
117
|
+
Init & Brain & Exec & Sync --> DAG
|
|
102
118
|
```
|
|
103
119
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
120
|
+
The orchestrator:
|
|
121
|
+
1. **Orients** — calls `arcs brief` for the T0 routing envelope (~1 KB)
|
|
122
|
+
2. **Classifies** — detects intent (INIT / BRAINSTORM / EXECUTE / SYNC)
|
|
123
|
+
3. **Routes** — delegates to specialist sub-agents with scoped prompts
|
|
124
|
+
4. **Executes** — `arcs next` picks dependency-safe tasks; sub-agents implement them
|
|
125
|
+
5. **Advances** — `arcs done` completes tasks, automatically unblocking dependents
|
|
107
126
|
|
|
108
|
-
|
|
127
|
+
### T0 Routing Envelope (the operating brief)
|
|
109
128
|
|
|
110
129
|
```bash
|
|
111
|
-
|
|
130
|
+
$ arcs brief --lean --json
|
|
112
131
|
```
|
|
113
132
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"slug": "my-project",
|
|
136
|
+
"name": "My Project",
|
|
137
|
+
"operatingBrief": {
|
|
138
|
+
"currentFocus": "Build REST API",
|
|
139
|
+
"recommendedSurface": "QUEUE",
|
|
140
|
+
"why": "Task in progress: Build REST API",
|
|
141
|
+
"nextAction": "Continue task build-rest-api"
|
|
142
|
+
},
|
|
143
|
+
"openTasksCount": 3,
|
|
144
|
+
"topOpenTasks": [
|
|
145
|
+
{ "id": "build-rest-api", "title": "Build REST API", "status": "in_progress" },
|
|
146
|
+
{ "id": "write-integration-tests", "title": "Write integration tests", "status": "backlog" }
|
|
147
|
+
]
|
|
148
|
+
}
|
|
118
149
|
```
|
|
119
150
|
|
|
120
|
-
The
|
|
121
|
-
1. Builds the TypeScript source
|
|
122
|
-
2. Registers the `arcs` CLI at `~/.local/bin/arcs`
|
|
123
|
-
3. Creates `~/.arcs/` (project data store)
|
|
124
|
-
4. Deploys bundled agents + skills into `~/.config/opencode/`
|
|
151
|
+
~1 KB. No source files read. The orchestrator uses `recommendedSurface` to pick the workflow branch.
|
|
125
152
|
|
|
126
|
-
|
|
153
|
+
---
|
|
127
154
|
|
|
128
|
-
|
|
155
|
+
## CLI Reference
|
|
129
156
|
|
|
130
|
-
|
|
131
|
-
arcs init
|
|
132
|
-
```
|
|
157
|
+
All commands: `arcs <command> [args] --json`. Output: `{ok, data}` on success, `{ok, code, message}` on error.
|
|
133
158
|
|
|
134
|
-
|
|
159
|
+
### Core Agent Loop
|
|
135
160
|
|
|
136
|
-
|
|
161
|
+
| Command | Purpose |
|
|
162
|
+
|---------|---------|
|
|
163
|
+
| `arcs brief` | T0 routing envelope — what to focus on |
|
|
164
|
+
| `arcs next` | Next dependency-safe task + related knowledge |
|
|
165
|
+
| `arcs done <taskId>` | Mark complete, unblock dependents |
|
|
166
|
+
| `arcs remember "<text>"` | Capture knowledge (auto-classifies kind) |
|
|
167
|
+
| `arcs status` | Progress overview across all surfaces |
|
|
137
168
|
|
|
138
|
-
|
|
169
|
+
### Tasks & Dependencies
|
|
139
170
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
171
|
+
| Command | Purpose |
|
|
172
|
+
|---------|---------|
|
|
173
|
+
| `arcs task create <slug> <title> --dependsOn=id1,id2` | Create task with dependency edges |
|
|
174
|
+
| `arcs task update <slug> <id> --dependsOn=id1` | Add/update dependencies |
|
|
175
|
+
| `arcs task transition <slug> <id> <status>` | Move through lifecycle |
|
|
176
|
+
| `arcs diagram ready <slug> <planId>` | Get unblocked diagram nodes |
|
|
144
177
|
|
|
145
|
-
|
|
178
|
+
### Project Management
|
|
146
179
|
|
|
147
|
-
|
|
180
|
+
| Command | Purpose |
|
|
181
|
+
|---------|---------|
|
|
182
|
+
| `arcs project init` | Register current directory as a project |
|
|
183
|
+
| `arcs project list` | List all tracked projects |
|
|
184
|
+
| `arcs context [slug]` | Full context assembly (audience-targeted) |
|
|
185
|
+
| `arcs search <slug> "<query>"` | BM25 + graph-scored search across DAG |
|
|
186
|
+
| `arcs validate <slug>` | Health check — status drift, orphans, staleness |
|
|
148
187
|
|
|
149
|
-
###
|
|
188
|
+
### Plans & Knowledge
|
|
150
189
|
|
|
151
|
-
|
|
190
|
+
| Command | Purpose |
|
|
191
|
+
|---------|---------|
|
|
192
|
+
| `arcs plan create <slug> <title>` | Create a plan |
|
|
193
|
+
| `arcs knowledge create <slug> <title>` | Create knowledge entry |
|
|
152
194
|
|
|
153
|
-
|
|
154
|
-
|---|---|---|
|
|
155
|
-
| **ARCS Orchestrator** | Full prose | Classifies intent, routes to workflows, delegates to sub-agents, writes DAG |
|
|
156
|
-
| **ARCS Caveman** | ~65% fewer tokens | Identical capabilities; caveman-speak for chat narration only |
|
|
195
|
+
### Flags
|
|
157
196
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
197
|
+
| Flag | Effect |
|
|
198
|
+
|------|--------|
|
|
199
|
+
| `--json` | Structured JSON output (always use for agents) |
|
|
200
|
+
| `--lean` | Strip timestamps (saves tokens) |
|
|
201
|
+
| `--dry-run` | Validate without mutation |
|
|
202
|
+
| `--help` | Per-command usage |
|
|
162
203
|
|
|
163
|
-
|
|
204
|
+
Full command discovery: `arcs --commands --json`.
|
|
164
205
|
|
|
165
|
-
|
|
206
|
+
---
|
|
166
207
|
|
|
167
|
-
|
|
208
|
+
## Graph & Retrieval
|
|
168
209
|
|
|
169
|
-
|
|
170
|
-
|---|---|---|
|
|
171
|
-
| **software-engineer** | Implementation specialist. Writes code, runs tests, ships features. Loads quick-dev, code-agent, TDD, executing-plans skills as needed. | Opus |
|
|
172
|
-
| **tech-architect** | Architecture and analysis specialist. Deep structural reasoning, refactor guidance, trade-off evaluation, and root cause analysis without making hasty edits. | Haiku |
|
|
173
|
-
| **qa-analyst** | Quality enforcement specialist. Proactive code audits, convention compliance, and verification gate enforcement. | Haiku |
|
|
174
|
-
| **oncall-ops** | Debugging and diagnosis specialist. Finds root causes through systematic investigation, log triage, bisect, and performance profiling. | Opus |
|
|
175
|
-
| **arcs-docs** | ARCS documentation specialist. Manages plans, knowledge entries, diagrams, and DAG health. | Opus |
|
|
176
|
-
| **system-architect** | Architecture and design specialist. Module boundaries, dependency graphs, migration strategies, and cross-project design decisions. | Opus |
|
|
177
|
-
| **code-reviewer** | Reviews code changes for production readiness. Catches correctness, maintainability, and testing issues. | Haiku |
|
|
178
|
-
| **docs-researcher** | Handles documentation writing, research synthesis, and document-heavy analysis tasks. | Opus |
|
|
210
|
+
ARCS builds a relationship graph across all project entities:
|
|
179
211
|
|
|
180
|
-
|
|
212
|
+
| Edge Type | Weight | Connects |
|
|
213
|
+
|-----------|--------|----------|
|
|
214
|
+
| `task_belongs_to_plan` | 1.0 | Task → Plan |
|
|
215
|
+
| `task_blocks_task` | 0.95 | Task → Task (from `dependsOn`) |
|
|
216
|
+
| `shares_source_file` | 0.9 | Any → Any (co-reference) |
|
|
217
|
+
| `knowledge_touches_file` | 0.85 | Knowledge → File |
|
|
218
|
+
| `plan_contains_task` | 0.8 | Plan → Task |
|
|
219
|
+
| `shares_keywords` | 0.5 | Knowledge → Knowledge |
|
|
181
220
|
|
|
182
|
-
|
|
221
|
+
Queries: `arcs search` uses BM25 for text + graph traversal (weighted BFS) for relationship scoring. `arcs next` enriches results with related knowledge from the graph.
|
|
183
222
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
### Work Mode (select exactly one per code-change dispatch)
|
|
223
|
+
---
|
|
187
224
|
|
|
188
|
-
|
|
189
|
-
|---|---|
|
|
190
|
-
| `quick-dev` | Fully bounded — rename, refactor, config nudge, trivial bugfix |
|
|
191
|
-
| `code-agent` | 50–90% clear, 1–2 open decisions resolvable from the repo |
|
|
192
|
-
| `test-driven-development` | New feature or bugfix — test-first discipline adds value |
|
|
193
|
-
| `brainstorming` | Design open, product direction genuinely unclear |
|
|
225
|
+
## Sub-Agents
|
|
194
226
|
|
|
195
|
-
|
|
227
|
+
The orchestrator dispatches specialist sub-agents with scoped prompts:
|
|
196
228
|
|
|
197
|
-
|
|
|
198
|
-
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
|
|
|
229
|
+
| Sub-Agent | Role | When |
|
|
230
|
+
|-----------|------|------|
|
|
231
|
+
| **software-engineer** | Writes code, runs tests | EXECUTE — bounded tasks |
|
|
232
|
+
| **system-architect** | Module boundaries, plan creation | BRAINSTORM — design-open |
|
|
233
|
+
| **tech-architect** | Deep analysis, trade-offs | Analysis without edits |
|
|
234
|
+
| **oncall-ops** | Debugging, log triage, bisect | Bugs, test failures |
|
|
235
|
+
| **code-reviewer** | Pre-merge review | PR review, phase gates |
|
|
236
|
+
| **devil-advocate** | Adversarial KISS/YAGNI/DRY gate | Phase boundaries |
|
|
237
|
+
| **arcs-docs** | DAG health, knowledge curation | SYNC workflow |
|
|
205
238
|
|
|
206
|
-
###
|
|
239
|
+
### Skills (loaded per-dispatch)
|
|
207
240
|
|
|
208
|
-
|
|
|
209
|
-
|
|
210
|
-
|
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
| `caveman-commit` | Writing git commit messages in ARCS Caveman mode |
|
|
241
|
+
| Category | Skills |
|
|
242
|
+
|----------|--------|
|
|
243
|
+
| **Work mode** (pick one) | `quick-dev`, `code-agent`, `test-driven-development`, `brainstorming` |
|
|
244
|
+
| **Lifecycle** | `writing-plans`, `executing-plans`, `subagent-driven-development` |
|
|
245
|
+
| **Quality** | `requesting-code-review`, `deep-pr-review`, `systematic-debugging` |
|
|
246
|
+
| **Tooling** | `to-diagram`, `init-project`, `caveman-commit` |
|
|
215
247
|
|
|
216
248
|
---
|
|
217
249
|
|
|
@@ -219,230 +251,104 @@ Skills are instruction sets loaded on demand. The orchestrator auto-layers them
|
|
|
219
251
|
|
|
220
252
|
```
|
|
221
253
|
~/.arcs/
|
|
222
|
-
├── meta.json
|
|
223
|
-
└── projects/
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
├──
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
│ └── {planId}.diagram.mmd # Mermaid execution map (agents read this first)
|
|
237
|
-
└── knowledge/
|
|
238
|
-
├── index.json
|
|
239
|
-
├── {entryId}.meta.json
|
|
240
|
-
└── {entryId}.md # Knowledge entry body
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Summary Docs vs Structured Stores
|
|
244
|
-
|
|
245
|
-
| Layer | Files | Purpose |
|
|
246
|
-
|---|---|---|
|
|
247
|
-
| **Summary docs** | `overview.md`, `tasks.md`, `dependencies.md`, `knowledge.md` | Quick-orientation landing pages — short, scannable, always current |
|
|
248
|
-
| **Structured stores** | `plans/*.md`, `knowledge/*.md`, `tasks/index.json` | Full documents with indexed metadata — durable, searchable, detailed |
|
|
249
|
-
|
|
250
|
-
### Project Lifecycle
|
|
251
|
-
|
|
252
|
-
```
|
|
253
|
-
draft → active → completed → archived
|
|
254
|
+
├── meta.json # Global registry
|
|
255
|
+
└── projects/{slug}/
|
|
256
|
+
├── meta.json # Project metadata + workspace paths
|
|
257
|
+
├── overview.md # Summary + goals
|
|
258
|
+
├── tasks.md # Rendered task queue (human-readable)
|
|
259
|
+
├── tasks/index.json # Structured tasks + dependsOn edges
|
|
260
|
+
├── plans/
|
|
261
|
+
│ ├── {id}.meta.json # Plan status + keywords
|
|
262
|
+
│ ├── {id}.md # Plan body
|
|
263
|
+
│ └── {id}.diagram.mmd # Mermaid execution map (auto-generated arrows)
|
|
264
|
+
└── knowledge/
|
|
265
|
+
├── index.json # Knowledge index
|
|
266
|
+
├── {id}.meta.json # Metadata (kind, audience, sourceFiles)
|
|
267
|
+
└── {id}.md # Entry body
|
|
254
268
|
```
|
|
255
269
|
|
|
256
|
-
###
|
|
257
|
-
|
|
258
|
-
Each plan has an associated `.diagram.mmd` file — a Mermaid flowchart that serves as the **agent execution map**. Agents read the diagram first for task selection before loading plan prose.
|
|
259
|
-
|
|
260
|
-
Node status is encoded via `classDef`:
|
|
270
|
+
### Knowledge Kinds
|
|
261
271
|
|
|
262
|
-
|
|
263
|
-
|---|---|
|
|
264
|
-
| `:::backlog` | Not started |
|
|
265
|
-
| `:::in_progress` | Active |
|
|
266
|
-
| `:::done` | Complete |
|
|
267
|
-
| `:::blocked` | Waiting on dependency |
|
|
272
|
+
8 structured categories: `lesson`, `gotcha`, `pattern`, `architecture`, `module`, `feature`, `reference`, `decision`.
|
|
268
273
|
|
|
269
274
|
---
|
|
270
275
|
|
|
271
|
-
##
|
|
272
|
-
|
|
273
|
-
Registering a workspace path enables two features:
|
|
274
|
-
|
|
275
|
-
**1. Context resolution** — `arcs context --path=/path/to/repo` matches the directory to its ARCS project and returns the operating brief, current focus, active plans, and relevant knowledge.
|
|
276
|
-
|
|
277
|
-
**2. AGENTS.md generation** — `arcs sync-agents-md <slug>` assembles a coding guardrail document from three sources and symlinks it into each workspace:
|
|
278
|
-
|
|
279
|
-
| Source | Content |
|
|
280
|
-
|---|---|
|
|
281
|
-
| Coding discipline | Non-negotiable rules (DRY, single responsibility, etc.) |
|
|
282
|
-
| Codebase analysis | LLM-provided scan of tech stack, patterns, file structure |
|
|
283
|
-
| Project context | ARCS overview, current focus, dependencies, active plans |
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
## Development
|
|
276
|
+
## Quick Start
|
|
288
277
|
|
|
289
|
-
|
|
278
|
+
**1. Install**
|
|
290
279
|
|
|
291
280
|
```bash
|
|
292
|
-
npm install
|
|
293
|
-
npm run build
|
|
281
|
+
npm install -g @rryando/arcs
|
|
294
282
|
```
|
|
295
283
|
|
|
296
|
-
|
|
284
|
+
Registers `arcs` CLI, creates `~/.arcs/`, deploys agents + skills to `~/.config/opencode/`.
|
|
297
285
|
|
|
298
|
-
|
|
299
|
-
|---|---|
|
|
300
|
-
| `npm run build` | Compile TypeScript → `dist/` |
|
|
301
|
-
| `npm run dev` | Watch mode (rebuild on change) |
|
|
302
|
-
| `npm test` | Run Vitest test suite (62 test files, 685 tests) |
|
|
303
|
-
| `npm run typecheck` | Type check without emit |
|
|
304
|
-
| `npm run lint` | Biome lint + format check |
|
|
305
|
-
| `npm run lint:fix` | Auto-fix lint and format issues |
|
|
306
|
-
| `npm run format` | Format only |
|
|
286
|
+
**2. Track a project**
|
|
307
287
|
|
|
308
|
-
Full quality gate before committing:
|
|
309
288
|
```bash
|
|
310
|
-
|
|
289
|
+
cd your-project
|
|
290
|
+
arcs init
|
|
311
291
|
```
|
|
312
292
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
| Pattern | Detail |
|
|
316
|
-
|---|---|
|
|
317
|
-
| Framework | Vitest |
|
|
318
|
-
| DAG isolation | `withTempDataDir()` — each test gets a fresh `~/.arcs/` |
|
|
319
|
-
| No mocks | Core DAG I/O tests operate on real (temp) filesystem |
|
|
320
|
-
| Test location | All tests in `test/` (not co-located with source) |
|
|
321
|
-
|
|
322
|
-
### Environment
|
|
293
|
+
**3. Use it**
|
|
323
294
|
|
|
324
295
|
```bash
|
|
325
|
-
#
|
|
326
|
-
|
|
296
|
+
arcs brief # What should I work on?
|
|
297
|
+
arcs next # Get next unblocked task
|
|
298
|
+
arcs done <taskId> # Mark complete, unblock dependents
|
|
299
|
+
arcs remember "..." # Capture what I learned
|
|
327
300
|
```
|
|
328
301
|
|
|
329
|
-
|
|
302
|
+
Or select **ARCS Orchestrator** in OpenCode for full automation.
|
|
330
303
|
|
|
331
|
-
|
|
304
|
+
---
|
|
332
305
|
|
|
333
|
-
|
|
306
|
+
## Prerequisites
|
|
334
307
|
|
|
335
|
-
|
|
|
336
|
-
|
|
337
|
-
|
|
|
338
|
-
|
|
|
339
|
-
|
|
|
340
|
-
| 4. Dry-run | `arcs deploy-superpowers --dry-run` | Review `filesAdded / filesChanged / filesRemoved` |
|
|
341
|
-
| 5. Deploy | `arcs deploy-superpowers` | Writes to `~/.config/opencode/` |
|
|
342
|
-
| 6. Restart | Restart OpenCode / IDE | Skills load at startup |
|
|
308
|
+
| Tool | Required | Notes |
|
|
309
|
+
|------|----------|-------|
|
|
310
|
+
| [Node.js](https://nodejs.org/) v18+ | Yes | Runtime |
|
|
311
|
+
| [OpenCode](https://opencode.ai/) | Recommended | Agent host (orchestrator + sub-agents) |
|
|
312
|
+
| [graphify](https://github.com/safishamsi/graphify) | No | Optional AST-based codebase knowledge extraction |
|
|
343
313
|
|
|
344
314
|
---
|
|
345
315
|
|
|
346
|
-
## Graphify
|
|
316
|
+
## Graphify (Optional)
|
|
347
317
|
|
|
348
|
-
|
|
318
|
+
When [graphify](https://github.com/safishamsi/graphify) is on PATH, ARCS auto-extracts structural knowledge during INIT and SYNC:
|
|
349
319
|
|
|
350
|
-
|
|
320
|
+
| Category | Cap | What |
|
|
321
|
+
|----------|-----|------|
|
|
322
|
+
| God nodes | 8 | Highest-connectivity modules |
|
|
323
|
+
| Clusters | 8 | Directory-based module boundaries |
|
|
324
|
+
| Couplings | 5 | Cross-module dependency links |
|
|
351
325
|
|
|
352
|
-
|
|
326
|
+
---
|
|
353
327
|
|
|
354
|
-
|
|
355
|
-
|---|---|---|
|
|
356
|
-
| God nodes | 8 | Highest-connectivity modules — likely architectural hubs |
|
|
357
|
-
| Architecture clusters | 8 | Directory-based groupings revealing module boundaries |
|
|
358
|
-
| Cross-module couplings | 5 | Links between high-degree nodes across top-level directories |
|
|
328
|
+
## Development
|
|
359
329
|
|
|
360
|
-
|
|
330
|
+
```bash
|
|
331
|
+
git clone https://github.com/rryando/arcs.git
|
|
332
|
+
cd arcs && npm install && npm run build
|
|
333
|
+
```
|
|
361
334
|
|
|
362
|
-
|
|
|
363
|
-
|
|
364
|
-
| `
|
|
365
|
-
|
|
|
366
|
-
|
|
|
335
|
+
| Command | Description |
|
|
336
|
+
|---------|-------------|
|
|
337
|
+
| `npm run build` | Compile TypeScript to `dist/` |
|
|
338
|
+
| `npm test` | Vitest suite (67 files, 744 tests) |
|
|
339
|
+
| `npm run typecheck` | Type check without emit |
|
|
340
|
+
| `npm run lint` | Biome lint + format |
|
|
367
341
|
|
|
368
|
-
|
|
342
|
+
### Bundle Workflow
|
|
369
343
|
|
|
370
|
-
|
|
344
|
+
```bash
|
|
345
|
+
npm run build:opencode-bundle # Build agent/skill bundle
|
|
346
|
+
arcs lint-bundle # Validate bundle integrity
|
|
347
|
+
arcs deploy-superpowers # Deploy to ~/.config/opencode/
|
|
348
|
+
```
|
|
371
349
|
|
|
372
350
|
---
|
|
373
351
|
|
|
374
|
-
##
|
|
352
|
+
## License
|
|
375
353
|
|
|
376
|
-
|
|
377
|
-
arcs/
|
|
378
|
-
├── src/
|
|
379
|
-
│ ├── index.ts # Main entry point — dispatches to CLI
|
|
380
|
-
│ ├── cli/
|
|
381
|
-
│ │ ├── index.ts # Registry-first CLI router + fallback
|
|
382
|
-
│ │ ├── command-registry.ts # Declarative command registration system
|
|
383
|
-
│ │ ├── arg-parser.ts # Schema-driven argument parser
|
|
384
|
-
│ │ ├── output-envelope.ts # Structured JSON output ({ok, data} / {ok, code, message})
|
|
385
|
-
│ │ ├── help-generator.ts # Auto-generated help text from registry
|
|
386
|
-
│ │ ├── dag-commands.ts # LEGACY: thin delegation shell (backward-compat)
|
|
387
|
-
│ │ ├── brief-renderer.ts # Renders brief output for arcs brief command
|
|
388
|
-
│ │ ├── md-renderer.ts # Markdown rendering utilities
|
|
389
|
-
│ │ ├── bundle-installer.ts # OpenCode bundle installer
|
|
390
|
-
│ │ ├── setup.ts # Interactive setup wizard
|
|
391
|
-
│ │ ├── lean-output.ts # --lean flag support (strip timestamps)
|
|
392
|
-
│ │ ├── arcs-orchestrate.ts # Orchestrator prompt content
|
|
393
|
-
│ │ ├── status-dashboard.ts # TTY status overview
|
|
394
|
-
│ │ └── commands/ # 17 focused command modules (≤400 lines each)
|
|
395
|
-
│ │ ├── index.ts # Trigger all command registrations (side-effects)
|
|
396
|
-
│ │ ├── brief.ts # T0 operating brief
|
|
397
|
-
│ │ ├── next.ts # arcs next — get next task + related knowledge
|
|
398
|
-
│ │ ├── done.ts # arcs done — mark task complete (--learn flag)
|
|
399
|
-
│ │ ├── remember.ts # arcs remember — capture knowledge (auto-classify)
|
|
400
|
-
│ │ ├── status.ts # arcs status — progress overview
|
|
401
|
-
│ │ ├── project.ts # project list, get, init, validate
|
|
402
|
-
│ │ ├── project-updates.ts # project update-doc, update-status, update-paths
|
|
403
|
-
│ │ ├── task.ts # task list, get, create, transition, update, delete
|
|
404
|
-
│ │ ├── plan.ts # plan list, get, create, update-meta, update-body, delete
|
|
405
|
-
│ │ ├── knowledge.ts # knowledge CRUD
|
|
406
|
-
│ │ ├── knowledge-search.ts # Dedicated knowledge search
|
|
407
|
-
│ │ ├── utility.ts # context, search, agents-md, validate
|
|
408
|
-
│ │ ├── batch.ts # batch operations
|
|
409
|
-
│ │ ├── graph.ts # related, graph inspect
|
|
410
|
-
│ │ ├── diagnostics.ts # audit, diff
|
|
411
|
-
│ │ ├── diagram.ts # diagram ready/inspect/validate/status/show
|
|
412
|
-
│ │ ├── dependency.ts # dependency add/remove
|
|
413
|
-
│ │ ├── maintenance.ts # git-log, sync-agents-md
|
|
414
|
-
│ │ ├── bundle.ts # lint-bundle, deploy-superpowers
|
|
415
|
-
│ │ └── loop.ts # loop start, cancel, status
|
|
416
|
-
│ ├── retrieval/
|
|
417
|
-
│ │ ├── bm25.ts # BM25 full-text scoring
|
|
418
|
-
│ │ ├── graph-retrieval.ts # Graph-based related-entity retrieval
|
|
419
|
-
│ │ ├── knowledge-selection.ts # Graph+BM25 knowledge selection for context
|
|
420
|
-
│ │ └── graph-cache.ts # Graph index caching + invalidation
|
|
421
|
-
│ └── utils/
|
|
422
|
-
│ ├── dag.ts # Core DAG I/O
|
|
423
|
-
│ ├── project-memory.ts # Barrel re-exporting split modules below
|
|
424
|
-
│ ├── storage-utils.ts # Shared enums, types, filesystem helpers
|
|
425
|
-
│ ├── plan-store.ts # Plan CRUD operations
|
|
426
|
-
│ ├── knowledge-store.ts # Knowledge CRUD operations
|
|
427
|
-
│ ├── task-store.ts # Task CRUD operations
|
|
428
|
-
│ ├── paths.ts # Data dir and project path helpers
|
|
429
|
-
│ ├── workflow-policy.ts # deriveOperatingBrief(), WorkflowSurface
|
|
430
|
-
│ ├── schemas.ts # Shared Zod schemas
|
|
431
|
-
│ ├── graphify.ts # Graphify integration (detect, extract, ingest)
|
|
432
|
-
│ ├── graphify-knowledge.ts # Graphify→knowledge entry ingestion helpers
|
|
433
|
-
│ ├── diagram-generator.ts # Generate Mermaid diagrams from task metadata
|
|
434
|
-
│ ├── errors.ts # Error factory functions
|
|
435
|
-
│ └── file-lock.ts # Advisory file locking for concurrent writes
|
|
436
|
-
├── opencode/arcs/
|
|
437
|
-
│ ├── skills/ # Agent skill instruction sets (15 skills)
|
|
438
|
-
│ ├── prompts/ # Sub-agent prompt definitions (8 agents)
|
|
439
|
-
│ ├── manifest.json # Bundle install manifest
|
|
440
|
-
│ └── bundle-runtime.json # Curated runtime payload
|
|
441
|
-
├── scripts/
|
|
442
|
-
│ ├── arcs-cli.mjs # CLI entry wrapper (bin)
|
|
443
|
-
│ └── build-opencode-bundle.mjs # Build bundle
|
|
444
|
-
└── test/ # Vitest test suite (62 files, 685 tests)
|
|
445
|
-
└── helpers/
|
|
446
|
-
├── cli-runner.ts # runCommand() for registry-path invocation
|
|
447
|
-
└── temp-data-dir.ts # withTempDataDir() — isolated DAG state
|
|
448
|
-
```
|
|
354
|
+
MIT
|