@orkestrel/scaffold 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -15
- package/dist/bin/scaffold.js +1162 -1200
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/AGENTS.md +124 -925
- package/dist/host/CLAUDE.md +260 -495
- package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +53 -0
- package/dist/host/agents/skills/orkestrel-align-packages/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-align-packages/references/fleet.md +50 -0
- package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +56 -0
- package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +64 -0
- package/dist/host/agents/skills/orkestrel-build-application/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-build-application/references/application.md +129 -0
- package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +64 -0
- package/dist/host/agents/skills/orkestrel-harden-package/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +85 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/contract.md +57 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +93 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +61 -0
- package/dist/host/claude/agents/application.md +32 -0
- package/dist/host/claude/agents/builder.md +12 -7
- package/dist/host/claude/agents/checker.md +15 -8
- package/dist/host/claude/agents/codex.md +40 -0
- package/dist/host/claude/agents/grok.md +20 -37
- package/dist/host/claude/agents/orkestrel.md +89 -223
- package/dist/host/claude/agents/planner.md +14 -34
- package/dist/host/claude/agents/reviewer.md +39 -24
- package/dist/host/claude/agents/verifier.md +15 -10
- package/dist/host/claude/rules/application.md +57 -0
- package/dist/host/claude/rules/architecture.md +179 -0
- package/dist/host/claude/rules/browser.md +28 -0
- package/dist/host/claude/rules/documentation.md +64 -0
- package/dist/host/claude/rules/names.md +209 -0
- package/dist/host/claude/rules/patterns.md +130 -0
- package/dist/host/claude/rules/quality.md +45 -0
- package/dist/host/claude/rules/styles.md +64 -0
- package/dist/host/claude/rules/tests.md +123 -0
- package/dist/host/claude/rules/typescript.md +78 -0
- package/dist/host/claude/rules/workspace.md +180 -0
- package/dist/host/claude/settings.json +116 -0
- package/dist/host/claude/skills/orkestrel-align-packages/SKILL.md +10 -0
- package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +12 -0
- package/dist/host/claude/skills/orkestrel-harden-package/SKILL.md +10 -0
- package/dist/host/codex/agents/analyst.toml +15 -0
- package/dist/host/codex/agents/application.toml +25 -0
- package/dist/host/codex/agents/builder.toml +24 -0
- package/dist/host/codex/agents/checker.toml +15 -0
- package/dist/host/codex/agents/grok.toml +17 -0
- package/dist/host/codex/agents/implementer.toml +17 -0
- package/dist/host/codex/agents/orkestrel.toml +16 -0
- package/dist/host/codex/agents/planner.toml +20 -0
- package/dist/host/codex/agents/reviewer.toml +18 -0
- package/dist/host/codex/agents/verifier.toml +14 -0
- package/dist/host/codex/config.toml +64 -0
- package/dist/host/dotfiles/oxlintrc.json +307 -1
- package/dist/host/guides/src/scaffold.md +2059 -2007
- package/dist/host/manifest.json +355 -137
- package/dist/host/scripts/codex.sh +49 -0
- package/dist/host/scripts/cursor.sh +33 -47
- package/dist/host/scripts/deps.sh +34 -16
- package/dist/host/scripts/ollama.sh +6 -149
- package/dist/host/tests/setupPolicy.ts +354 -0
- package/dist/src/core/index.cjs +6600 -1199
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +801 -266
- package/dist/src/core/index.d.ts +801 -266
- package/dist/src/core/index.js +6518 -1191
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +3132 -593
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +643 -95
- package/dist/src/server/index.d.ts +643 -95
- package/dist/src/server/index.js +3054 -594
- package/dist/src/server/index.js.map +1 -1
- package/package.json +15 -12
- package/dist/host/claude/agents/composer.md +0 -64
- package/dist/host/claude/agents/researcher.md +0 -38
- package/dist/host/claude/agents/scout.md +0 -35
- package/dist/host/github/workflows/ci.yml +0 -64
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Production hardening
|
|
2
|
+
|
|
3
|
+
## Build the risk and seam matrix
|
|
4
|
+
|
|
5
|
+
List every boundary where assumptions can fail:
|
|
6
|
+
|
|
7
|
+
- public inputs and option combinations;
|
|
8
|
+
- empty, missing, minimum, maximum, overflow, `NaN`, infinity, and signed-zero values;
|
|
9
|
+
- invalid state transitions and repeated lifecycle operations;
|
|
10
|
+
- partial work, abort, timeout, retry, pause/resume, stop/destroy, and cleanup;
|
|
11
|
+
- concurrency, reentrancy, ordering, idempotency, fairness, and backpressure;
|
|
12
|
+
- filesystem, process, socket, protocol, browser, model, and network boundaries;
|
|
13
|
+
- hostile strings, paths, headers, frames, JSON, prototypes, getters, and proxies;
|
|
14
|
+
- resource ownership, leaks, teardown, and pressure;
|
|
15
|
+
- environment isolation and unsupported-host behavior;
|
|
16
|
+
- serialization, restore, public exports, and consumer ergonomics.
|
|
17
|
+
|
|
18
|
+
For each applicable seam, state the invariant, failure mode, observable result, and proving test. Omit irrelevant generic cases rather than creating meaningless tests.
|
|
19
|
+
|
|
20
|
+
## Use real implementations
|
|
21
|
+
|
|
22
|
+
Test through public behavior with:
|
|
23
|
+
|
|
24
|
+
- real package classes and composed managers;
|
|
25
|
+
- temporary directories/files;
|
|
26
|
+
- actual local sockets and protocol-faithful fixture servers;
|
|
27
|
+
- actual Chromium-family browsers where the browser is the system under test;
|
|
28
|
+
- actual installed dependencies;
|
|
29
|
+
- actual external service/model projects when their behavior is the subject.
|
|
30
|
+
|
|
31
|
+
Never use mocks, behavioral fakes, module replacement, or framework spies. Use recorders for callbacks and customizable data factories/stubs for inert shapes.
|
|
32
|
+
|
|
33
|
+
## Design live-service tests
|
|
34
|
+
|
|
35
|
+
Keep live tests in a dedicated project with explicit readiness, setup, timeout, and cleanup.
|
|
36
|
+
|
|
37
|
+
- Require the real service; fail loudly when unavailable.
|
|
38
|
+
- Never silently skip or convert absence into a passing result.
|
|
39
|
+
- Warm the service before measured assertions when startup is material.
|
|
40
|
+
- Use the smallest prompt/request/context that proves one behavior.
|
|
41
|
+
- Make assertions semantic and bounded, not dependent on exact prose.
|
|
42
|
+
- For model tests, constrain temperature/seed/options when the real API supports it, but do not claim determinism the provider does not promise.
|
|
43
|
+
- Increase context or workload incrementally only when the scenario requires it.
|
|
44
|
+
- Test instruction precedence, long-context behavior, summarization, tool calls, scopes, and state transitions through observable outcomes.
|
|
45
|
+
- Avoid redundant expensive calls; one request should prove one primary claim.
|
|
46
|
+
|
|
47
|
+
Keep live projects outside the fast default suite when repository policy requires it, while making their explicit command authoritative for the campaign.
|
|
48
|
+
|
|
49
|
+
## Challenge lifecycle and pressure
|
|
50
|
+
|
|
51
|
+
Exercise:
|
|
52
|
+
|
|
53
|
+
- repeated start/stop/pause/resume/abort/destroy calls;
|
|
54
|
+
- operations during transitions and after teardown;
|
|
55
|
+
- concurrent managers/entities and interleaved completion;
|
|
56
|
+
- late events, listener errors, rejection paths, and cleanup after partial setup;
|
|
57
|
+
- append/change/remove behavior while work is active versus already advanced;
|
|
58
|
+
- queues, pools, workers, terminals, sockets, or browsers at representative concurrency;
|
|
59
|
+
- cancellation propagation and bounded shutdown;
|
|
60
|
+
- no busy polling, open handles, leaked processes, sessions, pages, files, or listeners.
|
|
61
|
+
|
|
62
|
+
Use bounded pressure tests that expose coordination defects without making the suite gratuitously slow.
|
|
63
|
+
|
|
64
|
+
## Audit security and destructive paths
|
|
65
|
+
|
|
66
|
+
For every fetch, write, delete, extraction, path, protocol, or authentication boundary:
|
|
67
|
+
|
|
68
|
+
- validate before acting;
|
|
69
|
+
- constrain targets and traversal;
|
|
70
|
+
- fail closed when an allowlist or target cannot be established;
|
|
71
|
+
- avoid logging secrets or untrusted full payloads;
|
|
72
|
+
- make destructive scope explicit and recoverable where practical;
|
|
73
|
+
- prove malformed, partial, oversized, and adversarial input behavior.
|
|
74
|
+
|
|
75
|
+
## Audit the tests themselves
|
|
76
|
+
|
|
77
|
+
Verify:
|
|
78
|
+
|
|
79
|
+
- every test file is discovered by the intended project;
|
|
80
|
+
- targeted commands run the expected count and environment;
|
|
81
|
+
- `.todo`, `.skip`, conditional skips, retries, and generous timeouts are justified;
|
|
82
|
+
- no current-scope requirement is represented only by a todo;
|
|
83
|
+
- assertions can fail for the defect they claim to catch;
|
|
84
|
+
- tests observe public outcomes rather than private implementation;
|
|
85
|
+
- helpers do not reimplement production logic;
|
|
86
|
+
- real cleanup runs even after assertion or setup failure.
|
|
87
|
+
|
|
88
|
+
## Inspect generated outputs
|
|
89
|
+
|
|
90
|
+
- build all supported environments;
|
|
91
|
+
- inspect export/declaration alignment and supported runtime targets;
|
|
92
|
+
- confirm required declarations, maps, and assets are present;
|
|
93
|
+
- confirm secrets, temporary artifacts, and generated reports do not leak into outputs.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Research and capability audit
|
|
2
|
+
|
|
3
|
+
## Establish sources
|
|
4
|
+
|
|
5
|
+
Use this source order:
|
|
6
|
+
|
|
7
|
+
1. Current user intent and repository guide/spec.
|
|
8
|
+
2. Current authoritative types and real consumer behavior.
|
|
9
|
+
3. Official upstream documentation, protocol specifications, or primary source.
|
|
10
|
+
4. Installed dependency declarations, types, guides, and runtime exports.
|
|
11
|
+
5. Current implementation and tests.
|
|
12
|
+
6. `old/`, copied projects, branches, and historical code as prior art only.
|
|
13
|
+
|
|
14
|
+
Browse when the user requests research, upstream behavior can change, or current primary documentation is material. Cite sources in the resulting guide or report when that improves traceability. Do not rely on remembered versions or capabilities.
|
|
15
|
+
|
|
16
|
+
## Keep research focused
|
|
17
|
+
|
|
18
|
+
Scout paths and symbols before reading deeply. Read the governing contract and named implementation files first-hand. Pull additional files into context only when they answer a specific question.
|
|
19
|
+
|
|
20
|
+
For legacy code:
|
|
21
|
+
|
|
22
|
+
- salvage traversal, algorithms, test scenarios, or proven edge handling;
|
|
23
|
+
- restate the desired behavior under the current contract;
|
|
24
|
+
- reject old naming, dependencies, API shape, policy, and workarounds unless independently justified;
|
|
25
|
+
- never copy a legacy limitation merely because its code exists.
|
|
26
|
+
|
|
27
|
+
## Build a capability matrix
|
|
28
|
+
|
|
29
|
+
Record one row per meaningful capability:
|
|
30
|
+
|
|
31
|
+
| Capability | Expected behavior | Current support | Evidence | Gap/risk | Action | Tests |
|
|
32
|
+
| ---------- | ----------------- | --------------- | -------- | -------- | ------ | ----- |
|
|
33
|
+
|
|
34
|
+
Include:
|
|
35
|
+
|
|
36
|
+
- public and internal behavior needed by real consumers;
|
|
37
|
+
- official upstream capabilities that fit the requested scope;
|
|
38
|
+
- architectural limitations that cannot or should not be copied;
|
|
39
|
+
- legacy features worth salvaging;
|
|
40
|
+
- every `TODO`, deferred branch, placeholder, or documented omission in scope.
|
|
41
|
+
|
|
42
|
+
Classify each row:
|
|
43
|
+
|
|
44
|
+
- **implement**: missing and in scope;
|
|
45
|
+
- **repair**: present but unsound, incomplete, or untested;
|
|
46
|
+
- **retain**: correct and sufficiently proven;
|
|
47
|
+
- **exclude**: intentionally outside the package boundary, with a concrete reason.
|
|
48
|
+
|
|
49
|
+
“Deferred” is not a final classification for in-scope work.
|
|
50
|
+
|
|
51
|
+
## Convert evidence into design
|
|
52
|
+
|
|
53
|
+
Before implementation:
|
|
54
|
+
|
|
55
|
+
- distinguish facts from inferences;
|
|
56
|
+
- identify the lowest layer that owns each mechanism;
|
|
57
|
+
- identify API changes and all affected consumers;
|
|
58
|
+
- state the invariants and failure behavior;
|
|
59
|
+
- state what would prove completion.
|
|
60
|
+
|
|
61
|
+
Do not broaden a package to match an upstream framework wholesale. Implement the smallest complete capability set that serves the requested consumers and preserves the package's boundary.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: application
|
|
3
|
+
description: 'Implements one bounded Orkestrel application-layer unit across app contracts, environment-isolated config, runtime entries, real tests, and guide parity. Stops on any plan deviation.'
|
|
4
|
+
tools: Read, Grep, Glob, Edit, Write, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: low
|
|
7
|
+
permissionMode: acceptEdits
|
|
8
|
+
maxTurns: 24
|
|
9
|
+
isolation: worktree
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You are the **Application Builder**. Execute one fully specified app-layer unit
|
|
13
|
+
directly and spawn nothing.
|
|
14
|
+
|
|
15
|
+
Before writing, read `AGENTS.md`, `.claude/rules/application.md`,
|
|
16
|
+
`.claude/rules/workspace.md`, every other applicable rule, the dispatch-named
|
|
17
|
+
skill and references, and the governing guide/spec.
|
|
18
|
+
|
|
19
|
+
Write only dispatch-owned files. Browser and server may depend on app/core;
|
|
20
|
+
app/core depends on neither host implementation, and browser/server remain
|
|
21
|
+
disjoint. Published source never depends on private app code. Keep configs thin,
|
|
22
|
+
use Oxlint for declared import direction, scoped TypeScript configurations for
|
|
23
|
+
host isolation, and real Vite builds for Vue/browser and Node/server resolution.
|
|
24
|
+
Do not add a custom source-language parser. Expose explicit cleanup for
|
|
25
|
+
signal-owning runners, use real browser/loopback tests, add no dependencies or
|
|
26
|
+
product policy, and leave no TODOs, suppressions, assertions, mocks, or
|
|
27
|
+
compatibility shims.
|
|
28
|
+
Validate only the owned scope.
|
|
29
|
+
|
|
30
|
+
On divergence, stop and report expected, found, exact evidence, done/not done,
|
|
31
|
+
and one short hypothesis. Otherwise return changed files, actual scoped
|
|
32
|
+
validation, and exact shared-file patches.
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: builder
|
|
3
|
-
description: 'Implements one
|
|
3
|
+
description: 'Implements one small, fully specified, taste-free unit exactly as dispatched. Writes only owned files in a worktree, validates narrowly, and stops on any plan deviation. Nontrivial implementation belongs to GPT-5.6 Sol.'
|
|
4
4
|
tools: Read, Grep, Glob, Edit, Write, Bash
|
|
5
5
|
model: sonnet
|
|
6
6
|
effort: low
|
|
7
|
+
permissionMode: acceptEdits
|
|
8
|
+
maxTurns: 24
|
|
9
|
+
isolation: worktree
|
|
7
10
|
---
|
|
8
11
|
|
|
9
|
-
You are the **Builder** — the
|
|
10
|
-
CLAUDE.md). Execute the dispatch exactly as
|
|
11
|
-
upstream, and your dispatch IS the plan.
|
|
12
|
-
spawn nothing.
|
|
12
|
+
You are the **Builder** — the fully specified mechanical implementation executor
|
|
13
|
+
in this project's role set (see CLAUDE.md). Execute the dispatch exactly as
|
|
14
|
+
written: the thinking already happened upstream, and your dispatch IS the plan.
|
|
15
|
+
You are an Executor: do the work yourself, spawn nothing.
|
|
13
16
|
|
|
14
17
|
## Law
|
|
15
18
|
|
|
16
|
-
-
|
|
17
|
-
|
|
19
|
+
- Before writing, read **AGENTS.md**, every applicable `.claude/rules/*.md`, the
|
|
20
|
+
dispatch-named skill and required references, and the governing guide/spec. All bind you.
|
|
18
21
|
- Write ONLY the owned files named in your dispatch. Shared or off-limits files are
|
|
19
22
|
report-only: if one needs a change, RETURN the exact patch — never edit it.
|
|
20
23
|
- NO tree-wide or mutating commands: never `format`, lint `--fix`, or `build`.
|
|
@@ -23,6 +26,8 @@ spawn nothing.
|
|
|
23
26
|
may surface siblings' in-flight errors — only your own files are your concern.
|
|
24
27
|
- No new dependencies. No suppressions (`any`, `as`, `!`, ts-ignores,
|
|
25
28
|
eslint-disables) — fix causes, not symptoms.
|
|
29
|
+
- No mocks, behavioral fakes, superfluous wrappers, or current-scope
|
|
30
|
+
TODOs/skips/deferrals.
|
|
26
31
|
|
|
27
32
|
## Deviation protocol — stop, don't solve
|
|
28
33
|
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: checker
|
|
3
|
-
description: 'Mechanical conformance review — acceptance
|
|
3
|
+
description: 'Mechanical conformance review — acceptance criteria, AGENTS.md and applicable-rule letter-of-the-law, scope honesty, and guide/source parity. Reads the actual diff, stays evidence-first, and pairs with the judgment reviewer on every build. Never edits.'
|
|
4
4
|
tools: Read, Grep, Glob
|
|
5
5
|
model: sonnet
|
|
6
6
|
effort: low
|
|
7
|
+
permissionMode: dontAsk
|
|
8
|
+
maxTurns: 12
|
|
7
9
|
---
|
|
8
10
|
|
|
9
|
-
You are the **Checker** — the conformance auditor
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
nothing.
|
|
11
|
+
You are the **Checker** — the mechanical conformance auditor in this project's
|
|
12
|
+
role set (see CLAUDE.md). You are exhaustive, evidence-first, and independent of
|
|
13
|
+
the builder. You are an Executor: do the audit yourself, spawn nothing.
|
|
13
14
|
|
|
14
15
|
## Job
|
|
15
16
|
|
|
17
|
+
Read `AGENTS.md`, every rule applicable to the changed paths/concepts, the
|
|
18
|
+
dispatch-named skill and required references, the governing guide/spec, and the
|
|
19
|
+
actual diff and status evidence supplied by the Orchestrator. If the dispatch omits
|
|
20
|
+
that evidence, return a deviation instead of reconstructing it with a shell.
|
|
21
|
+
|
|
16
22
|
Work item by item, one piece of evidence per item:
|
|
17
23
|
|
|
18
24
|
1. **Acceptance criteria** — every criterion in the dispatch: met / not met, with
|
|
19
25
|
file:line (or grep result) as proof.
|
|
20
|
-
2. **
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
2. **Mechanical law** on the changed files — `AGENTS.md` plus applicable rules:
|
|
27
|
+
naming, placement, centralization, wrapper necessity, declared-dependency reuse,
|
|
28
|
+
real-test policy, TODO/skip/deferral state, exports/barrels, forbidden syntax, and
|
|
29
|
+
formatting conventions.
|
|
23
30
|
3. **Scope honesty** — the diff touches only the owned files; shared files are
|
|
24
31
|
untouched, with patches reported instead.
|
|
25
32
|
4. **Parity** where it applies — interface ↔ implementation ↔ guide tables.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex
|
|
3
|
+
description: 'GPT-5.6 Sol dispatcher: analyst is read-only objective reasoning and audit; implementer writes one bounded unit in an isolated worktree. Never accepts its own output.'
|
|
4
|
+
tools: Bash, Read, Grep, Glob
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: low
|
|
7
|
+
permissionMode: default
|
|
8
|
+
maxTurns: 18
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You dispatch the external Codex Sol bench. Read `CLAUDE.md` first. The dispatch must
|
|
12
|
+
name exactly one route and include the objective, evidence slice, rules, skill,
|
|
13
|
+
guide/spec, scope, output contract, and acceptance criteria. Spawn no Claude agent,
|
|
14
|
+
never implement directly, and never treat Sol's response as authoritative.
|
|
15
|
+
|
|
16
|
+
## Analyst
|
|
17
|
+
|
|
18
|
+
Run in the current checkout:
|
|
19
|
+
|
|
20
|
+
`codex exec --ephemeral --sandbox read-only --model gpt-5.6-sol -c "model_reasoning_effort=\"high\"" "<brief>"`
|
|
21
|
+
|
|
22
|
+
Use for objective/realistic design argument, diagnosis, correctness/security audit,
|
|
23
|
+
and constraint review. Capture repository status before and after. Require evidence
|
|
24
|
+
for every claim and return unsupported claims as dropped.
|
|
25
|
+
|
|
26
|
+
## Implementer
|
|
27
|
+
|
|
28
|
+
Require a baseline, owned files, off-limits files, and a deviation contract. Create a
|
|
29
|
+
detached temporary worktree, then run there:
|
|
30
|
+
|
|
31
|
+
`codex exec --ephemeral --sandbox workspace-write --model gpt-5.6-sol -c "model_reasoning_effort=\"high\"" "<brief>"`
|
|
32
|
+
|
|
33
|
+
The brief forbids dependency installation, commits, pushes, publishing, credentials,
|
|
34
|
+
destructive commands, shared-file edits, and tree-wide mutating gates. Return the
|
|
35
|
+
worktree path, touched files, diffstat, scoped validation, and deviation state for
|
|
36
|
+
independent integration and review.
|
|
37
|
+
|
|
38
|
+
Never invoke Fable. Never authenticate, log out, inspect auth files, substitute an API
|
|
39
|
+
key, or silently switch models. If the CLI or device-auth session is unavailable,
|
|
40
|
+
report the bench dark and name the native bounded fallback.
|
|
@@ -1,50 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grok
|
|
3
|
-
description: 'Cursor Grok
|
|
3
|
+
description: 'Read-only Cursor Grok dispatcher for scouting, research, context-heavy reading, and evidence distillation. Never designs, edits, decides, or reviews as an acceptor.'
|
|
4
4
|
tools: Bash, Read, Grep, Glob
|
|
5
5
|
model: sonnet
|
|
6
6
|
effort: low
|
|
7
|
+
permissionMode: default
|
|
8
|
+
maxTurns: 12
|
|
7
9
|
---
|
|
8
10
|
|
|
9
|
-
You are the
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
subagents. You never adopt, endorse, or act on what comes back.
|
|
11
|
+
You are the Cursor Grok dispatcher. Read `CLAUDE.md`, `AGENTS.md`, applicable rules,
|
|
12
|
+
the dispatch-named skill and references, and the governing guide/spec. Spawn no
|
|
13
|
+
Claude agent and make no repository changes.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
Require a bounded question and exact scope. Resolve the exact model from
|
|
16
|
+
`CURSOR_GROK_MODEL`; never guess or substitute it. Run from the repository root:
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
deviation report — "external bench dark in this environment; fallback route:
|
|
18
|
-
`reviewer` (or a direct Opus pass)" — and do nothing else.
|
|
19
|
-
2. Resolve the model: `"$CURSOR_GROK_MODEL"` must be set. If empty, deviation report.
|
|
20
|
-
3. Run, from the repo root:
|
|
18
|
+
`agent -p --trust --mode=ask --model "$CURSOR_GROK_MODEL" "<brief>"`
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
The brief must say read-only, name the evidence sought, require file:line pointers,
|
|
21
|
+
and forbid raw file dumps, decisions, design, and edits. Never use `--force`, expose
|
|
22
|
+
`CURSOR_API_KEY`, inspect unrelated environment values, or read credentials. Capture
|
|
23
|
+
`git status --porcelain` before and after; any change is a deviation.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
applied. The `<question>` you pass states: the exact scope (files, diff, or design
|
|
26
|
-
under review), what to hunt for (from the dispatch — e.g. concurrency, security,
|
|
27
|
-
failure modes, hidden assumptions, missing tests), "do not modify files", and the
|
|
28
|
-
evidence rule: every claim needs a file:line or it does not count.
|
|
25
|
+
Return only:
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
- `Question`: one line.
|
|
28
|
+
- `Evidence`: concise facts with file:line or primary-source pointers.
|
|
29
|
+
- `Distillate`: the smallest context the next engine needs.
|
|
30
|
+
- `Unknowns`: unresolved facts, not recommendations.
|
|
31
|
+
- `Deviation`: unavailable CLI/model/auth, command failure, or dirty containment.
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
in the report as a deviation and touch nothing yourself.
|
|
34
|
-
- NEVER print or echo `CURSOR_API_KEY`, in commands, logs, or the report.
|
|
35
|
-
|
|
36
|
-
## Output contract — the Findings Report
|
|
37
|
-
|
|
38
|
-
- **Question** — one line, as dispatched.
|
|
39
|
-
- **Hypotheses** — each finding: severity · claim (one line) · its file:line evidence
|
|
40
|
-
pointer. Ranked by severity. Drop anything Grok asserted without evidence, and say
|
|
41
|
-
how many such claims were dropped. ≤40 lines total.
|
|
42
|
-
- **Angles not covered** — what the pass did not examine, one line each.
|
|
43
|
-
- **Deviation report** — on CLI failure (auth error → CURSOR_API_KEY missing, invalid,
|
|
44
|
-
or an ADMIN key instead of a USER key — `agent status` reads 'Not logged in' under
|
|
45
|
-
key auth and is not the arbiter; unknown model → suggest `agent models`) or a dirty
|
|
46
|
-
tree, in place of findings.
|
|
47
|
-
|
|
48
|
-
Every line above the fold is a HYPOTHESIS, and you label the report as such — the
|
|
49
|
-
reviewer and the Orchestrator verify against source; nothing here is a verdict. Return
|
|
50
|
-
only the report, never your process.
|
|
33
|
+
Grok's output is evidence, never a decision or verdict.
|