agent-control-plane 0.3.0 → 0.6.0

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.
Files changed (106) hide show
  1. package/README.md +141 -28
  2. package/assets/workflow-catalog.json +1 -1
  3. package/bin/pr-risk.sh +22 -7
  4. package/bin/sync-pr-labels.sh +1 -1
  5. package/hooks/heartbeat-hooks.sh +125 -12
  6. package/hooks/issue-reconcile-hooks.sh +1 -1
  7. package/hooks/pr-reconcile-hooks.sh +1 -1
  8. package/npm/bin/agent-control-plane.js +257 -59
  9. package/package.json +39 -32
  10. package/tools/bin/debug-session.sh +106 -0
  11. package/tools/bin/flow-config-lib.sh +1203 -60
  12. package/tools/bin/flow-runtime-doctor-linux.sh +136 -0
  13. package/tools/bin/flow-runtime-doctor.sh +5 -1
  14. package/tools/bin/flow-shell-lib.sh +32 -0
  15. package/tools/bin/github-core-rate-limit-state.sh +77 -0
  16. package/tools/bin/github-write-outbox.sh +470 -0
  17. package/tools/bin/heartbeat-loop-scheduling-lib.sh +7 -7
  18. package/tools/bin/heartbeat-safe-auto.sh +42 -0
  19. package/tools/bin/install-project-launchd.sh +17 -2
  20. package/tools/bin/install-project-systemd.sh +255 -0
  21. package/tools/bin/project-init.sh +21 -1
  22. package/tools/bin/project-launchd-bootstrap.sh +5 -1
  23. package/tools/bin/project-runtimectl.sh +91 -2
  24. package/tools/bin/project-systemd-bootstrap.sh +74 -0
  25. package/tools/bin/scaffold-profile.sh +61 -3
  26. package/tools/bin/uninstall-project-systemd.sh +87 -0
  27. package/tools/dashboard/app.js +228 -6
  28. package/tools/dashboard/dashboard_snapshot.py +55 -0
  29. package/tools/dashboard/issue_queue_state.py +101 -0
  30. package/tools/dashboard/server.py +123 -1
  31. package/tools/dashboard/styles.css +526 -455
  32. package/tools/templates/pr-fix-template.md +3 -1
  33. package/tools/templates/pr-merge-repair-template.md +2 -1
  34. package/references/architecture.md +0 -217
  35. package/references/commands.md +0 -128
  36. package/references/control-plane-map.md +0 -124
  37. package/references/docs-map.md +0 -73
  38. package/references/release-checklist.md +0 -65
  39. package/references/repo-map.md +0 -36
  40. package/tools/bin/agent-cleanup-worktree +0 -247
  41. package/tools/bin/agent-github-update-labels +0 -71
  42. package/tools/bin/agent-init-worktree +0 -216
  43. package/tools/bin/agent-project-archive-run +0 -52
  44. package/tools/bin/agent-project-capture-worker +0 -46
  45. package/tools/bin/agent-project-catch-up-issue-pr-links +0 -118
  46. package/tools/bin/agent-project-catch-up-merged-prs +0 -194
  47. package/tools/bin/agent-project-catch-up-scheduled-issue-retries +0 -123
  48. package/tools/bin/agent-project-cleanup-session +0 -513
  49. package/tools/bin/agent-project-detached-launch +0 -127
  50. package/tools/bin/agent-project-heartbeat-loop +0 -1029
  51. package/tools/bin/agent-project-open-issue-worktree +0 -89
  52. package/tools/bin/agent-project-open-pr-worktree +0 -80
  53. package/tools/bin/agent-project-publish-issue-pr +0 -465
  54. package/tools/bin/agent-project-reconcile-issue-session +0 -1398
  55. package/tools/bin/agent-project-reconcile-pr-session +0 -1230
  56. package/tools/bin/agent-project-retry-state +0 -147
  57. package/tools/bin/agent-project-run-claude-session +0 -805
  58. package/tools/bin/agent-project-run-codex-resilient +0 -955
  59. package/tools/bin/agent-project-run-codex-session +0 -435
  60. package/tools/bin/agent-project-run-kilo-session +0 -369
  61. package/tools/bin/agent-project-run-ollama-session +0 -658
  62. package/tools/bin/agent-project-run-openclaw-session +0 -1309
  63. package/tools/bin/agent-project-run-opencode-session +0 -377
  64. package/tools/bin/agent-project-run-pi-session +0 -479
  65. package/tools/bin/agent-project-sync-anchor-repo +0 -139
  66. package/tools/bin/agent-project-worker-status +0 -188
  67. package/tools/bin/branch-verification-guard.sh +0 -364
  68. package/tools/bin/capture-worker.sh +0 -18
  69. package/tools/bin/cleanup-worktree.sh +0 -52
  70. package/tools/bin/codex-quota +0 -31
  71. package/tools/bin/create-follow-up-issue.sh +0 -114
  72. package/tools/bin/dashboard-launchd-bootstrap.sh +0 -50
  73. package/tools/bin/issue-publish-localization-guard.sh +0 -142
  74. package/tools/bin/issue-publish-scope-guard.sh +0 -242
  75. package/tools/bin/issue-requires-local-workspace-install.sh +0 -31
  76. package/tools/bin/issue-resource-class.sh +0 -12
  77. package/tools/bin/kick-scheduler.sh +0 -75
  78. package/tools/bin/label-follow-up-issues.sh +0 -14
  79. package/tools/bin/new-pr-worktree.sh +0 -50
  80. package/tools/bin/new-worktree.sh +0 -49
  81. package/tools/bin/pr-risk.sh +0 -12
  82. package/tools/bin/prepare-worktree.sh +0 -142
  83. package/tools/bin/provider-cooldown-state.sh +0 -204
  84. package/tools/bin/publish-issue-worker.sh +0 -31
  85. package/tools/bin/reconcile-bootstrap-lib.sh +0 -113
  86. package/tools/bin/reconcile-issue-worker.sh +0 -34
  87. package/tools/bin/reconcile-pr-worker.sh +0 -34
  88. package/tools/bin/record-verification.sh +0 -71
  89. package/tools/bin/render-flow-config.sh +0 -98
  90. package/tools/bin/resident-issue-controller-lib.sh +0 -448
  91. package/tools/bin/resident-issue-queue-status.py +0 -35
  92. package/tools/bin/retry-state.sh +0 -31
  93. package/tools/bin/reuse-issue-worktree.sh +0 -121
  94. package/tools/bin/run-codex-bypass.sh +0 -3
  95. package/tools/bin/run-codex-safe.sh +0 -3
  96. package/tools/bin/run-codex-task.sh +0 -280
  97. package/tools/bin/serve-dashboard.sh +0 -5
  98. package/tools/bin/split-retained-slice.sh +0 -124
  99. package/tools/bin/start-issue-worker.sh +0 -943
  100. package/tools/bin/start-pr-fix-worker.sh +0 -491
  101. package/tools/bin/start-pr-merge-repair-worker.sh +0 -8
  102. package/tools/bin/start-pr-review-worker.sh +0 -261
  103. package/tools/bin/start-resident-issue-loop.sh +0 -499
  104. package/tools/bin/update-github-labels.sh +0 -14
  105. package/tools/bin/worker-status.sh +0 -19
  106. package/tools/bin/workflow-catalog.sh +0 -77
@@ -11,6 +11,7 @@ PR metadata:
11
11
  - PR: {PR_NUMBER} - {PR_TITLE}
12
12
  - URL: {PR_URL}
13
13
  - Base branch: {PR_BASE_REF}
14
+ - Base tracking ref: {PR_BASE_TRACKING_REF}
14
15
  - Head branch: {PR_HEAD_REF}
15
16
  - Linked issue: {PR_LINKED_ISSUE_ID}
16
17
  - Risk classification: {PR_RISK}
@@ -55,7 +56,7 @@ Required flow:
55
56
 
56
57
  1. Inspect the current diff and the failing/pending CI signals first:
57
58
  - `openspec list` if the repo uses OpenSpec
58
- - `git diff --stat origin/main...HEAD`
59
+ - `git diff --stat {PR_BASE_TRACKING_REF}...HEAD`
59
60
  - `git status --short`
60
61
  - if `Merge state` is not `CLEAN` or `Mergeable` is `FALSE`, treat branch drift/conflicts as the concrete blocker first
61
62
  - if `Actionable current-head review findings` is not `- none`, treat those findings as the concrete blockers to address first
@@ -68,6 +69,7 @@ Required flow:
68
69
  - do not run `git fetch`, `git merge`, `git rebase`, `git commit`, `git push`, or other Git metadata-writing commands from inside this worker; host-side wrappers own those steps
69
70
  3. If the blocker is branch drift or a merge conflict, use the already-prepared local refs and make the smallest branch-local source update needed to restore mergeability on this PR branch. Keep the resolution scoped to the PR intent; do not rewrite unrelated code.
70
71
  - Treat `Current local merge-conflict paths` as the authoritative conflict list to clear.
72
+ - Treat `{PR_BASE_TRACKING_REF}` as the authoritative base ref for any read-only diff or merge-base inspection.
71
73
  - Do not stop after fixing only one file if other conflict paths remain.
72
74
  - Before you declare success, rerun local merge simulation and confirm there are no remaining conflict paths for this branch against `{PR_BASE_REF}`.
73
75
  4. Make the smallest change that fixes the concrete PR blockers on this existing branch.
@@ -11,6 +11,7 @@ PR metadata:
11
11
  - PR: {PR_NUMBER} - {PR_TITLE}
12
12
  - URL: {PR_URL}
13
13
  - Base branch: {PR_BASE_REF}
14
+ - Base tracking ref: {PR_BASE_TRACKING_REF}
14
15
  - Head branch: {PR_HEAD_REF}
15
16
  - Linked issue: {PR_LINKED_ISSUE_ID}
16
17
  - Risk classification: {PR_RISK}
@@ -43,7 +44,7 @@ PR body:
43
44
  Required flow:
44
45
 
45
46
  1. Treat this worktree as an already-prepared merge repair state from host control-plane.
46
- - `origin/{PR_BASE_REF}` has already been merged into this worktree locally.
47
+ - `{PR_BASE_TRACKING_REF}` has already been merged into this worktree locally.
47
48
  - if `Current unresolved merge-conflict paths` is not `- none detected after host merge preparation`, resolve those files first.
48
49
  2. Never run Git control commands from inside the worker:
49
50
  - do not run `git fetch`, `git pull`, `git merge`, `git rebase`, `git commit`, `git push`, or any command that writes Git metadata
@@ -1,217 +0,0 @@
1
- # Architecture Guide
2
-
3
- This document explains how `agent-control-plane` is put together as an
4
- operator-facing system, not just a collection of scripts.
5
-
6
- ACP has five practical layers:
7
-
8
- 1. package entrypoint and staging
9
- 2. profile installation and publication
10
- 3. runtime supervision and heartbeat scheduling
11
- 4. worker execution and reconcile
12
- 5. dashboard and operator visibility
13
-
14
- If you are reading the repo for the first time, start with the system overview
15
- diagram below, then jump to the flow you care about most.
16
-
17
- ## System Overview
18
-
19
- ```mermaid
20
- flowchart LR
21
- User[Operator] --> CLI["npm/bin/agent-control-plane.js"]
22
-
23
- CLI --> Init["project-init.sh"]
24
- CLI --> Sync["sync-shared-agent-home.sh"]
25
- CLI --> RuntimeCtl["project-runtimectl.sh"]
26
- CLI --> DashboardCmd["serve-dashboard.sh"]
27
-
28
- Init --> Profiles["Profile registry\n~/.agent-runtime/control-plane/profiles/<id>"]
29
- Sync --> RuntimeHome["Runtime home\n~/.agent-runtime/runtime-home"]
30
-
31
- RuntimeCtl --> Supervisor["project-runtime-supervisor.sh"]
32
- Supervisor --> Bootstrap["project-launchd-bootstrap.sh"]
33
- Bootstrap --> Heartbeat["heartbeat-safe-auto.sh"]
34
- Heartbeat --> Scheduler["agent-project-heartbeat-loop"]
35
-
36
- Scheduler --> IssueWorkers["start-issue-worker.sh"]
37
- Scheduler --> PRWorkers["start-pr-review-worker.sh\nstart-pr-fix-worker.sh\nstart-pr-merge-repair-worker.sh"]
38
- IssueWorkers --> Router["run-codex-task.sh"]
39
- PRWorkers --> Router
40
-
41
- Router --> Codex["agent-project-run-codex-session"]
42
- Router --> Claude["agent-project-run-claude-session"]
43
- Router --> OpenClaw["agent-project-run-openclaw-session"]
44
- Router --> Ollama["agent-project-run-ollama-session"]
45
- Router --> Pi["agent-project-run-pi-session"]
46
- Router --> OpenCode["agent-project-run-opencode-session"]
47
- Router --> Kilo["agent-project-run-kilo-session"]
48
-
49
- Codex --> Artifacts["run.env / runner.env /\nresult.env / verification.jsonl"]
50
- Claude --> Artifacts
51
- OpenClaw --> Artifacts
52
- Ollama --> Artifacts
53
- Pi --> Artifacts
54
- OpenCode --> Artifacts
55
- Kilo --> Artifacts
56
-
57
- Artifacts --> Reconcile["reconcile-issue-worker.sh\nreconcile-pr-worker.sh"]
58
- Reconcile --> GitHub["GitHub issues / PRs / labels / comments"]
59
- Reconcile --> History["runs/ + history/ + state/"]
60
-
61
- DashboardCmd --> Snapshot["dashboard_snapshot.py"]
62
- Snapshot --> Profiles
63
- Snapshot --> History
64
- Snapshot --> Browser["Local dashboard browser"]
65
- ```
66
-
67
- The important architectural choice is that ACP separates:
68
-
69
- - package distribution from runtime execution
70
- - shared engine logic from per-profile config
71
- - worker execution from reconcile and GitHub side effects
72
- - operator visibility from the worker CLIs themselves
73
-
74
- ## Install and Publication Flow
75
-
76
- This is the path from `npx agent-control-plane ...` to a usable runtime on disk.
77
-
78
- ```mermaid
79
- sequenceDiagram
80
- participant User
81
- participant CLI as agent-control-plane.js
82
- participant Stage as staged shared-home
83
- participant Init as project-init.sh
84
- participant Scaffold as scaffold-profile.sh
85
- participant Smoke as profile-smoke.sh
86
- participant Adopt as profile-adopt.sh
87
- participant Sync as sync-shared-agent-home.sh
88
-
89
- User->>CLI: npx agent-control-plane init ...
90
- CLI->>Stage: copy packaged skill into temp shared-home
91
- CLI->>Init: forward command with staged env
92
- Init->>Scaffold: write control-plane.yaml + profile docs
93
- Init->>Smoke: validate profile contract
94
- Init->>Adopt: create runtime roots / sync anchor repo / workspace
95
- Init->>Sync: publish shared runtime into ~/.agent-runtime/runtime-home
96
- ```
97
-
98
- Why this split exists:
99
-
100
- - the npm package is treated as a distribution artifact
101
- - the real runtime is copied into `~/.agent-runtime/runtime-home`
102
- - installed profiles live outside the package in
103
- `~/.agent-runtime/control-plane/profiles/<id>`
104
- - upgrades are therefore explicit and repeatable instead of depending on a temp
105
- `npx` cache directory
106
-
107
- ## Runtime Scheduler Loop
108
-
109
- This is the heartbeat path ACP follows after `runtime start`.
110
-
111
- ```mermaid
112
- flowchart TD
113
- Start["runtime start"] --> RuntimeCtl["project-runtimectl.sh"]
114
- RuntimeCtl --> Supervisor["project-runtime-supervisor.sh"]
115
- Supervisor --> Bootstrap["project-launchd-bootstrap.sh"]
116
- Bootstrap --> SyncCheck["sync runtime copy if needed"]
117
- SyncCheck --> Heartbeat["heartbeat-safe-auto.sh"]
118
- Heartbeat --> Preflight["locks / quota preflight /\nretained-worktree audit"]
119
- Preflight --> SharedLoop["agent-project-heartbeat-loop"]
120
-
121
- SharedLoop --> ReconcileCompleted["reconcile completed sessions"]
122
- SharedLoop --> Capacity["compute capacity / cooldown / pending launches"]
123
- SharedLoop --> Workflows["select workflow lane from issue + PR state"]
124
-
125
- Workflows --> IssueImplementation["issue implementation"]
126
- Workflows --> IssueScheduled["scheduled issue checks"]
127
- Workflows --> IssueRecovery["blocked recovery"]
128
- Workflows --> PRReview["PR review"]
129
- Workflows --> PRFix["PR fix"]
130
- Workflows --> PRMergeRepair["merge repair"]
131
- ```
132
-
133
- Key detail: the shared scheduler owns the control logic around workers:
134
-
135
- - concurrency and heavy-worker limits
136
- - cooldown and retry gating
137
- - resident recurring and scheduled issue lanes
138
- - launch ordering
139
- - summary output and queue visibility
140
-
141
- That is why workers do not need to be "smart" about the entire system. The
142
- workflow around them carries a lot of the operational burden.
143
-
144
- ## Worker Session Lifecycle
145
-
146
- This is the path from one chosen issue or PR to a reconciled outcome.
147
-
148
- ```mermaid
149
- flowchart LR
150
- Pick["heartbeat selects issue or PR"] --> Launch["start-issue-worker.sh\nor start-pr-*.sh"]
151
- Launch --> Worktree["open or reuse managed worktree"]
152
- Worktree --> Prompt["render prompt + context files"]
153
- Prompt --> Route["run-codex-task.sh"]
154
-
155
- Route --> Backend["Codex / Claude / OpenClaw adapter"]
156
- Backend --> Session["backend session wrapper"]
157
- Session --> Output["result.env / comments /\nverification.jsonl / runner.env"]
158
-
159
- Output --> Reconcile["agent-project-reconcile-issue-session\nor agent-project-reconcile-pr-session"]
160
- Reconcile --> Labels["update labels / retry state /\nresident metadata / cooldown"]
161
- Reconcile --> Publish["comment on issue, open PR,\nor leave blocked report"]
162
- Reconcile --> Archive["archive run into history root"]
163
- ```
164
-
165
- The contract here is deliberate:
166
-
167
- - worker backends focus on producing work and result artifacts
168
- - reconcile scripts own the final interpretation and GitHub-facing outcome
169
- - resident metadata and history are updated by the host workflow, not by the
170
- worker trying to infer the entire system state
171
-
172
- ## Dashboard Snapshot Pipeline
173
-
174
- The dashboard is a read-only window into ACP state. It does not own scheduling.
175
-
176
- ```mermaid
177
- flowchart LR
178
- Browser["browser"] --> Server["tools/dashboard/server.py"]
179
- Server --> API["GET /api/snapshot.json"]
180
- API --> Snapshot["dashboard_snapshot.py"]
181
-
182
- Snapshot --> Registry["profile registry"]
183
- Snapshot --> Config["render-flow-config.sh"]
184
- Snapshot --> WorkerStatus["agent-project-worker-status"]
185
- Snapshot --> Runs["runs/ history/ state/"]
186
-
187
- Registry --> JSON["snapshot payload"]
188
- Config --> JSON
189
- WorkerStatus --> JSON
190
- Runs --> JSON
191
-
192
- JSON --> UI["dashboard app.js + index.html"]
193
- ```
194
-
195
- This means the dashboard reflects the current state of:
196
-
197
- - installed profiles
198
- - live and recent runs
199
- - resident controller metadata
200
- - provider cooldowns
201
- - scheduled issue state
202
- - runtime process status
203
-
204
- without introducing a second control path that could drift away from the real
205
- scheduler state.
206
-
207
- ## Reading Order
208
-
209
- If you want the shortest path through the architecture:
210
-
211
- 1. [System Overview](#system-overview)
212
- 2. [Runtime Scheduler Loop](#runtime-scheduler-loop)
213
- 3. [Worker Session Lifecycle](#worker-session-lifecycle)
214
- 4. [Dashboard Snapshot Pipeline](#dashboard-snapshot-pipeline)
215
-
216
- If you are changing packaging or onboarding, also read
217
- [Install and Publication Flow](#install-and-publication-flow).
@@ -1,128 +0,0 @@
1
- # Command Map
2
-
3
- Run commands from the current isolated checkout for the task.
4
-
5
- Profile-specific repo roots and repo-local dev/test commands belong in
6
- `~/.agent-runtime/control-plane/profiles/<id>/README.md`. Resolve the active
7
- profile first, then use the selected profile's notes for product-repo commands.
8
-
9
- ## Profile Resolution
10
-
11
- ```bash
12
- bash tools/bin/workflow-catalog.sh profiles
13
- tools/bin/workflow-catalog.sh context
14
- bash tools/bin/profile-activate.sh --profile-id <id>
15
- ACP_PROJECT_ID=<id> bash tools/bin/render-flow-config.sh
16
- ```
17
-
18
- Use `render-flow-config.sh` when you need the effective repo root, worktree
19
- root, runtime root, worker backend, or profile-specific script bindings.
20
- When multiple available profiles exist, set `ACP_PROJECT_ID=<id>` first or use
21
- `profile-activate.sh --profile-id <id>` before running manual operator
22
- commands.
23
-
24
- ## Dependency bootstrap
25
-
26
- Run dependency bootstrap only from the clean automation baseline for the
27
- selected profile when you explicitly need to refresh shared dependencies. Do not
28
- repair shared `node_modules` from inside a worker worktree.
29
-
30
- For control-plane changes in this repo, prefer focused shell tests over broad
31
- bootstrap unless the task actually changes dependency behavior.
32
-
33
- ## Control-Plane Verification
34
-
35
- ```bash
36
- bash tools/bin/check-skill-contracts.sh
37
- bash tools/bin/flow-runtime-doctor.sh
38
- bash tools/bin/profile-smoke.sh
39
- bash tools/bin/test-smoke.sh
40
- bash tools/tests/test-project-init.sh
41
- bash tools/tests/test-project-init-force-and-skip-sync.sh
42
- bash tools/tests/test-project-remove.sh
43
- bash tools/tests/test-project-runtimectl.sh
44
- bash tools/tests/test-project-runtimectl-missing-profile.sh
45
- bash tools/tests/test-project-runtimectl-stop-cancels-pending-kick.sh
46
- bash tools/tests/test-project-runtimectl-start-falls-back-to-bootstrap.sh
47
- bash tools/tests/test-project-runtimectl-status-supervisor-running.sh
48
- bash tools/tests/test-project-launchd-bootstrap.sh
49
- bash tools/tests/test-install-project-launchd.sh
50
- bash tools/tests/test-uninstall-project-launchd.sh
51
- bash tools/tests/test-project-runtimectl-launchd.sh
52
- bash tools/tests/test-dashboard-launchd-bootstrap.sh
53
- bash tools/tests/test-install-dashboard-launchd.sh
54
- bash tools/tests/test-render-dashboard-snapshot.sh
55
- bash tools/tests/test-serve-dashboard.sh
56
- bash tools/tests/test-control-plane-dashboard-runtime-smoke.sh
57
- bash tools/tests/test-workflow-catalog.sh
58
- bash tools/tests/test-render-flow-config.sh
59
- ```
60
-
61
- Add or run targeted tests in `tools/tests/` for the changed surface.
62
-
63
- ## Flow maintenance
64
-
65
- ```bash
66
- tools/bin/flow-runtime-doctor.sh
67
- tools/bin/workflow-catalog.sh list
68
- tools/bin/workflow-catalog.sh show pr-review
69
- tools/bin/workflow-catalog.sh profiles
70
- tools/bin/workflow-catalog.sh context
71
- tools/bin/profile-activate.sh --profile-id <id>
72
- tools/bin/project-init.sh --profile-id <id> --repo-slug <owner/repo>
73
- tools/bin/render-flow-config.sh
74
- tools/bin/scaffold-profile.sh --profile-id <id> --repo-slug <owner/repo>
75
- tools/bin/profile-smoke.sh
76
- tools/bin/test-smoke.sh
77
- tools/bin/profile-adopt.sh --profile-id <id>
78
- tools/bin/project-runtimectl.sh status --profile-id <id>
79
- tools/bin/project-runtimectl.sh sync --profile-id <id>
80
- tools/bin/project-runtimectl.sh stop --profile-id <id>
81
- tools/bin/project-runtimectl.sh start --profile-id <id>
82
- tools/bin/project-runtimectl.sh restart --profile-id <id>
83
- tools/bin/install-project-launchd.sh --profile-id <id>
84
- tools/bin/uninstall-project-launchd.sh --profile-id <id>
85
- tools/bin/project-remove.sh --profile-id <id>
86
- tools/bin/project-remove.sh --profile-id <id> --purge-paths
87
- tools/bin/sync-shared-agent-home.sh
88
- python3 tools/dashboard/dashboard_snapshot.py --pretty
89
- bash tools/bin/serve-dashboard.sh --host 127.0.0.1 --port 8765
90
- bash tools/bin/install-dashboard-launchd.sh --host 127.0.0.1 --port 8765
91
- ```
92
-
93
- Installed profile prompts should live under
94
- `~/.agent-runtime/control-plane/profiles/<id>/templates/`; generic fallback
95
- prompts live under `tools/templates/`.
96
-
97
- ## Dashboard
98
-
99
- ```bash
100
- python3 tools/dashboard/dashboard_snapshot.py --pretty
101
- bash tools/bin/serve-dashboard.sh --host 127.0.0.1 --port 8765
102
- bash tools/bin/install-dashboard-launchd.sh --host 127.0.0.1 --port 8765
103
- ```
104
-
105
- Use the snapshot command for CLI/debug output and the HTTP server for the live
106
- dashboard at `http://127.0.0.1:8765`. Use the LaunchAgent installer when you
107
- want the dashboard to come back automatically after macOS restart/login.
108
-
109
- ## Project Autostart
110
-
111
- ```bash
112
- bash tools/bin/install-project-launchd.sh --profile-id <id>
113
- bash tools/bin/uninstall-project-launchd.sh --profile-id <id>
114
- ```
115
-
116
- Use the project installer when one profile should come back automatically after
117
- macOS restart/login. `project-runtimectl.sh start|stop|status` will detect that
118
- per-project LaunchAgent automatically once it is installed.
119
-
120
- ## Repo-Specific Commands
121
-
122
- After choosing a profile, read `~/.agent-runtime/control-plane/profiles/<id>/README.md` for:
123
-
124
- - clean automation baseline and retained checkout roots
125
- - repo-local startup docs such as `AGENTS.md` and OpenSpec paths
126
- - app/package-specific dev commands
127
- - isolated smoke and release-rehearsal commands
128
- - project-specific operator runbooks
@@ -1,124 +0,0 @@
1
- # Agent Control Plane Map
2
-
3
- This repository is the shared `agent-control-plane` package. It provides a
4
- generic engine that can host multiple installed profiles, each with its own repo
5
- roots, labels, worker preferences, prompts, and project-specific guardrails.
6
-
7
- ## What Lives Here
8
-
9
- - `SKILL.md`
10
- Canonical operating manual for the shared control plane.
11
- - `~/.agent-runtime/control-plane/profiles/<id>/control-plane.yaml`
12
- Canonical installed project profile for repo paths, queue labels, limits,
13
- and script bindings.
14
- - `~/.agent-runtime/control-plane/profiles/<id>/README.md`
15
- Repo-specific operator notes, startup docs, and command references for the
16
- selected profile.
17
- - `~/.agent-runtime/control-plane/profiles/<id>/templates/`
18
- Optional installed profile-specific prompt overrides.
19
- - `assets/workflow-catalog.json`
20
- Declarative catalog of the workflow lanes this control plane exposes.
21
- - `bin/`
22
- Queue, label, and risk logic shared by installed profiles.
23
- - `hooks/`
24
- Heartbeat and reconcile hooks shared by installed profiles.
25
- - `tools/bin/flow-runtime-doctor.sh`
26
- Reports whether the published source copy and runtime-home copy are in sync.
27
- - `tools/bin/workflow-catalog.sh`
28
- Lists workflows, shows workflow details, or prints available profile ids.
29
- - `tools/bin/render-flow-config.sh`
30
- Prints the effective operator/runtime config after environment overrides.
31
- - `tools/bin/run-codex-task.sh`
32
- Routes the shared worker contract into the backend-specific session wrapper.
33
- - `tools/bin/agent-project-run-codex-session`
34
- Launches Codex-backed worker sessions.
35
- - `tools/bin/agent-project-run-claude-session`
36
- Launches Claude-backed worker sessions.
37
- - `tools/bin/agent-project-run-openclaw-session`
38
- Launches OpenClaw-backed worker sessions.
39
- - `tools/bin/agent-project-run-ollama-session`
40
- Launches Ollama-backed worker sessions with a Node.js agentic loop.
41
- - `tools/bin/agent-project-run-pi-session`
42
- Launches Pi-backed worker sessions in `--print --no-session` mode.
43
- - `tools/bin/agent-project-run-opencode-session`
44
- Launches Crush (formerly OpenCode) worker sessions via `crush run`.
45
- - `tools/bin/agent-project-run-kilo-session`
46
- Launches Kilo Code worker sessions via `kilo run --auto --format json`.
47
- - `tools/bin/project-init.sh`
48
- Runs scaffold + smoke + adopt + runtime sync for one installed profile.
49
- - `tools/bin/scaffold-profile.sh`
50
- Scaffolds a new installed profile, profile notes, and prompt templates in the
51
- local profile registry.
52
- - `tools/bin/project-runtimectl.sh`
53
- Provides `status`, `start`, `stop`, and `restart` for one installed profile.
54
- - `tools/bin/project-launchd-bootstrap.sh`
55
- Syncs the runtime copy and runs one profile-scoped heartbeat pass in a
56
- launchd-safe foreground process for the runtime supervisor.
57
- - `tools/bin/install-project-launchd.sh`
58
- Installs a per-user LaunchAgent for one installed profile so its runtime can
59
- come back automatically after reboot/login.
60
- - `tools/bin/uninstall-project-launchd.sh`
61
- Removes the per-project LaunchAgent wrapper and plist for one installed
62
- profile.
63
- - `tools/bin/project-remove.sh`
64
- Removes one installed profile plus ACP-owned runtime state, with optional
65
- purge of ACP-managed repo/worktree/workspace paths.
66
- - `tools/bin/profile-smoke.sh`
67
- Validates available profiles and catches session/branch prefix collisions
68
- before scheduler use.
69
- - `tools/bin/test-smoke.sh`
70
- Runs the main shared-package smoke gates in one operator-facing command.
71
- - `tools/dashboard/dashboard_snapshot.py`
72
- Emits a JSON snapshot of active runs, resident controllers, cooldown state,
73
- queue depth, and scheduled issues across installed profiles.
74
- - `tools/bin/serve-dashboard.sh`
75
- Serves the live worker dashboard and `/api/snapshot.json` endpoint for local
76
- browser-based monitoring.
77
- - `tools/bin/dashboard-launchd-bootstrap.sh`
78
- Syncs the runtime copy and launches the dashboard server in a launchd-safe
79
- foreground process.
80
- - `tools/bin/install-dashboard-launchd.sh`
81
- Installs and bootstraps a per-user LaunchAgent so the dashboard returns after
82
- reboot/login.
83
- - `tools/bin/profile-adopt.sh`
84
- Creates runtime roots, installs the selected profile into the local profile
85
- registry when needed, and syncs the anchor repo plus VS Code workspace for
86
- live scheduler adoption.
87
- - `references/`
88
- Control-plane docs, operator commands, and repository maps.
89
-
90
- ## What Does Not Live Here
91
-
92
- - Repo-specific product code.
93
- - Local scheduler bootstrap and operator docs that belong to a particular
94
- workstation. Those now live under:
95
- `~/.agent-runtime/control-plane/workspace`
96
-
97
- ## Vendored Runtime
98
-
99
- - Runtime engines are resolved from the current skill root first, then the
100
- shared/runtime canonical copies when present, while active project profiles
101
- are resolved from `~/.agent-runtime/control-plane/profiles/`.
102
- - Project-specific instructions should be loaded from the active profile's
103
- `README.md` and templates instead of being hardcoded into the shared engine.
104
-
105
- ## Published Artifacts
106
-
107
- - Source canonical package copy:
108
- `$SHARED_AGENT_HOME/skills/openclaw/agent-control-plane`
109
- - Runtime canonical package copy:
110
- `~/.agent-runtime/runtime-home/skills/openclaw/agent-control-plane`
111
-
112
- Published artifacts are rebuilt by `tools/bin/sync-shared-agent-home.sh` as
113
- concrete copied files, not symlink aliases. Canonical profile configs now live
114
- outside the repo in `~/.agent-runtime/control-plane/profiles/<id>/control-plane.yaml`.
115
-
116
- ## Operational Rule
117
-
118
- When updating the control plane:
119
-
120
- 1. Change the generic engine in this repo or the selected installed profile in the external registry.
121
- 2. Keep workstation wrappers thin.
122
- 3. Repair shared/runtime published copies with `tools/bin/sync-shared-agent-home.sh`.
123
- 4. Prefer explicit profile docs and copied artifacts over hidden defaults and
124
- symlink aliases.
@@ -1,73 +0,0 @@
1
- # Docs Map
2
-
3
- Canonical documentation sources inside `agent-control-plane`:
4
-
5
- ## Shared Control-Plane Docs
6
-
7
- - `SKILL.md`
8
- Shared operating rules and startup sequence.
9
- - `README.md`
10
- Public-facing install, usage, funding, contributing, and security entrypoint.
11
- - `CHANGELOG.md`
12
- Public release history for the package and repository.
13
- - `ROADMAP.md`
14
- Public product and backend-support roadmap, including current and planned
15
- worker integrations.
16
- - `references/architecture.md`
17
- Architecture walkthrough with system, runtime, worker, and dashboard diagrams.
18
- - `CONTRIBUTING.md`
19
- Contributor workflow, legal model, and maintainer expectations.
20
- - `CLA.md`
21
- Contributor license agreement used for incoming changes.
22
- - `CODE_OF_CONDUCT.md`
23
- Community behavior and moderation expectations.
24
- - `SECURITY.md`
25
- Security reporting path and disclosure expectations.
26
- - `references/control-plane-map.md`
27
- Ownership map for profiles, scripts, publication copies, and operator tools.
28
- - `references/commands.md`
29
- Control-plane operator commands and profile-management entrypoints.
30
- - `references/release-checklist.md`
31
- Maintainer release checklist for public package publishing.
32
- - `.github/release-template.md`
33
- Reusable markdown template for GitHub release notes.
34
- - `.github/workflows/ci.yml`
35
- Public CI workflow used for the README status badge.
36
- - `.github/workflows/publish.yml`
37
- Trusted npm publishing workflow used for tag-driven releases with provenance.
38
- - `references/repo-map.md`
39
- Layout of the control-plane repository itself.
40
-
41
- ## Profile-Scoped Docs
42
-
43
- - `~/.agent-runtime/control-plane/profiles/<id>/README.md`
44
- Canonical repo-specific startup docs, repo roots, command map, and
45
- high-risk notes.
46
- - `~/.agent-runtime/control-plane/profiles/<id>/control-plane.yaml`
47
- Canonical machine-readable installed profile config.
48
- - `~/.agent-runtime/control-plane/profiles/<id>/templates/*.md`
49
- Canonical prompt overrides for issue, PR fix, PR review, or scheduled issue flows.
50
-
51
- ## Runtime and Publication Docs
52
-
53
- - `tools/bin/flow-runtime-doctor.sh`
54
- Sync health for source and runtime copies.
55
- - `tools/bin/profile-smoke.sh`
56
- Installed-profile validation before scheduler use.
57
- - `tools/bin/profile-adopt.sh`
58
- Local workstation adoption helper.
59
- - `tools/bin/sync-shared-agent-home.sh`
60
- Publication repair for shared/runtime copies.
61
- - `tools/bin/render-dashboard-demo-media.sh`
62
- Regenerates the README dashboard screenshot and animated walkthrough from a
63
- real local demo fixture.
64
- - `tools/bin/render-architecture-infographics.sh`
65
- Regenerates the architecture infographic PNGs and PDF deck from the local
66
- HTML source in `tools/architecture/`.
67
-
68
- ## Rule of Thumb
69
-
70
- If a piece of guidance is specific to one repo, keep it in
71
- `~/.agent-runtime/control-plane/profiles/<id>/README.md` or
72
- `~/.agent-runtime/control-plane/profiles/<id>/templates/` instead of the shared
73
- control-plane docs.
@@ -1,65 +0,0 @@
1
- # Release Checklist
2
-
3
- Maintainer checklist for shipping a new public package release of
4
- `agent-control-plane`.
5
-
6
- ## Pre-Release
7
-
8
- - confirm `git status` is clean
9
- - confirm `package.json` version is intentional
10
- - review `CHANGELOG.md` and prepare release notes from
11
- `.github/release-template.md`
12
- - review `README.md`, `SECURITY.md`, `CONTRIBUTING.md`, and `CLA.md` for stale
13
- links or policy text
14
- - if a public GitHub repo now exists, set or verify the `homepage`,
15
- `repository`, and `bugs` URLs in `package.json`
16
- - make sure sponsor links still point to the intended maintainer identity
17
- - confirm the intended license is still `MIT`
18
-
19
- ## Verification
20
-
21
- Run the core checks:
22
-
23
- ```bash
24
- bash tools/tests/test-package-public-metadata.sh
25
- bash tools/tests/test-package-funding-metadata.sh
26
- bash tools/tests/test-contribution-docs.sh
27
- bash tools/tests/test-agent-control-plane-npm-cli.sh
28
- bash tools/bin/test-smoke.sh
29
- npm pack --dry-run
30
- ```
31
-
32
- ## Publish
33
-
34
- Recommended release flow uses npm trusted publishing from GitHub Actions, so you
35
- do not have to enter an OTP during every local publish.
36
-
37
- One-time setup:
38
-
39
- - configure `agent-control-plane` for npm trusted publishing from
40
- `ducminhnguyen0319/agent-control-plane`
41
- - verify the publish workflow file is `.github/workflows/publish.yml`
42
- - keep npm package publishing policy on the stricter setting you want after
43
- trusted publishing is working
44
-
45
- Per-release command flow:
46
-
47
- ```bash
48
- npm version <patch|minor|major>
49
- git push origin main --follow-tags
50
- ```
51
-
52
- Then:
53
-
54
- - watch `.github/workflows/publish.yml` for the npm publish run
55
- - create or update a GitHub release using `.github/release-template.md`
56
- - update `CHANGELOG.md` if the final shipped notes differ from the draft
57
-
58
- ## Post-Release
59
-
60
- - verify `npx agent-control-plane@latest help` works from a clean shell
61
- - verify the npm package shows provenance for the new version
62
- - verify `npm fund` shows the expected sponsor link
63
- - verify the repo README, sponsor button, and package metadata all point to the
64
- same maintainer identity
65
- - announce the release where relevant