agent-policy-kit 0.0.0-stage → 0.2.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.
@@ -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.
@@ -0,0 +1,21 @@
1
+ # Development
2
+
3
+ Use Node.js 22.x (22.13+) or 24+ and npm. No build step is required.
4
+
5
+ ```sh
6
+ npm ci --ignore-scripts --no-audit --no-fund
7
+ npm run test:cache
8
+ npm run check
9
+ npm run test:unit
10
+ npm run test:package
11
+ ```
12
+
13
+ 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
+
15
+ 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
+
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. 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
+
19
+ 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
+
21
+ Do not reintroduce hooks, wrappers, plugins, daemons, runtime audits or package paths in generated settings. Receipts/backups belong only to configuration operations. See [support](compatibility.md), [verification](verification.md) and [release preparation](npm-release.md).
@@ -0,0 +1,23 @@
1
+ # Configuration commands
2
+
3
+ Follow the [AI operator guide](../AGENT_INSTALL.md). npx, a temporary prefix or an installed tarball can run this one-shot configurator. Native files never depend on those locations afterward.
4
+
5
+ Use setup --release --preset balanced to preview Standard, a version's default choices; add --apply to configure. --preset fast selects Light and --preset quality selects Top-tier. The [page](../site/index.html) generates explicit role, model, effort and concurrency arguments. Commands are pinned to that page's APK version.
6
+
7
+ Interactive terminals show readable results. Captured output remains JSON, and --json always requests JSON. A preview writes nothing. A repeated application reports unchanged clients. Partial results identify the clients that need attention.
8
+
9
+ Run `agent-policy show` to read current user-level native subagent settings before or after APK setup. Add `--client codex` for one tool or `--json` for machine output. It needs neither client executables nor APK receipts. Relevant native-home environment variables select the active user profile. An explicit --home selects standard client directories under that home. The command never changes files or calls a model.
10
+
11
+ Show reads Codex TOML roles, Claude/Antigravity/Grok Build Markdown role fields (Grok Build models come from config.toml [subagents.models]), and Kimi's native secondary-model pool. Kimi APK role mappings and APK concurrency instructions are labeled as guidance. Missing pins stay unspecified. Supported Markdown fields use plain, single-quoted or JSON-compatible double-quoted scalar values. Unsupported role syntax, unsafe files and incomplete reads produce explicit attention statuses and exit code 3. External role-file references, project/managed settings, plugins and session overrides are not resolved. Show displays supported current values even when APK-managed files have local edits. It does not print prompts, credentials, raw configuration or private paths.
12
+
13
+ Only genuine detected and selected clients receive files. A standard native profile is required for automatic setup; nondefault native-home environment roots get a zero-write prerequisite. Explicit --home selects the standard layout under an intentional target. Preserve original --home/--state-dir for later removal.
14
+
15
+ Named APK roles and a managed global instruction block configure optional delegation. Main models, credentials, permissions, disabled agent features and unrelated hooks/plugins/settings are preserved. Native capabilities still differ; see [support](compatibility.md).
16
+
17
+ Kimi requires provisioned model entries. A missing preferred catalog alias may resolve once to one unambiguous existing alias for the documented upstream model. No aliases/providers/credentials are invented. Actual alias effort capability and main-session behavior are checked before writes. Native model access is not granted by a dropdown.
18
+
19
+ Explicit release/custom replacement has no physical uninstall gap. Old ownership is verified, desired files are rendered over the original user baseline, and rollback protects the installed release. Doctor inspects actual applied version/source/preset without needing current presets or canonical preferences.
20
+
21
+ After success the npm package can be removed. Native clients may need fresh sessions; no kit launcher is needed. Reinvoke a compatible APK for owned uninstall. Keep private receipts/backups if future removal is desired. [Recovery](recovery.md) handles drift or interrupted transactions without overwriting later user edits.
22
+
23
+ The configuration page keeps per-tool limits in individual tool details. Light starts at 2, Standard at 3 and Top-tier at 2. A manual limit marks only that tool Custom. Explicit commands can use --TOOL-max-concurrent overrides alongside the shared --max-concurrent fallback. Preset selection restores its cap as well as its models and effort.
@@ -0,0 +1,102 @@
1
+ # Model catalog and presets
2
+
3
+ models/catalog.json is the release snapshot, checked on 2026-10-30 UTC (2026-10-29 in Toronto). It records native selector IDs, effort levels, defaults and primary sources. The same data drives the page and configuration validation. Normal agent work never fetches this catalog.
4
+
5
+ | Tool | Current selectable inventory | Evidence |
6
+ |---|---|---|
7
+ | Codex | 9 visible model IDs | CLI 0.166.0 bundled catalog and [official models](https://learn.chatgpt.com/docs/models) |
8
+ | Claude Code | 14 versioned IDs, 4 family aliases and inherit | [Native model configuration](https://code.claude.com/docs/en/model-config), CLI 2.1.312 |
9
+ | Kimi Code | 6 upstream models through preferred native aliases | [Current Kimi Code models](https://www.kimi.com/code/docs/en/kimi-code/models), CLI 2.4.0 provisioned metadata |
10
+ | Antigravity | Pro, Flash, Flash Lite and inherit tiers | CLI 1.4.10 parser and [subagent documentation](https://antigravity.google/docs/subagents?tab=cli) |
11
+ | Grok Build | Grok 4.7, 4.6, 4.5 and Grok Build 0.1 model IDs (checked 2026-11-01) | [xAI models](https://docs.x.ai/developers/models) and [Grok Build subagents](https://github.com/xai-org/grok-build/blob/main/crates/codegen/xai-grok-pager/docs/user-guide/16-subagents.md), CLI 1.0.70 |
12
+
13
+ Hidden security/utility models, session modes and private deployments are separate from this native subagent inventory. Custom IDs remain available where the native format supports them.
14
+
15
+ ## Kimi's six models
16
+
17
+ | Upstream ID | Native effort levels | Default | Role in this release |
18
+ |---|---|---|---|
19
+ | k3.1-pro | low / high / max | high | Optional flagship; Top-tier top-model switch for code/review/tests |
20
+ | k3.1-pro-highspeed | low / high / max | high | Optional faster-output variant |
21
+ | k3 | low / high / max | high | Top-tier code, review, tests, exploration and documentation |
22
+ | k3-256k | low / high / max | high | Standard implementation, review, tests and docs |
23
+ | kimi-for-coding | low / high / max | max | K2.8 Preview; Light, Standard exploration and routine work, Top-tier Task runner |
24
+ | kimi-for-coding-highspeed | Fixed thinking; no effort override | Unpinned | Optional K2.7 Code Highspeed |
25
+
26
+ Both K3.1 Pro variants require thinking. Kimi documents approximately twice the quota usage for Pro Highspeed versus regular Pro; account tier controls access and context limits. The old kimi.ai/help page still lists only four IDs, so it is not the current inventory source. Native aliases use the kimi-code/ prefix; setup still requires an existing provisioned alias or a unique matching upstream model. It never creates provider credentials.
27
+
28
+ Setup refuses an explicit native thinking-disabled setting for either Pro model, including unpinned-effort requests. It leaves that setting intact rather than relying on undocumented force-on behavior.
29
+
30
+ ## Native and API capabilities
31
+
32
+ The efforts/defaultEffort fields describe native choices. Separate apiEfforts/apiDefaultEffort fields retain API facts where they differ. Codex 0.166.0 does not advertise none in its picker; this does not prove manual TOML rejection. APK conservatively offers and validates the advertised native subset for known IDs. Ultra is recorded separately as a delegating execution mode, not offered as an ordinary effort level.
33
+
34
+ Claude Code's native effort matrix omits Opus 4.5 even though its API supports effort. Its page choices therefore omit that override. Alias and inherit rows list possible requested levels; the resolved provider model can clamp or ignore them. Use a versioned ID for predictable model-specific capabilities. Sonnet 4.5 is deprecated on Anthropic-operated platforms, with retirement scheduled for 2026-11-30; partner schedules differ. See [model lifecycle](https://platform.claude.com/docs/en/about-claude/model-deprecations).
35
+
36
+ Antigravity's shared documentation has a narrower App table, but the installed CLI 1.4.10 parser explicitly supports flash_lite too. Its wider session model inventory cannot be pinned through the role tier field. Per-role effort is unavailable.
37
+
38
+ Account/provider access varies. Custom model IDs remain available for supported native fields. Antigravity accepts only inherit/flash_lite/flash/pro for the native role model field; its broader session model inventory cannot be pinned through this field. Per-role effort is unavailable there. Claude aliases may resolve differently per provider. Unknown defaults are kept as null rather than invented.
39
+
40
+ ## How the presets are designed
41
+
42
+ These are starting recommendations, reviewed on 2026-10-30. Subagent usage counts against the same plan limits as the main session, and every parallel session adds to it. The presets therefore differ in how much of the plan subagents may use, not in a claimed quality ranking. No comparative task benchmark was run. Vendors' effort labels and subscription usage are not directly comparable, so one role can get different levels in different tools.
43
+
44
+ - **Light:** light models for every role, so plan limits last longest. It suits entry plans and many parallel sessions. In Codex and Claude Code, reviews and test creation receive extra reasoning because checking edge cases differs from executing known steps. Kimi roles share one alias and therefore one effort, kept low to save quota; Antigravity has no per-role effort and uses Flash for code and Flash Lite for lighter work.
45
+ - **Standard:** stronger implementation, review, test creation and documentation, with light models for fact gathering and mechanical work. Antigravity's light tier for exploration and docs is Flash. Codex runs Luna at high for exploration, OpenAI's suggested starting level for Luna; Claude's Haiku explorer uses its native default, medium. No role uses Astra, Fable or K3.1 Pro. Kimi uses K3 256K for code to keep its quota footprint below the full-context K3 variant; larger-context choices remain editable.
46
+ - **Top-tier:** Opus 5.5, GPT-6.1 Sol and K3 at high effort for implementation, review and tests. It uses limits fastest and suits top plans with few parallel sessions. Exploration and documentation use the same high-end model; only the Task runner stays lighter. Kimi keeps one effort per shared alias, and because K2.8 has no medium level its Task runner rises from low to high. Antigravity has one top tier, Pro, so its Standard and Top-tier differ only in exploration, docs and the Task runner.
47
+ - **Top models switch:** under Top-tier, a per-tool switch replaces the Coder, Reviewer and Test writer model with the tool's top model: Fable 5.1, GPT-6 Astra or K3.1 Pro, still at high effort. Antigravity and Grok Build have no such tier. The switch is off by default because these models use limits much faster and native default subagent settings copy the first selected role (the Coder when selected) to subagents started without a named role. It is part of Top-tier, not a separate preset, and share links keep it.
48
+
49
+ Top-tier, with or without top models, pins high rather than xhigh or max. Native default subagent settings copy the first selected role (the Coder when selected), so a higher level would also apply to every subagent started without a named role. OpenAI recommends starting Astra at Light and places High and Extra High in the same band for difficult multi-step work. Anthropic describes high as the level for work where verification matters and xhigh as deeper reasoning at higher token spend; high is Fable's native default. Higher levels remain available in Custom.
50
+
51
+ No preset bans any model. An unselected model remains available in Custom. Explicit personal avoid lists are still supported in user policy/CLI input. Parallelism defaults are Light 2, Standard 3 and Top-tier 2 for each tool. They bound simultaneous delegation rather than starting tasks or measuring quality. Light keeps short work bounded. Standard allows three independent responsibilities to overlap. Top-tier limits concurrent long-running work on heavier models. These are product defaults, not benchmark results. Each tool can override its limit in its details. Native enforcement varies by client.
52
+
53
+ ### Light
54
+
55
+ | Role | Codex | Claude Code | Kimi Code | Antigravity | Grok Build |
56
+ |---|---|---|---|---|---|
57
+ | Coder | Luna · medium | Haiku 5.5 · medium | K2.8 Preview · low | Flash | Grok Build 0.1 |
58
+ | Reviewer | Luna · high | Haiku 5.5 · high | K2.8 Preview · low | Flash | Grok Build 0.1 |
59
+ | Code explorer | Luna · low | Haiku 5.5 · low | K2.8 Preview · low | Flash Lite | Grok Build 0.1 |
60
+ | Test writer | Luna · high | Haiku 5.5 · high | K2.8 Preview · low | Flash | Grok Build 0.1 |
61
+ | Docs writer | Luna · low | Haiku 5.5 · low | K2.8 Preview · low | Flash Lite | Grok Build 0.1 |
62
+ | Task runner | Luna · low | Haiku 5.5 · low | K2.8 Preview · low | Flash Lite | Grok Build 0.1 |
63
+
64
+ ### Standard
65
+
66
+ | Role | Codex | Claude Code | Kimi Code | Antigravity | Grok Build |
67
+ |---|---|---|---|---|---|
68
+ | Coder | Sol · medium | Sonnet 5.5 · medium | K3 256K · high | Pro | Grok 4.7 |
69
+ | Reviewer | Sol · high | Sonnet 5.5 · high | K3 256K · high | Pro | Grok 4.7 |
70
+ | Code explorer | Luna · high | Haiku 5.5 · medium | K2.8 Preview · low | Flash | Grok Build 0.1 |
71
+ | Test writer | Sol · high | Sonnet 5.5 · high | K3 256K · high | Pro | Grok 4.7 |
72
+ | Docs writer | Sol · medium | Sonnet 5.5 · medium | K3 256K · high | Flash | Grok 4.7 |
73
+ | Task runner | Luna · low | Haiku 5.5 · low | K2.8 Preview · low | Flash Lite | Grok Build 0.1 |
74
+
75
+ ### Top-tier
76
+
77
+ | Role | Codex | Claude Code | Kimi Code | Antigravity | Grok Build |
78
+ |---|---|---|---|---|---|
79
+ | Coder | Sol · high | Opus 5.5 · high | K3 · high | Pro | Grok 4.7 |
80
+ | Reviewer | Sol · high | Opus 5.5 · high | K3 · high | Pro | Grok 4.7 |
81
+ | Code explorer | Sol · high | Opus 5.5 · high | K3 · high | Pro | Grok 4.7 |
82
+ | Test writer | Sol · high | Opus 5.5 · high | K3 · high | Pro | Grok 4.7 |
83
+ | Docs writer | Sol · high | Opus 5.5 · high | K3 · high | Pro | Grok 4.7 |
84
+ | Task runner | Sol · medium | Sonnet 5.5 · medium | K2.8 Preview · high | Flash | Grok Build 0.1 |
85
+
86
+ With the top models switch on, Coder, Reviewer and Test writer use Astra · high in Codex, Fable 5.1 · high in Claude Code and K3.1 Pro · high in Kimi Code.
87
+
88
+ ## Reasons and access requirements
89
+
90
+ OpenAI positions Astra for demanding work, Sol for a capability/usage balance and Luna for focused efficient work. Its [selection guidance](https://developers.openai.com/api/docs/guides/model-selection) treats these as starting points to evaluate on representative tasks. APK's Codex effort values still follow the native CLI catalog, not API-only options.
91
+
92
+ Anthropic's [model comparison](https://platform.claude.com/docs/en/models/overview) distinguishes Fable, Opus, Sonnet and Haiku by workload and latency. Versioned IDs freeze the recommendation more precisely than moving family aliases. [Claude Code](https://code.claude.com/docs/en/model-config) supports the selected levels and warns of diminishing returns at max. Fable 5.1 requires CLI 2.1.257+ and may consume usage credits depending on the plan. Some non-interactive native paths bill those credits without a consent prompt; APK does not change billing settings or promise a later confirmation. Use Custom to choose another available model.
93
+
94
+ [Kimi's model table](https://www.kimi.com/code/docs/en/kimi-code/models.html) describes K2.8 Preview's efficient thinking and the smaller quota footprint of K3 256K. Pro Highspeed has the same capabilities as regular Pro at a quota premium, so it is optional rather than a default for either economical or quality priorities. Selected aliases must be provisioned and Pro must have thinking enabled. Roles sharing one alias share its native effort setting.
95
+
96
+ Grok Build 0.1 is xAI's fast coding model and serves light work; Grok 4.7 is the flagship and serves code, review, tests and docs. Light uses Grok Build 0.1 everywhere, Standard adds Grok 4.7 for code, review, tests and docs, and Top-tier also uses it for exploration. Grok 4.6 and 4.5 stay available in Custom. Account access to each model varies by plan. Per-role effort is unavailable, and there is no top models switch for Grok Build.
97
+
98
+ Antigravity recommendations use only its native role tiers. The CLI's Pro/Flash/Flash Lite selectors do not freeze the underlying provider model, and there is no per-role effort field. Account access and native precedence still apply; see [support](compatibility.md).
99
+
100
+ Native default effort means no explicit override. Unsupported effort fields are omitted. Explicit levels are filtered by model and native client; Kimi additionally checks provisioned support_efforts. It never silently changes the main agent's effort to satisfy a helper's setting.
101
+
102
+ For the next release, review the native catalogs and current official docs, update sources/date/data, explain model/task/effort changes in CHANGELOG.md, regenerate the page and rerun configuration/release tests. A configuration test is not a model-quality benchmark. See [maintenance](model-updates.md) and [release preparation](npm-release.md).
@@ -0,0 +1,22 @@
1
+ # Keeping model choices current
2
+
3
+ The task roles stay stable: worker for implementation, reviewer for findings, explorer for discovery, tester for tests, writer for documentation and routine for prescribed execution. Models and effort values are separate data in policies and models/catalog.json and can evolve without changing those responsibilities.
4
+
5
+ Named presets and the dated model/effort catalog follow the npm package version. Record model-choice changes and their review date/sources in CHANGELOG.md when releasing a revised preset. Version 0.1.0 is a starting example, not a live ranking or a benchmark of model quality. Native format checks are recorded in [verification](verification.md).
6
+
7
+ ## Before setup or an authorized update
8
+
9
+ The installing AI agent should:
10
+
11
+ 1. Read the saved preferences and installed client versions. Preserve explicit user choices.
12
+ 2. Cross-check the provider's current dedicated model docs with native catalogs or schemas. Older official help pages can lag: Kimi's old help page omitted K3.1 Pro while its current Code Docs and provisioned metadata included it. Keep API capabilities separate from native choices; aliases and session modes are not additional versioned models. Check provisioned aliases without printing credentials.
13
+ 3. Compare proposed choices with the saved setup. A newer model is not automatically better for every task, account or usage constraint.
14
+ 4. Apply requested changes through the coordinated [preferences update procedure](../AGENT_INSTALL.md). Package installation alone must not rewrite native settings.
15
+
16
+ No background updater, live model catalog request, or automatic model replacement runs during normal client use. Existing configured values stay saved until another configuration operation changes them.
17
+
18
+ Provider aliases can still resolve to a newer model independently of APK. For example, Claude documents that its [model aliases update over time](https://code.claude.com/docs/en/model-config#model-aliases). Use available versioned identifiers where reproducibility matters and the client/provider supports them. A configured identifier remains distinct from proof of the actual provider model.
19
+
20
+ ## Maintainer release check
21
+
22
+ Update the preset data, source/date notes and configuration fixtures together. Recheck native schemas, preserve main-session behavior, and run unit plus packed-package acceptance. Do not present configuration tests as model-quality evaluations. All preferences continue to apply only when the main agent chooses to delegate.
@@ -0,0 +1,27 @@
1
+ # Prepare a configuration release
2
+
3
+ One version: package.json version identifies presets, model catalog, native templates, instructions and page. No second preset-version system. The owner authorizes each publication; nothing publishes automatically. New pull requests must remain draft, and only the owner merges them.
4
+
5
+ ## Record what and why
6
+
7
+ For every release, update CHANGELOG.md with: date, changed models/efforts/role instructions, why the changes fit the work, who should update, native/client requirements and migration/rollback limits. Record catalog source/date and distinguish configuration checks from model-quality evaluation. Do not claim performance/cost numbers without evidence.
8
+
9
+ Patch releases can correct documentation/configuration bugs; intentional recommendation changes deserve clearly described release notes (normally a minor release); incompatible native ownership/layouts require a documented migration boundary. Never rewrite a published version. See [npm publication rules](https://docs.npmjs.com/cli/v11/commands/npm-publish/).
10
+
11
+ ## Build and verify before tagging
12
+
13
+ 1. Confirm npm name ownership and set actual repository/bugs/homepage URLs once they exist. Do not invent them.
14
+ 2. Update package version and lockfile, preset JSON, model catalog/source date and this version's changelog entry. Fill the actual release date when cutting it.
15
+ 3. Run npm run build:site. The generated single HTML file embeds that version's exact data and command.
16
+ 4. Run npm run check and npm test. Required tarball gates deny source access, remove package/state, and prove two synthetic versions can upgrade/downgrade changed models AND templates safely. Synthetic 0.2.0 is not a real release.
17
+ 5. Review npm pack --dry-run --json --ignore-scripts, npm publish --dry-run --ignore-scripts, and the final npm pack tarball/integrity. Private evidence/configs must stay out.
18
+
19
+ The package includes CHANGELOG.md and its matching page. Its CLI requires no compilation; only the page data is regenerated. No lifecycle install script mutates native settings.
20
+
21
+ After explicit publication authorization, create the corresponding git version tag/release with the reviewed changelog text and publish that exact tarball through npm's normal authenticated process. Publish application and npm releases only from reviewed commits already present in main. Before publication, fetch origin and require git merge-base --is-ancestor HEAD origin/main to succeed. Never merge, mark a draft ready or enable auto-merge. Recheck registry contents and public page links after an authorized release.
22
+
23
+ ## Static page
24
+
25
+ The latest site deploys automatically from reviewed main after CI, while each published /v/VERSION/ page remains an exact tagged snapshot. npm publication stays explicit. See [website deployment](deployment.md) for configuration guards, archive preservation, credentials and main-only retry.
26
+
27
+ The public domain is https://agent-policy-kit.trymenow.io/. The workers.dev address remains available for earlier links. Domain-only infrastructure changes use wrangler triggers deploy and compare deployment/version IDs before and after. CI website deployment deliberately omits routing changes and does not publish npm packages.
package/docs/policy.md ADDED
@@ -0,0 +1,16 @@
1
+ # Configuration preferences
2
+
3
+ Start with policies/balanced.json or another preset in the selected release. The [JSON Schema](../schema/policy.schema.json) describes data shape; the configuration validator also checks the release catalog's known model/effort compatibility.
4
+
5
+ - schemaVersion1; maxConcurrent is the shared fallback, from 1 to 32. Optional clients[tool].maxConcurrent overrides it for one tool. Older policies without overrides keep their shared behavior.
6
+ - clients contains codex, claude, kimi, agy (the technical key for Antigravity) and/or grok (Grok Build).
7
+ - Optional top-level selectedRoles is a nonempty unique array of worker, reviewer, explorer, tester, writer and routine IDs. Omit it for all six roles in the executing release. Only selected roles receive native files and routing instructions.
8
+ - code/light hold default model+effort pairs.
9
+ - Optional roles inside each client overrides each selected role independently. Worker/reviewer/tester otherwise use code; explorer/writer/routine use light. Public presets also contain role-specific overrides.
10
+ - avoidModels is delegation guidance. An explicit page choice removes itself from that avoid list.
11
+
12
+ Effort null means native behavior without an explicit effort override. Codex effort depends on the native model selector. Claude supports low through max as documented per model. Kimi actual aliases must declare the requested non-null effort. Antigravity's role field supports model tiers, with no per-role effort pin. Grok Build accepts any model ID and always uses effort null.
13
+
14
+ A known model cannot request an effort excluded by the release catalog. Custom IDs can use the client's native level set, subject to actual native availability. Kimi can merge null with one explicit pin for a selected shared alias. Contradictory explicit pins are refused. Unselected role defaults do not require Kimi aliases or acquire pins. A section-wide effort conflicting with mixed default/pinned alias behavior is a prerequisite rather than a silent rewrite.
15
+
16
+ [Presets/catalog](model-catalog.md) describe recommendations and sources. [Release usage](releases.md) explains explicit default/preset/custom replacement. Only when the main agent chooses delegation do any of these role preferences apply. No subagent feature is enabled by the configurator.
@@ -0,0 +1,9 @@
1
+ # Privacy
2
+
3
+ The configurator reads local preferences and native configuration, probes CLI version/help identity, writes owned native settings and exits. It does not read transcripts or send prompts to a classifier, proxy or telemetry endpoint. It does not provision or transfer credentials.
4
+
5
+ Client settings can contain existing secrets. Transaction backups and receipts are private local state and must never be published. CLI summaries omit configuration bodies, raw executable output, private paths and raw errors.
6
+
7
+ There is no runtime audit, session tracking or token journal. Normal agent operation does not call package code. Native clients retain their own provider/account behavior.
8
+
9
+ The npm package uses a files allowlist. Tests, development notes, private profiles, evidence and tarballs stay outside it. The acceptance gate uses fresh profiles with fake secret sentinels and denies source access. Fixtures do not establish live account or provider execution.
@@ -0,0 +1,13 @@
1
+ # Recovery
2
+
3
+ Do not remove a lock or pending journal merely to make configuration proceed. Another operation may own it, or a failed transaction may need its backups.
4
+
5
+ The installer stages changes and rechecks the complete read set. A failed commit restores matching postimages. A competing edit is preserved and yields a recovery conflict.
6
+
7
+ Private state contains pending.json, .install.lock and backups/TRANSACTION_ID/index.json. Keep the journal and backup index together. The retained lock ID can identify the index if recreating pending.json failed.
8
+
9
+ For recovery, ensure no configurator is active, make a private copy of affected files/state, compare current files with recorded preimages/postimages, and reconcile only owned changes. Preserve every later unrelated edit. Remove only the resolved transaction's blocking markers, then rerun a plan. Do not publish config bodies or backup indexes.
10
+
11
+ Owned file/block/scalar drift stops removal. Reconcile that exact change rather than restoring a stale whole-file backup. Unknown experimental runtime receipts require the older version's owned uninstall first; never delete arbitrary hooks based on their text.
12
+
13
+ Removing or moving the npm package after successful setup is safe. Native files have no package dependency. Reinstall or invoke the configurator with npx for future updates/removal. Preserve private receipts if owned removal is desired.
@@ -0,0 +1,40 @@
1
+ # Choose and apply a configuration release
2
+
3
+ **APK package version = configuration release.** Each published package freezes its named presets/model catalog/efforts, native role templates, instructions, changelog and static configuration page. There is no second preset-version system.
4
+
5
+ ## Default settings from a specific release
6
+
7
+ Inspect the release and preview its plan:
8
+
9
+ ```sh
10
+ npx --yes --ignore-scripts --package agent-policy-kit@0.2.0 agent-policy release
11
+ npx --yes --ignore-scripts --package agent-policy-kit@0.2.0 agent-policy setup --release
12
+ ```
13
+
14
+ Apply explicitly:
15
+
16
+ ```sh
17
+ npx --yes --ignore-scripts --package agent-policy-kit@0.2.0 agent-policy setup --release --preset balanced --apply
18
+ ```
19
+
20
+ The package you select supplies both preferences and native templates. --release is a boolean, not another version argument. --preset selects fast/balanced/quality; its identity is stored alongside release/source. The same pattern selects an older compatible release for downgrade. Installing/updating an npm package alone does not change native files. Before publication, use that release's verified .tgz instead of the registry package spec.
21
+
22
+ ## Your own choices
23
+
24
+ Open this release's [configuration page](../site/index.html) in Google Chrome. Its fully expanded per-tool command is pinned to the page's package version. It applies your chosen models through that release's templates. Generated explicit commands record custom provenance, including when the form used a preset. The --release workflow retains named preset provenance.
25
+
26
+ --config is bounded canonical base64url UTF-8 JSON. It is data, not executable shell content. Explicit tool arguments, --release/--preset, --config and --policy are alternative input modes. Explicit arguments, --config and --release permit replacement of owned configuration. --policy without those options remains conservative for advanced saved-file workflows.
27
+
28
+ ## What happens during an update
29
+
30
+ APK verifies old owned files, reconstructs the original user baseline in memory, renders the target, and commits one final change per file. There is no physical uninstall gap. Native prerequisites and drift refuse changes; late failure rolls back the previous installed release. Later unrelated user edits survive. Final uninstall restores original user values rather than the previous APK version's values.
31
+
32
+ Transactions are per client. Missing, unsupported or blocked clients retain their actual previous release; successful independent clients may advance. setup results and doctor report each client's applied version/source. The shared state policy is the latest requested snapshot, not proof every client applied it. Doctor verifies receipts without needing that snapshot or today's templates.
33
+
34
+ Current native receipt v4 records the selected subset of six bounded role filenames. Native v3 and v2 snapshots remain bounded to their historical four roles and remain supported. An explicit replacement with selectedRoles omitted can expand an earlier setup to all six roles in the chosen release; implicit setup keeps the existing installation unchanged. v2 has unknown release provenance. An older executable can reject v4. Use a receipt-compatible executable before an incompatible downgrade. Unknown future schemas/layouts are refused. An incompatible migration must explain its supported path in that release's notes.
35
+
36
+ ## What a release does not freeze
37
+
38
+ A release reproduces declared settings and templates. Provider aliases/tiers can resolve to new models, old model IDs can retire, and account access can change. See [model maintenance](model-updates.md). No runtime updater or model gateway is installed.
39
+
40
+ Read [CHANGELOG](../CHANGELOG.md) for what changed, why, who should update and migration limits. Version 0.1.0 was the first release and 0.2.0 is being prepared; synthetic versions in acceptance tests are not real releases.
@@ -0,0 +1,25 @@
1
+ # Examples
2
+
3
+ ## Add only reviewers and researchers
4
+
5
+ Choose Reviewer and Researcher in the page, then select your coding tools. APK creates only apk-reviewer and apk-explorer. Later additions can expand this set. Removing a selected role removes its earlier owned definition while preserving unrelated files and edits.
6
+
7
+ ## One role scheme across coding tools
8
+
9
+ Choose models for the six focused roles: implementation, review, discovery, tests, documentation and prescribed execution. Presets provide role-specific starting choices. Each tool receives native definitions and delegation instructions; no central dispatcher runs between it and its provider.
10
+
11
+ ## Keep your main model
12
+
13
+ Apply the shared preferences to delegated helpers while preserving each tool's main model, account, permissions and unrelated setup.
14
+
15
+ ## Configure and discard the installer
16
+
17
+ Run detected setup with --apply, verify native files, remove the npm package, and start your coding tools normally. Saved role files and settings keep working through native features.
18
+
19
+ ## Customize model choices
20
+
21
+ Use init --policy FILE, choose models/efforts actually available in each account, then apply through the AI guide. Kimi needs provisioned aliases; agy choices are tiers. Higher-priority native settings can override global preferences.
22
+
23
+ ## Remove after other settings changed
24
+
25
+ A later unrelated theme setting remains during owned uninstall. An edited generated role or managed block produces a drift conflict; the configurator preserves it for reconciliation.
@@ -0,0 +1,45 @@
1
+ # Verification record
2
+
3
+ Configuration checks, native loading and model execution are separate results.
4
+
5
+ ## 0.2.0
6
+
7
+ macOS arm64, 2026-11-01.
8
+
9
+ | Layer | Current evidence |
10
+ |---|---|
11
+ | Full Node 26.5.1 suite | PASS: 350/350, including source-denied real-tarball gates, selected-role native generation, Grok Build files under an isolated GROK_HOME, per-tool limits and expanded page commands |
12
+ | Hosted CI | PASS on main 7f8666d: macOS Node 22.13.0 and Ubuntu Node 24 suites plus site-build ([run](https://github.com/automatis-tools/agent-policy-kit/actions/runs/41283600922)) |
13
+ | Two synthetic releases | PASS: the actual 0.2.0 tarball and a synthetic 0.3.0 tarball, A to B to A, mixed applied versions, drift safety and original-user restoration |
14
+ | Page command via npx | PASS: the generated multiline command runs through a real shell and npx with the local tarball; independent Codex 5 and Claude 2 limits and Grok Build values are read back from native files |
15
+ | Preset audit | PASS: an independent review compared every preset, tool and role with the catalog and documentation and found no data defects; wording fixes were applied, and a test keeps the documentation tables in sync |
16
+ | Grok Build discovery | PASS: `grok inspect --json` with Grok Build 1.0.70 lists an `apk-*` agent from an isolated GROK_HOME. Model selection and execution NOT CHECKED |
17
+ | Native Codex/Claude/Kimi/Antigravity loading and provider execution | NOT CHECKED for 0.2.0; no live model tasks used as configuration proof |
18
+ | Browser | The owner reviewed local previews manually; no automated browser run for 0.2.0 |
19
+ | npm packaging | PASS: `npm pack --dry-run` and `npm publish --dry-run` list 42 files; no private evidence or configuration |
20
+ | Current model catalog | Codex 9 selectors, Claude 19 selectors, Kimi 6 preferred aliases, Antigravity CLI 4 tiers, Grok Build 4 model IDs. Account access and model quality are not established by configuration tests. |
21
+
22
+ ## 0.1.0
23
+
24
+ macOS arm64, 2026-10-30.
25
+
26
+ | Layer | Current evidence |
27
+ |---|---|
28
+ | Full Node 26.5.1 suite | PASS: 248/248, including both source-denied real-tarball gates, selected-role native generation, v2/v3/v4 ownership and expanded page commands |
29
+ | Minimum Node 22.13.0 suite | PASS: 248/248, using the checksum-verified official runtime outside the denied source checkout |
30
+ | Two synthetic releases | PASS: actual 0.1.0/0.2.0 tarballs, changed model and shared role/instruction definitions, A to B to A, mixed applied versions, late replacement rollback, drift safety and original-user restoration |
31
+ | Page-selected roles via npx | PASS: the shipped page formatter produced explicit Reviewer/Researcher options for selected Codex/Claude fixtures, including independent effort. The actual multiline command ran through a real shell and npx with the local tarball offline. Unselected installed tools stayed unchanged. Later role reduction/removal succeeded. A late failure after role deletion restored the complete prior installation. |
32
+ | Package/state removal | PASS: native files and standalone consumer fixtures remain readable without package/source/state |
33
+ | Desktop Google Chrome | PASS: approved four-step layout, empty/missing/error/ready states, per-tool modes, append order, automatic All/manual scope, synced role rows, visible per-tool model/effort arguments, actual clipboard copy, denied-clipboard fallback and stale-copy protection |
34
+ | Custom input browser regression | PASS: real typing followed directly by effort or Copy clicks, without Tab, works with reduced motion. The earlier lost-click case was reproduced before the fix. Normal/reduced/fallback motion checks are recorded separately from model execution. |
35
+ | Independent review | PASS: independent URL codec/controller review and scoped final animation/hover/label-cache review. Preset/role integration review found and verified fixes for six-role schema bounds and live Custom Fable notices. Fresh targeted checks passed 76/76; full suites passed 248/248 on both runtimes. |
36
+ | URL/checklist behavior | PASS in local HTTP Chrome tabs: exact command restored from a shared link, imported copy remains incomplete, Reset clears state/hash, no default radio, first mode choice skips warning, Custom-only toggle skips unnecessary overwrite warning while genuine edits/mixed bases/cap remain protected, view-only navigation preserves copy, settings changes clear it, invalid links remain non-applicable. Hint/marker keyframes hold at offsets 0–0.5 and fade by offset 1 over 4000 ms. |
37
+ | Current model catalog | Dated release snapshot: Codex 9 selectors, Claude 19 selectors, Kimi 6 preferred aliases, Antigravity CLI 4 tiers. API effort metadata is separate. Account access and model quality are not established by configuration tests. |
38
+ | Native Codex/Antigravity loading | Historical parser/listing positive and malformed negative controls only. New subset behavior has file/consumer fixtures, not fresh vendor-client loading proof. |
39
+ | Native Claude/Kimi loading and provider execution | NOT CHECKED; no live model tasks used as configuration proof |
40
+ | Six-role compatibility | PASS: legacy four-role v2/v3/v4 inspection, owned removal, explicit expansion to six, drift refusal and late rollback; six-alias Kimi v4 plans/inspects/removes 14 bounded operations. |
41
+ | npm packaging | PASS: 38-file package-content inspection and real local tarball consumption. No npm publication. |
42
+ | Hosted macOS/Linux CI | See the public workflow runs linked from the GitHub release; local results above do not establish hosted CI. |
43
+ | Deployment/publication | Public status and downloadable artifacts are recorded in the GitHub release; package checks below concern the reviewed tarball. |
44
+
45
+ At 0.1.0, the 0.2.0 packages were synthetic test fixtures, not public releases. Browser evidence, disposable homes, raw configuration fixtures and logs stay outside Git/npm. Expanded commands preserve the selected cap and avoid lists; :native round-trips unpinned effort. A 2835-case preset/role/tool matrix produces identical native role files and routing instructions. Real-shell tests preserve colon/@/bracket IDs and prevent pathname expansion. The same pinned command consumes the published npm release. The verified local tarball supports testing before publication.
@@ -0,0 +1,17 @@
1
+ # Partial example: merge into the native config, never append duplicate tables.
2
+ # The two aliases must already be provisioned with compatible model metadata.
3
+ # Preserve provider/login entries. Remove a conflicting section-wide
4
+ # secondary_model.default_effort so per-entry efforts can differ.
5
+
6
+ [secondary_model]
7
+ default_model = "kimi-code/k3"
8
+
9
+ [secondary_model.models]
10
+ "kimi-code/k3" = "Code changes, debugging and review. Use high effort."
11
+ "kimi-code/kimi-for-coding" = "File search, facts and routine work. Use low effort."
12
+
13
+ [models."kimi-code/k3".overrides]
14
+ default_effort = "high"
15
+
16
+ [models."kimi-code/kimi-for-coding".overrides]
17
+ default_effort = "low"
@@ -0,0 +1,7 @@
1
+ # Release model catalog
2
+
3
+ catalog.json is a dated native-subagent selector snapshot shipped with the package. It is not a live/account-universal inventory. Each entry records ID, label, native efforts/default when documented, and a primary source. Custom model/deployment IDs remain available where supported.
4
+
5
+ The current audit is 2026-10-30 UTC. Codex 0.166.0 has nine visible models and three hidden specialized/utility entries. Native efforts/defaults come from its bundled catalog; separate apiEfforts/apiDefaultEffort metadata records API differences. Ultra is a delegating mode, not an ordinary effort choice. Claude Code has 14 versioned IDs, four family aliases and inherit; alias capabilities depend on the resolved provider model. Kimi has six preferred aliases, including both K3.1 Pro variants, corroborated through whitelisted provisioned metadata. Antigravity CLI 1.4.10 accepts four role tiers, including Flash Lite; its session model picker is a separate surface. See the [audit and preset rationale](../docs/model-catalog.md).
6
+
7
+ API defaults can differ from CLI defaults. Unknown native defaults are null; unsupported effort lists are empty. Presets are editable priorities, not measured quality/price guarantees. Update sources/date and release notes alongside any changed recommendation, then regenerate the static page and run all configuration/package tests.