@vegastack/vegafactory 0.19.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 (170) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +417 -0
  3. package/dist/dashboard-artifact.json +21240 -0
  4. package/dist/index.js +22752 -0
  5. package/dist/run-wrapper.js +377 -0
  6. package/package.json +46 -0
  7. package/skill/dev-architect/SKILL.md +106 -0
  8. package/skill/dev-architect/agents/openai.yaml +4 -0
  9. package/skill/dev-architect/references/ai-agents.md +96 -0
  10. package/skill/dev-architect/references/conventions.md +113 -0
  11. package/skill/dev-architect/references/data.md +89 -0
  12. package/skill/dev-architect/references/infra.md +99 -0
  13. package/skill/dev-architect/references/mobile.md +75 -0
  14. package/skill/dev-architect/references/pinned-facts.md +133 -0
  15. package/skill/dev-architect/references/principles.md +117 -0
  16. package/skill/dev-architect/references/security.md +90 -0
  17. package/skill/dev-architect/references/stack.md +38 -0
  18. package/skill/dev-architect/references/web.md +102 -0
  19. package/skill/dev-architect/refresh/REFRESH.md +31 -0
  20. package/skill/dev-architect/refresh/sources.json +239 -0
  21. package/skill/dev-chronicle/SKILL.md +52 -0
  22. package/skill/dev-chronicle/agents/openai.yaml +4 -0
  23. package/skill/dev-chronicle/references/conventions.md +113 -0
  24. package/skill/dev-chronicle/references/styles.md +75 -0
  25. package/skill/dev-chronicle/refresh/REFRESH.md +3 -0
  26. package/skill/dev-chronicle/refresh/sources.json +6 -0
  27. package/skill/dev-debug/SKILL.md +43 -0
  28. package/skill/dev-debug/agents/openai.yaml +4 -0
  29. package/skill/dev-debug/references/conventions.md +113 -0
  30. package/skill/dev-debug/references/loop-ladder.md +20 -0
  31. package/skill/dev-debug/refresh/REFRESH.md +3 -0
  32. package/skill/dev-debug/refresh/sources.json +6 -0
  33. package/skill/dev-implement/SKILL.md +81 -0
  34. package/skill/dev-implement/agents/openai.yaml +4 -0
  35. package/skill/dev-implement/assets/workflows/implement-children.js +12 -0
  36. package/skill/dev-implement/references/ask-route.md +80 -0
  37. package/skill/dev-implement/references/changelog-and-chronicle.md +21 -0
  38. package/skill/dev-implement/references/conventions.md +113 -0
  39. package/skill/dev-implement/references/ledger-and-resume.md +52 -0
  40. package/skill/dev-implement/references/parallel-children.md +35 -0
  41. package/skill/dev-implement/references/worktrees.md +63 -0
  42. package/skill/dev-implement/refresh/REFRESH.md +3 -0
  43. package/skill/dev-implement/refresh/sources.json +6 -0
  44. package/skill/dev-implement/scripts/children.mjs +479 -0
  45. package/skill/dev-implement/scripts/effective-policy.mjs +694 -0
  46. package/skill/dev-implement/scripts/evidence-check.mjs +107 -0
  47. package/skill/dev-implement/scripts/evidence-upload.mjs +181 -0
  48. package/skill/dev-implement/scripts/learning.mjs +41 -0
  49. package/skill/dev-implement/scripts/lib/approval.mjs +1182 -0
  50. package/skill/dev-implement/scripts/lib/gh.mjs +101 -0
  51. package/skill/dev-implement/scripts/preflight.mjs +153 -0
  52. package/skill/dev-implement/scripts/questions.mjs +381 -0
  53. package/skill/dev-implement/scripts/reclaim.mjs +116 -0
  54. package/skill/dev-implement/scripts/recovery.mjs +213 -0
  55. package/skill/dev-implement/scripts/worktree.mjs +991 -0
  56. package/skill/dev-intake/SKILL.md +80 -0
  57. package/skill/dev-intake/agents/openai.yaml +4 -0
  58. package/skill/dev-intake/references/ask-route.md +80 -0
  59. package/skill/dev-intake/references/brief-template.md +89 -0
  60. package/skill/dev-intake/references/conventions.md +113 -0
  61. package/skill/dev-intake/refresh/REFRESH.md +3 -0
  62. package/skill/dev-intake/refresh/sources.json +6 -0
  63. package/skill/dev-intake/scripts/brief-lint.mjs +87 -0
  64. package/skill/dev-intake/scripts/lib/approval.mjs +1182 -0
  65. package/skill/dev-intake/scripts/questions.mjs +381 -0
  66. package/skill/dev-plan/SKILL.md +54 -0
  67. package/skill/dev-plan/agents/openai.yaml +4 -0
  68. package/skill/dev-plan/references/ask-route.md +80 -0
  69. package/skill/dev-plan/references/conventions.md +113 -0
  70. package/skill/dev-plan/references/plan-format.md +82 -0
  71. package/skill/dev-plan/refresh/REFRESH.md +3 -0
  72. package/skill/dev-plan/refresh/sources.json +6 -0
  73. package/skill/dev-plan/scripts/lib/approval.mjs +1182 -0
  74. package/skill/dev-plan/scripts/plan-lint.mjs +319 -0
  75. package/skill/dev-plan/scripts/questions.mjs +381 -0
  76. package/skill/dev-review/SKILL.md +76 -0
  77. package/skill/dev-review/agents/openai.yaml +4 -0
  78. package/skill/dev-review/assets/review-known-patterns.md.template +32 -0
  79. package/skill/dev-review/references/conventions.md +113 -0
  80. package/skill/dev-review/references/cross-agent.md +39 -0
  81. package/skill/dev-review/references/dispatch-prompts.md +121 -0
  82. package/skill/dev-review/references/security-axis.md +45 -0
  83. package/skill/dev-review/refresh/REFRESH.md +5 -0
  84. package/skill/dev-review/refresh/sources.json +6 -0
  85. package/skill/dev-setup/SKILL.md +113 -0
  86. package/skill/dev-setup/agents/openai.yaml +4 -0
  87. package/skill/dev-setup/assets/agents-section.md.template +24 -0
  88. package/skill/dev-setup/assets/dev-profile.md.template +102 -0
  89. package/skill/dev-setup/assets/factory-board.yml.template +162 -0
  90. package/skill/dev-setup/assets/hooks/decision-nudge.mjs +30 -0
  91. package/skill/dev-setup/assets/hooks/prompt-skill-mention.mjs +29 -0
  92. package/skill/dev-setup/assets/hooks/session-end.mjs +14 -0
  93. package/skill/dev-setup/assets/hooks/session-start.mjs +178 -0
  94. package/skill/dev-setup/assets/hooks/ship-guard.mjs +738 -0
  95. package/skill/dev-setup/assets/hooks/skill-activated.mjs +47 -0
  96. package/skill/dev-setup/assets/hooks/stop-heartbeat.mjs +14 -0
  97. package/skill/dev-setup/assets/workflows/implement-children.js +12 -0
  98. package/skill/dev-setup/references/ask-route.md +80 -0
  99. package/skill/dev-setup/references/conventions.md +113 -0
  100. package/skill/dev-setup/references/github-app.md +286 -0
  101. package/skill/dev-setup/references/harness-facts.md +169 -0
  102. package/skill/dev-setup/references/stack-playbooks.md +124 -0
  103. package/skill/dev-setup/refresh/REFRESH.md +13 -0
  104. package/skill/dev-setup/refresh/sources.json +602 -0
  105. package/skill/dev-setup/scripts/effective-policy.mjs +694 -0
  106. package/skill/dev-setup/scripts/questions.mjs +381 -0
  107. package/skill/dev-setup/scripts/ship-policy.mjs +195 -0
  108. package/skill/dev-ship/SKILL.md +56 -0
  109. package/skill/dev-ship/agents/openai.yaml +4 -0
  110. package/skill/dev-ship/references/conventions.md +113 -0
  111. package/skill/dev-ship/references/runbook.md +72 -0
  112. package/skill/dev-ship/refresh/REFRESH.md +3 -0
  113. package/skill/dev-ship/refresh/sources.json +6 -0
  114. package/skill/dev-ship/scripts/lib/approval.mjs +1182 -0
  115. package/skill/dev-ship/scripts/ship-gate.mjs +485 -0
  116. package/skill/dev-status/SKILL.md +56 -0
  117. package/skill/dev-status/agents/openai.yaml +4 -0
  118. package/skill/dev-status/references/conventions.md +113 -0
  119. package/skill/dev-status/refresh/REFRESH.md +3 -0
  120. package/skill/dev-status/refresh/sources.json +6 -0
  121. package/skill/dev-status/scripts/effective-policy.mjs +694 -0
  122. package/skill/dev-status/scripts/status.mjs +311 -0
  123. package/skill/skill-maintainer/SKILL.md +82 -0
  124. package/skill/skill-maintainer/agents/openai.yaml +4 -0
  125. package/skill/skill-maintainer/references/release-ops.md +61 -0
  126. package/skill/skill-maintainer/references/standards.md +137 -0
  127. package/skill/skill-maintainer/refresh/REFRESH.md +40 -0
  128. package/skill/skill-maintainer/refresh/sources.json +103 -0
  129. package/skill/skill-scan/SKILL.md +59 -0
  130. package/skill/skill-scan/agents/openai.yaml +4 -0
  131. package/skill/skill-scan/refresh/REFRESH.md +18 -0
  132. package/skill/skill-scan/refresh/sources.json +133 -0
  133. package/skill/skill-scan/scripts/lib/skillspector.mjs +226 -0
  134. package/skill/skill-scan/scripts/skill-scan.mjs +1002 -0
  135. package/skill/skillify/SKILL.md +108 -0
  136. package/skill/skillify/agents/openai.yaml +4 -0
  137. package/skill/skillify/assets/templates/README.md.template +26 -0
  138. package/skill/skillify/assets/templates/REFRESH.md.template +16 -0
  139. package/skill/skillify/assets/templates/SKILL.md.template +27 -0
  140. package/skill/skillify/assets/templates/evals.json.template +12 -0
  141. package/skill/skillify/assets/templates/openai.yaml.template +4 -0
  142. package/skill/skillify/assets/templates/skill.test.ts.template +27 -0
  143. package/skill/skillify/assets/templates/sources.json.template +6 -0
  144. package/skill/skillify/assets/templates/trigger-queries.json.template +1 -0
  145. package/skill/skillify/references/authoring.md +103 -0
  146. package/skill/skillify/references/eval-playbook.md +112 -0
  147. package/skill/skillify/refresh/REFRESH.md +23 -0
  148. package/skill/skillify/refresh/sources.json +6 -0
  149. package/skill/skillify/scripts/scaffold-skill.mjs +334 -0
  150. package/skill/skillify/scripts/trigger-check.mjs +209 -0
  151. package/skill/vegafactory-setup/SKILL.md +77 -0
  152. package/skill/vegafactory-setup/agents/openai.yaml +4 -0
  153. package/skill/vegafactory-setup/assets/control-room/boards.md.template +17 -0
  154. package/skill/vegafactory-setup/assets/control-room/decisions.md.template +5 -0
  155. package/skill/vegafactory-setup/assets/control-room/group.md.template +44 -0
  156. package/skill/vegafactory-setup/assets/control-room/onboarding/dispatcher-box.md.template +86 -0
  157. package/skill/vegafactory-setup/assets/control-room/onboarding/new-repo.md.template +13 -0
  158. package/skill/vegafactory-setup/assets/control-room/onboarding/new-teammate.md.template +12 -0
  159. package/skill/vegafactory-setup/assets/control-room/org.md.template +60 -0
  160. package/skill/vegafactory-setup/assets/control-room/people.csv.template +2 -0
  161. package/skill/vegafactory-setup/assets/control-room/repos.md.template +7 -0
  162. package/skill/vegafactory-setup/assets/control-room/rules/CODEOWNERS.template +6 -0
  163. package/skill/vegafactory-setup/assets/control-room/rules/README.md.template +9 -0
  164. package/skill/vegafactory-setup/assets/control-room/rules/stats-privacy.md.template +44 -0
  165. package/skill/vegafactory-setup/assets/control-room/templates/README.md.template +9 -0
  166. package/skill/vegafactory-setup/references/control-room.md +149 -0
  167. package/skill/vegafactory-setup/references/conventions.md +113 -0
  168. package/skill/vegafactory-setup/refresh/REFRESH.md +5 -0
  169. package/skill/vegafactory-setup/refresh/sources.json +6 -0
  170. package/skill-integrity.json +252 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 VegaStack
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,417 @@
1
+ # @vegastack/vegafactory
2
+
3
+ Installer for VegaStack Agent Skills — a family of self-contained skills for Claude Code, Codex, and Hermes, shipped in one integrity-checked package.
4
+
5
+ Install the whole dev workflow, once per machine:
6
+
7
+ ```sh
8
+ npx @vegastack/vegafactory skills add --group dev --global
9
+ ```
10
+
11
+ `--global` is the recommended install: the skills land in your home directory and are available in every project you open. Drop it for a project-local install when a repository should carry its own copy.
12
+
13
+ See what else is bundled:
14
+
15
+ ```sh
16
+ npx @vegastack/vegafactory skills list
17
+ ```
18
+
19
+ ## Skills in this package
20
+
21
+ ### `dev` — the issue-driven dev workflow
22
+
23
+ Install the family with `add --group dev --global`.
24
+
25
+ | Skill | What it does |
26
+ |---|---|
27
+ | `dev-setup` | Bootstraps any project, greenfield included, for the issue-driven dev workflow: stack-playbook-drafted profile, AGENTS.md section, labels, guards, decision register |
28
+ | `dev-intake` | Turns ideas, brainstorms, and SOWs into agent-ready GitHub issues with recorded user approval |
29
+ | `dev-plan` | Plans an approved issue before any code exists: fresh-grounded questionnaire, strict plan format with Interfaces blocks, the scope ratchet, quick-build inline mode |
30
+ | `dev-architect` | Architecture advisor: the locked stack, recorded rejections, and dated platform facts behind a verify-before-you-recommend protocol |
31
+ | `dev-implement` | Implements an approved issue end to end, dark: preflight, claim, build, test, review, evidence in the issue |
32
+ | `dev-debug` | Reproduce-first bug diagnosis: red command, ranked suspects, regression-test-before-fix |
33
+ | `dev-review` | Independent multi-axis review of finished work: spec/standards/security axes, bounded fix loop, cross-agent Codex mode |
34
+ | `dev-ship` | Opens the PR, merges, and runs the project's Ship runbook, each only on the user's explicit word |
35
+ | `dev-status` | The operator's board: whose move is it, from deterministic gh data |
36
+ | `dev-chronicle` | The project's narrative record: story entries per branch and the "catch me up" digest |
37
+
38
+ ### `skills-tooling` — tools that work on skills themselves
39
+
40
+ Install the group with `add --group skills-tooling --global`.
41
+
42
+ | Skill | What it does |
43
+ |---|---|
44
+ | `skill-scan` | Scans agent skills with NVIDIA SkillSpector and holds the suppression baseline: the Verify-gate guard, and the answer to "is this downloaded skill safe to install" |
45
+
46
+ ### `repo-tooling` — repo-only
47
+
48
+ These operate on the vegafactory repository itself and do nothing useful in another project, so **`--all` skips them**. Install one by name if you are contributing to that repo.
49
+
50
+ | Skill | What it does |
51
+ |---|---|
52
+ | `skill-maintainer` | Encodes the Agent Skills standards (Claude Code, Codex, Hermes, agentskills.io) for creating, updating, and releasing skills in a skills repo |
53
+ | `skillify` | Turns a feature or workflow into a complete skill conforming to the VegaStack skills contract, or audits an existing one |
54
+
55
+ ## Commands
56
+
57
+ | Command | What it does |
58
+ |---|---|
59
+ | `list` | Show the bundled skills |
60
+ | `add <selection>` | Install (or upgrade) skills into the selected agent directories |
61
+ | `verify [selection]` | Check installed copies against the bundled checksum manifest (all bundled skills when nothing is selected) |
62
+ | `doctor` | Diagnose an install: integrity across all skills, dev profile (`.vegastack/dev.md`) presence, installed-vs-latest version |
63
+ | `remove <selection>` | Uninstall skills from the selected agent directories |
64
+ | `sync` | Refresh this machine's shallow control-room clone from the repo's `control-room:` knob |
65
+ | `dispatch` | Turn labels and 🚀 reactions on the watched repos into headless runs in feature worktrees |
66
+ | `service <install\|uninstall\|status>` | Install that dispatcher as a launchd LaunchAgent (macOS) or a systemd user unit (Linux) |
67
+ | `status` | The board, the worktrees, the last tick, the runs in flight, and the dispatcher's own health |
68
+ | `stats` | Where agent time and money went — record, push, roll up, and print the org's own numbers |
69
+ | `dashboard` | Start the local read-only dashboard over the control room's statistics and the live board |
70
+ | `guard sync [--check]` | Compile `.vegastack/dev.md`'s guard policy into `~/.vegastack/guard/<owner>__<repo>.json`, the one file the ship guard reads; `--check` exits 2 when it is stale |
71
+
72
+ ### Selecting what to act on
73
+
74
+ `add`, `verify`, and `remove` each take **exactly one** selector. Combining two is an error, not a merge.
75
+
76
+ | Selector | Means |
77
+ |---|---|
78
+ | `<skill>` | That one skill. Works for every bundled skill, repo-only ones included |
79
+ | `--group <group>` | Every skill in that group |
80
+ | `--all` | Every bundled skill **except** the repo-only ones |
81
+
82
+ A `--group` or `--all` install is **one transaction**: every skill is checked and staged before any of them is committed, so if one fails, none are installed and the destination is left exactly as it was.
83
+
84
+ The ten dev-workflow skills:
85
+
86
+ ```sh
87
+ npx @vegastack/vegafactory skills add --group dev --global
88
+ ```
89
+
90
+ Everything worth installing outside this repo:
91
+
92
+ ```sh
93
+ npx @vegastack/vegafactory skills add --all --global
94
+ ```
95
+
96
+ Check the family against the manifest:
97
+
98
+ ```sh
99
+ npx @vegastack/vegafactory skills verify --group dev --global
100
+ ```
101
+
102
+ Uninstall it again:
103
+
104
+ ```sh
105
+ npx @vegastack/vegafactory skills remove --group dev --global
106
+ ```
107
+
108
+ ### The dispatcher
109
+
110
+ `vegafactory dispatch` polls the repos this machine watches and starts headless runs in their feature worktrees: `needs-plan` → dev-plan, unassigned `ready` → dev-implement, and a 🚀 reaction from a listed operator on any comment of a `for-operator` issue → the corrections run. It runs as **you** — your `gh` token, your harness authentication, your machine — which is why installing it is the operator's own step and never an agent's. Board, launch-comment and native-dependency reads must be complete before claiming or starting work. Reads stop at 100 pages or 10,000 records, with a 10-second request bound, 60-second repository budget and at most two retries; incomplete or rate-limited reads remain a named refusal and do not mean an empty queue. Retry a tick after connectivity recovers or the reported rate reset; no unchanged failure produces repeated notifications. The status CLI and its dashboard bridge still require #141’s completeness integration before their final acceptance.
111
+
112
+ Which repos, how often, and how many at a time is machine-local, in `~/.vegastack/factory.json` (the same file the control-room clone state lives in; keys it does not recognise are left untouched):
113
+
114
+ ```json
115
+ {
116
+ "repos": [{ "path": "~/code/app", "repo": "acme/app", "org": "acme" }],
117
+ "interval": 120,
118
+ "maxRuns": 1,
119
+ "subagents": { "spawnDepth": 1, "concurrent": 3 }
120
+ }
121
+ ```
122
+
123
+ Whether a repo may be dispatched at all is **not** machine-local — it is the repo's own `.vegastack/dev.md`:
124
+
125
+ ```
126
+ dispatch: local # off | local
127
+ ```
128
+
129
+ Three refusals stand between a board and a dark build, and each one names itself in the output:
130
+
131
+ - `dispatch: off`, no `dispatch:` line, or any other value — opting in is explicit, and the default is off.
132
+ - The selected harness must have a supported synchronous PreToolUse registration for every shell tool: direct `node <checkout guard> --harness <selected>`, with verified installed asset bytes, no symlinks and an executable interpreter. JSON and supported inline config layers are checked together. Wrong event/matcher/argv, missing worktree copies and custom wrappers refuse with a migration reason. The owner compiler checks current schema2 policy/digest in the actual prepared ordinary or parent worktree, and the check repeats immediately before spawn. Stale policy requires explicit `vegafactory guard sync`; launch never recompiles it into permission. Configuration, local invocation and live-qualified coverage are separate. These same-user hooks are cooperative; remote branch protection and permissions remain necessary.
133
+ - Another run holds the repo's lock, the issue is assigned, or `maxRuns` is already committed.
134
+
135
+ Read the plan before anything ever runs — this is the default, and both `--once` and `--watch` are opt-ins:
136
+
137
+ ```sh
138
+ vegafactory dispatch --once --dry-run --json # exactly what would launch, and launch nothing
139
+ vegafactory dispatch --once # one tick, for real
140
+ vegafactory dispatch --watch # the loop the service runs
141
+ vegafactory status --json # what happened
142
+ ```
143
+
144
+ Every run first records private lifecycle state under `~/.vegastack/runs/<run-id>/`; default diagnostics contain bounded events and reason codes, never raw stdout, stderr, argv, credentials, or local paths. A failed or timed-out run may publish only a separately authorized hand-back intent with an opaque delivery marker and reason. Process completion grants no label, assignment, push, or acceptance mutation: each remote effect needs its own durable exact intent and verified readback, while the worktree and pending local evidence remain preserved.
145
+
146
+ ### Owned claims and recovery
147
+
148
+ Use one non-root dispatcher account and one lock directory per host. The default is `~/.vegastack/factory/locks`; an optional absolute `lockRoot` in the exact service config selects another directory. Changing the directory requires stopped-service migration and inspection of the old directory first. Two homes are not a substitute for a shared host lock root.
149
+
150
+ Repository and watch claims use random owner tokens plus the process UID, boot identity and start identity. Every acquisition, renewal, release and stale-owner replacement takes the same short exclusive mutation guard. A PID alone never proves ownership. The guard waits at most two seconds for contention; this is not a task timeout. Repository path keys hash the canonical GitHub identity. Existing PID-only files are preserved and refuse migration until reconciled. Status reports unverifiable ownership explicitly.
151
+
152
+ For a corrupt claim, legacy claim or abandoned mutation guard: stop every dispatcher using that account/root; preserve the owner file and guard directory; verify the recorded process is absent or its boot/start identity differs; verify no retained run is executing; then take an exclusive offline recovery guard and reconcile only the inspected pathname and exact token. Re-read the token while holding that guard before clearing a verified stale record. If a mutation guard has no valid owner record, recovery is an offline operator action: automatic recursive guard stealing is forbidden. Never delete a worktree, checkpoint or run record to unlock a task. An unknown process identity remains a visible refusal.
153
+
154
+ Registered machines additionally use the configured existing private control-room state branch. Shared claims reserve repository/issue identity, host capacity, parent child slots and incompatible resources with one GitHub `createCommitOnBranch` transaction using `expectedHeadOid`. Different machines and scope revisions do not create different task keys. Only verified independent scopes may overlap; ambiguous paths serialize. A missing, rewritten, malformed, default or inaccessible state branch refuses dispatch; runtime never creates or resets it. [GitHub's conditional commit input](https://docs.github.com/en/graphql/reference/commits#createcommitonbranchinput) defines the expected-head field.
155
+
156
+ Top-level work is repository-exclusive unless the fresh approved plan carries #135's closed `FleetParallelDeclaration`. The declaration must name the exact selected task set; its paths are re-derived from those tasks' canonical `Files —` clauses after current authority and dependency validation, and both peers must independently provide disjoint paths and resources. Missing, malformed, stale, mismatched, globbed or shared scope never reuses an older projection or gains independence from capacity, labels, configuration, observed diffs or model output.
157
+
158
+ A verified stopped top-level parent and every direct retained child can move only through one atomic group-succession commit. The commit preserves checkpoints, accepted work, original parent bindings, joins, effects, history and reservations while replacing the complete owner tuple and generation. It leaves the parent `claimed` and children `recovery-queued`; transfer starts no process. Queued children retain file/resource reservations but consume a process slot only when their immutable predecessor receipt no longer proves stopped-and-never-started. Starting one requires the transferred parent to be running, fresh authority/source/qualification checks and both parent and machine child capacity. Group records use task schema v2 and a distinct receipt schema; every participating reader must support them before live activation, while v1 records remain readable and older closed readers refuse v2 instead of falling back.
159
+
160
+ Recovery receipts are closed typed data pinned to an actual commit and blob digest. Publishing a receipt and linking it into the task are separate acknowledged transitions. Unlinked intent cannot authorize an effect, and an ambiguous send must be reconciled before retry. Completed scope evidence remains historical even after active reservations are removed. A stale heartbeat or disconnected host never proves termination. Transfer requires verified stopped execution, an available checkpoint, original execution identity, current authority and resolution of every possible remote effect. Configured hooks alone leave `remoteEffectCoverage` as `unmanaged-possible`.
161
+
162
+ The source coordination API is available to the durable runtime owner: `acquireSharedTask`, `transitionSharedTask`, `recoverStoppedGroup`, `inspectGroupSuccession`, `publishRecoveryReceipt`, `resolveEvidence`, `beginManagedEffect` and `readSharedStatus`. Dispatch requires verified-candidate, durable-preparation, shared-executor and stopped-result adapters; absence refuses instead of launching through the legacy executor. Live provider behavior, full macOS/Linux reboot coverage, managed-effect qualification and assembled acceptance remain separate required gates.
163
+
164
+ ### Running it as a service
165
+
166
+ ```sh
167
+ vegafactory service install # dry run: prints the unit file and the commands
168
+ vegafactory service install --write # writes it and loads it
169
+ vegafactory service status
170
+ vegafactory service uninstall --write
171
+ ```
172
+
173
+ macOS gets `~/Library/LaunchAgents/com.vegastack.factory.plist` with `RunAtLoad` and `KeepAlive`, bootstrapped into your GUI domain; Linux gets `~/.config/systemd/user/vegafactory.service` with `Restart=always`, `loginctl enable-linger` first so it survives logout. Both are user-level: nothing here needs or asks for root.
174
+
175
+ ## Upgrading and health checks
176
+
177
+ Upgrade to the latest release. `--force` is required because `add` refuses to overwrite an installed copy that differs from the bundle rather than silently discarding local edits:
178
+
179
+ ```sh
180
+ npx @vegastack/vegafactory@latest skills add --group dev --global --force
181
+ ```
182
+
183
+ Diagnose an install — integrity across all skills, plus installed-vs-latest version:
184
+
185
+ ```sh
186
+ npx @vegastack/vegafactory skills doctor --global
187
+ ```
188
+
189
+ Run `doctor` without `--global` from inside a project to additionally check that project's `.vegastack/dev.md` profile; the global run skips that check, since the profile is per-project by design.
190
+
191
+ ## Control-room sync
192
+
193
+ An organisation can keep its shared defaults — org policy, per-group knobs, people, decisions — in a **control room** repository. Every machine reads a shallow clone of it rather than the network, so a GitHub outage degrades to "last synced <time>" instead of failing.
194
+
195
+ ```sh
196
+ vegafactory sync # refresh if the last fetch is older than sync-max-age
197
+ vegafactory sync --force # refresh regardless
198
+ vegafactory sync --json # the machine-readable report (what hooks and the dispatcher read)
199
+ vegafactory sync --dry-run # print the plan, write nothing
200
+ vegafactory sync --org acme # bootstrap: a repo whose profile has no control-room: knob yet
201
+ ```
202
+
203
+ - The project's `.vegastack/dev.md` names the control room: `control-room: <org>/<repo>#<group>@<sha7>`, where the trailing sha is the clone commit the profile was drafted from. `control-room: none`, or no line at all, means the skill defaults apply and `sync` exits 0 doing nothing — unless `--org <org>` is passed, the bootstrap path dev-setup uses before the profile exists: the room is then `<org>/vegafactory-control-room` by convention, and an `--org` that disagrees with an existing knob is refused (exit 2).
204
+ - The clone lives at `~/.vegastack/control-room/<org>/` — one per org.
205
+ - The machine-local state document `~/.vegastack/factory.json` records, per org, the clone `path`, its `remote` and `branch`, and the timestamp of the **last successful fetch**. Freshness is measured from that timestamp, never from the directory's mtime. Editing `path`, `remote` or `branch` there points a repo at a different control room; nothing in the repository has to change — every refresh re-points the clone's `origin` at the configured `remote` and resets to what it fetched from the configured `branch`, so an edit takes effect on the next refresh (or `--force`) rather than only on a fresh clone.
206
+ - `sync-max-age: 30m` in `.vegastack/dev.md` (`<n>m` or `<n>h`) is how stale the clone may be before a session refreshes it. Refresh runs through the explicit sync/runtime owner; the bounded advisory SessionStart hook performs no background network work.
207
+ - Authentication is your existing `gh` credential over HTTPS, injected per invocation — no token reaches argv, the remote URL, or the clone's config, and no second credential is set up.
208
+ - `sync` never commits and never pushes: the clone is read-only to this verb.
209
+
210
+ Exit codes: **0** synced, already fresh, or the repo names no control room · **1** the fetch failed and the existing clone stands (the report says when it last synced) · **2** a refusal.
211
+
212
+ Two refusals are deliberate and fail closed:
213
+
214
+ - a clone with local modifications is never reset — `sync` refuses and names the path, because nobody should hand-edit the clone;
215
+ - a symlink on the clone path or its parent is refused before any git call.
216
+
217
+ An unreadable `~/.vegastack/factory.json` is also a refusal, never a silent reset: resetting it would drop every other org's clone record.
218
+
219
+ ### Effective policy and migration
220
+
221
+ Runtime, stats and the standalone dev-setup compiler share `effective-policy.mjs`. Ordinary explicit values resolve org → group → repo, including individual harness stages. A repo alone opts into `dispatch: local`. Org locks and exact group/repo/value delegations live in one `vsk-policy` schema2 block in org.md; a group's legacy `stats-override: allowed` cannot unlock the organization. A refused override retains its effective value for diagnostics but stops capture/export and new launches.
222
+
223
+ `policy-schema: 2` opts into the documented typed contract. Legacy version1 ordinary knobs remain readable and are never silently rewritten. Use `vegafactory guard sync --dry-run --json` to inspect the proposed compiled values, source revisions and digest, then `--check` to compare the installed copy. Show original/effective/proposed policy differences and preserve originals before an explicit migration; obtain approval for an actual authority change. Unknown schemas, duplicate known keys and invalid values refuse without overwriting the existing copy. Unknown extension fields remain inert.
224
+
225
+ Configured rooms require `factory.json`'s `controlRooms[org].snapshots[canonicalCodeRepo]` binding. Each snapshot carries schemaVersion2, org, group, repository (the room), origin, full sourceCommit, policyDigest, validatedAt and contentPath. The digest is recomputed for that exact code repo's current profile and selected group, using canonical relative source paths; one org digest cannot stand for multiple code repos. The reader checks origin, commit, clean managed content and regular Git blobs. Missing bindings, changed local profile, wrong group/origin or expired validation refuse. Snapshot creation and atomic refresh are the sync transaction's responsibility; a legacy lastSyncedAt is not validation. Freshness never creates a cumulative task deadline.
226
+
227
+ Organization admins and explicitly delegated group admins are configured separately from descriptive people.csv roles and the task operators list. Only org admins appoint/remove admins. CLI people queries verify the requester through GitHub and filter exact allowed repository records before totals; chat/URL/display-role claims do not grant authority. The dashboard's canonical adapters fail closed until a caller supplies validated scope. Control-room Git readers can still read committed reports; application permissions do not make shared Git files group-confidential.
228
+
229
+ Registered-machine policy includes stable machine/installation identity, host binding, execution login, exact repositories and disabled initial enrollment. Org defaults → group defaults → machine overrides govern polling, capacity, checkpoint and verified-transfer recovery modes. Group edits require previous org delegation; bootstrap paths cannot enable or enlarge registration. No-fleet installations retain explicit legacy operation; shared machines require validated registration and shared ownership rather than local-lock fallback. Runtime activation, private house-policy migration and state-branch creation remain separate setup steps.
230
+
231
+ ### Statistics
232
+
233
+ Metric v2 uses immutable execution, activity and rework-snapshot events in the private outbox and control room. Execution segments retain independent event IDs and one logical execution identity across continuation. Historical JSONL files remain unchanged and use explicitly labelled legacy definitions. See the [metric dictionary and coverage rules](https://github.com/vegastack/vegafactory/blob/main/packages/cli/docs/metrics.md).
234
+
235
+ ```sh
236
+ vegafactory stats # this repo, this month
237
+ vegafactory stats --org --since SEP-2026
238
+ vegafactory stats --me # your own rows
239
+ vegafactory stats skills # invocations per skill, by trigger and harness
240
+ vegafactory stats push # dry run: prints the plan and the commit it would make
241
+ vegafactory stats push --commit # delivers verified immutable event batches
242
+ vegafactory stats rollup --since SEP-2026 # discover accepted delivery independently of run months
243
+ vegafactory stats activity --org acme --repo acme/project.docs --month 2026-09 --json
244
+ vegafactory stats record --source <kind> # called by the capture hooks, reads the payload on stdin
245
+ ```
246
+
247
+ **Records contain counts and permitted identifiers only.** Execution records carry observed runtime, usage and terminal outcome. Activities carry event identity and occurrence time; cumulative rework snapshots carry their as-of date and history coverage. Missing measurements stay `null`, and reported zero stays zero. Mutable legacy review/ledger/handback counters do not become monthly events. Prompt text, assistant text, tool arguments and file contents do not enter shared reports.
248
+
249
+ **Whether anything is recorded is org/group/repo policy, never a machine bypass.** Ordinary `stats` and `stats-people` values inherit; explicit org locks require exact delegation. `stats-export: attributed` requires org authorization. Refusals stop capture and export. Per-person reads use verified own-data identity or explicit scoped administration; a descriptive `lead` role does not supply that grant. Derived summaries retain their authorized repository scope. The private shared Git audience remains explicit; UI filtering does not erase Git history or copies.
250
+
251
+ `push` is a dry run until `--commit`, because it writes to a repository other people read.
252
+
253
+ The CLI verifies its requester through the GitHub API. `rollup` also reads issue history: lead and cycle time come from each touched issue's label timeline, fetched through `gh` and written beside the summary as `<MON-YYYY>.timeline.json`. When `gh` cannot answer, the summaries are still regenerated from the timeline file the clone already holds, the reason is printed, and the exit code is 1.
254
+
255
+ ## Dashboard
256
+
257
+ `vegafactory dashboard` starts a local, read-only web view of the factory and prints its URL.
258
+
259
+ ```bash
260
+ vegafactory dashboard # fetch on first use, then serve on 127.0.0.1:7777
261
+ vegafactory dashboard --org acme # required only when more than one org is configured
262
+ vegafactory dashboard --open # …and open it in the browser
263
+ vegafactory dashboard --dry-run # print what a real run would do, change nothing
264
+ ```
265
+
266
+ | Flag | Means |
267
+ |---|---|
268
+ | `--org ORG` | Select one configured canonical organization; inferred when exactly one is configured |
269
+ | `--port N` | First port to try; the next nine are tried in turn |
270
+ | `--open` | Open the URL in the browser once the server answers |
271
+ | `--dir PATH` | Launch an already-built package tree instead of the fetched one |
272
+ | `--dry-run` | Print the plan and change nothing |
273
+ | `--json` | Machine-readable result, including the exact `org`, `version`, `instanceId` and cache schema of the owned child |
274
+
275
+ Exit **0** the server answered, or the dry-run plan printed · **1** the server exited or never
276
+ answered with the expected identity · **2** a usage error or refusal such as ambiguous org selection,
277
+ an invalid repository registration, an unsafe path, or an unverified existing install. Missing `gh`
278
+ credentials do not block an identity-safe empty/unavailable shell.
279
+
280
+ The app is a second published package, `@vegastack/vegafactory-dashboard`, fetched at this CLI's own
281
+ version on first use into `~/.vegastack/dashboard/<version>/` — the core install stays small. The
282
+ CLI verifies the exact descriptor-declared tarball bytes and regular-file tree, stages them with
283
+ scripts disabled, and atomically selects the version. An ordinary caught failure removes only that
284
+ attempt's owned staging directory; crash-interrupted or unrelated staging and an unowned or
285
+ mismatched existing install remain preserved and unexecuted. `--dir` is explicitly
286
+ `unverified-development`; release qualification never treats it as artifact proof.
287
+
288
+ Each canonical org has an isolated immutable-generation cache at
289
+ `~/.vegastack/dashboard/<sha256(org)>/cache-v2/`. Requests hold process-identity reader pins until
290
+ their async render callback finishes; obsolete generations are reclaimed only when every exact pin
291
+ owner is absent or proven stopped. A failed refresh serves the last eligible generation with its
292
+ original source timestamp/digest and a stale/partial reason. The legacy
293
+ `~/.vegastack/cache/stats.db` is never migrated, relabelled or deleted automatically: after a new
294
+ selected-org generation has served the expected views, inspect/move it as a manual dry-run cleanup
295
+ candidate before deleting it.
296
+
297
+ The server binds `127.0.0.1` only. The CLI generates a fresh per-child instance ID and accepts
298
+ readiness only when org, version, instance, schema and data-state match while that owned child is
299
+ still alive. Your `gh` token is passed only to that server process and never appears in readiness or
300
+ client data: the browser receives projected view models, not credentials.
301
+
302
+ Nine destinations cover Attention, Performance, Activity, People, person detail, Skills, repository
303
+ detail, Board and Dispatcher. Attention orders decisions, blocked or failed tasks, running work and
304
+ recent merges. Performance keeps reported usage, coverage, subscription fee evidence and
305
+ API-equivalent estimates separate. Activity keeps task owner, agent-account owner, shared machine,
306
+ checkpoint uncertainty and compact handoff history on one repository/issue row. Every live/status
307
+ read is projected to the current verified repository scope before totals, rows or links. When a live
308
+ source is unavailable, safely retained data stays visible with explicit unavailable, stale and
309
+ partial state; unavailable dispatcher observation is not reported as idle.
310
+
311
+ This source revision still uses the dashboard's native semantic table and existing root setup.
312
+ Signature-verified provider/Table copy-in and descriptor-backed packed browser evidence remain
313
+ pending; no registry credential, hash-only component or completed accessibility claim is implied.
314
+
315
+ ## Flags
316
+
317
+ | Flag | Meaning |
318
+ |---|---|
319
+ | `--project` / `--global` | Install into the current project (default) or the user's home directory |
320
+ | `--group NAME` | Select every skill in a group (see `list` for the groups) |
321
+ | `--all` | Select every bundled skill except the repo-only ones |
322
+ | `--agent codex\|claude\|hermes\|both\|all` | Target agent runtime(s); `both` = codex+claude |
323
+ | `--dir PATH` | Operate on a different project directory; not valid with `--global` |
324
+ | `--dry-run` | Show what would change without writing |
325
+ | `--force` | Overwrite a modified installed copy; for `sync`, refresh regardless of `sync-max-age` |
326
+ | `--json` | Machine-readable output (`sync`) |
327
+ | `--non-interactive` | Skip prompts and use defaults: `--agent both`, project-local (for automation) |
328
+ | `--version` / `-v` | Print the installer version |
329
+ | `--help` / `-h` | Print usage |
330
+
331
+ `--all` and `--agent all` are different axes and are easy to confuse: `--all` chooses **which skills**, `--agent all` chooses **which agent runtimes**. `add --all --agent all --global` is valid and means every installable skill, on every runtime, in your home directory.
332
+
333
+ Agent targeting is automatic: the CLI detects which agents you have (`~/.claude`, `~/.codex`/`~/.agents`, `~/.hermes`) and targets them without asking — `--agent` overrides. A numbered picker appears only when nothing is detected.
334
+
335
+ ## Agent surfaces
336
+
337
+ `--global` is the recommended install and the only one that can cover all three runtimes at once. `--project` is the flag default, so pass `--global` explicitly.
338
+
339
+ | Agent | Global install (recommended) | Project install |
340
+ |---|---|---|
341
+ | Claude Code | `~/.claude/skills/` | `.claude/skills/` |
342
+ | Codex | `~/.agents/skills/` | `.agents/skills/` |
343
+ | Hermes | `~/.hermes/skills/` | — (Hermes discovers skills globally only) |
344
+
345
+ `--agent hermes` therefore requires `--global`; `--agent all` on a project install covers codex+claude and prints a notice about hermes.
346
+
347
+ Prefer a project install when a repository should carry its own copy — so collaborators get the same skills from a checkout, or so one project can pin a version while the rest of the machine moves on. Pick one or the other per skill rather than both: in Claude Code a personal (global) skill takes precedence over a project one, so a project-local copy would not override a global install of the same skill.
348
+
349
+ ## Integrity model
350
+
351
+ The package ships a checksum manifest that is verified at install and by `verify` — it proves the installed bytes match what was packed, not who published it. Publisher identity is attested separately by npm provenance, generated by the trusted-publishing release pipeline. Verify it with `npm audit signatures` or on the package's npm page.
352
+
353
+ ## Network and telemetry
354
+
355
+ Zero telemetry, in the sense that matters: **nothing is ever sent to VegaStack or to any third party.**
356
+
357
+ The tool makes three kinds of network call, all to somewhere you already own:
358
+
359
+ - `doctor`'s single version check against registry.npmjs.org;
360
+ - `sync`'s shallow git fetch of the control room named by the project's `control-room:` knob;
361
+ - `stats push`'s git push of your statistics records into that same control room, and bounded `stats rollup`/`stats activity` reads of all-state issues, immutable acceptance receipts, delivery PRs and linked releases/tags;
362
+ - `dashboard`'s first-use fetch of `@vegastack/vegafactory-dashboard` from registry.npmjs.org, and that server's own reads of the GitHub API for the live board.
363
+
364
+ All of them but the two registry calls use your existing `gh` credential, and the control-room calls reach only your organization's own repository. `add`, `verify`, and `remove` are fully offline. Statistics are recorded only while the org's `stats:` policy says so, and a record carries counts and identifiers only — never transcript text (see [Statistics](#statistics)).
365
+
366
+ ## Requirements
367
+
368
+ - Node >= 24
369
+ - macOS or Linux. Windows is not yet supported (path handling; tracked in the repo issues).
370
+
371
+ ## Docs
372
+
373
+ Skill content, freshness model, and policies: [github.com/vegastack/vegafactory](https://github.com/vegastack/vegafactory)
374
+
375
+ MIT license.
376
+
377
+
378
+ ### Managed hooks and memory
379
+
380
+ Managed Claude/Codex launches disable native memory retrieval/generation while retaining authored project instructions and hooks. Supported controls are pinned to Claude Code2.1.263 and Codex0.153.4; missing/unsupported version or effective controls refuse. Codex also disables optional task-note/search context management and native-memory import; neither `memories=false` nor CLI help alone proves runtime exclusion. Session overrides do not alter personal settings or existing vendor stores. Actual qualification remains separately evidenced.
381
+
382
+ SessionStart/Stop/SessionEnd use a bounded local adapter with explicit harness, a 64 KiB input limit, one 500 ms capture/learning phase and one-second overall hook limit. The known Node child signals module readiness, validates registry/session/current policy without optional Git index locks, then obtains one trusted flush grant before any write. The supervisor enforces both fixed deadlines through owned-process-group termination. Finish plus exit 0 is required for context output. Stop and SessionEnd emit no instructions and start no network/model process. The shared session-start.mjs file must accompany either consumer. Only normalized identity fields reach `stats record --source managed-hook`; the CLI index preserves its existing durable private capture/deduplication consumer before flushing prepared learning. SessionStart uses `learning inspect --source managed-hook --json` for actual bounded verified lesson context. No fallback reads transcripts or native memory, and no capture/lesson-reuse success is inferred from silent exit. The precise wire and configuration examples are in the authored dev-setup harness-facts reference.
383
+
384
+
385
+ Codex0.153.4 applicability uses bounded read-only stdio hooks/config/requirements metadata APIs, with no thread, turn or hook execution. Only relevant sanitized fields survive; individual disabling and managed-only restrictions can refuse a locally present guard. Claude applicability currently remains unsupported and refuses: CLI version/help is not effective managed-settings evidence. The checked child gateway is integrated, while actual pinned-harness execution qualification and qualified shared-parent admission remain outstanding. Neither refusal changes personal settings or permits native-memory fallback. Pre-spawn refusal preserves a pending corrections reaction, and configuration evidence retains explicit unmanaged-possible effect coverage.
386
+
387
+
388
+ ### Recoverable execution and source checkpoints
389
+
390
+ Each execution attempt has a private record under `~/.vegastack/runs/<run-id>/`.
391
+ The wrapper records its process identity before admitting the vendor command. Ordinary
392
+ work has no elapsed-time cutoff. Cancellation allows five seconds for termination,
393
+ then up to two seconds to verify forced cleanup. Unknown termination retains ownership
394
+ and requires reconciliation; process completion does not imply accepted issue completion.
395
+ Default event logs contain lifecycle events and reason codes, without raw streams or argv.
396
+
397
+ `vegafactory status --json` reports durable state, terminal cause and pending delivery
398
+ counts. Legacy logs remain unverified diagnostics. The same task resumes only after its
399
+ original authority, ownership, saved source and execution setup are verified.
400
+
401
+ `vegafactory checkpoint --run-id ID --json` inspects saved progress. `--write` requires
402
+ an existing recorded exact checkpoint intent and freshly verified canonical approval.
403
+ Checkpoint preparation checks all newly exported commits, merge ancestry, paths and blobs,
404
+ including files removed by later commits. Delivery uses the approved task ref without force,
405
+ implicit tags or submodule pushes, and remote readback precedes acknowledgment. A failed
406
+ upload preserves local source. The dispatcher never stages an actively changing worktree.
407
+
408
+ This source checkpoint does not qualify unattended operation. Shared execution refuses
409
+ without the pinned execution-evidence verifier. Provider quota detection/availability,
410
+ shared checkpoint/status effect controllers and complete recovery/acceptance qualification
411
+ remain integration work; local fixtures do not establish those capabilities.
412
+
413
+ ### Verified lessons and recovery
414
+
415
+ `vegafactory learning checkpoint --run-id ID --json` flushes prepared observations from the owned recovery packet; `inspect` selects source-bound lessons and `revert --id ID --run-id ID --dry-run|--apply --json` checks an exact local inverse patch. Lessons need actual relevant ordinary-work checks and reversible approved files; mandatory reviews and protected rules retain their gates. No background model jobs or native-memory fallback are added.
416
+
417
+ Recovery compares exact approved task IDs and fresh source tuples, keeps prior attempts and pending delivery identities, and preserves unavailable checkpoints, unknown termination and ambiguous effects as explicit blockers. Within a live owned run, `dispatch --checkpoint-task ISSUE-TN --run-id RUN_ID --once --json` runs only its approved-base configured check and retains task-only completion proof; omission of `--once` previews. Same-home continuation and receiving-home construction use verified ownership transitions and new terminal segments. Receiving history and reporting remain explicitly unavailable when the old private context is absent. Accepted child delivery rows require verified review, exact local join and immutable receipt readback/linking. Source backups, silent hooks and successful process exit alone are insufficient.