@yunhozz/arc 0.0.0-stage → 0.1.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.
- package/MANIFEST.sha256 +96 -0
- package/README.md +265 -2
- package/bin/arc.mjs +3 -0
- package/claude/agents/arc-coder.md +67 -0
- package/claude/agents/arc-planner.md +74 -0
- package/claude/agents/arc-qa.md +68 -0
- package/claude/agents/arc-reviewer.md +65 -0
- package/claude/agents/arc-scouter.md +63 -0
- package/claude/skill/SKILL.md +370 -0
- package/claude/skill/hooks/git-policy.json +208 -0
- package/claude/skill/hooks/role-git-guard.mjs +98 -0
- package/claude/skill/models.toml +64 -0
- package/claude/skill/references/commit.md +77 -0
- package/claude/skill/references/git-recovery.md +46 -0
- package/claude/skill/references/handoff-prep.md +102 -0
- package/claude/skill/references/handoff.md +100 -0
- package/claude/skill/references/limits.md +42 -0
- package/claude/skill/references/planning.md +250 -0
- package/claude/skill/references/superpowers/LICENSE +21 -0
- package/claude/skill/references/superpowers/brainstorming/SKILL.md +225 -0
- package/claude/skill/references/superpowers/brainstorming/builder-check-prompt.md +23 -0
- package/claude/skill/references/superpowers/brainstorming/scripts/frame-template.html +213 -0
- package/claude/skill/references/superpowers/brainstorming/scripts/helper.js +167 -0
- package/claude/skill/references/superpowers/brainstorming/scripts/server.cjs +723 -0
- package/claude/skill/references/superpowers/brainstorming/scripts/start-server.sh +209 -0
- package/claude/skill/references/superpowers/brainstorming/scripts/stop-server.sh +120 -0
- package/claude/skill/references/superpowers/brainstorming/visual-companion.md +299 -0
- package/claude/skill/references/superpowers/provenance.json +26 -0
- package/claude/skill/references/superpowers/test-driven-development/SKILL.md +330 -0
- package/claude/skill/references/superpowers/test-driven-development/writing-good-tests.md +198 -0
- package/claude/skill/references/superpowers/writing-plans/SKILL.md +204 -0
- package/claude/skill/references/verification.md +125 -0
- package/claude/skill/references/visual-companion.md +16 -0
- package/claude/skill/scripts/apply-models.py +31 -0
- package/claude/skill/scripts/model_config.py +211 -0
- package/codex/agents/arc-coder.toml +37 -0
- package/codex/agents/arc-planner.toml +38 -0
- package/codex/agents/arc-qa.toml +24 -0
- package/codex/agents/arc-reviewer.toml +25 -0
- package/codex/agents/arc-scouter.toml +37 -0
- package/codex/skill/SKILL.md +356 -0
- package/codex/skill/models.toml +64 -0
- package/codex/skill/references/commit.md +100 -0
- package/codex/skill/references/git-recovery.md +64 -0
- package/codex/skill/references/handoff-prep.md +153 -0
- package/codex/skill/references/handoff-worktree.md +93 -0
- package/codex/skill/references/handoff.md +181 -0
- package/codex/skill/references/limits.md +43 -0
- package/codex/skill/references/planning.md +287 -0
- package/codex/skill/references/superpowers/LICENSE +21 -0
- package/codex/skill/references/superpowers/brainstorming/SKILL.md +225 -0
- package/codex/skill/references/superpowers/brainstorming/builder-check-prompt.md +23 -0
- package/codex/skill/references/superpowers/brainstorming/scripts/frame-template.html +213 -0
- package/codex/skill/references/superpowers/brainstorming/scripts/helper.js +167 -0
- package/codex/skill/references/superpowers/brainstorming/scripts/server.cjs +723 -0
- package/codex/skill/references/superpowers/brainstorming/scripts/start-server.sh +209 -0
- package/codex/skill/references/superpowers/brainstorming/scripts/stop-server.sh +120 -0
- package/codex/skill/references/superpowers/brainstorming/visual-companion.md +299 -0
- package/codex/skill/references/superpowers/provenance.json +26 -0
- package/codex/skill/references/superpowers/test-driven-development/SKILL.md +330 -0
- package/codex/skill/references/superpowers/test-driven-development/writing-good-tests.md +198 -0
- package/codex/skill/references/superpowers/writing-plans/SKILL.md +204 -0
- package/codex/skill/references/verification.md +163 -0
- package/codex/skill/references/visual-companion.md +23 -0
- package/codex/skill/scripts/apply-models.py +207 -0
- package/codex/skill/scripts/model_config.py +362 -0
- package/install.command +5 -0
- package/lib/cli/choices.mjs +47 -0
- package/lib/cli/completion.mjs +53 -0
- package/lib/cli/index.mjs +55 -0
- package/lib/cli/preset.mjs +29 -0
- package/lib/cli/progress.mjs +10 -0
- package/lib/cli/root.mjs +20 -0
- package/lib/cli/uninstall.mjs +17 -0
- package/lib/installer/acquisition.mjs +77 -0
- package/lib/installer/global-config.mjs +43 -0
- package/lib/installer/install.mjs +28 -0
- package/lib/installer/language.mjs +13 -0
- package/lib/installer/limits.mjs +21 -0
- package/lib/installer/manifest.mjs +37 -0
- package/lib/installer/package-references.mjs +32 -0
- package/lib/installer/plan.mjs +62 -0
- package/lib/installer/preset.mjs +26 -0
- package/lib/installer/runtime-config.mjs +85 -0
- package/lib/installer/shell-completion.mjs +29 -0
- package/lib/installer/stage-cleanup.mjs +40 -0
- package/lib/installer/superpowers.mjs +113 -0
- package/lib/installer/targets.mjs +55 -0
- package/lib/installer/transaction.mjs +91 -0
- package/lib/installer/uninstall.mjs +32 -0
- package/lib/limits.mjs +13 -0
- package/lib/models/config.mjs +58 -0
- package/lib/models/index.mjs +2 -0
- package/lib/models/profiles.mjs +111 -0
- package/lib/policy/claude-hook.mjs +40 -0
- package/lib/policy/render.mjs +74 -0
- package/lib/policy/role-policy.json +577 -0
- package/lib/safe-fs/index.mjs +67 -0
- package/lib/safe-fs/native.mjs +54 -0
- package/native/binding.c +157 -0
- package/native/binding.gyp +1 -0
- package/package.json +43 -4
- package/prebuilds/darwin-arm64/arc_safe_fs.node +0 -0
- package/prebuilds/darwin-x64/arc_safe_fs.node +0 -0
- package/prebuilds/index.json +64 -0
- package/prebuilds/linux-arm64-gnu/arc_safe_fs.node +0 -0
- package/prebuilds/linux-x64-gnu/arc_safe_fs.node +0 -0
- package/scripts/build-native.mjs +36 -0
- package/scripts/check-installer-parity.mjs +59 -0
- package/scripts/update-manifest.mjs +28 -0
- package/scripts/update-role-policy.mjs +15 -0
- package/scripts/update-superpowers.mjs +4 -0
- package/scripts/vendor-toml.mjs +40 -0
- package/vendor/toml/LICENSE +24 -0
- package/vendor/toml/dist/date.js +156 -0
- package/vendor/toml/dist/error.js +67 -0
- package/vendor/toml/dist/extract.js +293 -0
- package/vendor/toml/dist/index.js +34 -0
- package/vendor/toml/dist/parse.js +164 -0
- package/vendor/toml/dist/primitive.js +151 -0
- package/vendor/toml/dist/stringify.js +219 -0
- package/vendor/toml/dist/struct.js +156 -0
- package/vendor/toml/dist/util.js +57 -0
- package/vendor/toml/package.json +6 -0
- package/vendor/toml/provenance.json +35 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {renderSourceClaudeHook} from './claude-hook.mjs';
|
|
2
|
+
import {validateGitPolicy} from '../../claude/skill/hooks/role-git-guard.mjs';
|
|
3
|
+
import source from './role-policy.json' with {type: 'json'};
|
|
4
|
+
const ROLES = ['orchestrator','scouter','planner','coder','qa','reviewer'];
|
|
5
|
+
const CONTROLS = ['prompt','capability','hook'];
|
|
6
|
+
const fail = message => { throw new Error(`Role policy: ${message}`); };
|
|
7
|
+
const object = value => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
8
|
+
const strings = value => Array.isArray(value) && value.length > 0 && value.every(x => typeof x === 'string' && x.length > 0) && new Set(value).size === value.length;
|
|
9
|
+
const same = (a,b) => JSON.stringify(a) === JSON.stringify(b);
|
|
10
|
+
export function validateRolePolicy(input) {
|
|
11
|
+
if (!object(input) || input.schemaVersion !== 1 || !Array.isArray(input.roles) || !same(input.roles.map(x=>x?.id),ROLES) || input.roles.some(x=>typeof x.description !== 'string' || !x.description)) fail('expected six known roles in canonical order');
|
|
12
|
+
if (!Array.isArray(input.rules) || !input.rules.length) fail('rules are required');
|
|
13
|
+
const ids = new Set();
|
|
14
|
+
for (const rule of input.rules) {
|
|
15
|
+
if (!object(rule) || typeof rule.id !== 'string' || !/^[a-z][a-z0-9.-]+$/.test(rule.id) || ids.has(rule.id)) fail('invalid or duplicate rule ID');
|
|
16
|
+
ids.add(rule.id);
|
|
17
|
+
if (!strings(rule.roles) || rule.roles.some(x=>!ROLES.includes(x)) || !['allow','deny','require'].includes(rule.effect) || !strings(rule.operations) || !strings(rule.evidence) || !['user','orchestrator'].includes(rule.authority) || typeof rule.text !== 'string' || !rule.text || /[\r\n]/.test(rule.text)) fail(`invalid rule ${rule.id}`);
|
|
18
|
+
if (!object(rule.controls) || !same(Object.keys(rule.controls).sort(),['claude','codex']) || Object.values(rule.controls).some(x=>!CONTROLS.includes(x))) fail(`invalid control level for ${rule.id}`);
|
|
19
|
+
}
|
|
20
|
+
for (const id of ['scope.non-escalation','git.specialists-deny','git.orchestrator-accept-commit','external.explicit-user-authority',...ROLES.map(x=>({orchestrator:'role.orchestrator-boundary',scouter:'role.scouter-read-only',planner:'role.planner-draft-only',coder:'role.coder-implementation',qa:'role.qa-verification',reviewer:'role.reviewer-independent'})[x]),'review.significant-no-plan','review.significant-plan','review.final-plan-recheck']) if(!ids.has(id)) fail(`missing required rule ${id}`);
|
|
21
|
+
for (const platform of ['codex','claude']) if (!object(input.platforms?.[platform]) || !CONTROLS.includes(input.platforms[platform].level) || typeof input.platforms[platform].notice !== 'string' || !input.platforms[platform].notice) fail(`invalid ${platform} controls`);
|
|
22
|
+
// These are workflow invariants, not customizable scheduling options.
|
|
23
|
+
const routes = {noPlan:['coder','qa','reviewer','orchestrator-accept'],planTask:['coder','fresh-qa','orchestrator-accept','orchestrator-commit'],planFinal:['required-qa','reviewer'],planFinding:['coder','reviewer']};
|
|
24
|
+
if (!object(input.review) || Object.keys(input.review).length !== 4 || Object.entries(routes).some(([key,value])=>!same(input.review[key],value))) fail('invalid review routing');
|
|
25
|
+
try {validateGitPolicy(input.git);} catch {fail('invalid Git policy');}
|
|
26
|
+
return input;
|
|
27
|
+
}
|
|
28
|
+
export const defaultRolePolicy = source;
|
|
29
|
+
export const POLICY_TARGETS = ['codex','claude'].flatMap(platform => [
|
|
30
|
+
{path:`${platform}/skill/SKILL.md`,platform,audience:'orchestrator'},
|
|
31
|
+
...ROLES.slice(1).map(audience=>({path:`${platform}/agents/arc-${audience}.${platform==='codex'?'toml':'md'}`,platform,audience})),
|
|
32
|
+
...['planning','handoff','handoff-prep','commit','verification'].map(name=>({path:`${platform}/skill/references/${name}.md`,platform,audience:'orchestrator'})),
|
|
33
|
+
]);
|
|
34
|
+
POLICY_TARGETS.splice(POLICY_TARGETS.length-1,0,{path:'claude/skill/hooks/git-policy.json',platform:'claude',audience:'specialists',asset:'git'});
|
|
35
|
+
export function renderPolicySection(policy, {platform, audience, section = 'contract', skillPath} = {}) {
|
|
36
|
+
validateRolePolicy(policy);
|
|
37
|
+
if (!['codex','claude'].includes(platform) || !ROLES.includes(audience) || !['contract','global'].includes(section)) fail('unknown render target');
|
|
38
|
+
const rules = policy.rules.filter(rule=>section === 'global' || audience === 'orchestrator' || rule.roles.includes(audience));
|
|
39
|
+
const lines = ['Generated from lib/policy/role-policy.json; do not edit this managed section manually.', ...rules.map(rule=>`- [${rule.id}] ${rule.text}`), ...(section === 'global' ? [] : [`- [platform.${platform}] ${policy.platforms[platform].notice}`])];
|
|
40
|
+
if (skillPath !== undefined) { if(typeof skillPath !== 'string' || !skillPath || /[\r\n]/.test(skillPath)) fail('invalid skill path'); lines.push(`- Policy details: \`${skillPath}\`.`); }
|
|
41
|
+
return lines.join('\n');
|
|
42
|
+
}
|
|
43
|
+
export function replaceManagedPolicyBlocks(text, blocks) {
|
|
44
|
+
if(typeof text !== 'string' || !object(blocks) || !Object.keys(blocks).length) fail('invalid managed block input');
|
|
45
|
+
const tokens = [...text.matchAll(/\[ARC role policy: ([a-z-]+) (begin|end)\]/g)];
|
|
46
|
+
if (tokens.length !== Object.keys(blocks).length * 2 || tokens.some(x=>!Object.hasOwn(blocks,x[1]))) fail('missing or unexpected managed marker');
|
|
47
|
+
const ranges=[];
|
|
48
|
+
for(const [name,body] of Object.entries(blocks)) {
|
|
49
|
+
if(!/^[a-z-]+$/.test(name) || typeof body !== 'string' || body.includes('[ARC role policy:')) fail('invalid managed section');
|
|
50
|
+
const matches=tokens.filter(x=>x[1]===name);
|
|
51
|
+
if(matches.length!==2 || matches[0][2]!=='begin' || matches[1][2]!=='end') fail(`duplicate, missing or reversed ${name} markers`);
|
|
52
|
+
const start=matches[0].index+matches[0][0].length,end=matches[1].index;
|
|
53
|
+
const eol=/\r?\n/.exec(text)?.[0]??'\n';
|
|
54
|
+
if(tokens.some(x=>x.index>=start && x.index<end)) fail('nested managed markers');
|
|
55
|
+
ranges.push({start,end,body:eol+body.replace(/\r?\n/g,eol)+eol});
|
|
56
|
+
}
|
|
57
|
+
let result=text;
|
|
58
|
+
for(const {start,end,body} of ranges.sort((a,b)=>b.start-a.start)) result=result.slice(0,start)+body+result.slice(end);
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
export function buildPolicyOutputs(inputs, policy = source) {
|
|
62
|
+
validateRolePolicy(policy);
|
|
63
|
+
if (!(inputs instanceof Map) || inputs.size !== POLICY_TARGETS.length) fail('expected complete target map');
|
|
64
|
+
const outputs=new Map();
|
|
65
|
+
for(const target of POLICY_TARGETS) {
|
|
66
|
+
const bytes=inputs.get(target.path); if(!Buffer.isBuffer(bytes)) fail(`missing target ${target.path}`);
|
|
67
|
+
let text; try{text=new TextDecoder('utf-8',{fatal:true,ignoreBOM:true}).decode(bytes);}catch{fail(`invalid UTF-8 target ${target.path}`);}
|
|
68
|
+
if(target.asset==='git') {try{JSON.parse(text);}catch{fail('invalid Git policy asset');}outputs.set(target.path,Buffer.from(JSON.stringify(policy.git,null,2)+'\n'));continue;}
|
|
69
|
+
let rendered=replaceManagedPolicyBlocks(text,{contract:renderPolicySection(policy,{...target,section:'contract'})});
|
|
70
|
+
if(target.platform==='claude' && target.path.startsWith('claude/agents/')) {try{rendered=renderSourceClaudeHook(rendered);}catch{fail('invalid Claude hook wiring');}}
|
|
71
|
+
outputs.set(target.path,Buffer.from(rendered));
|
|
72
|
+
}
|
|
73
|
+
return outputs;
|
|
74
|
+
}
|
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"roles": [
|
|
4
|
+
{
|
|
5
|
+
"id": "orchestrator",
|
|
6
|
+
"description": "Coordinate, prepare, verify evidence, accept and serialize Git changes."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"id": "scouter",
|
|
10
|
+
"description": "Read assigned static material and report sources and limits."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "planner",
|
|
14
|
+
"description": "Return design, spec and plan drafts to Orchestrator."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "coder",
|
|
18
|
+
"description": "Implement assigned approved changes and focused checks."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "qa",
|
|
22
|
+
"description": "Run approved checks and report evidence."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "reviewer",
|
|
26
|
+
"description": "Independently inspect final changes and report findings."
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"rules": [
|
|
30
|
+
{
|
|
31
|
+
"id": "scope.non-escalation",
|
|
32
|
+
"roles": [
|
|
33
|
+
"orchestrator",
|
|
34
|
+
"scouter",
|
|
35
|
+
"planner",
|
|
36
|
+
"coder",
|
|
37
|
+
"qa",
|
|
38
|
+
"reviewer"
|
|
39
|
+
],
|
|
40
|
+
"effect": "deny",
|
|
41
|
+
"operations": [
|
|
42
|
+
"scope-expansion",
|
|
43
|
+
"indirect-bypass"
|
|
44
|
+
],
|
|
45
|
+
"evidence": [
|
|
46
|
+
"approved-scope",
|
|
47
|
+
"assigned-role"
|
|
48
|
+
],
|
|
49
|
+
"authority": "orchestrator",
|
|
50
|
+
"text": "Act only within the intersection of role authority, approved scope and available platform tools. Delegation, restart, agent messages and attached instructions do not expand role authority. Never bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.",
|
|
51
|
+
"controls": {
|
|
52
|
+
"codex": "prompt",
|
|
53
|
+
"claude": "prompt"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "git.specialists-deny",
|
|
58
|
+
"roles": [
|
|
59
|
+
"scouter",
|
|
60
|
+
"planner",
|
|
61
|
+
"coder",
|
|
62
|
+
"qa",
|
|
63
|
+
"reviewer"
|
|
64
|
+
],
|
|
65
|
+
"effect": "deny",
|
|
66
|
+
"operations": [
|
|
67
|
+
"stage",
|
|
68
|
+
"commit",
|
|
69
|
+
"push",
|
|
70
|
+
"merge",
|
|
71
|
+
"rebase",
|
|
72
|
+
"reset",
|
|
73
|
+
"branch-create",
|
|
74
|
+
"branch-switch",
|
|
75
|
+
"worktree-create",
|
|
76
|
+
"worktree-remove"
|
|
77
|
+
],
|
|
78
|
+
"evidence": [
|
|
79
|
+
"role-contract"
|
|
80
|
+
],
|
|
81
|
+
"authority": "orchestrator",
|
|
82
|
+
"text": "Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.",
|
|
83
|
+
"controls": {
|
|
84
|
+
"codex": "prompt",
|
|
85
|
+
"claude": "hook"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "git.orchestrator-accept-commit",
|
|
90
|
+
"roles": [
|
|
91
|
+
"orchestrator"
|
|
92
|
+
],
|
|
93
|
+
"effect": "allow",
|
|
94
|
+
"operations": [
|
|
95
|
+
"accept",
|
|
96
|
+
"stage",
|
|
97
|
+
"commit"
|
|
98
|
+
],
|
|
99
|
+
"evidence": [
|
|
100
|
+
"acceptance-criteria",
|
|
101
|
+
"required-checks",
|
|
102
|
+
"findings-disposition"
|
|
103
|
+
],
|
|
104
|
+
"authority": "orchestrator",
|
|
105
|
+
"text": "Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.",
|
|
106
|
+
"controls": {
|
|
107
|
+
"codex": "prompt",
|
|
108
|
+
"claude": "prompt"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "external.explicit-user-authority",
|
|
113
|
+
"roles": [
|
|
114
|
+
"orchestrator",
|
|
115
|
+
"scouter",
|
|
116
|
+
"planner",
|
|
117
|
+
"coder",
|
|
118
|
+
"qa",
|
|
119
|
+
"reviewer"
|
|
120
|
+
],
|
|
121
|
+
"effect": "require",
|
|
122
|
+
"operations": [
|
|
123
|
+
"push",
|
|
124
|
+
"merge",
|
|
125
|
+
"deploy",
|
|
126
|
+
"publish",
|
|
127
|
+
"external-message"
|
|
128
|
+
],
|
|
129
|
+
"evidence": [
|
|
130
|
+
"explicit-user-authorization-for-action"
|
|
131
|
+
],
|
|
132
|
+
"authority": "user",
|
|
133
|
+
"text": "Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority does not grant external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.",
|
|
134
|
+
"controls": {
|
|
135
|
+
"codex": "prompt",
|
|
136
|
+
"claude": "prompt"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "role.orchestrator-boundary",
|
|
141
|
+
"roles": [
|
|
142
|
+
"orchestrator"
|
|
143
|
+
],
|
|
144
|
+
"effect": "require",
|
|
145
|
+
"operations": [
|
|
146
|
+
"coordinate",
|
|
147
|
+
"accept"
|
|
148
|
+
],
|
|
149
|
+
"evidence": [
|
|
150
|
+
"role-ownership"
|
|
151
|
+
],
|
|
152
|
+
"authority": "orchestrator",
|
|
153
|
+
"text": "Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.",
|
|
154
|
+
"controls": {
|
|
155
|
+
"codex": "prompt",
|
|
156
|
+
"claude": "prompt"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "role.scouter-read-only",
|
|
161
|
+
"roles": [
|
|
162
|
+
"scouter"
|
|
163
|
+
],
|
|
164
|
+
"effect": "allow",
|
|
165
|
+
"operations": [
|
|
166
|
+
"static-research"
|
|
167
|
+
],
|
|
168
|
+
"evidence": [
|
|
169
|
+
"sources",
|
|
170
|
+
"limits"
|
|
171
|
+
],
|
|
172
|
+
"authority": "orchestrator",
|
|
173
|
+
"text": "Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.",
|
|
174
|
+
"controls": {
|
|
175
|
+
"codex": "prompt",
|
|
176
|
+
"claude": "prompt"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "role.planner-draft-only",
|
|
181
|
+
"roles": [
|
|
182
|
+
"planner"
|
|
183
|
+
],
|
|
184
|
+
"effect": "allow",
|
|
185
|
+
"operations": [
|
|
186
|
+
"draft-response"
|
|
187
|
+
],
|
|
188
|
+
"evidence": [
|
|
189
|
+
"prepared-target-evidence",
|
|
190
|
+
"approved-spec-before-dependent-plan"
|
|
191
|
+
],
|
|
192
|
+
"authority": "orchestrator",
|
|
193
|
+
"text": "Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. Do not save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.",
|
|
194
|
+
"controls": {
|
|
195
|
+
"codex": "prompt",
|
|
196
|
+
"claude": "prompt"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "role.coder-implementation",
|
|
201
|
+
"roles": [
|
|
202
|
+
"coder"
|
|
203
|
+
],
|
|
204
|
+
"effect": "allow",
|
|
205
|
+
"operations": [
|
|
206
|
+
"assigned-edit",
|
|
207
|
+
"focused-check"
|
|
208
|
+
],
|
|
209
|
+
"evidence": [
|
|
210
|
+
"approved-brief",
|
|
211
|
+
"tdd-or-recorded-exception"
|
|
212
|
+
],
|
|
213
|
+
"authority": "orchestrator",
|
|
214
|
+
"text": "Implement only assigned approved files and focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.",
|
|
215
|
+
"controls": {
|
|
216
|
+
"codex": "prompt",
|
|
217
|
+
"claude": "prompt"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "role.qa-verification",
|
|
222
|
+
"roles": [
|
|
223
|
+
"qa"
|
|
224
|
+
],
|
|
225
|
+
"effect": "allow",
|
|
226
|
+
"operations": [
|
|
227
|
+
"approved-check",
|
|
228
|
+
"scoped-temporary-artifact"
|
|
229
|
+
],
|
|
230
|
+
"evidence": [
|
|
231
|
+
"commands",
|
|
232
|
+
"observations",
|
|
233
|
+
"criterion-evidence"
|
|
234
|
+
],
|
|
235
|
+
"authority": "orchestrator",
|
|
236
|
+
"text": "Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.",
|
|
237
|
+
"controls": {
|
|
238
|
+
"codex": "prompt",
|
|
239
|
+
"claude": "prompt"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "role.reviewer-independent",
|
|
244
|
+
"roles": [
|
|
245
|
+
"reviewer"
|
|
246
|
+
],
|
|
247
|
+
"effect": "allow",
|
|
248
|
+
"operations": [
|
|
249
|
+
"static-review"
|
|
250
|
+
],
|
|
251
|
+
"evidence": [
|
|
252
|
+
"assigned-final-diff",
|
|
253
|
+
"relevant-qa-evidence"
|
|
254
|
+
],
|
|
255
|
+
"authority": "orchestrator",
|
|
256
|
+
"text": "Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only; do not execute QA tests, edit files, perform Git mutations or decide acceptance.",
|
|
257
|
+
"controls": {
|
|
258
|
+
"codex": "prompt",
|
|
259
|
+
"claude": "prompt"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"id": "review.significant-no-plan",
|
|
264
|
+
"roles": [
|
|
265
|
+
"orchestrator",
|
|
266
|
+
"scouter",
|
|
267
|
+
"planner",
|
|
268
|
+
"coder",
|
|
269
|
+
"qa",
|
|
270
|
+
"reviewer"
|
|
271
|
+
],
|
|
272
|
+
"effect": "require",
|
|
273
|
+
"operations": [
|
|
274
|
+
"no-plan-final-review"
|
|
275
|
+
],
|
|
276
|
+
"evidence": [
|
|
277
|
+
"required-qa",
|
|
278
|
+
"qa-rechecks"
|
|
279
|
+
],
|
|
280
|
+
"authority": "orchestrator",
|
|
281
|
+
"text": "For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. Do not omit Reviewer merely because no plan exists. This creates no new plan obligation.",
|
|
282
|
+
"controls": {
|
|
283
|
+
"codex": "prompt",
|
|
284
|
+
"claude": "prompt"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "review.significant-plan",
|
|
289
|
+
"roles": [
|
|
290
|
+
"orchestrator",
|
|
291
|
+
"scouter",
|
|
292
|
+
"planner",
|
|
293
|
+
"coder",
|
|
294
|
+
"qa",
|
|
295
|
+
"reviewer"
|
|
296
|
+
],
|
|
297
|
+
"effect": "require",
|
|
298
|
+
"operations": [
|
|
299
|
+
"plan-final-review"
|
|
300
|
+
],
|
|
301
|
+
"evidence": [
|
|
302
|
+
"all-tasks-accepted",
|
|
303
|
+
"required-qa"
|
|
304
|
+
],
|
|
305
|
+
"authority": "orchestrator",
|
|
306
|
+
"text": "For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. After all tasks are accepted and required QA is complete, Reviewer reviews the final full change once. Reviewer is NOT a per-task or per-commit required gate. Preserve required checks and necessary finding rechecks.",
|
|
307
|
+
"controls": {
|
|
308
|
+
"codex": "prompt",
|
|
309
|
+
"claude": "prompt"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"id": "review.final-plan-recheck",
|
|
314
|
+
"roles": [
|
|
315
|
+
"orchestrator",
|
|
316
|
+
"scouter",
|
|
317
|
+
"planner",
|
|
318
|
+
"coder",
|
|
319
|
+
"qa",
|
|
320
|
+
"reviewer"
|
|
321
|
+
],
|
|
322
|
+
"effect": "require",
|
|
323
|
+
"operations": [
|
|
324
|
+
"plan-finding-recheck"
|
|
325
|
+
],
|
|
326
|
+
"evidence": [
|
|
327
|
+
"reviewer-findings"
|
|
328
|
+
],
|
|
329
|
+
"authority": "orchestrator",
|
|
330
|
+
"text": "For final overall Reviewer findings on plan work, including behavior findings, use Coder → Reviewer without QA reassignment; repeat until resolved. This exception applies only to that final plan stage. Preserve required QA and QA failure rechecks before initial final review and outside this exception.",
|
|
331
|
+
"controls": {
|
|
332
|
+
"codex": "prompt",
|
|
333
|
+
"claude": "prompt"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"platforms": {
|
|
338
|
+
"codex": {
|
|
339
|
+
"level": "prompt",
|
|
340
|
+
"notice": "Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Coder and QA need shell for approved checks."
|
|
341
|
+
},
|
|
342
|
+
"claude": {
|
|
343
|
+
"level": "capability",
|
|
344
|
+
"notice": "Existing per-role tool allowlists reduce available tools; Bash and role contracts are not a filesystem sandbox. A role-scoped Git guard is a separate integration and is not supplied by these policy sections alone."
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"review": {
|
|
348
|
+
"noPlan": [
|
|
349
|
+
"coder",
|
|
350
|
+
"qa",
|
|
351
|
+
"reviewer",
|
|
352
|
+
"orchestrator-accept"
|
|
353
|
+
],
|
|
354
|
+
"planTask": [
|
|
355
|
+
"coder",
|
|
356
|
+
"fresh-qa",
|
|
357
|
+
"orchestrator-accept",
|
|
358
|
+
"orchestrator-commit"
|
|
359
|
+
],
|
|
360
|
+
"planFinal": [
|
|
361
|
+
"required-qa",
|
|
362
|
+
"reviewer"
|
|
363
|
+
],
|
|
364
|
+
"planFinding": [
|
|
365
|
+
"coder",
|
|
366
|
+
"reviewer"
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
"git": {
|
|
370
|
+
"schemaVersion": 1,
|
|
371
|
+
"globalValueOptions": [
|
|
372
|
+
"-C",
|
|
373
|
+
"--git-dir",
|
|
374
|
+
"--work-tree"
|
|
375
|
+
],
|
|
376
|
+
"globalFlags": [
|
|
377
|
+
"--no-pager",
|
|
378
|
+
"-P",
|
|
379
|
+
"--literal-pathspecs"
|
|
380
|
+
],
|
|
381
|
+
"commands": {
|
|
382
|
+
"status": {
|
|
383
|
+
"flags": [
|
|
384
|
+
"--short",
|
|
385
|
+
"-s",
|
|
386
|
+
"--branch",
|
|
387
|
+
"-b",
|
|
388
|
+
"--porcelain",
|
|
389
|
+
"--porcelain=v1",
|
|
390
|
+
"--porcelain=v2",
|
|
391
|
+
"--untracked-files=no",
|
|
392
|
+
"--untracked-files=all"
|
|
393
|
+
],
|
|
394
|
+
"values": [],
|
|
395
|
+
"positionals": "any"
|
|
396
|
+
},
|
|
397
|
+
"diff": {
|
|
398
|
+
"flags": [
|
|
399
|
+
"--stat",
|
|
400
|
+
"--numstat",
|
|
401
|
+
"--shortstat",
|
|
402
|
+
"--name-only",
|
|
403
|
+
"--name-status",
|
|
404
|
+
"--oneline",
|
|
405
|
+
"--no-color",
|
|
406
|
+
"--color=never",
|
|
407
|
+
"--no-ext-diff",
|
|
408
|
+
"--no-textconv",
|
|
409
|
+
"--raw",
|
|
410
|
+
"--patch",
|
|
411
|
+
"-p",
|
|
412
|
+
"--summary",
|
|
413
|
+
"--exit-code",
|
|
414
|
+
"--quiet",
|
|
415
|
+
"--check",
|
|
416
|
+
"--cached",
|
|
417
|
+
"--staged",
|
|
418
|
+
"--relative",
|
|
419
|
+
"--no-index"
|
|
420
|
+
],
|
|
421
|
+
"values": [],
|
|
422
|
+
"positionals": "any"
|
|
423
|
+
},
|
|
424
|
+
"log": {
|
|
425
|
+
"flags": [
|
|
426
|
+
"--stat",
|
|
427
|
+
"--numstat",
|
|
428
|
+
"--shortstat",
|
|
429
|
+
"--name-only",
|
|
430
|
+
"--name-status",
|
|
431
|
+
"--oneline",
|
|
432
|
+
"--no-color",
|
|
433
|
+
"--color=never",
|
|
434
|
+
"--no-ext-diff",
|
|
435
|
+
"--no-textconv",
|
|
436
|
+
"--raw",
|
|
437
|
+
"--patch",
|
|
438
|
+
"-p",
|
|
439
|
+
"--summary",
|
|
440
|
+
"--exit-code",
|
|
441
|
+
"--quiet",
|
|
442
|
+
"-<count>",
|
|
443
|
+
"--all",
|
|
444
|
+
"--decorate",
|
|
445
|
+
"--no-decorate",
|
|
446
|
+
"--graph"
|
|
447
|
+
],
|
|
448
|
+
"values": [
|
|
449
|
+
"-n",
|
|
450
|
+
"--max-count",
|
|
451
|
+
"--format",
|
|
452
|
+
"--pretty"
|
|
453
|
+
],
|
|
454
|
+
"positionals": "any"
|
|
455
|
+
},
|
|
456
|
+
"show": {
|
|
457
|
+
"flags": [
|
|
458
|
+
"--stat",
|
|
459
|
+
"--numstat",
|
|
460
|
+
"--shortstat",
|
|
461
|
+
"--name-only",
|
|
462
|
+
"--name-status",
|
|
463
|
+
"--oneline",
|
|
464
|
+
"--no-color",
|
|
465
|
+
"--color=never",
|
|
466
|
+
"--no-ext-diff",
|
|
467
|
+
"--no-textconv",
|
|
468
|
+
"--raw",
|
|
469
|
+
"--patch",
|
|
470
|
+
"-p",
|
|
471
|
+
"--summary",
|
|
472
|
+
"--exit-code",
|
|
473
|
+
"--quiet",
|
|
474
|
+
"--no-patch",
|
|
475
|
+
"-s"
|
|
476
|
+
],
|
|
477
|
+
"values": [
|
|
478
|
+
"--format",
|
|
479
|
+
"--pretty"
|
|
480
|
+
],
|
|
481
|
+
"positionals": "any"
|
|
482
|
+
},
|
|
483
|
+
"rev-parse": {
|
|
484
|
+
"flags": [
|
|
485
|
+
"--show-toplevel",
|
|
486
|
+
"--git-common-dir",
|
|
487
|
+
"--absolute-git-dir",
|
|
488
|
+
"--git-dir",
|
|
489
|
+
"--verify",
|
|
490
|
+
"--short",
|
|
491
|
+
"--is-inside-work-tree",
|
|
492
|
+
"--abbrev-ref",
|
|
493
|
+
"--path-format=absolute"
|
|
494
|
+
],
|
|
495
|
+
"values": [],
|
|
496
|
+
"positionals": "any"
|
|
497
|
+
},
|
|
498
|
+
"ls-files": {
|
|
499
|
+
"flags": [
|
|
500
|
+
"--stage",
|
|
501
|
+
"-s",
|
|
502
|
+
"--cached",
|
|
503
|
+
"--others",
|
|
504
|
+
"--exclude-standard",
|
|
505
|
+
"--deleted",
|
|
506
|
+
"--modified"
|
|
507
|
+
],
|
|
508
|
+
"values": [],
|
|
509
|
+
"positionals": "any"
|
|
510
|
+
},
|
|
511
|
+
"ls-tree": {
|
|
512
|
+
"flags": [
|
|
513
|
+
"-r",
|
|
514
|
+
"--name-only",
|
|
515
|
+
"-l"
|
|
516
|
+
],
|
|
517
|
+
"values": [],
|
|
518
|
+
"positionals": "any"
|
|
519
|
+
},
|
|
520
|
+
"branch": {
|
|
521
|
+
"flags": [
|
|
522
|
+
"--list",
|
|
523
|
+
"--all",
|
|
524
|
+
"-a",
|
|
525
|
+
"--remotes",
|
|
526
|
+
"-r",
|
|
527
|
+
"--show-current",
|
|
528
|
+
"-v",
|
|
529
|
+
"-vv"
|
|
530
|
+
],
|
|
531
|
+
"values": [],
|
|
532
|
+
"positionals": "list"
|
|
533
|
+
},
|
|
534
|
+
"config": {
|
|
535
|
+
"flags": [
|
|
536
|
+
"--get",
|
|
537
|
+
"--get-all",
|
|
538
|
+
"--get-regexp",
|
|
539
|
+
"--list",
|
|
540
|
+
"-l",
|
|
541
|
+
"--show-origin",
|
|
542
|
+
"--show-scope",
|
|
543
|
+
"--local",
|
|
544
|
+
"--global",
|
|
545
|
+
"--system"
|
|
546
|
+
],
|
|
547
|
+
"values": [],
|
|
548
|
+
"positionals": "query"
|
|
549
|
+
},
|
|
550
|
+
"worktree list": {
|
|
551
|
+
"flags": [
|
|
552
|
+
"--porcelain",
|
|
553
|
+
"-z",
|
|
554
|
+
"-v"
|
|
555
|
+
],
|
|
556
|
+
"values": [],
|
|
557
|
+
"positionals": "none"
|
|
558
|
+
},
|
|
559
|
+
"remote": {
|
|
560
|
+
"flags": [
|
|
561
|
+
"-v",
|
|
562
|
+
"--verbose"
|
|
563
|
+
],
|
|
564
|
+
"values": [],
|
|
565
|
+
"positionals": "none"
|
|
566
|
+
},
|
|
567
|
+
"remote get-url": {
|
|
568
|
+
"flags": [
|
|
569
|
+
"--all",
|
|
570
|
+
"--push"
|
|
571
|
+
],
|
|
572
|
+
"values": [],
|
|
573
|
+
"positionals": "any"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|