agent-policy-kit 0.1.0 → 0.3.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/AGENT_INSTALL.md CHANGED
@@ -4,6 +4,8 @@ APK is configuration-only. Native files remain independent after npm package/sou
4
4
 
5
5
  Perform authorized technical setup/removal yourself; do not hand the owner a shell checklist. Use JSON plans/results, preserve main models, credentials, permissions, unrelated settings and later edits. Never log in, collect credentials, accept terms, start model tasks, publish, weaken sandboxes or bypass trust to force installation success. Private backups can contain existing secrets; keep state private.
6
6
 
7
+ Captured output stays JSON. Use --json explicitly when a terminal is attached. Interactive users receive a readable summary. Run show to inspect existing user-level native subagent settings without APK receipts or client executables. Show reads current supported fields, including manual edits, but does not resolve project, managed or session precedence. An incomplete read exits with code 3 while retaining independent client results. Doctor remains the owned-configuration integrity check.
8
+
7
9
  ## 1. Select the requested release
8
10
 
9
11
  Package version is configuration-release version. Read that version's CHANGELOG.md or release output for what changed, why and migration limits. Check the installed tool versions, actual provisioned model aliases and current official model/effort documentation before applying. Preserve explicit user choices; a newer package/model is not an instruction to switch silently. See [model maintenance](docs/model-updates.md) and the dated [model catalog/presets](docs/model-catalog.md).
@@ -11,8 +13,8 @@ Package version is configuration-release version. Read that version's CHANGELOG.
11
13
  After publication, pinned invocation is supported:
12
14
 
13
15
  ```sh
14
- npx --yes --ignore-scripts --package agent-policy-kit@0.1.0 agent-policy release
15
- npx --yes --ignore-scripts --package agent-policy-kit@0.1.0 agent-policy setup --release
16
+ npx --yes --ignore-scripts --package agent-policy-kit@0.3.0 agent-policy release
17
+ npx --yes --ignore-scripts --package agent-policy-kit@0.3.0 agent-policy setup --release
16
18
  ```
17
19
 
18
20
  Before publication, replace the registry spec with the verified local .tgz. For several commands, install to a temporary or user-owned prefix with npm install --prefix PREFIX TARBALL --ignore-scripts --no-audit --no-fund, then invoke PREFIX/node_modules/.bin/agent-policy. No stable runtime prefix, sudo or shell-profile changes are needed.
@@ -25,14 +27,16 @@ The page always prints explicit arguments, including when a preset filled the fo
25
27
  agent-policy setup \
26
28
  --roles reviewer,explorer \
27
29
  --max-concurrent 3 \
28
- --codex 'reviewer=gpt-6.1-sol:high,explorer=gpt-6-luna:high' \
29
- --avoid-codex 'gpt-6-astra' \
30
+ --chatgpt 'reviewer=gpt-6.1-sol:high,explorer=gpt-6-luna:high' \
31
+ --avoid-chatgpt 'gpt-6-astra' \
30
32
  --claude 'reviewer=sonnet:high,explorer=haiku:high' \
31
33
  --avoid-claude 'opus,fable' \
32
34
  --apply
33
35
  ```
34
36
 
35
- Use --codex, --claude, --kimi and/or --antigravity to select tools. Each tool must list every selected role exactly once. --roles and --max-concurrent are required in this mode. :native means effort null. Antigravity accepts role=tier without an effort. Split the model/effort pair at its last colon. Keep the visible shell quotes and line continuations. The optional --avoid-TOOL lists preserve routing guidance. An omitted list is empty.
37
+ Use --chatgpt, --claude, --kimi, --gemini and/or --grok to select AI assistants. Each tool must list every selected role exactly once. --roles and --max-concurrent are required in this mode. :native means effort null. Gemini accepts role=tier and Grok accepts role=model, both without an effort. Split the model/effort pair at its last colon. Keep the visible shell quotes and line continuations. The optional --avoid-TOOL lists preserve routing guidance. An omitted list is empty.
38
+
39
+ Optional --chatgpt-max-concurrent, --claude-max-concurrent, --kimi-max-concurrent, --gemini-max-concurrent and --grok-max-concurrent override --max-concurrent for their selected tool. They accept whole numbers from 1 to 32 and require the corresponding tool argument. JSON preferences can instead set clients[tool].maxConcurrent. Omitted overrides use the top-level fallback.
36
40
 
37
41
  Explicit arguments are setup/install-only and cannot combine with --client, --release, --preset, --policy or --config. Duplicate flags and incomplete role maps fail before writes. Omit --apply to plan first. Explicit commands allow deliberate owned replacement and record custom source with no named preset provenance. The native files do not retain a dependency on the codec or package.
38
42
 
@@ -48,7 +52,7 @@ Optional top-level selectedRoles selects worker, reviewer, explorer, tester, wri
48
52
 
49
53
  Use model-supported native effort levels. null means no explicit pin. A known catalog model rejects unsupported explicit effort. Keep at most one non-null pin per selected Kimi alias. Preset identity and custom source are reported separately. Tools omitted from clients are not selected.
50
54
 
51
- Run detect and inspect the setup plan. Working executable identity is required; stale directories are not presence. Automatic targets use standard native roots. Nondefault CODEX_HOME/CLAUDE_CONFIG_DIR/KIMI_CODE_HOME returns a per-client zero-write prerequisite rather than configuring a dormant folder. Explicit --home selects the standard layout under that intended base; preserve exact --home/--state-dir for later inspection/removal. It does not remap arbitrary native roots.
55
+ Run detect and inspect the setup plan. Working executable identity is required; stale directories are not presence. On macOS, detect also checks the CLIs bundled in ChatGPT Desktop and Claude Desktop after PATH; such a client reports origin desktop_app and uses the standard native root. Automatic targets use standard native roots. Nondefault CODEX_HOME/CLAUDE_CONFIG_DIR/KIMI_CODE_HOME/GROK_HOME returns a per-client zero-write prerequisite rather than configuring a dormant folder. Explicit --home selects the standard layout under that intended base; preserve exact --home/--state-dir for later inspection/removal. It does not remap arbitrary native roots.
52
56
 
53
57
  ## 3. Apply the concrete reviewed plan
54
58
 
@@ -64,7 +68,7 @@ The available role names are apk-worker/apk-reviewer/apk-explorer/apk-tester/apk
64
68
 
65
69
  ## 4. Native limits
66
70
 
67
- Codex/Claude have native defaults/caps with higher-priority setting and execution-path exceptions. Kimi role-to-pool selection and concurrency are guidance. Antigravity uses native Pro/Flash/Flash Lite/inherit tiers, with no documented per-role effort or universal hard cap. avoidModels is guidance. A pinned configuration does not prove provider identity, entitlement, task quality or unchanged alias resolution. Never add a runtime gate to strengthen a missing native feature.
71
+ ChatGPT (Codex) and Claude (Claude Code) have native defaults/caps with higher-priority setting and execution-path exceptions. Kimi role-to-pool selection and concurrency are guidance. Gemini (Antigravity) uses native Pro/Flash/Flash Lite/inherit tiers, with no documented per-role effort or universal hard cap. Grok Build writes agents/apk-ROLE.md, per-role models and a general-purpose fallback in config.toml [subagents.models], and a native [subagents] max_concurrent cap; it has no per-role effort, so subagents use the main session effort. avoidModels is guidance. A pinned configuration does not prove provider identity, entitlement, task quality or unchanged alias resolution. Never add a runtime gate to strengthen a missing native feature.
68
72
 
69
73
  ## 5. Removal and incompatible formats
70
74
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,87 @@
2
2
 
3
3
  Each npm version is one configuration release: its presets, native role definitions, instructions and configuration page. Published versions are not rewritten. Applying another release is explicit; package installation alone changes no settings.
4
4
 
5
+ ## 0.3.0 — 2026-11-01
6
+
7
+ ### Why this release
8
+
9
+ People know their assistants as ChatGPT, Claude, Kimi, Gemini and Grok, not by the names of the coding agents inside them. The configurator and the CLI now use those names. Some people use only the desktop apps, and they have no CLI on PATH. Before this release, setup found nothing for them.
10
+
11
+ ### Who should update
12
+
13
+ - Anyone who uses Codex in ChatGPT Desktop or Claude Code in the Code tab of Claude Desktop on macOS without a separate CLI.
14
+ - Anyone who wants the general assistant names on the page and in the terminal.
15
+
16
+ Preset values do not change, so an installation of 0.2.0 keeps working without an update.
17
+
18
+ ### Breaking change
19
+
20
+ AI assistants now have general names: ChatGPT, Claude, Kimi, Gemini and Grok. APK still configures their coding agents: Codex, Claude Code, Kimi Code, Antigravity and Grok Build. Two technical IDs changed, and there is no migration:
21
+
22
+ - `codex` is now `chatgpt`: `--chatgpt`, `--chatgpt-max-concurrent`, `--avoid-chatgpt`, `--client chatgpt` and the `clients.chatgpt` policy key.
23
+ - `agy` is now `gemini`: `--gemini`, `--gemini-max-concurrent`, `--avoid-gemini`, `--client gemini` and the `clients.gemini` policy key.
24
+ - Warning and error codes follow the new IDs, for example `chatgpt-native-precedence-limits` and `CHATGPT_CAP_ALIAS_CONFLICT`.
25
+
26
+ Before you use this version, remove the APK settings for these two assistants with the version that created them: `npx --yes --ignore-scripts --package agent-policy-kit@0.2.0 agent-policy uninstall --apply`. This version does not read the old `codex` and `agy` installation receipts, so its setup refuses the existing `apk-*` files as unowned. Policy files and share links that use the old IDs are refused too. Claude, Kimi and Grok keep their IDs.
27
+
28
+ ### Migration and rollback
29
+
30
+ The two renamed IDs set a migration boundary. These results come from tests with the published 0.2.0 package and this release:
31
+
32
+ - **ChatGPT (Codex) and Gemini (Antigravity):** remove the APK settings with the version that created them before you set up with the other version. A move in either direction without removal reports `OWNERSHIP_CONFLICT` and changes nothing. After removal, setup with the other version succeeds.
33
+ - **Claude, Kimi and Grok:** their IDs and receipt format v4 are unchanged. In the tests, setup with 0.3.0 upgraded 0.2.0 installations of Claude and Grok in place, and setup with 0.2.0 moved Claude back. Kimi uses the same receipt format, but it was not tested with a provisioned model pool.
34
+
35
+ `uninstall --apply` removes the settings of every assistant. Run setup again afterwards for the assistants you use.
36
+
37
+ ### Presets and model catalog
38
+
39
+ Preset models, effort levels and parallel limits are the same as in 0.2.0. Only the keys `codex` and `agy` became `chatgpt` and `gemini`, and the catalog labels became the general names. The model catalog snapshot is still dated 2026-10-30, with the Grok entries checked on 2026-11-01. Configuration checks are not model-quality evaluations.
40
+
41
+ ### What changed
42
+
43
+ - The configurator calls the second step "AI assistants" and shows the general names. Readable CLI output uses the same names.
44
+ - On macOS, setup finds the Codex that ChatGPT Desktop includes and the Claude Code in the Code tab of Claude Desktop, also when no CLI is on PATH. Both apps read the same settings as their CLIs. A CLI on PATH or in a conventional location still has priority. Detect output reports these clients with `origin: "desktop_app"`. Claude Cowork reads its settings from the Claude account, so APK does not configure it.
45
+
46
+ ## 0.2.0 — 2026-11-01
47
+
48
+ ### Why this release
49
+
50
+ Subagents draw on the same plan limits as the main session, and every parallel session adds to that usage. Without explicit choices, subagents can inherit the most expensive model and use up a weekly limit within days. This release names the work modes by how much of a plan subagents may use, adds per-tool parallel limits, a read-only settings check and Grok Build support.
51
+
52
+ ### Who should update
53
+
54
+ Anyone who wants Grok Build roles, per-tool parallel limits or the renamed modes. Re-running setup with 0.2.0 applies the new preset values: Top-tier now uses Opus 5.5, GPT-6.1 Sol and K3 at high effort, with top models behind an opt-in switch, and Kimi's Standard Docs writer uses K3 256K. Installations of 0.1.0 keep working unchanged until setup is run again.
55
+
56
+ ### Migration and rollback
57
+
58
+ Preset ids (`fast`, `balanced`, `quality`), receipt format v4 and ownership, drift and rollback behavior are unchanged. Version 1 share links still open; new links use version 2 and carry each tool's parallel limit. Applying 0.1.0 again restores its owned settings, as the synthetic upgrade/downgrade gate verifies. Grok Build is new, so it has nothing to migrate.
59
+
60
+ ### Presets and model catalog
61
+
62
+ The model catalog snapshot is dated 2026-10-30; Grok Build entries were checked on 2026-11-01 against the Grok Build 1.0.70 user guide and the xAI model list. An independent audit compared every preset, tool and role with the catalog and the documentation tables, and a test now keeps those tables in sync. Configuration checks are not model-quality evaluations.
63
+
64
+ ### What changed
65
+
66
+ - Add Grok Build as a fifth coding tool, listed after Antigravity. APK writes `agents/apk-<role>.md` role files (Reviewer and Code explorer use the read-only `permission_mode: plan`), per-role models and a `general-purpose` fallback copied from the first selected role (the Coder when selected) in `config.toml` `[subagents.models]`, a native `[subagents] max_concurrent` cap and a delegation block in `AGENTS.md` under `$GROK_HOME` (default `~/.grok`). Per-role effort is not configurable, so every Grok choice has effort null and the page shows no effort controls. Presets use Grok Build 0.1, xAI's fast coding model, for light work and Grok 4.7 for stronger roles; Grok 4.6 and 4.5 stay available in Custom. Explicit commands use `--grok`, `--grok-max-concurrent` and `--avoid-grok`. Removal restores the original settings and refuses on local edits.
67
+
68
+ - Rename work modes to Light, Standard and Top-tier and describe them by how much of a plan's limits subagents use. Preset ids and share-link ids are unchanged. Top-tier now uses Opus 5.5, GPT-6.1 Sol and K3 at high effort for code, review and tests. A per-tool switch under Top-tier opts those roles into Fable 5.1, GPT-6 Astra or K3.1 Pro; it is off by default. Top models no longer run at xhigh/max, because native default subagent settings copy the first selected role (the Coder when selected) to subagents started without a named role.
69
+
70
+ - Explain each configuration step with a short ? note, and stop repeating vendor billing or version documentation in the work-mode notice.
71
+
72
+ - Start a fresh or reset form with every subagent role selected, and give the empty coding-tool field the same appearance as the empty role field.
73
+
74
+ - Automatically deploy the latest website from verified main while preserving exact tagged release pages and older share links. Configuration guards keep commands pinned to published package capabilities; npm releases remain explicit.
75
+
76
+ - Credit Mykola Maksymenko in the configuration page and package metadata. Link the supplied LinkedIn profile and related projects, with static author/project structured data and a release-specific canonical URL.
77
+
78
+ - Interactive terminals get readable setup, doctor, release and show output; captured output keeps the existing JSON contract, and `--json` forces JSON.
79
+
80
+ - `agent-policy show` reads the current user-level subagent settings of every tool, before or after APK installation, without writing files. The page footer offers it as "Check current settings" with a copy button.
81
+
82
+ - Each tool has its own parallel limit from 1 to 32, set in its details on the page or with `--TOOL-max-concurrent`; policies accept `clients[tool].maxConcurrent`.
83
+
84
+ - The page adds Add all for roles and tools, a GitHub link in the header, Reset form beside the release line, and preset switching for a single selected tool without a needless confirmation.
85
+
5
86
  ## 0.1.0 — 2026-10-30
6
87
 
7
88
  ### Why this release
package/README.md CHANGED
@@ -1,53 +1,31 @@
1
1
  # Agent Policy Kit
2
2
 
3
- Coding agents can delegate specific tasks to temporary subagents. Those tasks vary in complexity and importance. A single model for every task is rarely the best balance of capability, speed and cost.
3
+ Created and maintained by [Mykola Maksymenko](https://www.linkedin.com/in/nick-maximenko/).
4
4
 
5
- Agent Policy Kit lets you match subagent roles with models and effort. It configures your coding tools’ native environment, then exits. The main agent still decides when to delegate, and its model stays unchanged.
5
+ **Stop subagents from burning your plan limits.** APK gives each subagent role a model that fits the task and your plan in ChatGPT, Claude, Kimi, Gemini and Grok. One command, then it exits.
6
6
 
7
- ```mermaid
8
- flowchart LR
9
- Roles("1. Choose subagent roles") --> Tools("2. Choose your coding tools")
10
- Tools --> Models("3. Choose models and effort")
11
- Models --> Command("4. Run one setup command")
12
- Command --> Done("Native configs saved<br/>APK exits")
13
- classDef default fill:#f5f7fb,stroke:#e0e5ed,color:#19283e
14
- classDef action fill:#3158c3,stroke:#3158c3,color:#ffffff
15
- class Command action
16
- ```
7
+ ![One weekly limit: 5.3 h vs 25 h of work](docs/assets/subagent-limits.svg)
17
8
 
18
- ## Choose your setup
9
+ <sub>My own Codex logs; tasks differed between the runs. [How it was measured](docs/limits-evidence.md).</sub>
19
10
 
20
- Open the [configuration page](https://agent-policy-kit.maksymenko-ml.workers.dev/v/0.1.0/) in your browser. Choose roles and coding tools, keep a preset or adjust each role, then copy the fully expanded setup command. The page address saves your visible choices for sharing. APK creates only the selected roles in installed, selected tools.
11
+ ## Set it up
21
12
 
22
- The [bundled page](site/index.html) also works offline. APK has no proxy, background process or runtime during your normal coding sessions. You can remove the npm package afterward.
13
+ 1. Open the [configurator](https://agent-policy-kit.trymenow.io/). Pick roles, your AI assistants and a mode: **Light**, **Standard** or **Top-tier**, by how much of your plan subagents may use.
14
+ 2. Copy the command and run it. Remove the last `--apply` line to preview first; nothing is written without it.
23
15
 
24
- ## Roles and work modes
16
+ ![Configurator: models and effort for each subagent role, and the setup command](docs/assets/configurator.png)
25
17
 
26
- Choose only the roles you need:
18
+ ## Good to know
27
19
 
28
- | Role | Result |
29
- |---|---|
30
- | Coder | Implementation and fixes |
31
- | Reviewer | Read-only correctness, security and regression findings |
32
- | Code explorer | Read-only code and documentation discovery |
33
- | Test writer | Tests and targeted execution; product fixes return to Coder |
34
- | Docs writer | Verified docs, examples and release notes |
35
- | Task runner | Prescribed commands and mechanical edits; uncertain decisions return to the parent |
20
+ - Your main agent and its model stay unchanged. It still decides when to delegate.
21
+ - APK configures the coding agent of each assistant: Codex in ChatGPT, Claude Code in Claude, Kimi Code, Antigravity for Gemini and Grok Build. Plain chats do not change.
22
+ - Desktop apps on macOS work too. APK finds the Codex that ChatGPT Desktop includes and the Claude Code in the Code tab of Claude Desktop. Both read the same settings as their CLIs. Claude Cowork reads its settings from your Claude account, so APK does not change Cowork.
23
+ - No proxy and no background process. Delete the npm package after setup.
24
+ - `npx --yes --ignore-scripts --package agent-policy-kit@0.3.0 agent-policy show` reads your current settings. Use `uninstall --apply` instead of `show` to remove APK's settings and keep yours.
36
25
 
37
- Fast & economical favors bounded work and lighter models. Balanced puts more capability into implementation and verification. Quality first uses frontier models for demanding work, with higher usage and latency possible. All choices remain editable. Claude Fable in Quality may use additional usage credits.
26
+ [Model catalog](docs/model-catalog.md) · [Release notes](CHANGELOG.md) · [AI operator guide](AGENT_INSTALL.md) · [Support](docs/compatibility.md) · [Privacy](docs/privacy.md)
38
27
 
39
- See the [exact preset choices and rationale](docs/model-catalog.md#how-the-presets-are-designed). Recommendations contain no personal model bans. They configure the environment; the main agent still chooses whether to delegate.
28
+ ## Related projects
40
29
 
41
- ## Use a specific release's defaults
42
-
43
- ```sh
44
- npx --yes --ignore-scripts --package agent-policy-kit@0.1.0 agent-policy setup --release --apply
45
- ```
46
-
47
- Omit --apply to preview. Each version includes its own presets, instructions and configuration page. [Release notes](CHANGELOG.md) explain what changed and why; [release usage](docs/releases.md) covers upgrade and downgrade.
48
-
49
- Prefer your AI agent to handle installation or removal? Give it the [AI operator guide](AGENT_INSTALL.md).
50
-
51
- [Model catalog](docs/model-catalog.md) · [Support](docs/compatibility.md) · [Model updates](docs/model-updates.md) · [Privacy](docs/privacy.md) · [Verification](docs/verification.md)
52
-
53
- Node.js 22.x (22.13+) or 24+; macOS/Linux. Version 0.1.0. MIT licensed.
30
+ - [Agents Can Communicate (ACC)](https://github.com/automatis-tools/agents-can-communicate): connect independent AI coding sessions for questions, reviews and handoffs.
31
+ - [Automatis Skills](https://github.com/automatis-tools/automatis-skills): reusable engineering skills for GitHub workflows, Git cleanup and technical writing.
@@ -10,9 +10,11 @@ import {EXPLICIT_FIELDS,parseExplicitOptions} from '../src/explicit.mjs';
10
10
  import {nativeHomeConflict} from '../src/native.mjs';
11
11
  import {detectClients,resolveClient,summarizeDetection} from '../src/detect.mjs';
12
12
  import {bundledReleaseInfo,presetPreferences} from '../src/release.mjs';
13
+ import {formatResult,useJsonOutput} from '../src/output.mjs';
13
14
  const root=path.dirname(path.dirname(fileURLToPath(import.meta.url)));
14
15
  const version=JSON.parse(fs.readFileSync(path.join(root,'package.json'))).version;
15
- const print=value=>process.stdout.write(JSON.stringify(value,null,2)+'\n');
16
+ let outputContext={command:'',apply:false,json:process.argv.includes('--json')};
17
+ const print=value=>process.stdout.write(useJsonOutput({isTTY:process.stdout.isTTY,json:outputContext.json})?JSON.stringify(value,null,2)+'\n':formatResult(outputContext.command,value,{version,apply:outputContext.apply}));
16
18
  const fail=code=>{throw Object.assign(new Error(code),{code});};
17
19
  const safeCode=code=>typeof code==='string'&&/^[A-Z_]{1,64}$/.test(code)?code:'OPERATION_FAILED';
18
20
  function loadPolicy(file) {
@@ -26,36 +28,42 @@ Usage: agent-policy <command> [options]
26
28
 
27
29
  instructions Print the AI setup and removal guide
28
30
  init Copy default preferences to --policy (never overwrite)
29
- detect Detect installed coding tools from executable identity
31
+ detect Detect installed AI assistants from executable identity
30
32
  release Show this package's configuration version and release notes
31
33
  setup Plan native configuration; add --apply to write
32
34
  install Plan one --client or all detected clients
33
35
  uninstall Plan owned removals; add --apply to remove
34
36
  doctor Check owned native configuration without model calls
37
+ show Read current user-level native subagent configuration
35
38
 
36
- Options: --client codex|claude|kimi|agy --home PATH --state-dir PATH
39
+ Options: --client chatgpt|claude|kimi|gemini|grok --home PATH --state-dir PATH
37
40
  --policy FILE | --release [--preset fast|balanced|quality] | --config BASE64URL
38
41
  --roles worker,reviewer,explorer,tester,writer,routine --max-concurrent 3
39
- --codex ROLE=MODEL:EFFORT,... --claude ROLE=MODEL:EFFORT,...
40
- --kimi ROLE=ALIAS:EFFORT,... --antigravity ROLE=TIER,...
41
- --avoid-codex MODELS --avoid-claude MODELS --avoid-kimi MODELS --avoid-antigravity MODELS
42
- --apply --help --version
42
+ --chatgpt ROLE=MODEL:EFFORT,... --claude ROLE=MODEL:EFFORT,...
43
+ --kimi ROLE=ALIAS:EFFORT,... --gemini ROLE=TIER,... --grok ROLE=MODEL,...
44
+ --chatgpt-max-concurrent N --claude-max-concurrent N
45
+ --kimi-max-concurrent N --gemini-max-concurrent N --grok-max-concurrent N
46
+ --avoid-chatgpt MODELS --avoid-claude MODELS --avoid-kimi MODELS --avoid-gemini MODELS --avoid-grok MODELS
47
+ --apply --json --help --version
43
48
 
44
- Explicit tool input requires --roles and --max-concurrent. Use :native for unpinned effort.
45
- Include every selected role for each selected tool. Avoid lists are comma-separated.
49
+ Explicit tool input requires --roles and --max-concurrent. Use :native for unpinned effort. Gemini and Grok take ROLE=TIER and ROLE=MODEL with no effort.
50
+ Include every selected role for each selected tool. Per-tool concurrency overrides the shared fallback.
51
+ Avoid lists are comma-separated.
46
52
  State defaults to AGENT_POLICY_HOME or ~/.agent-policy-kit.
53
+ Terminal output is readable text; captured output is JSON. --json always prints JSON.
47
54
  This configurator exits after setup. Native files work without the package.`);}
48
55
  async function main(){
49
56
  const {values:opts,positionals,tokens}=parseArgs({allowPositionals:true,strict:true,tokens:true,options:{
50
57
  client:{type:'string'},home:{type:'string'},'state-dir':{type:'string'},policy:{type:'string'},
51
- apply:{type:'boolean',default:false},help:{type:'boolean'},version:{type:'boolean'},
58
+ apply:{type:'boolean',default:false},json:{type:'boolean',default:false},help:{type:'boolean'},version:{type:'boolean'},
52
59
  release:{type:'boolean',default:false},config:{type:'string'},preset:{type:'string'},
53
60
  ...Object.fromEntries(EXPLICIT_FIELDS.map(name=>[name,{type:'string'}])),
54
61
  }});
55
62
  if(opts.version){console.log(version);return;}
56
63
  const command=positionals[0];
64
+ outputContext={command,apply:opts.apply,json:opts.json};
57
65
  if(opts.help||!command||command==='help'){help();return;}
58
- if(!['instructions','init','detect','release','setup','install','uninstall','doctor'].includes(command)) fail('UNKNOWN_COMMAND');
66
+ if(!['instructions','init','detect','release','setup','install','uninstall','doctor','show'].includes(command)) fail('UNKNOWN_COMMAND');
59
67
  if(positionals.length!==1) fail('UNEXPECTED_ARGUMENT');
60
68
  const seen=new Set();for(const token of tokens)if(token.kind==='option'&&EXPLICIT_FIELDS.includes(token.name)){if(seen.has(token.name))fail('DUPLICATE_OPTION');seen.add(token.name);}
61
69
  const explicitValues=Object.fromEntries(EXPLICIT_FIELDS.filter(name=>opts[name]!==undefined).map(name=>[name,opts[name]])),explicit=Object.keys(explicitValues).length>0;
@@ -74,6 +82,13 @@ async function main(){
74
82
  const selectedState=opts['state-dir']??process.env.AGENT_POLICY_HOME??path.join(home,'.agent-policy-kit');
75
83
  if(!path.isAbsolute(selectedState)) fail('STATE_PATH_MUST_BE_ABSOLUTE');
76
84
  const stateDir=path.resolve(selectedState);
85
+ if(command==='show'){
86
+ if(opts.apply||opts.policy!==undefined||opts.preset!==undefined)fail('CONFLICTING_OPTIONS');
87
+ const {readConfiguration}=await import('../src/inspect.mjs');
88
+ const report=await readConfiguration({client:client??null,home,stateDir,explicitHome:Boolean(opts.home)});
89
+ print(report);if(Object.values(report.clients).some(c=>c.status==='attention'))process.exitCode=3;
90
+ return;
91
+ }
77
92
  const builtin=path.join(root,`policies/${preset}.json`);
78
93
  let policyPath=bundled?builtin:opts.policy?path.resolve(opts.policy):fs.existsSync(path.join(stateDir,'policy.json'))?path.join(stateDir,'policy.json'):builtin;
79
94
  if(command==='detect'){print(summarizeDetection(client?[await resolveClient(client)]:await detectClients()));return;}
@@ -134,8 +149,8 @@ async function main(){
134
149
  catch(error){configuration={status:'attention',reason:safeCode(error.code)};}
135
150
  }
136
151
  report.clients[selected]={detection,configuration,modelExecution:'not_checked',
137
- concurrency:['codex','claude'].includes(selected)?'native_setting_with_client_exceptions':'instructions_only',
138
- models:selected==='agy'?'native_tiers':selected==='kimi'?'native_pool_with_routing_guidance':'native_role_settings'};
152
+ concurrency:['chatgpt','claude','grok'].includes(selected)?'native_setting_with_client_exceptions':'instructions_only',
153
+ models:selected==='gemini'?'native_tiers':selected==='kimi'?'native_pool_with_routing_guidance':'native_role_settings'};
139
154
  }
140
155
  print(report);
141
156
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  APK runs only for configuration commands. It detects installed CLIs, reads release/custom preferences, writes native files and exits. Native agent operation never imports or launches APK.
4
4
 
5
- One npm version is one configuration release. src/release.mjs exposes its presets, catalog date and notes. policies contains Fast/Balanced/Quality data; models/catalog.json is the dated native model/effort snapshot. The self-contained page is generated from that same version and data. src/explicit.mjs supplies the pure command codec to Node and is embedded in the page at build time. Commands always expand selected role values, even for presets. The CLI converts complete maps to normal validated policy. Required code/light fallbacks copy the first explicit role and are unused by the complete per-role map. No browser/backend/provider request is needed to compose a command.
5
+ One npm version is one configuration release. src/release.mjs exposes its presets, catalog date and notes. policies contains Light/Standard/Top-tier data (ids fast/balanced/quality); models/catalog.json is the dated native model/effort snapshot. The self-contained page is generated from that same version and data. src/explicit.mjs supplies the pure command codec to Node and is embedded in the page at build time. Commands always expand selected role values, even for presets. The CLI converts complete maps to normal validated policy. Required code/light fallbacks copy the first explicit role and are unused by the complete per-role map. No browser/backend/provider request is needed to compose a command.
6
6
 
7
7
  src/share.mjs validates and encodes the visible form state into the URL fragment. It never runs native operations or stores clipboard history. The page restores only release-compatible state, then applies normal command validation.
8
8
 
Binary file
@@ -0,0 +1,44 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" class="apk-limits" viewBox="0 0 880 322" width="880" height="322" role="img" aria-labelledby="apk-limits-title">
2
+ <title id="apk-limits-title">One weekly Codex limit lasted 5.3 h of my work without APK and 25 h with APK</title>
3
+ <defs>
4
+ <pattern id="apk-limits-hatch" width="8" height="8" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
5
+ <rect width="8" height="8" class="hb"/><line x1="0" y1="0" x2="0" y2="8" class="hl"/>
6
+ </pattern>
7
+ </defs>
8
+ <style>
9
+ .apk-limits { --bg:#ffffff; --ink:#0b0b0b; --ink2:#52514e; --ink3:#8a8984; --hb:#f4f3ef; --hl:#e2e0d9; --before:#eb6834; --after:#2a78d6; }
10
+ @media (prefers-color-scheme: dark) {
11
+ .apk-limits { --bg:#0d1117; --ink:#f0efec; --ink2:#c3c2b7; --ink3:#8b8a82; --hb:#141920; --hl:#262c35; --before:#d95926; --after:#3987e5; }
12
+ }
13
+ .apk-limits text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; fill: var(--ink); }
14
+ .apk-limits .bg { fill: var(--bg); }
15
+ .apk-limits .h1 { font-size: 24px; font-weight: 700; }
16
+ .apk-limits .sub { font-size: 14px; fill: var(--ink2); }
17
+ .apk-limits .day { font-size: 12px; font-weight: 600; fill: var(--ink3); }
18
+ .apk-limits .hb { fill: var(--hb); } .apk-limits .hl { stroke: var(--hl); stroke-width: 3; }
19
+ .apk-limits .before { fill: var(--before); } .apk-limits .after { fill: var(--after); }
20
+ .apk-limits .sep { stroke: var(--bg); stroke-width: 2; }
21
+ .apk-limits .rl { font-size: 15px; font-weight: 650; }
22
+ .apk-limits .rn { font-size: 14px; font-weight: 400; fill: var(--ink2); }
23
+ .apk-limits .val { font-size: 18px; font-weight: 700; }
24
+ .apk-limits .chip { fill: var(--bg); }
25
+ </style>
26
+ <rect class="bg" width="880" height="322" rx="12"/>
27
+ <text class="h1" x="32" y="48">One weekly limit: 5.3 h vs 25 h of work</text>
28
+ <text class="sub" x="32" y="74">My own Codex work on the same plan, in 8-hour workdays. Hatched: limit used up.</text>
29
+ <text class="day" x="113.6" y="114" text-anchor="middle">Mon</text><text class="day" x="276.8" y="114" text-anchor="middle">Tue</text><text class="day" x="440.0" y="114" text-anchor="middle">Wed</text><text class="day" x="603.2" y="114" text-anchor="middle">Thu</text><text class="day" x="766.4" y="114" text-anchor="middle">Fri</text>
30
+
31
+ <text class="rl" x="32" y="140">Without APK<tspan class="rn"> · half of subagent work ran on the top model</tspan></text>
32
+ <rect fill="url(#apk-limits-hatch)" x="32" y="152" width="816" height="48" rx="8"/>
33
+ <rect class="before" x="32" y="152" width="108.8" height="48" rx="8"/>
34
+ <line class="sep" x1="195.2" x2="195.2" y1="152" y2="200"/><line class="sep" x1="358.4" x2="358.4" y1="152" y2="200"/><line class="sep" x1="521.6" x2="521.6" y1="152" y2="200"/><line class="sep" x1="684.8" x2="684.8" y1="152" y2="200"/>
35
+ <rect class="chip" x="150.8" y="161" width="71" height="30" rx="6"/>
36
+ <text class="val" x="158.8" y="183">5.3 h</text>
37
+
38
+ <text class="rl" x="32" y="228">With APK<tspan class="rn"> · each role ran on a model that fits the task and the plan</tspan></text>
39
+ <rect fill="url(#apk-limits-hatch)" x="32" y="240" width="816" height="48" rx="8"/>
40
+ <rect class="after" x="32" y="240" width="510.0" height="48" rx="8"/>
41
+ <line class="sep" x1="195.2" x2="195.2" y1="240" y2="288"/><line class="sep" x1="358.4" x2="358.4" y1="240" y2="288"/><line class="sep" x1="521.6" x2="521.6" y1="240" y2="288"/><line class="sep" x1="684.8" x2="684.8" y1="240" y2="288"/>
42
+ <rect class="chip" x="552.0" y="249" width="60" height="30" rx="6"/>
43
+ <text class="val" x="560.0" y="271">25 h</text>
44
+ </svg>
@@ -1,14 +1,31 @@
1
1
  # Native configuration support
2
2
 
3
- | Client | Written native configuration | Limits |
3
+ | AI assistant | Written native configuration | Limits |
4
4
  |---|---|---|
5
- | Codex | User role TOMLs, native subagent defaults/concurrency, routing instructions | Higher-priority project/explicit settings still follow Codex rules |
6
- | Claude Code | User role Markdown with model/effort, native default/concurrency env, routing instructions | Force settings and native execution-path exceptions can override the intended mapping |
7
- | Kimi Code | User role Markdown, existing secondary-model pool, per-alias effort, routing instructions | Model-role selection and max concurrency are guidance; provisioned aliases/capabilities are required |
8
- | Antigravity | User role Markdown with Pro/Flash/Flash Lite/inherit tiers and routing instructions | No concrete provider pin, documented per-role effort, or universal native max-three cap |
5
+ | ChatGPT (Codex) | User role TOMLs, native subagent defaults/concurrency, routing instructions | Higher-priority project/explicit settings still follow Codex rules |
6
+ | Claude (Claude Code) | User role Markdown with model/effort, native default/concurrency env, routing instructions | Force settings and native execution-path exceptions can override the intended mapping |
7
+ | Kimi (Kimi Code) | User role Markdown, existing secondary-model pool, per-alias effort, routing instructions | Model-role selection and max concurrency are guidance; provisioned aliases/capabilities are required |
8
+ | Gemini (Antigravity) | User role Markdown with Pro/Flash/Flash Lite/inherit tiers and routing instructions | No concrete provider pin, documented per-role effort, or universal native max-three cap |
9
+ | Grok (Grok Build) | User role Markdown (read-only roles use permission_mode plan), per-role models and a general-purpose fallback in config.toml, native max_concurrent, routing instructions | No documented per-role effort; subagents use the main session effort. Higher-priority project/explicit settings still follow Grok Build rules |
9
10
 
10
11
  These are preferences implemented through native features. APK does not participate in later agent operation and does not enforce policy on every request. avoidModels is guidance. No hook, wrapper or proxy is installed to bypass native limits.
11
12
 
13
+ ## Desktop apps
14
+
15
+ Some desktop apps include their own copy of a CLI and do not put it on PATH. On macOS, detection also checks these copies, after PATH and the conventional CLI locations:
16
+
17
+ | App | Checked location | Settings it reads |
18
+ |---|---|---|
19
+ | ChatGPT Desktop (Codex) | `/Applications/ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex`, and the same path under `~/Applications` | `~/.codex`, the same as the Codex CLI |
20
+ | Claude Desktop (Code tab) | `~/Library/Application Support/Claude/claude-code/<version>/<build>/claude.app/Contents/MacOS/claude`, newest version first, and within a version the most recently written build first | `~/.claude`, the same as the Claude Code CLI |
21
+
22
+ A client found this way has `origin: "desktop_app"` in detect output. The app must be installed, and the bundled CLI must report a valid version. Settings apply to new desktop sessions.
23
+
24
+ These desktop features are not configured:
25
+
26
+ - Claude Cowork reads instructions and plugins from your Claude account, not from `~/.claude`.
27
+ - ChatGPT conversations outside Codex have no subagent settings.
28
+
12
29
  Global configuration can be superseded by a project's native settings, session flags, environment or plugins. A fresh client session may be needed. Configured files, native loading and actual provider model execution are separate evidence.
13
30
 
14
31
  macOS is the local acceptance host. Linux has a source-isolation gate using bubblewrap and a hosted workflow prepared; hosted runs are pending. Windows application is explicitly unsupported.
@@ -19,3 +36,4 @@ Primary references checked for this design:
19
36
  - [Claude native subagents](https://code.claude.com/docs/en/sub-agents).
20
37
  - [Kimi configuration](https://github.com/MoonshotAI/kimi-code/blob/main/docs/en/configuration/config-files.md) and [agent definitions](https://github.com/MoonshotAI/kimi-code/blob/main/docs/en/customization/agents.md).
21
38
  - [Antigravity native subagents](https://antigravity.google/docs/subagents?tab=cli).
39
+ - [Grok Build subagents](https://github.com/xai-org/grok-build/blob/main/crates/codegen/xai-grok-pager/docs/user-guide/16-subagents.md), observed with Grok Build 1.0.70 and an isolated GROK_HOME.
@@ -5,23 +5,25 @@ Open site/index.html in Google Chrome. The page is one self-contained HTML file.
5
5
  ## Four steps
6
6
 
7
7
  1. Add the subagent roles you need. A green check confirms a nonempty role selection. Each question-mark button explains its description and native prompt. Removing a role also removes its configuration rows. Readding it preserves its choices in the current page session.
8
- 2. Add your coding tools. A green check confirms a nonempty tool selection. New tools append to the list. The first becomes active. From the second onward, All is active by default. A manually selected tool or All stays active during later additions. All configures the selected tools together. The CLI, not the browser, detects which selected tools are installed.
9
- 3. Choose a work mode. No mode is selected initially. Each selected tool needs a chosen mode before the command becomes available. The first choice has no replacement warning. Individual tools always show every selected role's model and supported effort. All offers shared presets. Custom can be selected manually and is also set by model or effort edits. Each tool shows its own mode beneath its name. Individual presets warn before changing that tool. Replacing genuinely edited values, mixed per-tool bases or partially chosen modes from All warns before changing all selected tools. Selecting Custom alone without changing values does not create an overwrite warning. Cancel preserves the choices.
10
- 4. Copy the setup command and run it in a terminal. Incomplete selections identify the missing steps with links. Invalid model settings disable copying and clear the previous command. Clipboard failure selects the full command for manual copying.
8
+ 2. Add your AI assistants. A green check confirms a nonempty assistant selection. New assistants append to the list. The first becomes active. From the second onward, All is active by default. A manually selected assistant or All stays active during later additions. All configures the selected assistants together. The CLI, not the browser, detects which selected assistants are installed.
9
+ 3. Choose a work mode. No mode is selected initially. Each selected assistant needs a chosen mode before the command becomes available. The first choice has no replacement warning. Individual assistant details show every selected role's model and supported effort, followed by that assistant's parallel limit. The shared All view hides these controls. All offers shared presets. Custom can be selected manually and is also set by model or effort edits. Each assistant shows its own mode beneath its name. Individual presets warn before changing that assistant. Replacing genuinely edited values, mixed per-assistant bases or partially chosen modes from All warns before changing all selected assistants. Selecting Custom alone without changing values does not create an overwrite warning. Cancel preserves the choices.
10
+ 4. Copy the setup command and run it in a terminal. Incomplete selections identify the missing steps with links. Invalid model settings or per-assistant limits disable copying and clear the previous command. Clipboard failure selects the full command for manual copying.
11
11
 
12
- The page starts empty. A completed third step requires selected modes and valid model settings. A fourth green check means the current command was successfully copied, not installed. Configuration changes clear that check; opening another tool without changing values preserves it. Reset form clears selections, modes, copy status and the URL fragment without changing any installed native files. Parallelism follows the release recommendation. Effort buttons fill their section and show supported explicit levels. A dash means no native effort setting. Unpinned values remain unpinned until changed. Kimi roles sharing a model alias share its effort. Antigravity offers only native tiers. Other tools also accept custom native model IDs, subject to CLI and account support.
12
+ The page starts with every subagent role selected and no AI assistant. A completed third step requires selected modes and valid model settings. A fourth green check means the current command was successfully copied, not installed. Configuration changes clear that check; opening another assistant without changing values preserves it. Reset form clears selections, modes, copy status and the URL fragment without changing any installed native files. Light uses 2 parallel subagents, Standard uses 3 and Top-tier uses 2. Selecting a preset restores its models, effort and parallel limit for the targeted assistants. Editing a limit marks only that assistant Custom. Effort buttons fill their section and show supported explicit levels. A dash means no native effort setting. Unpinned values remain unpinned until changed. Kimi roles sharing a model alias share its effort. Gemini offers only native tiers. Other assistants also accept custom native model IDs, subject to CLI and account support.
13
13
 
14
- The command is pinned to this page's package version. It always expands every selected tool and role into visible model/effort arguments. Presets fill the form but do not shorten or hide the command. Tools follow their selected order. --roles carries the selected role IDs and --max-concurrent carries the existing cap. Nonempty --avoid-TOOL lists preserve existing model-avoidance guidance. Omitted tools are not configured.
14
+ The command is pinned to this page's package version. It always expands every selected assistant and role into visible model/effort arguments. Presets fill the form but do not shorten or hide the command. Assistants follow their selected order. --roles carries the selected role IDs and --max-concurrent carries the shared fallback. Optional --chatgpt-max-concurrent, --claude-max-concurrent, --kimi-max-concurrent, --gemini-max-concurrent and --grok-max-concurrent carry independent overrides. Nonempty --avoid-TOOL lists preserve existing model-avoidance guidance. Omitted assistants are not configured.
15
15
 
16
- Each tool uses role=model:effort entries. :native means no explicit effort pin. Antigravity uses role=tier without an effort suffix. The parser splits at the last colon, preserving model IDs that contain colons or @. Every selected role must be present exactly once for every selected tool. The generated command reports custom provenance because its values are explicit, even when a preset filled the form.
16
+ Each assistant uses role=model:effort entries. :native means no explicit effort pin. Gemini uses role=tier and Grok uses role=model, both without an effort suffix. The parser splits at the last colon, preserving model IDs that contain colons or @. Every selected role must be present exactly once for every selected assistant. The generated command reports custom provenance because its values are explicit, even when a preset filled the form.
17
17
 
18
18
  The complete command is visible in a read-only field that grows to fit its contents. Copy preserves the visible POSIX shell line continuations. Soft wrapping adds no additional newlines. [Native field sizing](https://developer.chrome.com/docs/css-ui/css-field-sizing) handles content and window-size changes without a JavaScript resize helper. The page never executes the command or grants model access.
19
19
 
20
- Role/tool changes use native View Transitions with a reduced-motion setting and a synchronous fallback. Section hints are conditional: role guidance after selection, add-more guidance for one tool, individual-configuration guidance for two or more tools, mode guidance when available, and Copied in the fourth heading. Changed hints, step markers, editing-scope labels and per-tool mode captions hold a soft highlight for two seconds, then fade for two seconds. Tool-caption nodes are reused so switching the editing view does not interrupt a pulse. Identical state does not repeat the animation. Labels retain their size during layout changes. No animation dependency is installed.
20
+ Role/assistant changes use native View Transitions with a reduced-motion setting and a synchronous fallback. Section hints are conditional: role guidance after selection, add-more guidance for one assistant, individual-configuration guidance for two or more assistants, mode guidance when available, and Copied in the fourth heading. Changed hints, step markers, editing-scope labels and per-assistant mode captions hold a soft highlight for two seconds, then fade for two seconds. Assistant-caption nodes are reused so switching the editing view does not interrupt a pulse. Identical state does not repeat the animation. Labels retain their size during layout changes. No animation dependency is installed.
21
21
 
22
22
  ## Share a setup
23
23
 
24
- Each form edit replaces the current URL fragment with its visible state. Copy the page address to share it. The fragment contains roles, tool order, mode/base, selected model/effort pairs, cap and editing scope. It excludes clipboard completion and unselected cached choices. Opening a link restores the form, including unfinished choices and model drafts. Command validation still blocks incomplete or invalid settings.
24
+ The Max at once field appears only in individual AI assistant details. It accepts whole numbers from 1 to 32. Each assistant retains its own limit while switching the editing view. Model-preset selection restores that assistant's preset limit. Invalid selected-assistant limits block the command and copy action. Invalid cached settings on unselected assistants do not block selected assistants. Kimi and Gemini use the value as guidance rather than a native hard cap.
25
+
26
+ Each form edit replaces the current URL fragment with its visible state. Copy the page address to share it. Version 2 fragments contain roles, assistant order, mode/base, selected model/effort pairs, each assistant's limit and editing scope. Version 1 scalar-limit links remain readable. Links from 0.2.0 or earlier that include ChatGPT or Gemini do not open, because those assistants then had the IDs codex and agy. Their exact count is preserved; a count that differs from the current preset makes the restored assistant Custom. It excludes clipboard completion and unselected cached choices. Opening a link restores the form, including unfinished choices and model drafts. Command validation still blocks incomplete or invalid settings.
25
27
 
26
28
  src/share.mjs is the pure browser/Node codec. It uses versioned base64url JSON with strict IDs, fields, duplicate-key, size, UTF-8 and release checks. The fragment stays in the browser and needs no database or config lookup service. Invalid or mismatched-release links show an error and cannot produce an applicable command. Missing-step links scroll/focus without overwriting the setup fragment.
27
29
 
@@ -35,4 +37,8 @@ Serve site/index.html from any static host. It can become part of getacc.dev wit
35
37
 
36
38
  The current version is unreleased. Its page labels that status. Before npm publication, use the verified local tarball as described in the [AI operator guide](../AGENT_INSTALL.md). The checks do not publish or deploy anything.
37
39
 
38
- The introduction includes a collapsed “How it works and why you need it” explanation aligned with the README. Native details/summary supports keyboard toggling; opening/closing takes 200 ms and honors reduced motion. The hosted versioned URL preserves release-specific shared links.
40
+ The introduction matches the README: it states the problem, and a collapsed “Why” section holds the inline limit illustration from scripts/build-limits-chart.mjs and a link to [how it was measured](limits-evidence.md). Native details/summary supports keyboard toggling; opening/closing takes 200 ms and honors reduced motion. The hosted versioned URL preserves release-specific shared links.
41
+
42
+ The footer credits Mykola Maksymenko and links to his supplied LinkedIn profile, Agents Can Communicate and Automatis Skills. Package author metadata is the source for the visible byline, title, author tags and static JSON-LD Person/project/page relationship. The canonical URL follows the homepage origin and bundled release version. These links load only when followed; no social widgets or runtime metadata requests are added.
43
+
44
+ The latest hosted root can update its interface and author metadata from reviewed main independently of npm publication. Published versioned pages remain exact snapshots. Configuration-sensitive changes must match a published package before the host build accepts them. See [deployment](deployment.md).
@@ -0,0 +1,33 @@
1
+ # Website deployment
2
+
3
+ The latest configurator at https://agent-policy-kit.trymenow.io/ follows reviewed main after Verify package succeeds. npm publication remains a separate, explicitly authorized operation.
4
+
5
+ ## Automatic path
6
+
7
+ GitHub Actions runs Deploy configurator after a successful same-repository push verification on main. A successful version-tag verification can retry a site build after a package release. The deployment workflow always checks out main, never the triggering branch or tag's code. It verifies successful main-push CI for the checked-out commit and rechecks the latest main immediately before upload. Stale runs skip; deployments are serialized.
8
+
9
+ A merged version bump waits for its release. When the package version has no v-prefixed or bare tag reachable from main, the guard skips the deployment, and the run states that the version is not tagged and published yet. The run does not fail. The tag push after npm publication starts the deployment. A tagged version that npm does not serve yet still fails the build; use the manual retry after publication.
10
+
11
+ The production environment permits the main branch only. It has no required-reviewer pause, so normal merges need no manual deployment. workflow_dispatch provides a main-only retry after an external outage or delayed npm publication.
12
+
13
+ ## Latest page and archived releases
14
+
15
+ The root page uses the current main interface and author metadata. Its declared configuration version and generated command must already exist in npm, and configuration-sensitive source must match that version's reachable Git tag. A model/catalog/role/policy/explicit-option change requires a corresponding configuration release before it can be served.
16
+
17
+ The /v/VERSION/ pages are copied byte for byte from reachable release tags. They are not rebuilt with the latest template. Old root share links redirect only to a known same-origin archived release; malformed, unknown and offline links retain safe errors. The root canonical URL stays the project root.
18
+
19
+ npm run build:host requires full Git history/tags and anonymous registry access. It refuses unknown files/symlinks in the generated output and stops before replacing dist when release validation fails.
20
+
21
+ ## One-time credentials
22
+
23
+ The GitHub production environment stores CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN as encrypted environment secrets. The deployment API token needs Workers Scripts edit for the target Cloudflare account. Routing is excluded from the generated CI configuration: domain changes remain explicit infrastructure operations, so the CI token needs no zone, DNS, KV or R2 permissions.
24
+
25
+ Do not store the interactive Wrangler OAuth token or refresh token in CI. Create a separate deployment token and keep its value out of Git/npm, logs and artifacts. Cloudflare may scope Workers Scripts edit to the account rather than one Worker; the workflow additionally fixes the target Worker name and checks out trusted main code only.
26
+
27
+ Deployment tooling is pinned to Wrangler 4.151.3 and installed with lifecycle scripts disabled before Cloudflare credentials are passed to the upload step. Account secrets are not exposed to PR test jobs.
28
+
29
+ ## Validation and retry
30
+
31
+ Before upload, the workflow builds the allowlisted static output and verifies current main/CI. After upload, it checks ordinary HTTPS responses against local latest/archive bytes. A failed gate leaves the existing deployment in place. A post-upload HTTP mismatch fails the workflow and needs investigation; it does not silently claim success.
32
+
33
+ Use the Deploy configurator workflow's main-only manual retry for transient service failures. No tag, npm package or PR is merged or published by this workflow.
@@ -0,0 +1,30 @@
1
+ # Grok Build support
2
+
3
+ ## Intent
4
+
5
+ Many programmers use Grok Build next to Codex, Claude Code, Kimi Code and Antigravity. APK should configure Grok Build subagent roles the same way: one command writes native settings once and exits, with no runtime component.
6
+
7
+ ## Verified native surface (Grok Build 1.0.70, bundled user guide)
8
+
9
+ - Profile: `$GROK_HOME`, default `~/.grok`. An isolated `GROK_HOME` is honored (checked with `grok inspect --json` on a temporary profile).
10
+ - Roles: Markdown agent definitions in `~/.grok/agents/*.md` with YAML frontmatter (`name`, `description`, prompt body). User agents appear in the `spawn_subagent` type list. Bundled read-only agents use `permission_mode: plan`.
11
+ - Per-role model: `[subagents.models] <agent-name> = "<model>"` in `~/.grok/config.toml` (config reference: per-subagent model override).
12
+ - Fallback model: `[subagents.models] general-purpose = "<model>"`. Without it, a subagent without a named type inherits the parent model.
13
+ - Parallelism: `[subagents] max_concurrent` is a native cap.
14
+ - Instructions: `~/.grok/AGENTS.md` holds global rules.
15
+ - Effort: resolution is spawn override, role, persona, then parent session. Agent frontmatter effort is undocumented, so APK does not pin per-role effort. Subagents use the main session's effort, as with Antigravity.
16
+ - Compatibility: Grok reads `~/.claude/CLAUDE.md` by default. APK does not change that.
17
+
18
+ ## Decisions
19
+
20
+ - Client id `grok`, label "Grok Build".
21
+ - Role files `apk-<role>.md`; Reviewer and Code explorer are read-only through `permission_mode: plan`.
22
+ - Models come from `[subagents.models]`, plus the `general-purpose` fallback copied from the Coder choice, matching the other tools' default subagent model.
23
+ - Catalog: documented xAI ids `grok-4.7` (default, flagship), `grok-4.6`, `grok-4.5` and `grok-build-0.1` (fast coding model). Per-role effort is unavailable, so every Grok choice has `effort: null`.
24
+ - Presets target all users, not one plan: Light uses `grok-build-0.1` for every role; Standard uses `grok-4.7` for code, review and tests and `grok-build-0.1` for the rest; Top-tier also uses `grok-4.7` for exploration and docs, keeping `grok-build-0.1` for the task runner. Parallel defaults follow the shared 2/3/2. Account access varies by plan. No top-model switch for Grok.
25
+ - Explicit command: `--grok`, `--grok-max-concurrent`, `--avoid-grok`, following the existing per-tool pattern.
26
+ - Ownership, drift refusal, receipts and uninstall follow the existing adapters; TOML edits are surgical, like Codex.
27
+
28
+ ## Out of scope
29
+
30
+ Personas, roles TOML, plugin agents, project-level `.grok/` files, live model execution and any change to the main session's model or effort.
@@ -10,11 +10,21 @@ npm run test:unit
10
10
  npm run test:package
11
11
  ```
12
12
 
13
+ Enable the contributor pre-push check once per clone:
14
+
15
+ ```sh
16
+ git config core.hooksPath .githooks
17
+ ```
18
+
19
+ The hook runs npm run check and npm run test:unit before each push that updates a branch or tag. A push that only deletes refs skips both. The hook is not packaged and is unrelated to generated client settings. The packed-package gate runs in CI, and CI also requires the Lint check.
20
+
13
21
  npm run test:cache primes public dependency metadata on a fresh machine before the offline tarball consumers run. It installs only into a disposable directory and removes it afterward. npm ci alone may cache tarballs without the registry metadata required by a new offline consumer.
14
22
 
23
+ Detection checks desktop app bundles under /Applications. Set AGENT_POLICY_APPLICATIONS_DIR to another absolute directory to replace /Applications. The tests set it, so apps installed on the host do not change their results.
24
+
15
25
  npm test includes both unit tests and the installed-tarball gate. The gate needs macOS sandbox-exec or Linux bubblewrap. It must actually deny checkout access; unavailable isolation fails rather than skipping. Use a normal approved host if a managed sandbox forbids nesting.
16
26
 
17
- src/policy.mjs validates shared preferences. src/detect.mjs probes executable identity. Native generation and the installer write ordinary role/config/instruction files. src/setup.mjs coordinates detected clients; bin/agent-policy.mjs exposes JSON configuration commands.
27
+ src/policy.mjs validates shared preferences. src/detect.mjs probes executable identity. Native generation and the installer write ordinary role/config/instruction files. src/setup.mjs coordinates detected clients. src/inspect.mjs reads bounded native subagent fields without writes or executable probing. src/output.mjs formats readable terminal results. bin/agent-policy.mjs retains captured JSON output and supports explicit --json.
18
28
 
19
29
  Test with temporary homes. Preserve existing transaction, complete-read-set, rollback, ownership, symlink and privacy checks. The package gate must remove the npm package after setup and verify standalone native configuration consumers still read files with no dependency on package/source/state. Consumer fixtures are not actual native model execution.
20
30