jules-orchestrator-kit 0.72.2 → 0.73.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 (80) hide show
  1. package/.agent/prompts/{Overseer.md → Auditor.md} +3 -3
  2. package/.agent/prompts/{Alchemist.md → Database.md} +1 -1
  3. package/.agent/prompts/Debugger.md +25 -0
  4. package/.agent/prompts/{Scribe.md → Docs.md} +8 -5
  5. package/.agent/prompts/{Spectator.md → E2E.md} +9 -6
  6. package/.agent/prompts/{Janitor.md → Hygiene.md} +2 -2
  7. package/.agent/prompts/{Bolt.md → Performance.md} +1 -1
  8. package/.agent/prompts/Resilience.md +20 -0
  9. package/.agent/prompts/Security.md +21 -0
  10. package/.agent/prompts/Testing.md +30 -0
  11. package/.agent/prompts/Types.md +19 -0
  12. package/.agent/rules/jules-protocol.md +4 -3
  13. package/AGENTS.md +78 -96
  14. package/CHANGELOG.md +193 -0
  15. package/JULES_RULES_TEMPLATE.md +83 -96
  16. package/LICENSE +1 -1
  17. package/README.md +77 -439
  18. package/ROADMAP_V1.md +22 -132
  19. package/bin/agentctl.mjs +443 -144
  20. package/bin/init.js +6 -3
  21. package/index.mjs +9 -6
  22. package/package.json +1 -1
  23. package/scripts/asset-integrity-check.mjs +1 -1
  24. package/scripts/doc-sync-check.mjs +47 -0
  25. package/scripts/generate-command-reference.mjs +39 -0
  26. package/scripts/jules-dispatch.mjs +12 -113
  27. package/scripts/jules-merge-swarm.mjs +8 -196
  28. package/scripts/jules-patch.mjs +7 -8
  29. package/scripts/jules-queue-runner.mjs +6 -8
  30. package/scripts/jules-scan-todos.mjs +10 -38
  31. package/scripts/jules-self-audit.mjs +8 -139
  32. package/scripts/jules-status.mjs +32 -38
  33. package/scripts/jules-webhook-receiver.mjs +1 -1
  34. package/src/assertions.mjs +5 -50
  35. package/src/bidi-guard.mjs +36 -0
  36. package/src/budget.mjs +3 -14
  37. package/src/config.mjs +2 -6
  38. package/src/dashboard.mjs +7 -9
  39. package/src/dispatch.mjs +212 -0
  40. package/src/engine.mjs +40 -16
  41. package/src/evidence.mjs +10 -41
  42. package/src/execution-envelope.mjs +13 -1
  43. package/src/flaky-ledger.mjs +1 -1
  44. package/src/fs-atomic.mjs +72 -0
  45. package/src/git.mjs +298 -27
  46. package/src/mcp.mjs +296 -7
  47. package/src/memory.mjs +0 -0
  48. package/src/merge-swarm.mjs +202 -0
  49. package/src/ops/cli-intent.mjs +1 -0
  50. package/src/ops/command-registry.mjs +796 -70
  51. package/src/ops/doctor-registry.mjs +134 -47
  52. package/src/ops/handover.mjs +3 -27
  53. package/src/ops/pr-harvest.mjs +1 -1
  54. package/src/prompt-guard.mjs +33 -3
  55. package/src/provider.mjs +51 -7
  56. package/src/remediation.mjs +2 -2
  57. package/src/role-resolver.mjs +113 -3
  58. package/src/router.mjs +19 -11
  59. package/src/runtime-env.mjs +67 -0
  60. package/src/scaffold.mjs +3 -1
  61. package/src/scope-guard.mjs +249 -0
  62. package/src/secret-scanner.mjs +530 -0
  63. package/src/security.mjs +81 -2972
  64. package/src/self-audit.mjs +140 -0
  65. package/src/session-ops.mjs +29 -0
  66. package/src/stability.mjs +8 -1
  67. package/src/stack-detector.mjs +5 -2
  68. package/src/state.mjs +45 -0
  69. package/src/swarm.mjs +76 -0
  70. package/src/task-optimizer.mjs +34 -7
  71. package/src/telemetry.mjs +23 -0
  72. package/src/test-tamper-guard.mjs +2173 -0
  73. package/src/todo-scanner.mjs +129 -0
  74. package/src/web-templates.mjs +3 -3
  75. package/src/webhook.mjs +10 -3
  76. package/src/wizard-init.mjs +12 -20
  77. package/src/wizard-oracle.mjs +4 -3
  78. package/src/wizard-task.mjs +37 -9
  79. package/.agent/prompts/Sentinel.md +0 -18
  80. package/scripts/utils.mjs +0 -241
package/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
 
5
5
  ### Task orchestration and automated verification harness for coding agents
6
6
 
7
- <br/>
8
-
9
7
  [![Jules PR Audit](https://github.com/FullThrottle83/jules-orchestrator-kit/actions/workflows/jules-audit.yml/badge.svg)](https://github.com/FullThrottle83/jules-orchestrator-kit/actions/workflows/jules-audit.yml)
10
8
  [![npm version](https://img.shields.io/npm/v/jules-orchestrator-kit.svg)](https://www.npmjs.com/package/jules-orchestrator-kit)
11
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -13,148 +11,73 @@
13
11
  [![Zero Dependencies](https://img.shields.io/badge/dependencies-0%20native-blue.svg)](https://nodejs.org)
14
12
  [![Platform: Linux | macOS | Windows](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-blueviolet.svg)](https://nodejs.org)
15
13
 
16
- <br/>
17
-
18
- <p align="center">
19
- <b>Zero-dependency safety gatekeeper, scoped sandboxing, and automated verification for coding agents.</b><br/>
20
- Runs deterministic test verification, secret scrubbing, and automated repair loops across any stack or monorepo before opening Pull Requests.
21
- </p>
14
+ **Zero-dependency safety gatekeeper, scoped sandboxing, and automated verification for coding agents.**
15
+ Runs deterministic test verification, secret scrubbing, and automated repair loops across any stack or monorepo before opening Pull Requests.
22
16
 
23
- <br/>
17
+ [Quickstart](#quickstart) • [Key Workflows](#key-workflows) • [Architecture](#architecture) • [Verification Profiles](#verification-profiles) • [CLI](#cli) • [Docs](docs/README.md)
24
18
 
25
- <p align="center">
26
- <a href="#quickstart">Quickstart</a> &nbsp;•&nbsp;
27
- <a href="#any-repository">Any Repository</a> &nbsp;•&nbsp;
28
- <a href="#overview">Overview</a> &nbsp;•&nbsp;
29
- <a href="#target-workflows">Target Workflows</a> &nbsp;•&nbsp;
30
- <a href="#triage-guidelines">Triage</a> &nbsp;•&nbsp;
31
- <a href="#cli-docs">CLI Docs</a> &nbsp;•&nbsp;
32
- <a href="#deep-dives">Deep Dives</a>
33
- </p>
19
+ <img src="docs/assets/hero-flow.svg" alt="Autonomous Orchestration Pipeline" width="100%" />
34
20
 
35
21
  </div>
36
22
 
37
- <br/>
23
+ ---
38
24
 
39
- <p align="center">
40
- <img src="docs/assets/hero-flow.svg" alt="Autonomous Orchestration Pipeline" width="100%" />
41
- </p>
25
+ <a id="overview"></a>
26
+ ## Overview
27
+
28
+ > **`jules-orchestrator-kit` serves as a safety gate and automated test runner for AI coding agents.**
29
+ > It drafts falsifiable task envelopes, executes verification commands in an isolated sandbox, automatically retries on test failures using captured diagnostics, and approves PRs only when 100% of tests pass cleanly.
42
30
 
43
- <br/>
31
+ * **Multi-Provider Dispatch:** Google Jules (hosted REST), Claude Code CLI, OpenAI Codex CLI, and Gemini CLI; `agentctl providers` reports what this machine can dispatch to. Vendor-neutral `AGENT_*`/`JULES_*` environment variables.
32
+ * **Dynamic Verification Profiles:** `verify.profile: minimal | standard | max` schedules linting, tests, builds, AST mutation testing, and stability probing per toolchain. Stack-native CI via `agentctl ci init`.
33
+ * **Autonomous OODA Repair Loop:** Captures test stdout/stderr traces, fingerprints failure patterns, and runs automated repair cycles (up to 3 turns) before requesting human intervention.
34
+ * **Fail-Closed Security:** Deny-before-Allow scope rules, high-entropy and base64 secret scrubbing, semantic test-tamper detection (weakened/removed/vacuous assertions, dead-guard conditions), binary & symlink payload inspection, and a strict 75 KB diff governor.
35
+ * **Zero Runtime Dependencies:** Native Node.js 20+ standard modules only. Cross-platform parity verified on Linux, macOS, and Windows (Node 20, 22, 24).
36
+ * **Mechanically Verified:** Comprehensive test suite of **1530 unit tests across 204 suites**, with 59 activation-coverage canaries and 100% pass rate.
44
37
 
45
- ---
38
+ Any-repository configuration (monorepo scoping, 26+ ecosystem stack detection, provider selection, CI generation) is derived from your manifests — see the [Configuration Reference](docs/configuration.md).
46
39
 
47
- <br/>
40
+ ---
48
41
 
49
42
  <a id="quickstart"></a>
50
43
  ## Quickstart
51
44
 
52
- Get running in any repository in 3 commands. `init` asks seven questions and
53
- fills in a sensible answer for each; `--yes` accepts all of them, detects the
54
- stack, and probes the test command it picked before writing it down.
45
+ Configure any repository in three steps. `init` inspects project manifests, detects the stack, probes the test runner, and scaffolds repository guardrails:
55
46
 
56
47
  ```bash
57
- # 1. Scaffold config, AGENTS.md, role prompts and guardrails
58
- # (auto-detects Python, Rust, Go, Node, PHP, etc.)
59
- # Drop --yes to choose provider, plan, profile and workflows yourself.
48
+ # 1. Scaffold configuration, AGENTS.md, role prompts, and guardrails
49
+ # Auto-detects Python, Rust, Go, Bun, Deno, Node, PHP, .NET, etc.
50
+ # Omit --yes to select provider, plan tier, and verification profile interactively.
60
51
  npx jules-orchestrator-kit init --yes
61
52
  ```
62
53
 
63
54
  ```bash
64
- # 2. Commit what init wrote — .agent/config.yml is protected by BUILTIN_PROTECT,
65
- # so leaving it uncommitted makes the first gate reject your tree
55
+ # 2. Commit the scaffolded configuration
56
+ # .agent/config.yml is protected by scope guards; committing establishes the trusted base policy.
66
57
  git add .agent AGENTS.md SPEC.md CONSTRAINTS.md .gitignore && git commit -m "chore: add agent config"
67
58
  ```
68
59
 
69
60
  ```bash
70
- # 3. Author a scoped, verified task envelope with guardrails & secret scrubbing
71
- # Interactive by default. Pass the prompt to skip straight to review:
72
- npx jules-orchestrator-kit task create -p "Refactor the invoice module"
61
+ # 3. Author a scoped, verified task envelope
62
+ # Interactive by default. Pass --prompt and --verify to define requirements directly:
63
+ npx jules-orchestrator-kit task create -p "Refactor invoice calculation" --verify "npm test"
73
64
  ```
74
65
 
75
- `init` reads the repository, not a template: it detects the stack, picks a
76
- provider this machine can actually reach, and generates a CI workflow for the
77
- toolchain the project uses. Nothing about your setup is assumed.
78
-
79
66
  ```bash
80
67
  # Which agents can this machine dispatch to, and what is missing for the rest?
81
68
  npx jules-orchestrator-kit providers
82
- ```
83
69
 
84
- ```bash
85
70
  # How hard should the gate verify agent work? (minimal | standard | max)
86
71
  npx jules-orchestrator-kit profile --set max
87
72
  ```
88
73
 
89
74
  > [!TIP]
90
- > **Not sure what to run next?**
91
- > `agentctl` with no arguments reads the repository state and prints the single
92
- > next step — missing git repo, missing API key, empty queue, tasks ready to
93
- > dispatch — instead of a wall of commands.
94
-
95
- > [!TIP]
96
- > **Prefer a global CLI?**
97
- > Install globally to access `agentctl` directly:
98
- > ```bash
99
- > npm install -g jules-orchestrator-kit
100
- > agentctl init && agentctl task create && agentctl queue
101
- > ```
102
-
103
- <br/>
104
-
105
- ---
106
-
107
- <br/>
108
-
109
- <a id="any-repository"></a>
110
- ## Using It In Any Repository
111
-
112
- Four things differ between projects, and the kit resolves each one from the
113
- repository rather than from a template.
114
-
115
- | What differs | How it is resolved | Inspect / override |
116
- | :--- | :--- | :--- |
117
- | **Which suites to run** | A monorepo change resolves to the sub-projects it touches (`verify.scope: affected`), widening back to the root command as soon as it reaches a shared file. Off by default, on for repositories `init` detects as monorepos. | `agentctl check --json` · `verify.scope` in `.agent/config.yml` |
118
- | **The stack** | `detectStack()` recognises 24+ ecosystems (Cargo, Go, Python/Django, Maven/Gradle, .NET, PHP/Laravel, Ruby, Elixir, Swift, Flutter/Dart, CMake, Bun, Deno, Node + Turbo/pnpm/Nx workspaces) and derives the setup, lint, test and build commands from the manifest it finds. | `agentctl doctor` · `verify:` in `.agent/config.yml` |
119
- | **The agent** | `provider:` selects Google Jules (hosted REST), the Claude Code CLI, the Codex CLI or the Gemini CLI. Readiness means a credential for the hosted one and a binary on `PATH` for the local ones — never both. | `agentctl providers` · `agentctl init --provider <name>` |
120
- | **How hard to verify** | `verify.profile` expands at load time into a stage pipeline that skips gates the runtime cannot support, and says which and why. | `agentctl profile` · `agentctl profile --set max` |
121
- | **Where CI runs** | A workflow is *generated* for the detected stack — the project's toolchain plus Node for the CLI — not copied from this repository. | `agentctl ci init [--target github\|gitlab]` |
122
-
123
- ### Verification profiles
124
-
125
- | Profile | Runs | Use when |
126
- | :--- | :--- | :--- |
127
- | `minimal` | setup → tests | The suite is slow, the stack is unfamiliar, or it is day one. |
128
- | `standard` | setup → lint → tests → build → anti-tamper on the diff | The everyday gate. Scaffolded by default. |
129
- | `max` | everything above → mutation scoring → V8 diff coverage *(Node runtimes only)* → 3-pass flakiness probe | The change is consequential, or an agent has been getting green too easily. |
130
-
131
- Nothing in a profile is Node-specific by assumption. Gates a runtime cannot
132
- support are skipped with a stated reason rather than failing the diff — a Cargo
133
- repository on `max` runs mutation and stability probing and is never asked for
134
- `NODE_V8_COVERAGE`.
135
-
136
- ### No provider? Still useful
137
-
138
- Every gate below runs locally with no API key, no CLI and no network:
139
- `agentctl check`, `mutate`, `coverage`, `probe`, `assert`, `evidence`, `rules`,
140
- `doctor`. The provider is only needed to *dispatch* work, not to verify it.
141
-
142
- <br/>
75
+ > Running `agentctl` without arguments inspects the local repository state (git status, active API keys, queued tasks) and prints the immediate next action. Install globally (`npm install -g jules-orchestrator-kit`) for direct `agentctl` access.
143
76
 
144
77
  ---
145
78
 
146
- <br/>
147
-
148
- <a id="overview"></a>
149
- ## Overview
150
-
151
- > **`jules-orchestrator-kit` serves as a safety gate and automated test runner for AI coding agents.**
152
- > It drafts falsifiable task envelopes, executes verification commands in an isolated sandbox, automatically retries on test failures using captured diagnostics, and approves PRs only when 100% of tests pass cleanly.
153
-
154
- <br/>
155
-
156
- <a id="target-workflows"></a>
157
- ### Target Workflows
79
+ <a id="key-workflows"></a>
80
+ ## Key Workflows
158
81
 
159
82
  | Persona / Team | Primary Value | Everyday Commands |
160
83
  | :--- | :--- | :--- |
@@ -163,346 +86,71 @@ Every gate below runs locally with no API key, no CLI and no network:
163
86
  | **Monorepo Teams** | Isolate subproject verification (`backend/`, `frontend/`, `cli/`) so agent edits never thrash global test suites. | `agentctl swarm`<br/>`agentctl lock` |
164
87
  | **Platform & Security** | Enforce fail-closed security policies, pre-commit secret scrubbing (including base64), and strict 75 KB diff limits. | `agentctl doctor`<br/>`agentctl dashboard` |
165
88
 
166
- <br/>
89
+ ### Triage: When to Dispatch Tasks
167
90
 
168
- ---
169
-
170
- <br/>
171
-
172
- <a id="triage-guidelines"></a>
173
- ## Triage Guidelines: When to Dispatch Tasks
91
+ **Ideal tasks (high merge rate):** scoped bug fixes and code changes verifiable by unit tests (`pytest`, `npm test`, `cargo test`, `dotnet test`, `go test`) · type & linter migrations · dependency bumps and CVE patches · backend refactoring · headless E2E/Playwright-verified UI changes.
174
92
 
175
- To maximize PR merge rates, dispatch tasks according to deterministic boundaries:
93
+ **Out of scope (keep human-in-the-loop):** unverifiable visual UI tweaks without automated regression tests · closed proprietary platforms without a CLI or git integration · unmocked live cloud systems · protected infrastructure files (`.github/workflows/`, deployment keys, agent gate rules — blocked fail-closed by the Agent Scope Guard).
176
94
 
177
- ### Ideal Tasks (High Success Rate)
178
- * **Scoped Bug Fixes & Code Changes:** Mechanically verifiable via unit tests (`pytest`, `npm test`, `cargo test`, `dotnet test`, `go test`).
179
- * **Type & Linter Migrations:** Strict mode conversions, type annotations, and dead code elimination.
180
- * **Dependency Bumps & CVE Patches:** Upgrading vulnerable lockfile dependencies with hermetic test validation.
181
- * **Backend Refactoring:** Modularizing route controllers, API handlers, or database schemas.
182
- * **Headless E2E / Playwright Tests:** UI changes verified by automated visual snapshots (`npx playwright test`).
183
-
184
- ### Out of Scope (Keep Human-in-the-Loop)
185
- * **Unverifiable Visual UI Tweaks:** CSS/Tailwind adjustments without automated Playwright regression tests.
186
- * **Closed Proprietary Platforms Without CLI:** Systems lacking local CLI or git integration (e.g. Salesforce GUI, Webflow).
187
- * **Unmocked Live Cloud Systems:** Code requiring live connections to external cloud APIs without local mocks or emulators.
188
- * **Protected Infrastructure Files:** Direct edits to `.github/workflows/`, deployment keys, or agent security gate rules (blocked fail-closed by `Agent Scope Guard`).
189
-
190
- <br/>
95
+ Task envelope recipes: [EXAMPLES.md](EXAMPLES.md).
191
96
 
192
97
  ---
193
98
 
194
- <br/>
195
-
196
- ## Core Capabilities
99
+ <a id="architecture"></a>
100
+ ## Architecture
197
101
 
198
- * **Provider-Agnostic:** Dispatches to Google Jules (hosted REST), the Claude Code CLI, the OpenAI Codex CLI or the Gemini CLI. `agentctl providers` probes each one — a credential for the hosted provider, a binary on `PATH` for the local ones — and every verification gate works with no provider configured at all.
199
- * **Vendor-Neutral Configuration:** Every `JULES_*` environment variable also answers to an `AGENT_*` spelling (`AGENT_API_KEY`, `AGENT_REPO`, `AGENT_SWARM_CONCURRENCY`). The legacy name always wins where both are set, so adding an alias cannot change a working setup.
200
- * **One-Word Verification Depth:** `verify.profile: minimal | standard | max` expands at load time into a stack-aware pipeline — `max` adds mutation scoring, flakiness probing and, where the runtime emits it, V8 diff coverage. A Cargo repository is never asked for `NODE_V8_COVERAGE`.
201
- * **Generated, Not Copied, CI:** `agentctl ci init` writes a GitHub Actions or GitLab job carrying the toolchain the detected stack needs (`setup-python`, `setup-go`, `setup-java`, …) plus Node for the CLI itself.
202
- * **Zero Runtime Dependencies:** Built exclusively on Node.js 20+ built-in modules (`node:fs`, `node:child_process`, `node:crypto`, `node:path`, `node:http`, `node:tty`, `node:test`).
203
- * **Cross-Platform Parity:** Verified 100% green across Linux, macOS (Darwin), and Windows on Node 20, 22, and 24.
204
- * **Autonomous Self-Healing Loop:** Captures test stderr/stdout, fingerprints error traces, and feeds structured context back into automated repair turns (up to 3 attempts) before human escalation.
205
- * **Fail-Closed Verification:** A change that ran no verification command at all is rejected, not approved — "nothing to run" is not a pass. Repositories using only the scope and secret phases opt out explicitly with `verify.required: false`.
206
- * **Anti-Tamper That Reads Semantics:** Counting assertions cannot see a value check swapped for a truthiness check. The guard tracks assertions that name an expected value, so weakening a test is a violation even when the line count is unchanged.
207
- * **Binary-Aware Scanning:** Files git renders as `Binary files ... differ` are read directly for structured credentials, and their real size is charged against the diff ceiling, so a leading NUL byte cannot hide a token and a committed blob cannot walk past the payload governor.
208
- * **Fail-Closed Security & Secret Redaction:** Evaluates explicit Deny rules before Allow rules against canonicalized, case-folded paths. Redacts high-entropy keys and base64-encoded credentials (such as Kubernetes `Secret` manifests).
209
- * **Complexity & Cost Router:** Zero-dependency heuristic classifier (`src/router.mjs`) routing mechanical tasks to lightweight models while reserving primary models for complex refactors, with a `node --check` syntax-verification gate that transparently escalates a FAST-tier result to the primary provider if it left broken JS on disk.
210
- * **Terminal UI & Diagnostic Matrix (`agentctl doctor`):** Interactive terminal dashboard, task sidecar manager, and automated transactional self-repair.
211
- * **Verified Test Suite:** Tested with **1403 unit tests across 196 suites**, green on every supported platform.
102
+ Two decoupled pipelines — **Dispatch** (`task create` → `queue`/`dispatch`, routed and hydrated per provider) and **Verification** (`agentctl gate [--fix]`, four audit phases plus the OODA repair loop) — communicate through the repository and the telemetry ledger.
212
103
 
213
- <br/>
214
-
215
- ---
216
-
217
- <br/>
218
-
219
- <a id="cli-docs"></a>
220
- ## CLI Command Reference (`agentctl`)
221
-
222
- `agentctl` is the unified command-line interface for `jules-orchestrator-kit`, available via `npx jules-orchestrator-kit <command>` or `agentctl <command>`.
223
-
224
- | Command | Usage | Description | Exit Codes |
225
- | :--- | :--- | :--- | :--- |
226
- | `init` | `agentctl init [--interactive] [--tier pro] [--provider <name>] [--profile <name>] [--force]` | Interactive onboarding wizard & stack detector. Generates `.agent/config.yml` and scaffolds `AGENTS.md`, the role prompts, the guardrails and the runtime `.gitignore` entries. Existing files are preserved unless `--force`. | `0` (Created) |
227
- | `budget` | `agentctl budget [--by-user] [--json] [reset]` | Reports rolling 24h task budget, quota headroom, and per-developer task attribution without external auth servers. | `0` (Status), `2` (Arg Error) |
228
- | `task create` | `agentctl task create [<prompt>] [--title <t>] [-p <prompt>] [-f <file>] [--template <id>] [--role <name>] [--tier fast\|complex]` | Interactively authors & scopes falsifiable task envelopes with secret scrubbing, preflight gate checks, and DAG dependency wiring. | `0` (Queued), `1` (Secret/Unfalsifiable) |
229
- | `task template` | `agentctl task template [<id>] [--list] [--json]` | Lists and synthesizes pre-calibrated task envelopes (Web, Deep Think, Universal & Agent Hardening: `web-cwv`, `web-wcag`, `web-seo`, `web-playwright`, `agent-dead-code-audit`, `web-flaky-heal`, `web-i18n`, `web-ai-access`, `agent-qa-mutation`, `agent-ci-falsify`, `agent-service-isolate`, `agent-error-paths`, `agent-security-audit`, `agent-dep-audit`, `agent-doc-drift`, `agent-config-audit`, `agent-api-contract`, `deep-debug`, `deep-feature`, `deep-optimize`, `deep-harden`). | `0` (Listed/Synthesized) |
230
- | `dispatch` | `agentctl dispatch [<prompt>] [-p <prompt>] [-f <file>] [-r <role>] [-t <tier>] [--author <name>] [--check-premise] [--auto-pr] [--repoless] [--dry-run]` | Dispatches autonomous task to the active provider with pre-flight idempotency checks, payload limits, and role prompt resolution. `--dry-run` stops short of the provider call and reports itself as a rehearsal rather than a dispatch. | `0` (Dispatched), `1` (Error) |
231
- | `plan approve` | `agentctl plan approve <sessionId> [--dry-run] [--json]` | Approves pending execution plan for an active Jules session (`:approvePlan`) with automatic 404/503 retry backoff. | `0` (Approved), `1` (Error) |
232
- | `session get` | `agentctl session get <sessionId> [--dry-run] [--json]` | Retrieves live session lifecycle state from provider REST API with token rotation. | `0` (Fetched), `1` (Error) |
233
- | `patch` | `agentctl patch <sessionId> [--apply] [--save <path>] [--json]` | Extracts raw git diff patch from a completed Jules session and tests or applies it locally with `git apply --check` safety. | `0` (Clean/Applied), `1` (Conflict/Error) |
234
- | `retry` | `agentctl retry <sessionId> [--role <role>] [--with-failure] [--json]` | Fetches error traces and activity logs from a failed session and synthesizes a targeted OODA retry dispatch. | `0` (Dispatched), `1` (Error) |
235
- | `prune` | `agentctl prune [--age 7d] [--state <state>] [--delete] [--yes] [--json]` | Queries and batch-archives or deletes stale/completed sessions via Jules v1alpha API to keep workspaces clean. | `0` (Cleaned) |
236
- | `pr harvest` | `agentctl pr harvest [--tier r0,r1] [--limit <n>] [--auto] [--allow-no-checks] [--dry-run]` | Discovers open agent PRs, evaluates CI checks & risk tiers, and auto-squashes green low-risk changes autonomously. A PR reporting **no** CI checks is skipped unless `--allow-no-checks` is passed, and an unavailable changed-file list blocks rather than classifying as low risk. | `0` (Triaged/Merged), `1` (Error) |
237
- | `providers` | `agentctl providers [--json]` | Probes every built-in provider and reports which ones this machine can dispatch to, what each one is missing, and which is active. For a CLI provider, "ready" means the binary is on `PATH` — it does not prove the CLI is signed in. | `0` (Active provider ready), `1` (Not ready) |
238
- | `provider set` | `agentctl provider set <name>` | Switches the active provider in `.agent/config.yml` in place, preserving comments. | `0` (Set), `1` (No manifest), `2` (Name missing) |
239
- | `profile` | `agentctl profile [--list] [--set minimal\|standard\|max] [--json]` | Shows the verification stages the configured profile expands to on this stack, or writes a new profile into `.agent/config.yml` without disturbing comments. | `0` (Shown/Set), `2` (Unknown profile) |
240
- | `ci init` | `agentctl ci init [--target github\|gitlab] [--force] [--dry-run] [--json]` | Generates a stack-aware CI gate workflow (`.github/workflows/agent-gate.yml` or `.gitlab-ci.agent-gate.yml`) that runs `agentctl check --mode committed`. Refuses to overwrite without `--force`. | `0` (Written/Skipped), `1` (Write error), `2` (Unknown target) |
241
- | `doctor` | `agentctl doctor [--probe] [--json]` | Diagnostic check runner. `--probe` additionally starts the configured provider's CLI to confirm it answers, rather than only finding it on `PATH`. | `0` (Healthy), `1` (Failures) |
242
- | `queue` | `agentctl queue [--dag] [--concurrency <n>] [--dry-run] [--json]` | Consumes and executes task envelopes in `.agent/jules-queue/` with Kahn's DAG dependency resolution. Non-task files (manifests, `README.md`) are skipped, and `--dry-run` previews without moving anything. | `0` (Complete) |
243
- | `swarm` | `agentctl swarm [--json]` | Runs parallel multi-agent swarm across worker slots with PID liveness detection. | `0` (Complete) |
244
- | `check` / `gate` / `audit`| `agentctl check [--mode working-tree] [--fix] [--allow-protected] [--allow-test-change <kind>] [--json] [--json-report <path>]` | Runs security, secret scanning, rules budget audit, and tiered verification gates (with declarative assertion support) against working tree or branch. | `0` (Approved), `1` (Budget/Arg), `3` (Scope), `4` (Verify), `5` (Diff >75K), `6` (Secret **or** test integrity), `8` (Flaky) |
245
- | `mutate` / `mutation` | `agentctl mutate [--min-score <n>] [--max-mutants <n>] [--cmd <testCmd>] [--json]` | Runs zero-dependency diff mutation testing harness on changed hunks with operator inversion and safety rollback. | `0` (Passed), `1` (Score Low) |
246
- | `coverage` | `agentctl coverage [--min <pct>] [--cmd <testCmd>] [--base <ref>] [--json]` | Runs native zero-dependency V8 diff coverage check against added diff lines. | `0` (Passed), `1` (Low Coverage) |
247
- | `probe` / `stability` | `agentctl probe [--repeat <n>] [--min <passRate>] [--cmd <testCmd>] [--json]` | Probes test suite flakiness across N consecutive iterations with oscillation detection. | `0` (Passed), `1` (Flaky) |
248
- | `perf` / `event-loop` | `agentctl perf [--max-ms <n>] [--cmd <testCmd>] [--json]` | Monitors Node.js Event Loop delay and Big-O lag to prevent main-thread event loop starvation. | `0` (Healthy), `1` (Lag Exceeded) |
249
- | `fix` | `agentctl fix [--file <path>] [--task] [--dry-run] [--json]` | Auto-repairs failure traces from piped stdin (`npm test 2>&1 \| agentctl fix`) or synthesizes OODA queue tasks. | `0` (Resolved), `1` (Failed) |
250
- | `rules` | `agentctl rules <check\|compile> [--out <path>] [--json]` | Audits instruction files against character/line budgets or compiles unified rules block with SHA-256 and length anti-truncation sentinels. | `0` (Valid/Compiled), `1` (Violations) |
251
- | `assert` | `agentctl assert [--dir <d>] [--file <f>] [--max-mb <n>] [--gzip] [--targets <g>] [--patterns <p>] [--json] [--json-report <p>]` | Runs declarative zero-dependency verification assertion primitives (`assert:dir-size`, `assert:file-size`, `assert:file-patterns`, `assert:exists`, `assert:mutation`, `assert:test-integrity`, `assert:diff-coverage`, `assert:test-stability`, `assert:event-loop-lag`). | `0` (Passed), `1` (Assertion Failed) |
252
- | `rollback` | `agentctl rollback [sessionId \| --latest]` | Restores exact commit, uncommitted files, and cleans orphan task worktrees from pre-flight checkpoints. | `0` (Restored), `1` (Error) |
253
- | `resume` | `agentctl resume <sessionId> --response "<reply>"` | Streams engineer response back into active Google Jules warm session context window. | `0` (Resumed), `1` (Error) |
254
- | `test-gen` | `agentctl test-gen --title <t> --spec <s> [--run]` | Scaffolds falsifiable unit tests, verifies RED failure state, and locks test in `scope.deny`. | `0` (Scaffolded/Red) |
255
- | `dashboard` | `agentctl dashboard [port]` | Starts zero-dependency local HTTP telemetry and audit visualizer dashboard. | `0` (Running) |
256
- | `evidence` | `agentctl evidence <generate\|verify\|show>` | Generates, verifies, or prints SHA-256 evidence manifests (unkeyed digests: tamper-evident, not signed) with test-tamper locking. | `0` (Verified), `1` (Tamper) |
257
- | `flaky` | `agentctl flaky <status\|heal\|reset>` | Manages Wilson-quarantined tests (Exit Code 8) and dispatches automated anti-flakiness healing swarms. | `0` (Healed/Listed) |
258
- | `mcp` | `agentctl mcp` | Starts stdio Model Context Protocol (MCP) server for Claude, Cursor, and Antigravity. | `0` / Stdio stream |
259
- | `mcp init` | `agentctl mcp init [--target cursor\|vscode\|claude\|all]` | 1-click config scaffolding for Cursor (`.cursor/mcp.json`), VS Code tasks (`tasks.json`), and Claude Desktop. | `0` (Scaffolded) |
260
-
261
- <br/>
262
-
263
- ---
264
-
265
- <br/>
266
-
267
- <a id="deep-dives"></a>
268
- ## Deep Dives & Technical Reference
269
-
270
- <details>
271
- <summary><b>Configuration Reference (<code>.agent/config.yml</code>)</b></summary>
272
-
273
- <br/>
274
-
275
- `jules-orchestrator-kit` auto-detects stack defaults, but allows explicit overrides through `.agent/config.yml`:
276
-
277
- ```yaml
278
- # .agent/config.yml — Universal Orchestrator Configuration
279
-
280
- version: 1
281
- provider: "jules" # Provider key ("jules" | "claude-code" | "codex" | "gemini-flash")
282
- baseBranch: "main" # Default target base branch
283
- branchPrefix: "agent/" # Prefix for task branches
284
-
285
- # Verification commands (auto-detected by Stack Detector if omitted)
286
- verify:
287
- test: "npm test"
288
- build: "npm run build"
289
- timeout_ms: 300000 # Per-stage kill time in ms (default 300000)
290
- minTests: 1 # Floor for "the suite actually ran" (0 disables)
291
- required: true # false = this repo uses only the scope/secret phases
292
-
293
- # Scope protection rules (Deny-first evaluation)
294
- scope:
295
- deny:
296
- - ".github/**"
297
- - "keys/**"
298
-
299
- # Plan tier. Defaults to `free` when unset — the kit will not assume you are
300
- # paying for a larger plan than you are. Set this to unlock your real limits.
301
- tier: "free" # free | pro | ultra
302
-
303
- # Risk model for auto-merge triage. Builtin patterns cover what is dangerous in
304
- # any repository (CI, lockfiles, migrations, key material, IaC, auth). Add the
305
- # paths that are sensitive to YOUR domain — these EXTEND the builtins.
306
- risk:
307
- restricted: # R3 — never auto-merged
308
- - "**/pricing/**"
309
- - "**/billing/**"
310
- consequential: # R2 — always requires a human read
311
- - "packages/api/**"
312
- max_routine_diff_lines: 400
313
-
314
- # Operational limits & governors (tier defaults shown; any key here overrides)
315
- limits:
316
- diffKb: 75 # Diff Payload Governor limit
317
- promptKb: 50 # Maximum prompt payload size
318
- dailyTasks: 300 # Task quota per rolling 24h window (not per calendar day)
319
- repairAttempts: 3 # Maximum repair iterations
320
- concurrency: 15 # Worker slots (defaults free: 3, pro: 8, ultra: 15)
321
-
322
- # Dynamic Complexity & Cost Router — opt-in, disabled by default.
323
- router:
324
- enabled: false
325
- fast: "gemini-flash" # Trivial/mechanical tasks (score <= threshold)
326
- complex: "jules" # Complex/multi-file/safety-sensitive tasks
327
- threshold: 0 # Heuristic score threshold for escalation
328
- ```
329
-
330
- </details>
331
-
332
- <br/>
333
-
334
- <details>
335
- <summary><b>26+ Supported Languages, Frameworks & Stacks</b></summary>
336
-
337
- <br/>
338
-
339
- ```
340
- Ecosystems Natively Detected & Verified by Stack Detector:
341
- ├── Python / Django (pyproject.toml, requirements.txt, setup.py, manage.py)
342
- ├── Systems / Rust Cargo (Cargo.toml)
343
- ├── Systems / Go (go.mod)
344
- ├── Systems / CMake & Make (CMakeLists.txt, Makefile)
345
- ├── JS / TS Workspaces (turbo.json, pnpm-workspace.yaml, nx.json)
346
- ├── JS / TS Runtimes (bunfig.toml, deno.json, package.json)
347
- ├── PHP / Laravel / WordPress (composer.json, phpunit.xml, pest.php, artisan, wp-cli.yml)
348
- ├── .NET / C# / F# (*.sln, *.csproj, *.fsproj, global.json)
349
- ├── Mobile / Dart / Flutter (pubspec.yaml)
350
- ├── Mobile / Swift / Xcode (Package.swift)
351
- ├── Mobile / React Native (app.json, react-native.config.js)
352
- ├── Web3 / Solidity Foundry (foundry.toml, remappings.txt) — offline-enforced
353
- ├── Web3 / Solidity Hardhat (hardhat.config.js, hardhat.config.ts)
354
- ├── Elixir / Phoenix (mix.exs)
355
- ├── Ruby / Rails (Gemfile)
356
- ├── Java / Maven & Gradle (pom.xml, build.gradle, build.gradle.kts)
357
- └── Devcontainers & Docker Compose (.devcontainer/devcontainer.json, docker-compose.yml, Dockerfile)
358
- ```
359
-
360
- </details>
361
-
362
- <br/>
363
-
364
- <details>
365
- <summary><b>System Architecture & Verification Diagrams</b></summary>
366
-
367
- <br/>
368
-
369
- ### 1. Control Plane Architecture Layers
370
104
  <p align="center">
371
105
  <img src="docs/assets/architecture-layers.svg" alt="Control Plane Architecture Layers" width="100%" />
372
106
  </p>
373
107
 
374
- ### 2. Autonomous Verification & Repair Loop
375
- <p align="center">
376
- <img src="docs/assets/ooda-loop-cycle.svg" alt="Autonomous Verification & Repair Loop" width="100%" />
377
- </p>
378
-
379
- ### 3. Polyglot Monorepo Scoped Boundary Resolver
380
- <p align="center">
381
- <img src="docs/assets/monorepo-resolver.svg" alt="Polyglot Monorepo Scoped Boundary Resolver" width="100%" />
382
- </p>
108
+ Full sequence diagrams (verification & repair loop, monorepo boundary resolver, swarm topology, silence governor, flaky-healing swarm): [docs/architecture.md](docs/architecture.md).
383
109
 
384
- ### 4. Multi-Agent Parallel Swarm Topology
385
- <p align="center">
386
- <img src="docs/assets/swarm-topology.svg" alt="Multi-Agent Parallel Swarm Topology" width="100%" />
387
- </p>
388
-
389
- </details>
390
-
391
- <br/>
110
+ ---
392
111
 
393
- <details>
394
- <summary><b>Multi-Provider Failover & Cost Router SDK</b></summary>
112
+ <a id="verification-profiles"></a>
113
+ ## Verification Profiles
395
114
 
396
- <br/>
115
+ | Profile | Stages | Recommended Use |
116
+ | :--- | :--- | :--- |
117
+ | `minimal` | Setup → Tests | Large/slow test suites or initial project onboarding. |
118
+ | `standard` | Setup → Lint → Tests → Build → Diff Anti-Tamper | Default gate for routine pull requests. |
119
+ | `max` | All stages above → AST Mutation Scoring → V8 Diff Coverage *(Node)* → 3-Pass Flakiness Probe | High-risk refactors or critical infrastructure changes. |
397
120
 
398
- ### Multi-Provider Failover SDK (`createFailoverProvider`)
399
- ```javascript
400
- import { createFailoverProvider, loadConfig } from "jules-orchestrator-kit";
121
+ Profiles evaluate gates dynamically per runtime: unsupported platform checks (such as V8 coverage on Cargo or Go projects) are bypassed with explicit diagnostic logs rather than failing the gate.
401
122
 
402
- const config = loadConfig(process.cwd());
403
- const provider = createFailoverProvider(["jules", "claude-code"], config);
123
+ All security, integrity, and test gates run locally without network access or API keys (`agentctl check`, `gate`, `mutate`, `coverage`, `probe`, `evidence`, `doctor`). Agent providers are required only for dispatching autonomous tasks.
404
124
 
405
- const result = await provider.dispatch(
406
- { title: "Repair failing tests", prompt: "Fix the failing test suite." },
407
- { root: process.cwd() }
408
- );
409
- ```
125
+ ---
410
126
 
411
- ### Cost Router SDK (`resolveRoutedProvider`)
412
- ```javascript
413
- import { resolveRoutedProvider, loadConfig } from "jules-orchestrator-kit";
127
+ <a id="cli"></a>
128
+ ## CLI
414
129
 
415
- const config = loadConfig(process.cwd()); // router.enabled must be true in .agent/config.yml
416
- const { provider, classification } = resolveRoutedProvider(
417
- { title: "Fix typo", prompt: "Fix a typo in the README." },
418
- config
419
- );
420
- console.log(classification.tier); // "fast" | "complex"
421
- ```
130
+ `agentctl` is the unified CLI, available via `npx jules-orchestrator-kit <command>` or `agentctl <command>`. Core commands:
422
131
 
423
- ### Syntax-Verified FAST Tier (`createSyntaxVerifiedProvider`)
424
- `resolveRoutedProvider()` already wraps the FAST tier with this; use it directly only when composing your own provider cascade.
425
- ```javascript
426
- import { createProvider, createSyntaxVerifiedProvider, loadConfig } from "jules-orchestrator-kit";
427
-
428
- const config = loadConfig(process.cwd());
429
- const fast = createSyntaxVerifiedProvider(
430
- createProvider("gemini-flash", config),
431
- createProvider("jules", config),
432
- config
433
- );
434
-
435
- // If gemini-flash leaves broken .js/.mjs/.cjs on disk, this transparently
436
- // re-dispatches through "jules" instead of returning the broken result.
437
- const result = await fast.dispatch({ prompt: "Fix a typo." }, { root: process.cwd() });
438
- ```
132
+ | Command | Description |
133
+ | :--- | :--- |
134
+ | `init` | Onboarding wizard & stack detector; scaffolds `.agent/config.yml`, `AGENTS.md`, role prompts, and guardrails. |
135
+ | `task create` / `task template` | Author falsifiable task envelopes, or synthesize pre-calibrated ones (Web, Hardening, Universal, Deep Think). |
136
+ | `dispatch` / `queue` / `swarm` | Send tasks to the active provider, run queued envelopes with DAG resolution, or run parallel worker slots. |
137
+ | `check` / `gate` | Security, secret, scope, payload, and tiered verification gates with `--fix` OODA repair. |
138
+ | `mutate` / `coverage` / `probe` / `perf` | Diff mutation scoring, V8 diff coverage, flakiness probing, event-loop lag. |
139
+ | `providers` / `provider set` / `profile` / `ci init` | Provider readiness, switching, verification depth, stack-native CI generation. |
140
+ | `doctor` / `evidence` / `flaky` / `rollback` | Diagnostics, SHA-256 evidence manifests, flaky quarantine management, checkpoint restore. |
141
+ | `dashboard` | `agentctl dashboard [port] [--port <n>]` — zero-dependency local telemetry & audit visualizer (default port 4100; valid range 1024–65535). |
142
+ | `mcp` / `mcp init` | stdio Model Context Protocol server for Claude, Cursor, and Antigravity, plus 1-click client config. |
439
143
 
440
- </details>
441
-
442
- <br/>
443
-
444
- <details>
445
- <summary><b>Feature Roadmap & Shipped Milestones</b></summary>
446
-
447
- <br/>
448
-
449
- | Feature | Module / Command | Architectural Description | Status |
450
- | :--- | :--- | :--- | :---: |
451
- | **Child Streams & Polyglot Build Detection** | `src/git.mjs`, `src/stack-detector.mjs`, `bin/agentctl.mjs` | Native `spawnSync` execution in `runCmd()` preserving stderr stream on status 0 (supporting Bun test output), conditional `buildCmd` resolution for Bun/Deno scripts, and `--verify` alias parity. | **v0.72.2** *(Shipped)* |
452
- | **Staged Diff Fidelity & Indentation Dead Guards** | `src/git.mjs`, `src/security.mjs` | Query cached index in staged mode (`git diff --cached <base>`), detect literal falsity dead guards (`if False:`, `if (false)`, `if 0:`), and support indentation-aware block traversal for Python test suites. | **v0.72.1** *(Shipped)* |
453
- | **Cold-Start Hardened Kernel & Tamper Defense** | `src/config.mjs`, `src/engine.mjs`, `src/git.mjs`, `src/security.mjs` | Full remediation of 22 cold-start audit findings (F01–F22): authoritative base policy resolution, ephemeral snapshot worktree isolation, canonical root test tamper guard, conditional assertion defense, multi-target Cargo test aggregation, Python src-layout injection, and complete repository uninstall documentation. | **v0.72.0** *(Shipped)* |
454
- | **Silence Is Not A Suite & Scaffolding Linter Fixes** | `src/ops/test-collection.mjs`, `src/wizard-init.mjs`, `src/config.mjs` | Reject zero-output test suite commands, quote-aware YAML parser with scalar emission, test de-registration detection (`TEST_DEREGISTERED`), and active waiver telemetry banner. | **v0.71.0** *(Shipped)* |
455
- | **Diagnostics That Reach the Operator** | `src/security.mjs`, `src/engine.mjs`, `bin/agentctl.mjs` | Secret findings name the file and line, a failed verify stage reports its command, exit code and output, and `queue`/`swarm` name each failed task and exit `1` rather than reporting success for a run that dispatched nothing. | **v0.41.1** *(Shipped)* |
456
- | **One Scaffolding Path & First-Install Fixes** | `src/scaffold.mjs`, `src/security.mjs` | `agentctl init` and `jules-init` scaffold from one source and write the runtime `.gitignore` entries, so the kit's own bookkeeping no longer reaches its own gate; a lockfile bump no longer fails closed as a secret leak. | **v0.41.1** *(Shipped)* |
457
- | **Queue Runner Fidelity** | `src/dag-engine.mjs`, `src/engine.mjs` | Queue selection is by task shape rather than file extension, so manifests and READMEs are skipped instead of dispatched, and `--dry-run` leaves the queue untouched. | **v0.38.2** *(Shipped)* |
458
- | **Release Gate Enforcement & Wizard Smoke Test** | `.github/workflows/jules-audit.yml`, `scripts/release.mjs`, `test/wizard-smoke.test.mjs` | Doc-sync gate runs in CI rather than by hand, releases block on a green CI matrix for `HEAD`, per-test deadlines turn a hang into a failure, and the real `init` wizard is driven end to end over a fake TTY. | **v0.38.1** *(Shipped)* |
459
- | **Multi-OS CI Matrix & TUI Hardening** | `scripts/run-tests.mjs`, `src/state.mjs`, `src/git.mjs` | Automated 9-job CI matrix across Linux, macOS, and Windows on Node 20/22/24 with raw-mode TUI resilience and native Windows command quoting. | **v0.38.0** *(Shipped)* |
460
- | **Base64 Secret Detection & Budget Fix** | `src/security.mjs`, `src/budget.mjs` | Secret scanner decodes base64 before matching structured patterns (K8s secrets), and `budget reset` preserves confirmed provider sessions. | **v0.37.0** *(Shipped)* |
461
- | **Universal AI Crawler Policy & llms.txt** | `src/web-templates.mjs` (`web-ai-access`) | Cross-surface consistency for crawler directives (`robots.txt`, meta tags, `X-Robots-Tag`) and `llms.txt` local route integrity. | **v0.36.0** *(Shipped)* |
462
- | **Silence Governor & Flaky Test Swarm** | `src/webhook.mjs`, `src/flaky-ledger.mjs` | Notification alert throttling with interruption budgeting, and automated anti-flakiness swarm coordinator. | **v0.35.0** *(Shipped)* |
463
- | **Rolling 24h Quota & Plan Concurrency** | `src/state.mjs`, `src/config.mjs` | Rolling 24-hour quota accounting matching vendor reset windows and true concurrency limits (3/15/60). | **v0.34.0** *(Shipped)* |
464
- | **Cost Router & Guided First Run** | `src/router.mjs`, `src/ops/next-step.mjs` | Heuristic task classifier routing trivial tasks to fast models, and guided single-command first run workflow. | **v0.33.0** *(Shipped)* |
465
- | **DAG Task Queue & Specialist Roles** | `src/dag-engine.mjs`, `src/evidence.mjs` | Kahn's-algorithm dependency queue execution (`queue --dag`), specialist role prompts (`overseer`, `bolt`, `sentinel`, `janitor`), and SHA-256 evidence manifests. | **v0.32.5** *(Shipped)* |
466
- | **Warm Session Resumption & PR Bundler** | `src/provider.mjs`, `src/engine.mjs` | Multi-turn warm session context streaming via `POST /v1alpha/sessions/{id}:sendMessage` & evidence PR descriptions. | **v0.31.0** *(Shipped)* |
467
- | **TDD Harness & Prompt Falsifiability Linter** | `agentctl test-gen`, `agentctl task optimize` | Automated RED-state test generator, `scope.deny` test locking, and prompt testability linter with fuzzy path resolution. | **v0.31.0** *(Shipped)* |
468
- | **Atomic Git Checkpoint & Rollback** | `agentctl rollback` (`src/ops/checkpoint.mjs`) | Pre-flight git HEAD/stash snapshotting, atomic rollback restoration, and 10-session pruning rotation. | **v0.31.0** *(Shipped)* |
469
- | **Terminal UI Engine** | `src/tui.mjs`, `src/key-decoder.mjs` | Zero-dependency terminal capabilities detector, sequence key decoder, and interactive prompt widgets. | **v0.30.0** *(Shipped)* |
470
- | **PR Review Auto-Remediation Loop** | `agentctl review-repair` (`src/review-repair.mjs`) | Ingests GitHub PR review comments (`CHANGES_REQUESTED`), extracts line/file context, and dispatches automated repair turns. | **v0.27.0** *(Shipped)* |
471
-
472
- </details>
473
-
474
- <br/>
144
+ The exhaustive per-command flag reference is generated from the same registry that powers `--help`: [docs/COMMAND_REFERENCE.md](docs/COMMAND_REFERENCE.md). Exit codes `0`–`8` are standardized — see the registry in [AGENTS.md](AGENTS.md#6-exit-code-registry--remediation-matrix).
475
145
 
476
146
  ---
477
147
 
478
- <br/>
479
-
480
148
  ## 🧹 Complete Uninstall / Removing the Kit (Undo Init)
481
149
 
482
- If you need to completely remove `jules-orchestrator-kit` from a repository after running `agentctl init`, follow the procedure below. Note that `agentctl clean` is an operational maintenance command (cleaning ephemeral locks, temporary worktrees, and evidence caches), not an uninstaller.
483
-
484
- ### 1. Generated Assets & Manifest
485
-
486
- `agentctl init` / `scaffoldRepoAssets()` writes the following project files and directories:
487
- - **Core configuration and rules:** `.agent/config.yml` (or `.agent/jules.yml`), `.agent/rules/`, `.agent/prompts/`, `.agent/workflows/`, and `AGENTS.md`.
488
- - **System contracts:** `SPEC.md`, `CONSTRAINTS.md` (and optional `DESIGN.md`).
489
- - **Queue runtime stub:** `.agent/jules-queue/README.md`.
490
- - **Optional IDE & CI integrations:** `.github/workflows/agent-gate.yml`, `.gitlab-ci.agent-gate.yml`, and `.cursor/rules/jules.mdc`.
491
-
492
- ### 2. Runtime State & Working Trees
493
-
494
- During execution, the kit produces untracked runtime artifacts in:
495
- - `.agent/evidence/` — Cryptographic evidence manifests and stage run recordings.
496
- - `.agent/state/` — Flaky test ledgers, budget trackers, and escalation queues.
497
- - `.agent/worktrees/` — Isolated snapshot worktrees used by the verification sandbox.
498
- - `.agent/history/` and `.agent/handovers/` — Local agent session memories.
499
-
500
- ### 3. Removal Procedure (Preserving Pre-Existing User Files)
501
-
502
- To completely undo `init` and restore your working tree to its exact original state:
150
+ Note that `agentctl clean` performs operational maintenance (clearing ephemeral locks, temporary worktrees, and evidence caches), not an uninstaller. To completely undo `init`:
503
151
 
504
152
  ```bash
505
- # 1. Remove tracked orchestrator assets (skips any files that were not scaffolded)
153
+ # Remove tracked orchestrator assets (skips any files that were not scaffolded)
506
154
  git rm -rf --ignore-unmatch \
507
155
  .agent \
508
156
  AGENTS.md \
@@ -513,47 +161,37 @@ git rm -rf --ignore-unmatch \
513
161
  .gitlab-ci.agent-gate.yml \
514
162
  .cursor/rules/jules.mdc
515
163
 
516
- # 2. Remove untracked runtime directories and temporary caches
164
+ # Remove untracked runtime directories and temporary caches
517
165
  rm -rf .agent .agentctl
518
166
 
519
- # 3. Clean up .gitignore additions
520
- # Revert the appended "# Jules Orchestrator runtime state & credentials" block from .gitignore
521
- git checkout .gitignore # If .gitignore had no other unstaged changes, or edit by hand
522
-
523
- # 4. Optional: Uninstall global CLI package
167
+ # Revert the appended runtime-state block in .gitignore, then optionally:
524
168
  npm uninstall -g jules-orchestrator-kit
525
169
  ```
526
170
 
527
- <br/>
171
+ Full inventory of generated assets and runtime state: [docs/uninstall.md](docs/uninstall.md).
528
172
 
529
173
  ---
530
174
 
531
- <br/>
175
+ ## 📖 Documentation
532
176
 
533
- ## 📖 Documentation & External References
177
+ Start at the **[docs sitemap](docs/README.md)** — it maps "I want to …" workflows to the right page: [Configuration Reference](docs/configuration.md) · [CLI Command Reference](docs/COMMAND_REFERENCE.md) · [Architecture & Pipeline Flow](docs/architecture.md) · [SDK & MCP Integrations](docs/sdk.md) · [Examples & Task Envelopes](EXAMPLES.md) · [Changelog](CHANGELOG.md) · [Roadmap](ROADMAP_V1.md) · [Security Policy](SECURITY.md) · [Contributing](CONTRIBUTING.md) · [Contributors & Provenance](CONTRIBUTORS.md) · [Google Jules Official Documentation](https://jules.google).
534
178
 
535
- - [**System Architecture & Pipeline Overview**](./docs/architecture.md) — Comprehensive technical sequence diagrams and control plane specifications.
536
- - [**Google Jules Official Documentation**](https://jules.google) — Official platform overview and API specifications for Google Jules.
537
- - [**Examples & Task Envelope Recipes**](./EXAMPLES.md) — Production YAML and Markdown task envelopes.
538
- - [**Changelog**](./CHANGELOG.md) — Full release history and migration guides.
179
+ ---
539
180
 
540
- <br/>
181
+ ## 🤝 Contributions & Provenance
541
182
 
542
- ---
183
+ `jules-orchestrator-kit` is a **human-led, agent-assisted** open-source project. It is maintained by **Jonas Pudas** ([`FullThrottle83`](https://github.com/FullThrottle83)) and developed with supervised autonomous coding agents — **`jules-agent`** (Google Jules) and **Arena Agent** — which author code inside the task-envelope and verification framework defined in `AGENTS.md`. In the `git log` (2026-07-26 → 2026-09-09, 448 commits) the majority of commits (~80%) are authored by autonomous agents and ~18% by the human maintainers. Every commit is CI-verified and merged under maintainer oversight, and agent authorship is preserved transparently in git `Author`/`Co-authored-by` metadata — it is never hidden or rewritten. See [`CONTRIBUTORS.md`](CONTRIBUTORS.md) for the full provenance ledger and [`CONTRIBUTING.md`](CONTRIBUTING.md) for contribution rules.
543
184
 
544
- <br/>
185
+ ---
545
186
 
546
187
  ## ⚖️ Disclaimer
547
188
 
548
189
  `jules-orchestrator-kit` is an independent, community-driven open-source project and is not affiliated with, endorsed by, or sponsored by Google, Google LLC, or Alphabet Inc. "Google", "Google Jules", and related marks are trademarks of Google LLC.
549
190
 
550
- <br/>
191
+ **Prompt sanitization is not a security boundary.** `sanitizePromptVocabulary()` (`src/prompt-guard.mjs`) rewrites high-trigger operational terms in prompt prose (e.g. `kill -9` → `terminate with SIGTERM`) to reduce false-positive provider content-filter refusals; fenced code blocks and inline code spans are preserved verbatim. These substitutions can change technical meaning (SIGTERM is not equivalent to SIGKILL), do not guarantee provider acceptance, and do not replace scope checks, execution envelopes, secret redaction, or verification. Review transformed prompt text when exact operational semantics matter.
551
192
 
552
193
  ---
553
194
 
554
- <br/>
555
-
556
195
  <div align="center">
557
- <p><b>jules-orchestrator-kit</b> • Built with zero external dependencies for Google Jules and autonomous agent workflows.</p>
196
+ <p><b>jules-orchestrator-kit</b> • Zero runtime dependencies • MIT License • Universal safety and verification for autonomous coding agents.</p>
558
197
  </div>
559
-