@b00dea/cockpit 0.0.0-stage → 0.1.1
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/CHANGELOG.md +474 -0
- package/LICENSE +21 -0
- package/README.md +25 -2
- package/bin/cockpit.mjs +33 -0
- package/cockpit.schema.json +2644 -0
- package/dist/autonomy.d.ts +45 -0
- package/dist/autonomy.js +173 -0
- package/dist/bounded-read.d.ts +14 -0
- package/dist/bounded-read.js +42 -0
- package/dist/browser/commands.d.ts +117 -0
- package/dist/browser/commands.js +453 -0
- package/dist/browser/package-paths.d.ts +1 -0
- package/dist/browser/package-paths.js +6 -0
- package/dist/browser/proxy.d.ts +22 -0
- package/dist/browser/proxy.js +37 -0
- package/dist/browser/runtime.d.ts +118 -0
- package/dist/browser/runtime.js +186 -0
- package/dist/browser/surfaces.d.ts +141 -0
- package/dist/browser/surfaces.js +561 -0
- package/dist/browser/ui-gate.d.ts +15 -0
- package/dist/browser/ui-gate.js +18 -0
- package/dist/canonical-json.d.ts +2 -0
- package/dist/canonical-json.js +5 -0
- package/dist/cli-guard.d.ts +5 -0
- package/dist/cli-guard.js +71 -0
- package/dist/cli-main.d.ts +176 -0
- package/dist/cli-main.js +1584 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +16 -0
- package/dist/command-table.d.ts +121 -0
- package/dist/command-table.js +664 -0
- package/dist/config/load.d.ts +183 -0
- package/dist/config/load.js +367 -0
- package/dist/config/sibling-toml.d.ts +48 -0
- package/dist/config/sibling-toml.js +160 -0
- package/dist/config/surface-tools-toml.d.ts +9 -0
- package/dist/config/surface-tools-toml.js +37 -0
- package/dist/config/unconfirmed-toml.d.ts +9 -0
- package/dist/config/unconfirmed-toml.js +29 -0
- package/dist/config/verified-write.d.ts +43 -0
- package/dist/config/verified-write.js +89 -0
- package/dist/diagnostics.d.ts +26 -0
- package/dist/diagnostics.js +344 -0
- package/dist/docs/check.d.ts +16 -0
- package/dist/docs/check.js +197 -0
- package/dist/docs/decision-record.d.ts +34 -0
- package/dist/docs/decision-record.js +135 -0
- package/dist/docs/decisions.d.ts +16 -0
- package/dist/docs/decisions.js +103 -0
- package/dist/docs/markdown.d.ts +36 -0
- package/dist/docs/markdown.js +88 -0
- package/dist/docs/references.d.ts +32 -0
- package/dist/docs/references.js +148 -0
- package/dist/emit.d.ts +22 -0
- package/dist/emit.js +43 -0
- package/dist/entrypoint-kinds.d.ts +3 -0
- package/dist/entrypoint-kinds.js +11 -0
- package/dist/environment/application/confirm.d.ts +35 -0
- package/dist/environment/application/confirm.js +122 -0
- package/dist/environment/application/destructive.d.ts +6 -0
- package/dist/environment/application/destructive.js +429 -0
- package/dist/environment/application/doctor.d.ts +94 -0
- package/dist/environment/application/doctor.js +247 -0
- package/dist/environment/application/guard.d.ts +49 -0
- package/dist/environment/application/guard.js +677 -0
- package/dist/environment/application/health.d.ts +143 -0
- package/dist/environment/application/health.js +385 -0
- package/dist/environment/application/lifecycle-context.d.ts +235 -0
- package/dist/environment/application/lifecycle-context.js +154 -0
- package/dist/environment/application/lifecycle-state.d.ts +25 -0
- package/dist/environment/application/lifecycle-state.js +202 -0
- package/dist/environment/application/lifecycle.d.ts +18 -0
- package/dist/environment/application/lifecycle.js +737 -0
- package/dist/environment/application/logs.d.ts +45 -0
- package/dist/environment/application/logs.js +127 -0
- package/dist/environment/application/services.d.ts +60 -0
- package/dist/environment/application/services.js +89 -0
- package/dist/environment/application/setup.d.ts +129 -0
- package/dist/environment/application/setup.js +741 -0
- package/dist/environment/application/shared.d.ts +11 -0
- package/dist/environment/application/shared.js +61 -0
- package/dist/environment/application/siblings.d.ts +43 -0
- package/dist/environment/application/siblings.js +269 -0
- package/dist/environment/claims.d.ts +389 -0
- package/dist/environment/claims.js +1701 -0
- package/dist/environment/codex-hook-trust.d.ts +11 -0
- package/dist/environment/codex-hook-trust.js +185 -0
- package/dist/environment/compose-environment.d.ts +1 -0
- package/dist/environment/compose-environment.js +6 -0
- package/dist/environment/compose-ownership.d.ts +21 -0
- package/dist/environment/compose-ownership.js +117 -0
- package/dist/environment/compose-topology.d.ts +125 -0
- package/dist/environment/compose-topology.js +490 -0
- package/dist/environment/contract.d.ts +522 -0
- package/dist/environment/contract.js +794 -0
- package/dist/environment/declaration.d.ts +14 -0
- package/dist/environment/declaration.js +39 -0
- package/dist/environment/destructive-composition.d.ts +29 -0
- package/dist/environment/destructive-composition.js +333 -0
- package/dist/environment/docker-daemon.d.ts +30 -0
- package/dist/environment/docker-daemon.js +78 -0
- package/dist/environment/docker-endpoint.d.ts +10 -0
- package/dist/environment/docker-endpoint.js +19 -0
- package/dist/environment/env-schema-observation.d.ts +46 -0
- package/dist/environment/env-schema-observation.js +241 -0
- package/dist/environment/evidence.d.ts +136 -0
- package/dist/environment/evidence.js +437 -0
- package/dist/environment/executable.d.ts +38 -0
- package/dist/environment/executable.js +190 -0
- package/dist/environment/generated-application/authorities.d.ts +5 -0
- package/dist/environment/generated-application/authorities.js +61 -0
- package/dist/environment/generated-application/bootstrap-skill.d.ts +16 -0
- package/dist/environment/generated-application/bootstrap-skill.js +328 -0
- package/dist/environment/generated-application/check.d.ts +13 -0
- package/dist/environment/generated-application/check.js +191 -0
- package/dist/environment/generated-application/custom-surface.d.ts +26 -0
- package/dist/environment/generated-application/custom-surface.js +289 -0
- package/dist/environment/generated-application/prepare.d.ts +29 -0
- package/dist/environment/generated-application/prepare.js +278 -0
- package/dist/environment/generated-application/publication.d.ts +33 -0
- package/dist/environment/generated-application/publication.js +547 -0
- package/dist/environment/generated-application/shared.d.ts +492 -0
- package/dist/environment/generated-application/shared.js +354 -0
- package/dist/environment/generated-application/surface-observation.d.ts +4 -0
- package/dist/environment/generated-application/surface-observation.js +69 -0
- package/dist/environment/generated-application/surface-outputs.d.ts +71 -0
- package/dist/environment/generated-application/surface-outputs.js +400 -0
- package/dist/environment/generated-application/surfaces.d.ts +3 -0
- package/dist/environment/generated-application/surfaces.js +704 -0
- package/dist/environment/generated-application/sync.d.ts +6 -0
- package/dist/environment/generated-application/sync.js +124 -0
- package/dist/environment/git-observation.d.ts +202 -0
- package/dist/environment/git-observation.js +553 -0
- package/dist/environment/health-composition.d.ts +12 -0
- package/dist/environment/health-composition.js +645 -0
- package/dist/environment/host-observation.d.ts +56 -0
- package/dist/environment/host-observation.js +52 -0
- package/dist/environment/identity.d.ts +48 -0
- package/dist/environment/identity.js +85 -0
- package/dist/environment/init-application.d.ts +333 -0
- package/dist/environment/init-application.js +726 -0
- package/dist/environment/install-policy-observation.d.ts +71 -0
- package/dist/environment/install-policy-observation.js +284 -0
- package/dist/environment/install-policy.d.ts +48 -0
- package/dist/environment/install-policy.js +96 -0
- package/dist/environment/instance.d.ts +33 -0
- package/dist/environment/instance.js +122 -0
- package/dist/environment/instruction-pointer.d.ts +19 -0
- package/dist/environment/instruction-pointer.js +144 -0
- package/dist/environment/lifecycle-composition.d.ts +31 -0
- package/dist/environment/lifecycle-composition.js +742 -0
- package/dist/environment/lifecycle-stage.d.ts +120 -0
- package/dist/environment/lifecycle-stage.js +408 -0
- package/dist/environment/lifecycle.d.ts +75 -0
- package/dist/environment/lifecycle.js +354 -0
- package/dist/environment/logs.d.ts +132 -0
- package/dist/environment/logs.js +519 -0
- package/dist/environment/map-limit.d.ts +2 -0
- package/dist/environment/map-limit.js +13 -0
- package/dist/environment/mcp-observation.d.ts +9 -0
- package/dist/environment/mcp-observation.js +46 -0
- package/dist/environment/observations.d.ts +46 -0
- package/dist/environment/observations.js +346 -0
- package/dist/environment/operator-application.d.ts +79 -0
- package/dist/environment/operator-application.js +197 -0
- package/dist/environment/ports.d.ts +182 -0
- package/dist/environment/ports.js +1205 -0
- package/dist/environment/posture-observation.d.ts +68 -0
- package/dist/environment/posture-observation.js +253 -0
- package/dist/environment/presence.d.ts +4 -0
- package/dist/environment/presence.js +26 -0
- package/dist/environment/read-composition.d.ts +32 -0
- package/dist/environment/read-composition.js +397 -0
- package/dist/environment/readiness-composition.d.ts +57 -0
- package/dist/environment/readiness-composition.js +151 -0
- package/dist/environment/reclaim.d.ts +370 -0
- package/dist/environment/reclaim.js +1940 -0
- package/dist/environment/repository-identity.d.ts +13 -0
- package/dist/environment/repository-identity.js +108 -0
- package/dist/environment/runtime-measurement-record.d.ts +38 -0
- package/dist/environment/runtime-measurement-record.js +111 -0
- package/dist/environment/runtime-measurement.d.ts +27 -0
- package/dist/environment/runtime-measurement.js +224 -0
- package/dist/environment/runtime-probe-residue.d.ts +43 -0
- package/dist/environment/runtime-probe-residue.js +148 -0
- package/dist/environment/runtime-probe.d.ts +72 -0
- package/dist/environment/runtime-probe.js +725 -0
- package/dist/environment/runtime.d.ts +551 -0
- package/dist/environment/runtime.js +2405 -0
- package/dist/environment/seed.d.ts +16 -0
- package/dist/environment/seed.js +43 -0
- package/dist/environment/selftest-application.d.ts +86 -0
- package/dist/environment/selftest-application.js +713 -0
- package/dist/environment/sensitive.d.ts +3 -0
- package/dist/environment/sensitive.js +48 -0
- package/dist/environment/served-checkout-grants.d.ts +53 -0
- package/dist/environment/served-checkout-grants.js +182 -0
- package/dist/environment/setup-observation.d.ts +62 -0
- package/dist/environment/setup-observation.js +1473 -0
- package/dist/environment/setup.d.ts +43 -0
- package/dist/environment/setup.js +176 -0
- package/dist/environment/sibling-checkouts.d.ts +119 -0
- package/dist/environment/sibling-checkouts.js +254 -0
- package/dist/environment/sibling-instructions.d.ts +33 -0
- package/dist/environment/sibling-instructions.js +224 -0
- package/dist/environment/sibling-observation.d.ts +27 -0
- package/dist/environment/sibling-observation.js +45 -0
- package/dist/environment/sibling-pull.d.ts +23 -0
- package/dist/environment/sibling-pull.js +95 -0
- package/dist/environment/sibling-registration.d.ts +45 -0
- package/dist/environment/sibling-registration.js +538 -0
- package/dist/environment/stack-inputs.d.ts +18 -0
- package/dist/environment/stack-inputs.js +210 -0
- package/dist/environment/stack-inventory-prune.d.ts +31 -0
- package/dist/environment/stack-inventory-prune.js +129 -0
- package/dist/environment/stack-inventory-report.d.ts +44 -0
- package/dist/environment/stack-inventory-report.js +78 -0
- package/dist/environment/stack-inventory.d.ts +94 -0
- package/dist/environment/stack-inventory.js +418 -0
- package/dist/environment/state.d.ts +410 -0
- package/dist/environment/state.js +2153 -0
- package/dist/environment/templates.d.ts +140 -0
- package/dist/environment/templates.js +685 -0
- package/dist/environment/tool-registration.d.ts +9 -0
- package/dist/environment/tool-registration.js +92 -0
- package/dist/environment/upgrade-application.d.ts +19 -0
- package/dist/environment/upgrade-application.js +175 -0
- package/dist/environment-exec/execute.d.ts +105 -0
- package/dist/environment-exec/execute.js +1179 -0
- package/dist/environment-exec/libexec-program.d.ts +6 -0
- package/dist/environment-exec/libexec-program.js +22 -0
- package/dist/environment-exec/verified-digest.d.ts +4 -0
- package/dist/environment-exec/verified-digest.js +16 -0
- package/dist/exact-keys.d.ts +7 -0
- package/dist/exact-keys.js +15 -0
- package/dist/fix-catalogue.d.ts +32 -0
- package/dist/fix-catalogue.js +60 -0
- package/dist/freshness.d.ts +29 -0
- package/dist/freshness.js +75 -0
- package/dist/generated-environment/adopt.d.ts +16 -0
- package/dist/generated-environment/adopt.js +271 -0
- package/dist/generated-environment/command.d.ts +47 -0
- package/dist/generated-environment/command.js +75 -0
- package/dist/generated-environment/transaction.d.ts +186 -0
- package/dist/generated-environment/transaction.js +1770 -0
- package/dist/grading/evaluate.d.ts +71 -0
- package/dist/grading/evaluate.js +403 -0
- package/dist/grading/grade.d.ts +33 -0
- package/dist/grading/grade.js +57 -0
- package/dist/guards/answer-confirmation.d.ts +41 -0
- package/dist/guards/answer-confirmation.js +109 -0
- package/dist/guards/evaluator.d.ts +130 -0
- package/dist/guards/evaluator.js +1258 -0
- package/dist/guards/harness-adapter.d.ts +17 -0
- package/dist/guards/harness-adapter.js +57 -0
- package/dist/guards/host.d.ts +8 -0
- package/dist/guards/host.js +10 -0
- package/dist/guards/invocation-parser.d.ts +66 -0
- package/dist/guards/invocation-parser.js +595 -0
- package/dist/guards/local-identity.d.ts +44 -0
- package/dist/guards/local-identity.js +129 -0
- package/dist/guards/policy-change.d.ts +43 -0
- package/dist/guards/policy-change.js +159 -0
- package/dist/guards/policy-pin.d.ts +13 -0
- package/dist/guards/policy-pin.js +177 -0
- package/dist/guards/protected-locations.d.ts +62 -0
- package/dist/guards/protected-locations.js +461 -0
- package/dist/guards/read-only.d.ts +37 -0
- package/dist/guards/read-only.js +315 -0
- package/dist/init/command.d.ts +41 -0
- package/dist/init/command.js +330 -0
- package/dist/init/derive.d.ts +53 -0
- package/dist/init/derive.js +819 -0
- package/dist/init/draft.d.ts +140 -0
- package/dist/init/draft.js +1228 -0
- package/dist/init/render.d.ts +47 -0
- package/dist/init/render.js +104 -0
- package/dist/init/scaffold.d.ts +53 -0
- package/dist/init/scaffold.js +121 -0
- package/dist/invocation.d.ts +13 -0
- package/dist/invocation.js +20 -0
- package/dist/package-metadata.d.ts +9 -0
- package/dist/package-metadata.js +19 -0
- package/dist/readiness.d.ts +53 -0
- package/dist/readiness.js +88 -0
- package/dist/references/named.d.ts +24 -0
- package/dist/references/named.js +27 -0
- package/dist/refusal.d.ts +15 -0
- package/dist/refusal.js +7 -0
- package/dist/registry-derivation.d.ts +31 -0
- package/dist/registry-derivation.js +32 -0
- package/dist/registry-resolve/command.d.ts +47 -0
- package/dist/registry-resolve/command.js +226 -0
- package/dist/registry-resolve/registry.d.ts +68 -0
- package/dist/registry-resolve/registry.js +292 -0
- package/dist/registry-resolve/render-shell.d.ts +18 -0
- package/dist/registry-resolve/render-shell.js +36 -0
- package/dist/repair.d.ts +29 -0
- package/dist/repair.js +8 -0
- package/dist/repository-path.d.ts +9 -0
- package/dist/repository-path.js +16 -0
- package/dist/schema-json.d.ts +1 -0
- package/dist/schema-json.js +177 -0
- package/dist/schema.d.ts +1289 -0
- package/dist/schema.js +985 -0
- package/dist/setup/command.d.ts +4 -0
- package/dist/setup/command.js +4 -0
- package/dist/sha256.d.ts +1 -0
- package/dist/sha256.js +4 -0
- package/dist/surfaces/adoption.d.ts +41 -0
- package/dist/surfaces/adoption.js +217 -0
- package/dist/surfaces/consumer-instructions.d.ts +20 -0
- package/dist/surfaces/consumer-instructions.js +43 -0
- package/dist/surfaces/contract.d.ts +42 -0
- package/dist/surfaces/contract.js +169 -0
- package/dist/surfaces/core-declarations.d.ts +24 -0
- package/dist/surfaces/core-declarations.js +79 -0
- package/dist/surfaces/development-markers.d.ts +1 -0
- package/dist/surfaces/development-markers.js +18 -0
- package/dist/surfaces/generator-adapter.d.ts +71 -0
- package/dist/surfaces/generator-adapter.js +809 -0
- package/dist/surfaces/harness-registry.d.ts +260 -0
- package/dist/surfaces/harness-registry.js +146 -0
- package/dist/surfaces/mcp.d.ts +145 -0
- package/dist/surfaces/mcp.js +349 -0
- package/dist/surfaces/merge.d.ts +30 -0
- package/dist/surfaces/merge.js +105 -0
- package/dist/surfaces/ownership.d.ts +190 -0
- package/dist/surfaces/ownership.js +795 -0
- package/dist/surfaces/projection.d.ts +136 -0
- package/dist/surfaces/projection.js +716 -0
- package/dist/surfaces/render.d.ts +79 -0
- package/dist/surfaces/render.js +636 -0
- package/dist/surfaces/restrictions.d.ts +130 -0
- package/dist/surfaces/restrictions.js +447 -0
- package/dist/surfaces/selftest.d.ts +162 -0
- package/dist/surfaces/selftest.js +393 -0
- package/dist/surfaces/skill-contract.d.ts +85 -0
- package/dist/surfaces/skill-contract.js +449 -0
- package/dist/surfaces/sync.d.ts +57 -0
- package/dist/surfaces/sync.js +164 -0
- package/dist/team-metadata.d.ts +41 -0
- package/dist/team-metadata.js +513 -0
- package/dist/testing/gates.d.ts +91 -0
- package/dist/testing/gates.js +182 -0
- package/dist/testing/hooks.d.ts +59 -0
- package/dist/testing/hooks.js +139 -0
- package/dist/testing/test-protection.d.ts +34 -0
- package/dist/testing/test-protection.js +137 -0
- package/dist/testing/verdict.d.ts +29 -0
- package/dist/testing/verdict.js +62 -0
- package/dist/testing/weakening.d.ts +15 -0
- package/dist/testing/weakening.js +30 -0
- package/dist/work-orders/application-closure.d.ts +7 -0
- package/dist/work-orders/application-closure.js +76 -0
- package/dist/work-orders/application-context.d.ts +162 -0
- package/dist/work-orders/application-context.js +137 -0
- package/dist/work-orders/application-decisions.d.ts +27 -0
- package/dist/work-orders/application-decisions.js +121 -0
- package/dist/work-orders/application-grading.d.ts +11 -0
- package/dist/work-orders/application-grading.js +212 -0
- package/dist/work-orders/application.d.ts +6 -0
- package/dist/work-orders/application.js +223 -0
- package/dist/work-orders/composition.d.ts +101 -0
- package/dist/work-orders/composition.js +1202 -0
- package/dist/work-orders/contract.d.ts +77 -0
- package/dist/work-orders/contract.js +140 -0
- package/dist/work-orders/decisions.d.ts +23 -0
- package/dist/work-orders/decisions.js +55 -0
- package/dist/work-orders/store.d.ts +207 -0
- package/dist/work-orders/store.js +291 -0
- package/docs/README.md +68 -0
- package/docs/architecture.md +136 -0
- package/docs/capability-matrix.md +58 -0
- package/docs/cli-reference.md +807 -0
- package/docs/command-list.md +62 -0
- package/docs/compose-patterns.md +99 -0
- package/docs/concepts.md +173 -0
- package/docs/configuration-essentials.md +177 -0
- package/docs/configuration-reference.md +636 -0
- package/docs/docs-check.md +76 -0
- package/docs/environment.md +948 -0
- package/docs/extending.md +43 -0
- package/docs/faq.md +113 -0
- package/docs/getting-started.md +692 -0
- package/docs/harness-surfaces.md +500 -0
- package/docs/joining-a-team.md +76 -0
- package/docs/release-policy.md +49 -0
- package/docs/safety-and-autonomy.md +463 -0
- package/docs/troubleshooting.md +382 -0
- package/docs/tutorial.md +171 -0
- package/docs/work-and-browser.md +420 -0
- package/libexec/browser-operation.cjs +270 -0
- package/libexec/fence-marker.cjs +101 -0
- package/libexec/fence-marker.d.cts +24 -0
- package/libexec/fenced-group-runner.cjs +77 -0
- package/libexec/fenced-supervisor.cjs +137 -0
- package/libexec/generated-filesystem.cjs +731 -0
- package/libexec/install-filesystem.cjs +225 -0
- package/libexec/rulesync-generator.NOTICE.md +1112 -0
- package/libexec/rulesync-generator.cjs +743 -0
- package/libexec/surface-generator-worker.cjs +266 -0
- package/libexec/surface-output-reader.cjs +99 -0
- package/libexec/surface-scratch-cleanup.cjs +14 -0
- package/libexec/validate-harness-evidence.d.mts +183 -0
- package/libexec/validate-harness-evidence.mjs +1312 -0
- package/package.json +74 -4
- package/surfaces/README.md +33 -0
- package/surfaces/agents/evaluator.agent.md +76 -0
- package/surfaces/guards/bash-guard.sh +48 -0
- package/surfaces/guards/claude.adapter.json +25 -0
- package/surfaces/guards/codex.adapter.json +24 -0
- package/surfaces/guards/opencode.adapter.json +25 -0
- package/surfaces/references/browser.md +63 -0
- package/surfaces/references/test-data-and-personas.md +84 -0
- package/surfaces/references/testing-tiers.md +11 -0
- package/surfaces/skills/cockpit-browser.skill.md +59 -0
- package/surfaces/skills/cockpit-explain.skill.md +32 -0
- package/surfaces/skills/cockpit-fix.skill.md +37 -0
- package/surfaces/skills/cockpit-setup.skill.md +39 -0
- package/surfaces/skills/cockpit-work.skill.md +34 -0
- package/surfaces/skills/collection.json +5 -0
- package/surfaces/skills/procedures/explain.md +66 -0
- package/surfaces/skills/procedures/fix.md +95 -0
- package/surfaces/skills/procedures/setup.md +452 -0
- package/surfaces/skills/procedures/work.md +134 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
---
|
|
2
|
+
loading: pull
|
|
3
|
+
budget: uncapped
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- cockpit:verified version=0.0.0 -->
|
|
7
|
+
|
|
8
|
+
# Set up and maintain a cockpit
|
|
9
|
+
|
|
10
|
+
## Running cockpit
|
|
11
|
+
|
|
12
|
+
- Run every command from the cockpit root, the directory holding `cockpit.toml`, through the
|
|
13
|
+
project-local binary, for example `./node_modules/.bin/cockpit check --config cockpit.toml`.
|
|
14
|
+
`npx --no cockpit <command>` starts the same binary, but the path form still runs where the
|
|
15
|
+
guard cannot prove what npx starts. If the binary is missing, stop and ask the person to install cockpit; a
|
|
16
|
+
runner that downloads a package is never a substitute.
|
|
17
|
+
- Take flags from each command's `--help`. With `--json`, read `result`, `diagnostics[].code` and
|
|
18
|
+
`invocation.exitCode`. Every diagnostic names its fix, and
|
|
19
|
+
`./node_modules/@b00dea/cockpit/docs/troubleshooting.md` covers the codes that need more; the
|
|
20
|
+
other user-guide pages cited here sit beside it.
|
|
21
|
+
- When the guard asks before a command, the person decides in Claude Code; Codex and OpenCode deny
|
|
22
|
+
instead, so hand the person the exact command to run in a terminal. A refusal that holds every
|
|
23
|
+
tool call (a guard message saying so, `GUARD_AUTHORITY_UNAVAILABLE` or `GUARD_CONFIG_UNSYNCED`)
|
|
24
|
+
follows any edit to `cockpit.toml` or reinstall of cockpit or Node. `GUARD_CONFIG_UNSYNCED` means
|
|
25
|
+
the edit does not widen what agents may do, so run
|
|
26
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml` yourself where `[autonomy] sync =
|
|
27
|
+
"agent"`; any other hold clears only when a person runs it in a terminal. A refused command is the
|
|
28
|
+
person's to run: never reword, wrap or re-spell it to get past the guard.
|
|
29
|
+
- In Codex's sandbox only `check`, `sync --dry-run` and `--help` work. Every other cockpit command
|
|
30
|
+
there cannot read cockpit's state or the Docker socket, so a failure it reports is not evidence:
|
|
31
|
+
ask the person to approve running it outside the sandbox, or to run it in a terminal. Under
|
|
32
|
+
`codex exec`, which cannot ask, a person runs it.
|
|
33
|
+
- Ask, never invent. A port, image, command, host, purpose, name, version, role or credential comes
|
|
34
|
+
from a file you read or from the person; with neither, name the gap and ask.
|
|
35
|
+
|
|
36
|
+
## Bootstrap
|
|
37
|
+
|
|
38
|
+
`init` reads the repositories, interviews, writes the generated files and checks the environment;
|
|
39
|
+
follow what it reports rather than redoing any of that by hand. Rerunning the same command, with
|
|
40
|
+
the same root and `--target`, resumes where it stopped; a different target refuses with
|
|
41
|
+
`INIT_TARGET_CHANGED`, and a repository or draft that changed underneath it refuses with a code
|
|
42
|
+
such as `INIT_STATE_STALE` or `INIT_DRAFT_CHANGED` whose fix says what to restore or redo. Inside an
|
|
43
|
+
installed cockpit the guard asks before any `init` that carries `--answers` or an `--accept-` flag.
|
|
44
|
+
Until step 7 installs cockpit in the cockpit root, rerun `init` with the same executable that
|
|
45
|
+
started it, even where it lives outside this root.
|
|
46
|
+
|
|
47
|
+
1. **Choose the agent tools.** Ask the person which agent tools the team uses: `claudecode`
|
|
48
|
+
(Claude Code), `codexcli` (Codex CLI), `opencode` (OpenCode), `cursor` (Cursor) or `grokcli`
|
|
49
|
+
(Grok Build). One tool is a complete choice; for several, pass them all, yours first and
|
|
50
|
+
comma-separated (`--target claudecode,opencode`); the list needs at least one of `claudecode`,
|
|
51
|
+
`codexcli` and `opencode`, the tools cockpit can guard. init writes it as `[surfaces] tools`, and
|
|
52
|
+
sync writes instructions, skills and settings for those tools only. Cursor and Grok Build get
|
|
53
|
+
files nobody has tested them loading (see
|
|
54
|
+
`./node_modules/@b00dea/cockpit/docs/capability-matrix.md`), so propose them only when the team
|
|
55
|
+
uses them. Done when you hold the `--target` value.
|
|
56
|
+
2. **Preview.** Run `./node_modules/.bin/cockpit init . --target <tool> --json`, adding
|
|
57
|
+
`--registry` only when adopting an existing registry. The preview writes nothing. Read
|
|
58
|
+
`result.stage`, `result.question` and `result.interview.outstanding`: every field the interview
|
|
59
|
+
will ask, each with its `proposals` (each with `provenance.kind` `derived`, `measured` or
|
|
60
|
+
`inferred`, and the file it came from) and `confirmedBy`. Done when you hold
|
|
61
|
+
`result.previewSha256` and the outstanding fields.
|
|
62
|
+
3. **Explore, then ask in one small round.** Read the repositories for each outstanding field
|
|
63
|
+
before asking, ask only for what the files and CLI output cannot answer. A field with
|
|
64
|
+
`confirmedBy = "agent"` is yours to accept as read (step 4); present every other proposal with
|
|
65
|
+
its source for confirmation. Always settle these with the person:
|
|
66
|
+
- **The name.** `init` proposes the cockpit root's directory name for `cockpit.name`. It scopes
|
|
67
|
+
the cockpit's Compose projects, state and generated files, so changing it after the first sync
|
|
68
|
+
means following the *Rename a cockpit* section of
|
|
69
|
+
`./node_modules/@b00dea/cockpit/docs/getting-started.md` (`down`, edit the name, `sync`, `check`).
|
|
70
|
+
- **The root placement**, when init runs inside a product repository (a git checkout with a root
|
|
71
|
+
language manifest, Dockerfile or standard Compose file) and the preview carries
|
|
72
|
+
`result.cockpitRoot`: a question, its options and a recommended answer. Relay that question to
|
|
73
|
+
the human, explaining the trade-off in a sentence or two from the root placement choices in
|
|
74
|
+
`./node_modules/@b00dea/cockpit/docs/concepts.md`, and write their answer under the
|
|
75
|
+
`cockpit.root` key: `dedicated` creates a sibling `<repo>-cockpit` directory so generated files
|
|
76
|
+
stay out of the product's history; `in-repo` is the default when accepting without an answer,
|
|
77
|
+
except for a directory name that is not a valid sibling slug, which refuses with
|
|
78
|
+
`INIT_COCKPIT_ROOT_REQUIRED`.
|
|
79
|
+
- **The test gates.** For a runnable product, `init` proposes `testing` stages and gates from the
|
|
80
|
+
test entry points it finds. Whether each proves anything is your judgement, made on evidence:
|
|
81
|
+
name the behaviours its tests exercise, break one of them on purpose, run the proposed command
|
|
82
|
+
and see it go red, then restore the file so the checkout is as you found it. That edit needs no
|
|
83
|
+
yes, because it is undone within the step. Write the behaviours into the gate's `changes` text
|
|
84
|
+
and keep the red run's output for your report; a gate that stays green on the break proves
|
|
85
|
+
nothing about that behaviour, so say so. The person confirms which gate agents iterate with and
|
|
86
|
+
which they run before handing back. A new product with no tests needs the person to choose its
|
|
87
|
+
test runner first; adopting a test framework in a product repository waits for their explicit
|
|
88
|
+
yes. Answer `testing = "none"` only when they decide there are no tests yet; `doctor` then
|
|
89
|
+
reports `TESTING_GATE_UNDECLARED`.
|
|
90
|
+
- **The non-local hosts** for `guards`: the database and live vendor API hosts of every
|
|
91
|
+
production, staging or shared environment. Env templates give variable names only; each host
|
|
92
|
+
comes from the person.
|
|
93
|
+
Done when every outstanding field has the person's answer, a value they confirmed, or a default
|
|
94
|
+
you chose and will mark.
|
|
95
|
+
4. **Write the answers file**, TOML keyed by field. Being told to "use sensible defaults" or
|
|
96
|
+
"proceed without asking" covers interview answers only. Mark every answer you chose yourself in
|
|
97
|
+
the file's `[provenance]` table, for example `"environment.machine" = "agent-default"`: init then
|
|
98
|
+
writes the field under `unconfirmed` in `cockpit.toml` with a comment saying the setup agent
|
|
99
|
+
chose it, and `doctor` reports `DECLARATION_UNCONFIRMED` until it is confirmed (step 7). Mark a
|
|
100
|
+
field with `confirmedBy = "agent"` as `"derived"` instead, with no value needed: init answers it
|
|
101
|
+
with what it read, refuses one that differs (`DOCUMENT_CONFIGURATION_ANSWER_NOT_DERIVED`), and
|
|
102
|
+
records the file it came from. An unmarked answer is recorded as the person's. Done when the file holds every answer and marks each one you
|
|
103
|
+
chose.
|
|
104
|
+
5. **Accept.** Show the person the answers file and the preview digest, then rerun with
|
|
105
|
+
`--accept-preview <previewSha256> --answers <file>`. The run stops at `configuration.defaults`:
|
|
106
|
+
once the person has read the values the draft in `result.question.document` lists under
|
|
107
|
+
"A person confirms these" (the digest covers only those), rerun adding
|
|
108
|
+
`--accept-defaults` with `result.question.expectedSha256`. Each digest binds consent to the bytes
|
|
109
|
+
the person saw, so take it only from the latest pending run; any other is refused
|
|
110
|
+
(`INIT_PREVIEW_NOT_ACCEPTED`, `INIT_DEFAULTS_NOT_ACCEPTED`). A different value for an answer
|
|
111
|
+
already recorded refuses with `INIT_ANSWER_CONFLICT`; `--reset-answer <field>` previews clearing
|
|
112
|
+
it. A person at a terminal can run `--interactive` instead and type each digest; an agent session
|
|
113
|
+
has no terminal, so there it refuses with `INIT_TERMINAL_REQUIRED`. Done when the run has passed
|
|
114
|
+
`configuration.defaults`.
|
|
115
|
+
6. **Work through the expected stops**, rerunning the same accepted command after each:
|
|
116
|
+
- Where a runtime is declared, preflight needs a completed first bring-up, so the run stops with
|
|
117
|
+
`STATE_UNSEEDED` (exit 2, stage `draft-observed`); the diagnostics beside it name every other
|
|
118
|
+
gap found without a running stack. Bring the stack up as step 7 of **Create a local setup**
|
|
119
|
+
describes.
|
|
120
|
+
- Preflight passes only once the cockpit repository is committed and clean, so a new one reports
|
|
121
|
+
`GIT_STATE_UNHEALTHY` with the commands that commit the generated files. A person approves or
|
|
122
|
+
runs the staging and the commit, not you: the guard asks on `git add <paths>`, denies a broad
|
|
123
|
+
`git add -A` that covers a secrets directory, and the first commit stages the guard's own
|
|
124
|
+
files. Show them `git status --short` and hand them that fix to run in a terminal. To read
|
|
125
|
+
Git state in another directory, use `git -C <dir> status` or `cd ./<dir> && <command>`; a bare
|
|
126
|
+
`cd <dir>` is refused.
|
|
127
|
+
Done when the result reports `environment-verified`, or, for a cockpit that declares no runtime,
|
|
128
|
+
reports it with `ENVIRONMENT_NOT_DECLARED` as information and no bring-up.
|
|
129
|
+
7. **Clear the readiness gaps.** Every `init` stop, and
|
|
130
|
+
`./node_modules/.bin/cockpit doctor --config cockpit.toml --json`, carries `result.readiness`:
|
|
131
|
+
`gaps` lists each prerequisite a check reported missing, with its `level` (a `required` one is
|
|
132
|
+
refused by the command that needs it), `needs` (why cockpit needs it) and `findings` (the
|
|
133
|
+
diagnostic, its message and its fix); `noFinding` lists the ones no check reported, which is not
|
|
134
|
+
proof, because a check that could not run reports nothing. Take the gaps one at a time, required
|
|
135
|
+
first: say what is missing, why cockpit needs it, and the exact change you propose. A change to a
|
|
136
|
+
product repository follows step 8: committing, installing cockpit, recording a remote, untracking
|
|
137
|
+
a file or adding a test changes it for everyone who works on it. Whether the existing tests prove
|
|
138
|
+
anything is yours to judge, as step 3 describes; where a gap needs the person's judgement (which
|
|
139
|
+
test runner to adopt, where characterization tests for untested code should live), propose with
|
|
140
|
+
what you read and let them decide.
|
|
141
|
+
- The `cockpit-installed` gap clears first: `init` ran from a temporary copy, so run
|
|
142
|
+
`npm install` in the cockpit root, then ask the person to run
|
|
143
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml` in a terminal so the guard hook runs
|
|
144
|
+
the installed copy.
|
|
145
|
+
- If anyone will run Codex in this cockpit, a person must trust its guard hook on each machine,
|
|
146
|
+
and again whenever sync changes the hook: Codex silently skips a project hook nobody has
|
|
147
|
+
trusted, so every tool call would run unguarded. An agent cannot give that trust. Ask the
|
|
148
|
+
person to run `codex -C <cockpit root>` in a terminal (not `codex exec`), trust the folder if
|
|
149
|
+
asked, and choose **Trust all and continue** when Codex shows **Hooks need review**. `doctor`
|
|
150
|
+
reports `CODEX_HOOK_UNTRUSTED` until it is done.
|
|
151
|
+
- `DECLARATION_UNCONFIRMED` lists the answers no person stated. Confirm `ports.bases` (with the
|
|
152
|
+
stack up), `environment.compose_files` and `environment.machine` by observation, one at a time:
|
|
153
|
+
`./node_modules/.bin/cockpit confirm ports.bases --config cockpit.toml --json` runs the
|
|
154
|
+
observation that verifies the answer and, when it passes, removes the entry and records what
|
|
155
|
+
ran. Then run `./node_modules/.bin/cockpit sync --config cockpit.toml` where `[autonomy] sync =
|
|
156
|
+
"agent"`, or hand it to the person, before confirming the next one. A refusal
|
|
157
|
+
(`CONFIRM_OBSERVATION_FAILED`) names what the observation saw: fix that, or the value, and
|
|
158
|
+
confirm again. Never delete an `unconfirmed` entry by hand: `CONFIRM_PERSON_REQUIRED` marks the
|
|
159
|
+
answers only a person confirms (the trust decisions, `cockpit.name`, `estate.runnable`,
|
|
160
|
+
`environment.test_data`), so list them in your report with their values.
|
|
161
|
+
Done when `doctor` reports no required gap and every other gap is cleared or reported.
|
|
162
|
+
8. **Put product changes where the person reviews them.** A Dockerfile, Compose file or
|
|
163
|
+
`.env.schema` the product needs goes on a new branch in that sibling's checkout: start the branch
|
|
164
|
+
only when `git -C <sibling> status --short` prints nothing, write the files there, and put their
|
|
165
|
+
diff against the starting branch in your report. Nothing is pushed, so the person reviews it
|
|
166
|
+
before it reaches anyone else. Creating a hosted repository or a remote waits for their yes. Every
|
|
167
|
+
other product change (an **AGENTS.md** pointer, a `package.json`, a new test framework) needs the
|
|
168
|
+
person's explicit yes to that exact change, because it changes the product for everyone who works
|
|
169
|
+
on it; "use sensible defaults" never extends to it.
|
|
170
|
+
- For a dedicated cockpit, offer an instruction pointer for each product repository. If the
|
|
171
|
+
product has no **AGENTS.md**, show the exact proposed file as a draft; if it has one, show the
|
|
172
|
+
marked block that would be appended without changing the team's text. After approval, set
|
|
173
|
+
`instruction_pointer = true` on that sibling's table in `cockpit.toml`; the guard then holds
|
|
174
|
+
every tool call until a person runs `./node_modules/.bin/cockpit sync --config cockpit.toml` in
|
|
175
|
+
a terminal. Then continue from step 4 of **Add or remove a repository** at its `setup` command. An in-repository cockpit already uses the root guide and must not point it at itself.
|
|
176
|
+
- After accepted initialization, and only with explicit permission to change the product's
|
|
177
|
+
fixtures or auth setup, read `references/test-data-and-personas.md` beside the cockpit-setup
|
|
178
|
+
skill and treat it as a separate product change. Bootstrap does not discover provider
|
|
179
|
+
identities or create browser state.
|
|
180
|
+
- For environment or secret adoption, follow **Secret handling** after sync has established its
|
|
181
|
+
owned ignore boundary.
|
|
182
|
+
Done when each product file is on its branch with its diff in your report, and each other offer
|
|
183
|
+
is applied or declined.
|
|
184
|
+
|
|
185
|
+
Report the actual result; every gap still named; every default you chose, with its field and
|
|
186
|
+
value, so the person can confirm or replace each; your judgement of each test gate, with its red run;
|
|
187
|
+
and the diff of every product branch.
|
|
188
|
+
|
|
189
|
+
## Create a local setup
|
|
190
|
+
|
|
191
|
+
Use this when a repository has no local setup: it has only ever run in CI, staging or a cluster,
|
|
192
|
+
so there is no Dockerfile, Compose file or documented way to start it on a laptop. Cockpit cannot
|
|
193
|
+
read a setup that does not exist, and a setup it guessed would look complete while holding
|
|
194
|
+
guesses. So derive each value from what the repository shows, record it as inferred, and let the human confirm it.
|
|
195
|
+
|
|
196
|
+
1. Read what the repository already states, without running or changing anything: the manifests and
|
|
197
|
+
lockfiles for the runtime and entrypoint, CI workflows for the services they start, deployment
|
|
198
|
+
files for the ports and variable names they inject, and the code for its health endpoint.
|
|
199
|
+
The init preview from **Bootstrap** already proposes several of these under `interview.outstanding`; reuse them
|
|
200
|
+
rather than re-deriving. Done when you hold a list of entrypoint and runtime, ports, environment
|
|
201
|
+
variable names, backing services with images, and a health endpoint, each with the file it came from.
|
|
202
|
+
2. Record variable names only. Values belong to whoever owns the secret; see **Secret handling**. Done when
|
|
203
|
+
no value from an env file, manifest or workflow appears in your notes or output.
|
|
204
|
+
3. Mark every derived value as `inferred` with its source file and the reason you read it from there.
|
|
205
|
+
Show the human the whole list and ask them to confirm or correct it. Done when the human has
|
|
206
|
+
answered for every inferred value; confirm one only on their word.
|
|
207
|
+
4. Turn each unknown into a named gap instead of a value: an undecided decision for data, mounts,
|
|
208
|
+
ports and restore, and an explicit vendor posture for every third-party endpoint. Cockpit renders
|
|
209
|
+
a subject with no decision as undecided, which keeps the gap visible. Done when each unknown is
|
|
210
|
+
named with who can resolve it, and nothing in the declaration was filled in to make it load.
|
|
211
|
+
Answer `environment.test_data` with exact booleans for `seeded_data` and `signed_in_users`. A false
|
|
212
|
+
answer is retained as a not-declared decision. A true answer is only a requirement: it remains unresolved
|
|
213
|
+
until product-owned seed operations or browser authentication states are declared, and never proves that
|
|
214
|
+
data or a login exists.
|
|
215
|
+
5. Decide where the runnable pieces live. A Dockerfile or Compose file in the product is a product
|
|
216
|
+
change: write it on a branch in that repository's checkout, as step 8 of **Bootstrap** describes.
|
|
217
|
+
A `compose.yml` at the cockpit root that reaches the checkout through its sibling variable leaves
|
|
218
|
+
the product untouched. Done when each product file is on its branch with its diff in your report,
|
|
219
|
+
or no product file was written.
|
|
220
|
+
6. Finish the configuration with the init flow in **Bootstrap**. On an existing cockpit, an edit to
|
|
221
|
+
`cockpit.toml` makes the guard hold every tool call until it is synced. When the hold says the
|
|
222
|
+
edit does not widen what agents may do, run
|
|
223
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml` yourself where `[autonomy] sync =
|
|
224
|
+
"agent"`; when it names fields that widen, a person runs it in a terminal. Then run
|
|
225
|
+
`./node_modules/.bin/cockpit check --config cockpit.toml --json`. Done when the check exits 0.
|
|
226
|
+
7. Where a runtime is declared, measure it with
|
|
227
|
+
`./node_modules/.bin/cockpit runtime measure --config cockpit.toml --image <local-image>`, using an
|
|
228
|
+
image already on this machine because the probe never pulls; with none, ask the person which to
|
|
229
|
+
use. It measures the local daemon `up` will use (the context `DOCKER_CONTEXT` names, or else the
|
|
230
|
+
active one), can run for minutes without output, records the result for this machine only and
|
|
231
|
+
leaves `cockpit.toml` unchanged, so no `sync` is needed. When Docker is missing or not running,
|
|
232
|
+
it and `up` refuse with `RUNTIME_UNAVAILABLE`: ask the person to start or install it. Then start
|
|
233
|
+
the stack with `./node_modules/.bin/cockpit up --config cockpit.toml`. Report the actual result.
|
|
234
|
+
Done when the stack reports healthy, or you have named what stopped it.
|
|
235
|
+
|
|
236
|
+
## Secret handling
|
|
237
|
+
|
|
238
|
+
Keep the tracked product `.env.schema` beside the component that owns it. Store only encrypted
|
|
239
|
+
Varlock resolver expressions or external-provider references under
|
|
240
|
+
`env/.secrets/<cockpit-project>/<component>`; the generated `env/.secrets/.gitignore` must be current,
|
|
241
|
+
the directory mode 0700, and resolver files mode 0600 before use. Ignoring, encryption and redaction
|
|
242
|
+
do not prevent same-user code from reading a resolved value. The agent receives schema and redacted
|
|
243
|
+
status, never a plaintext source.
|
|
244
|
+
|
|
245
|
+
Reuse the product's declared command or script. Resolve both paths to absolute paths from their owning
|
|
246
|
+
roots so the command is independent of its working directory; repeated Varlock paths are applied in
|
|
247
|
+
order, so the later central path takes precedence. For status the locked executable is invoked as
|
|
248
|
+
`varlock load --path <absolute-component-schema-root> --path
|
|
249
|
+
<absolute-cockpit-root>/env/.secrets/<cockpit-project>/<component> --agent --format json-full
|
|
250
|
+
--summary-stderr`. For a trusted product process it is invoked as `varlock run --path
|
|
251
|
+
<absolute-component-schema-root> --path <absolute-cockpit-root>/env/.secrets/<cockpit-project>/<component>
|
|
252
|
+
--inject vars --redact-stdout -- <exact command>`. The angle brackets describe product-resolved inputs,
|
|
253
|
+
not literal commands. Resolve the executable and version
|
|
254
|
+
from the product manifest and lock; runtime commands never fetch with `npx`. If the product has not
|
|
255
|
+
adopted Varlock, you need explicit permission to change the product before adding and locking it. `varlock init`,
|
|
256
|
+
provider login, encryption and secret migration stay with a person; preview their file and
|
|
257
|
+
provider scope instead of running them automatically.
|
|
258
|
+
|
|
259
|
+
Preflight and doctor already check the schema of every sibling that has a `.env.schema`; a failing row
|
|
260
|
+
names the keys, and `varlock load` in that sibling shows why.
|
|
261
|
+
|
|
262
|
+
Treat Varlock output as secret-tainted even in agent mode. Report variable names, validation state,
|
|
263
|
+
exit status and provenance only. Never copy raw resolved values, stdout or stderr into work-order
|
|
264
|
+
records. Varlock's credential proxy is preview software and same-user code is not confined here;
|
|
265
|
+
report secure agent secret use as unavailable unless a sandbox that has been tested proves it.
|
|
266
|
+
|
|
267
|
+
## Add or remove an agent tool
|
|
268
|
+
|
|
269
|
+
When the team starts or stops using an agent tool, the `tool` command edits only `[surfaces]
|
|
270
|
+
tools` in `cockpit.toml`, and after the edit the guard holds every tool call until it is synced.
|
|
271
|
+
Adding a tool does not widen what agents may do, so you may run `tool add`; removing one deletes
|
|
272
|
+
that tool's guard, so the guard asks before `tool remove`, and the hold then names `surfaces.tools`
|
|
273
|
+
and waits for a person.
|
|
274
|
+
|
|
275
|
+
1. Preview with `./node_modules/.bin/cockpit tool add <tool> --config cockpit.toml --dry-run` (or
|
|
276
|
+
`tool remove`) and show the person the list it prints. Done when they agree to that list.
|
|
277
|
+
2. Run it without `--dry-run`. Tell the person first that every tool call is held after it. Done
|
|
278
|
+
when the command exits 0.
|
|
279
|
+
3. Sync: after `tool add`, run `./node_modules/.bin/cockpit sync --config cockpit.toml` yourself
|
|
280
|
+
where `[autonomy] sync = "agent"`; after `tool remove`, the person runs it in a terminal. An added
|
|
281
|
+
tool's files are written from the same sources as the others, and a removed tool's files are
|
|
282
|
+
deleted as `[autonomy] stale_delete` allows. When sync refuses with
|
|
283
|
+
`GENERATED_STALE_APPROVAL_REQUIRED`, they rerun it with `--interactive` and type the
|
|
284
|
+
stale-removal digest it shows. Done when
|
|
285
|
+
`./node_modules/.bin/cockpit check --config cockpit.toml --json` exits 0.
|
|
286
|
+
|
|
287
|
+
## Add or remove a repository
|
|
288
|
+
|
|
289
|
+
Use this on an installed cockpit when a product gains or drops a repository. The `sibling`
|
|
290
|
+
command edits `cockpit.toml` so the repository is declared once, with its purpose, instead of
|
|
291
|
+
reached by path. The guard asks before every `sibling` command, and because the command writes
|
|
292
|
+
`cockpit.toml` immediately, the guard then holds every tool call until it is synced.
|
|
293
|
+
|
|
294
|
+
1. **Propose the declaration.** Read the repository and ask the person for its purpose when no
|
|
295
|
+
source states it. Show the human the proposed sibling declaration before invoking the command:
|
|
296
|
+
slug, purpose, source mode, directory and exported variable. Done when the person approves it.
|
|
297
|
+
2. **Run the form that matches where the repository is.** Tell the person first that every tool
|
|
298
|
+
call is held after it. For a checkout already on disk, which must have an `origin` remote, run
|
|
299
|
+
`./node_modules/.bin/cockpit sibling add billing --config cockpit.toml --from ../billing --purpose "<purpose>" --json`;
|
|
300
|
+
for a new one run
|
|
301
|
+
`./node_modules/.bin/cockpit sibling add billing --config cockpit.toml --create --purpose "<purpose>" --json`
|
|
302
|
+
and hand the person `result.publish.command`, which creates the hosted repository; for a known
|
|
303
|
+
remote run
|
|
304
|
+
`./node_modules/.bin/cockpit sibling add billing --config cockpit.toml --remote <url> --purpose "<purpose>" --json`.
|
|
305
|
+
To drop one, run `./node_modules/.bin/cockpit sibling remove billing --config cockpit.toml --json`,
|
|
306
|
+
which refuses and lists every reference while anything still uses the repository, and never
|
|
307
|
+
deletes the checkout. The command writes cockpit.toml immediately; `--json` changes only its
|
|
308
|
+
output format, so it is neither a preview nor an acceptance gate. While the stack is up, a
|
|
309
|
+
repository the stack uses is refused until the stack is stopped; you may stop it with
|
|
310
|
+
`./node_modules/.bin/cockpit down --config cockpit.toml`. Done when the command exits 0.
|
|
311
|
+
3. **Sync.** Adding or removing a repository widens what agents may do (a new repository is a new
|
|
312
|
+
directory they may write), so the hold names the sibling and a person runs
|
|
313
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml` in a terminal. Then run
|
|
314
|
+
`./node_modules/.bin/cockpit check --config cockpit.toml --json`. Done when the check exits 0.
|
|
315
|
+
4. **Instruction pointer, only on request.** When the person wants the repository's **AGENTS.md**
|
|
316
|
+
to link to the cockpit instructions, add `--instruction-pointer` to the step 2 command; it opts
|
|
317
|
+
the sibling in and writes nothing there. A sibling already declared is opted in by setting
|
|
318
|
+
`instruction_pointer = true` on its table instead, followed by a person's sync. Then run
|
|
319
|
+
`./node_modules/.bin/cockpit setup --config cockpit.toml --json`; it reports the proposed
|
|
320
|
+
**AGENTS.md** path (`SETUP_INSTRUCTION_POINTER_OFFERED`) without writing it. If the guide is missing, show the exact new-file draft;
|
|
321
|
+
otherwise show the appended block and the preserved team text. After approval, run
|
|
322
|
+
`./node_modules/.bin/cockpit setup --config cockpit.toml --write-instruction-pointers`, which
|
|
323
|
+
writes only the marked block and refuses an edited, partial or duplicated existing one
|
|
324
|
+
(`SETUP_INSTRUCTION_POINTER_INVALID`). Done when the block is written or the person declined it.
|
|
325
|
+
5. Run `./node_modules/.bin/cockpit doctor --config cockpit.toml --json` and clear any
|
|
326
|
+
`sibling-instructions` gap for the new repository as **Make a repository's instructions reach
|
|
327
|
+
every tool** describes. Done when `doctor` reports no gap for it.
|
|
328
|
+
|
|
329
|
+
## Make a repository's instructions reach every tool
|
|
330
|
+
|
|
331
|
+
Each product repository's own instructions must reach every agent tool, not only the one its team
|
|
332
|
+
uses: Codex and OpenCode load **AGENTS.md** and Claude Code loads **CLAUDE.md**, so the shared text
|
|
333
|
+
belongs in AGENTS.md and CLAUDE.md starts with a line reading `@AGENTS.md`. The
|
|
334
|
+
`sibling-instructions` readiness gap names each repository laid out otherwise.
|
|
335
|
+
|
|
336
|
+
1. Run `./node_modules/.bin/cockpit setup --config cockpit.toml --json`. It reports
|
|
337
|
+
`SETUP_INSTRUCTION_FILES_OFFERED` for the two changes that need no judgement: a CLAUDE.md
|
|
338
|
+
importing an existing AGENTS.md, or a lone CLAUDE.md moved byte for byte into AGENTS.md. Done
|
|
339
|
+
when you know which repositories it offers and which need a proposal of yours.
|
|
340
|
+
2. Propose the files, read first. Before proposing a move, read the CLAUDE.md: lines only Claude
|
|
341
|
+
Code can act on (Claude Code commands, settings or tool names) go back into CLAUDE.md under the
|
|
342
|
+
`@AGENTS.md` line once moved, so show the person those lines and where each would go. When both
|
|
343
|
+
files exist without the import, read both and propose one AGENTS.md holding everything every
|
|
344
|
+
tool needs and a CLAUDE.md of `@AGENTS.md` plus Claude-only lines. When neither exists, or the
|
|
345
|
+
instructions sit in files such as **.cursorrules** or **GEMINI.md**, draft the AGENTS.md from
|
|
346
|
+
what you read. Done when the person has seen the exact text of every file.
|
|
347
|
+
3. After their yes to that exact text, run
|
|
348
|
+
`./node_modules/.bin/cockpit setup --config cockpit.toml --write-instruction-files` for the
|
|
349
|
+
offered changes, and edit the others by hand. A team's instruction file stays on disk: removing
|
|
350
|
+
one is the person's call. Done when `doctor` reports no `sibling-instructions` gap for the
|
|
351
|
+
repository.
|
|
352
|
+
|
|
353
|
+
## After upgrading cockpit
|
|
354
|
+
|
|
355
|
+
An upgrade changes the generated files that guard and instruct every agent, so it is reviewed,
|
|
356
|
+
never applied silently. Installing a new cockpit also makes the guard hold every tool call until
|
|
357
|
+
`sync` regenerates it for the new version.
|
|
358
|
+
|
|
359
|
+
1. **Upgrade in one command where you may.**
|
|
360
|
+
`./node_modules/.bin/cockpit upgrade --config cockpit.toml --dry-run` resolves the target and
|
|
361
|
+
prints the commands; show them to the person. `./node_modules/.bin/cockpit upgrade --config cockpit.toml`
|
|
362
|
+
(or `upgrade <version>`) then installs that exact release with the package manager the lockfile
|
|
363
|
+
names, runs `sync` in a new process, and prints the `Upgrade:` lines. An agent may run it where
|
|
364
|
+
`[autonomy] sync = "agent"`, the default; otherwise the guard asks, and the person runs it. When
|
|
365
|
+
its sync fails (`UPGRADE_SYNC_FAILED`, for example on stale removals that need approval), the new
|
|
366
|
+
version is already installed and the guard holds every tool call: a person acts on what sync
|
|
367
|
+
reported and runs `./node_modules/.bin/cockpit sync --config cockpit.toml --interactive` in a
|
|
368
|
+
terminal. Done when the command exits 0 and its sync wrote the new files.
|
|
369
|
+
2. **Or by hand.** `npm update` does not move the exact pin, so install the reviewed release by
|
|
370
|
+
version: `npm install --save-dev --save-exact @b00dea/cockpit@<version>`, and confirm the manifest
|
|
371
|
+
and lockfile show that exact version. From then on the guard holds every tool call, so a person
|
|
372
|
+
runs `./node_modules/.bin/cockpit sync --config cockpit.toml --dry-run` and then
|
|
373
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml --interactive` in a terminal. Done when
|
|
374
|
+
that sync exits 0.
|
|
375
|
+
3. **Review the diff.** A hand edit to a skill, agent settings file or cockpit-owned region stops
|
|
376
|
+
sync with `SURFACE_STATE_CONFLICT`: move that change into a `[surfaces].overlays` entry instead of
|
|
377
|
+
editing the generated file. An upgrade that changes something you overrode reports
|
|
378
|
+
`OVERRIDDEN_CORE_CHANGED`: review the new built-in against your override before updating its
|
|
379
|
+
recorded hash. Done when every changed file is accounted for.
|
|
380
|
+
4. **Do what sync does not.** Read the newly installed `./node_modules/@b00dea/cockpit/CHANGELOG.md`
|
|
381
|
+
between the old and new version for lines starting `Upgrade:`; each names a step that sync alone
|
|
382
|
+
does not do. Done when every `Upgrade:` line has been done or reported to the person.
|
|
383
|
+
5. **Commit together.** Ask the person to commit the lockfile and the regenerated files together.
|
|
384
|
+
Done when `./node_modules/.bin/cockpit check --config cockpit.toml --json` exits 0.
|
|
385
|
+
|
|
386
|
+
## Keep checkouts and stacks current
|
|
387
|
+
|
|
388
|
+
Each checkout of the cockpit, a linked worktree included, runs its own stack from the sibling
|
|
389
|
+
checkouts it mounts. These commands keep both current; run them yourself, except where a step
|
|
390
|
+
gives one to the person.
|
|
391
|
+
|
|
392
|
+
1. **Update the checkouts** with `./node_modules/.bin/cockpit pull --config cockpit.toml --json`. It
|
|
393
|
+
only fetches and fast-forwards the cockpit and every sibling. A checkout it skips (`PULL_SKIPPED`:
|
|
394
|
+
modified files, a diverged branch, a failed fetch) stays as it was; report it with the command
|
|
395
|
+
the finding names. Done when every checkout is current or reported.
|
|
396
|
+
2. **Serve a sibling from a worktree** with
|
|
397
|
+
`./node_modules/.bin/cockpit use sibling-slug /absolute/path/to/worktree --config cockpit.toml`,
|
|
398
|
+
and go back with `use sibling-slug --clear`. The choice holds for this cockpit checkout only, and
|
|
399
|
+
a checkout outside the directories you may already write is the person's to choose. A running
|
|
400
|
+
stack keeps the checkout it mounted, so run `down` and `up` after it. A worktree lacks the
|
|
401
|
+
ignored environment files (`SIBLING_ENVIRONMENT_FILE_MISSING`), and cockpit never copies them:
|
|
402
|
+
ask the person. Done when `doctor` names the checkout under `SIBLING_CHECKOUT_OVERRIDDEN`.
|
|
403
|
+
3. **A stale stack.** `STACK_INPUTS_CHANGED` from `doctor`, `preflight` or `pull` means a mounted
|
|
404
|
+
sibling's lockfile or declared `rebuild_inputs` changed under the running stack. While the stack
|
|
405
|
+
still runs, rebuild each service whose image installs those dependencies with
|
|
406
|
+
`./node_modules/.bin/cockpit rebuild --config cockpit.toml --service service-id`, then run
|
|
407
|
+
`./node_modules/.bin/cockpit down --config cockpit.toml` and
|
|
408
|
+
`./node_modules/.bin/cockpit up --config cockpit.toml`. When `down` refuses because another
|
|
409
|
+
holder still uses the stack (`CLAIM_CO_TENANT`), leave it and report who holds it. Done when
|
|
410
|
+
`doctor` no longer warns, or the holder is reported.
|
|
411
|
+
4. **Orphaned stacks.** `STACKS_ORPHANED` from `doctor` means a stack lost its checkout, usually a
|
|
412
|
+
deleted worktree. `./node_modules/.bin/cockpit stacks --config cockpit.toml --json` lists every
|
|
413
|
+
stack with its checkout and verdict; `./node_modules/.bin/cockpit stacks prune --config cockpit.toml`
|
|
414
|
+
previews what would go, and
|
|
415
|
+
`./node_modules/.bin/cockpit stacks prune --config cockpit.toml --apply` removes this cockpit's
|
|
416
|
+
orphans only. A prune that deletes volumes runs only where `[autonomy] reset = "agent"`, and
|
|
417
|
+
another cockpit's orphans need a person: for either, hand the person
|
|
418
|
+
`stacks prune --interactive` for a terminal. A stack whose worktree Git still registers, or marks
|
|
419
|
+
locked, is kept until `git worktree prune` (after `git worktree unlock` for a locked one) runs in
|
|
420
|
+
its main checkout. Done when `stacks` lists no orphaned stack, or the person has the command.
|
|
421
|
+
|
|
422
|
+
## Diagnose
|
|
423
|
+
|
|
424
|
+
1. Run `./node_modules/.bin/cockpit doctor --config cockpit.toml --json` first: it reports health,
|
|
425
|
+
wiring and `result.readiness` without repairing anything. Use
|
|
426
|
+
`./node_modules/.bin/cockpit preflight --config cockpit.toml --json` when the environment must
|
|
427
|
+
pass the blocking gate.
|
|
428
|
+
2. Follow the fix each diagnostic names, required gaps first. When the fix is a person's step
|
|
429
|
+
(trusting a Codex hook, signing in to a provider, approving a digest), hand them the exact
|
|
430
|
+
command it names. A stale or orphaned stack is cleared by **Keep checkouts and stacks
|
|
431
|
+
current**. Done when `doctor` reports each gap cleared, or you have reported the ones only a
|
|
432
|
+
person can clear.
|
|
433
|
+
|
|
434
|
+
For an account of the result without changing anything, use the cockpit-explain skill.
|
|
435
|
+
|
|
436
|
+
## On drift
|
|
437
|
+
|
|
438
|
+
`check` reports drift as `GENERATED_ARTIFACT_DRIFT`, and the session-start hook prints the same
|
|
439
|
+
report before you work. Act on the fix it names:
|
|
440
|
+
|
|
441
|
+
1. **A sibling guide's copy is stale** (the message names the guide). Run
|
|
442
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml`, review the regenerated `AGENTS.md`, and
|
|
443
|
+
commit it together with the guide change. Under `[autonomy] sync = "person"` or `"ci"` the guard
|
|
444
|
+
stops that sync: ask the person to run it.
|
|
445
|
+
2. **A generated file was edited by hand** (`SURFACE_STATE_CONFLICT`). Move the change into
|
|
446
|
+
`cockpit.toml` or a `[surfaces].overlays` entry, then sync. Editing the generated file again only
|
|
447
|
+
moves the drift.
|
|
448
|
+
3. **A formerly generated file is still on disk.** If the fix says to run `sync`, `[autonomy]
|
|
449
|
+
stale_delete` lets it remove the file: run it and review what it removed. If the fix asks a
|
|
450
|
+
person to approve a digest, stop and ask them.
|
|
451
|
+
|
|
452
|
+
Done when `./node_modules/.bin/cockpit check --config cockpit.toml --json` exits 0.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
loading: pull
|
|
3
|
+
budget: uncapped
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- cockpit:verified version=0.0.0 -->
|
|
7
|
+
|
|
8
|
+
# Work an order
|
|
9
|
+
|
|
10
|
+
## Running cockpit
|
|
11
|
+
|
|
12
|
+
- Run every command from the cockpit root, the directory holding `cockpit.toml`, through the
|
|
13
|
+
project-local binary, for example `./node_modules/.bin/cockpit check --config cockpit.toml`.
|
|
14
|
+
`npx --no cockpit <command>` starts the same binary, but the path form still runs where the
|
|
15
|
+
guard cannot prove what npx starts. If the binary is missing, stop and ask the person to install cockpit; a
|
|
16
|
+
runner that downloads a package is never a substitute.
|
|
17
|
+
- Take flags from each command's `--help`. With `--json`, read `result`, `diagnostics[].code` and
|
|
18
|
+
`invocation.exitCode`. Every diagnostic names its fix, and
|
|
19
|
+
`./node_modules/@b00dea/cockpit/docs/troubleshooting.md` covers the codes that need more; the
|
|
20
|
+
other user-guide pages cited here sit beside it.
|
|
21
|
+
- When the guard asks before a command, the person decides in Claude Code; Codex and OpenCode deny
|
|
22
|
+
instead, so hand the person the exact command to run in a terminal. A refusal that holds every
|
|
23
|
+
tool call (a guard message saying so, `GUARD_AUTHORITY_UNAVAILABLE` or `GUARD_CONFIG_UNSYNCED`)
|
|
24
|
+
follows any edit to `cockpit.toml` or reinstall of cockpit or Node. `GUARD_CONFIG_UNSYNCED` means
|
|
25
|
+
the edit does not widen what agents may do, so run
|
|
26
|
+
`./node_modules/.bin/cockpit sync --config cockpit.toml` yourself where `[autonomy] sync =
|
|
27
|
+
"agent"`; any other hold clears only when a person runs it in a terminal. A refused command is the
|
|
28
|
+
person's to run: never reword, wrap or re-spell it to get past the guard.
|
|
29
|
+
- In Codex's sandbox only `check`, `sync --dry-run` and `--help` work. Every other cockpit command
|
|
30
|
+
there cannot read cockpit's state or the Docker socket, so a failure it reports is not evidence:
|
|
31
|
+
ask the person to approve running it outside the sandbox, or to run it in a terminal. Under
|
|
32
|
+
`codex exec`, which cannot ask, a person runs it.
|
|
33
|
+
- Ask, never invent. A port, image, command, host, purpose, name, version, role or credential comes
|
|
34
|
+
from a file you read or from the person; with neither, name the gap and ask.
|
|
35
|
+
|
|
36
|
+
## Work
|
|
37
|
+
|
|
38
|
+
This is the work-order loop, for a change held to criteria someone else set, graded by something
|
|
39
|
+
other than you, or carried across sessions. Cockpit owns the contract, the checks and the grading,
|
|
40
|
+
not the thinking: reuse the planning skills the harness already has.
|
|
41
|
+
|
|
42
|
+
0. **Is this a work order?** If nobody else sets the criteria and nothing must carry on in a later
|
|
43
|
+
session, stop and use the cockpit-fix skill. Otherwise read
|
|
44
|
+
`./node_modules/.bin/cockpit work status --config cockpit.toml --json`: `result.wip` says how many
|
|
45
|
+
accepted orders are open against `work.wip_cap`, `result.gates` who passes each step, and
|
|
46
|
+
`result.grading` how an order earns done. If the order already exists, resume it at the step its
|
|
47
|
+
state names: draft at step 2, accepted at step 3, checked at step 5, graded at step 8; **stale**
|
|
48
|
+
(its file or a source changed since acceptance) goes back to step 2 to accept the change, and
|
|
49
|
+
**blocked** waits on the answer or decision step 3 or step 7 describes. Done when you can say who
|
|
50
|
+
accepts, who grades, and which step you start at.
|
|
51
|
+
1. **Write the order.** Create `workorders/WO-001.md`, using an ID `work status` does not list in
|
|
52
|
+
place of `WO-001` here and below, whose YAML front-matter holds `id`, `objective`, `scope`, `depends_on`, `gates`, `criteria`
|
|
53
|
+
and `non_goals`, as the *Write a work order* section of
|
|
54
|
+
`./node_modules/@b00dea/cockpit/docs/work-and-browser.md` shows. Take the criteria from the
|
|
55
|
+
person who sets them; when one is unclear, ask rather than write your own reading. Give each
|
|
56
|
+
criterion a `text` an independent reviewer could not read two ways and, wherever a command can
|
|
57
|
+
show it, a `check`. The body below the front-matter is free for your notes and plan. Done when
|
|
58
|
+
the person who set the criteria has seen the front-matter.
|
|
59
|
+
2. **Accept it** with `./node_modules/.bin/cockpit work accept --config cockpit.toml --work-order WO-001`.
|
|
60
|
+
Acceptance records the commit each repository stands at, and grading counts every change since
|
|
61
|
+
then against `scope`, so first ask the person what to do with uncommitted changes already in the
|
|
62
|
+
checkout. Under `accept = "agent"` it is accepted; under `ci` it is accepted pending the
|
|
63
|
+
`work verify` job; under `person` it answers `WORK_PERSON_REQUIRED`: stop, and ask the person to
|
|
64
|
+
run the same command with `--interactive` in a terminal. Never type the digest yourself. Past
|
|
65
|
+
`work.wip_cap` it refuses until an open order closes. Done when `work status` reports it accepted.
|
|
66
|
+
3. **Work test-first inside scope.** Write the failing test for a criterion, then the code, changing
|
|
67
|
+
only what `scope` names; a file outside it that the change needs (a lockfile, a regenerated
|
|
68
|
+
reference, a changeset) is judged at grading, so change nothing else. If the work needs more, edit
|
|
69
|
+
the order and run `work accept` again to accept the amendment: dropping a criterion or gate always
|
|
70
|
+
needs a person, a rewritten criterion or widened scope needs one under `checks` grading, and
|
|
71
|
+
otherwise the next grade judges whether your amendment lowered the bar. When you
|
|
72
|
+
need a person's input, run
|
|
73
|
+
`./node_modules/.bin/cockpit work note --config cockpit.toml --work-order WO-001 --ask --text "<question>"`
|
|
74
|
+
and stop: the order is blocked until it is answered with `work answer`, which under `answer =
|
|
75
|
+
"person"` only a person can run. When `work accept` or `work status` lists `relatedDecisions`,
|
|
76
|
+
read those decision records before changing the code they name. When the work makes a lasting
|
|
77
|
+
decision (a format, a boundary, a dependency, an option rejected), record it with
|
|
78
|
+
`./node_modules/.bin/cockpit work note --config cockpit.toml --work-order WO-001 --decision --text "<title>"`
|
|
79
|
+
and resolve it with `work decide --decision <n> --record` (adding `--supersedes <number>` when it
|
|
80
|
+
replaces an older record), then replace every placeholder in the record it writes;
|
|
81
|
+
`--record-file <path>` cites a record that already exists, and `--none --reason "<why>"` resolves
|
|
82
|
+
one that turned out not to last. Update the documentation that describes behaviour you change.
|
|
83
|
+
This needs `[docs] decisions` in `cockpit.toml`, and nothing enforces it under
|
|
84
|
+
`[work] grading = "checks"`. Done when every criterion has code and a test that passes.
|
|
85
|
+
4. **Check** with `./node_modules/.bin/cockpit work check --config cockpit.toml --work-order WO-001 --json`.
|
|
86
|
+
It runs every criterion's check and the order's gates; a failure (`WORK_CHECK_FAILED`) returns
|
|
87
|
+
each result's outcome and the end of its output under `result.results`. Fix and rerun. While
|
|
88
|
+
iterating, the declared gate
|
|
89
|
+
(`./node_modules/.bin/cockpit test-run --config cockpit.toml --gate declared-gate-id --json`) is
|
|
90
|
+
faster feedback. Done when `work check` exits 0.
|
|
91
|
+
5. **Before grading, review.** Run the harness's installed simplification and code-review skills,
|
|
92
|
+
with security emphasis when the change touches authentication, secrets, guards or reach to
|
|
93
|
+
non-local hosts. Fix their blocking findings and rerun `work check`. Where `cockpit.toml` declares
|
|
94
|
+
`[docs]`, also run `./node_modules/.bin/cockpit docs check --config cockpit.toml --json` and fix
|
|
95
|
+
each finding your change caused: a living document citing a path or `make` target you removed, or
|
|
96
|
+
a decision record out of step with its index. Done when no blocking finding is open, `work check`
|
|
97
|
+
still exits 0 and `docs check` reports nothing your change caused.
|
|
98
|
+
6. **Grade** with `./node_modules/.bin/cockpit work grade --config cockpit.toml --work-order WO-001 --json`.
|
|
99
|
+
Under the default `independent` grading a fresh read-only evaluator grades each criterion, in
|
|
100
|
+
another listed agent tool when there is one; never grade your own work. When no evaluator can run
|
|
101
|
+
(`EVALUATOR_UNAVAILABLE` or `EVALUATOR_RUN_FAILED` in the refusal: none on `PATH`, signed out,
|
|
102
|
+
rate-limited or timed out), the refusal names each tool's cause and the command that fixes it:
|
|
103
|
+
report that to the person instead of retrying. A warning
|
|
104
|
+
`EVALUATOR_FELL_BACK_TO_RUNNING_TOOL` means the tool doing the work graded it; pass it on. Under
|
|
105
|
+
`checks`, the checks decide, and any change outside scope fails. Under `self`, pass
|
|
106
|
+
`--verdict met` or `unmet` and a `--note` saying what you checked, naming each path in
|
|
107
|
+
`result.outOfScope` and each flagged test file with why its change is needed; the checks still run
|
|
108
|
+
and a failed one fails the grade. Cockpit adds standing criteria for changes outside scope
|
|
109
|
+
(`scope-changes-necessary`), flagged test changes (`test-changes-justified`) and your amendments
|
|
110
|
+
(`amendments-hold-bar`), and with `[docs]` declared for recorded decisions
|
|
111
|
+
(`decisions-recorded`) and updated documentation (`docs-updated`). Anything short of passing
|
|
112
|
+
(`WORK_GRADE_UNSATISFIED`) lists each criterion's verdict and note under `result.criteria` and
|
|
113
|
+
failed checks under `result.checks`: go back to step 3 for each, reverting a change outside scope
|
|
114
|
+
or a test change the grade calls unneeded. `WORK_TEST_WEAKENED` means a test change was not accepted: restore the test, or under
|
|
115
|
+
`checks` grading acknowledge a legitimate change with `work acknowledge --note <why>`. When
|
|
116
|
+
`amendments-hold-bar` is unmet, the next amendment is a person's: report it. When the person names a grader ("use Codex to
|
|
117
|
+
grade", "use Claude for everything"), pass `--evaluator <tool>` (`codexcli`, `claudecode` or
|
|
118
|
+
`opencode`) on every grade for the rest of the session; only that tool runs, with no fallback.
|
|
119
|
+
Done when the grade passes.
|
|
120
|
+
7. **Attempt cap.** Each failed check or grade counts an attempt; at `work.attempt_cap` the order is
|
|
121
|
+
blocked. Record the root cause with `work note`, then do what the refusal names: close it with
|
|
122
|
+
`work signoff --partial` or `--abandon`, or amend the contract, yourself where `[work.gates]` gives
|
|
123
|
+
that step to the agent, and otherwise hand the person the command. Done when the order is closed or
|
|
124
|
+
amended, or the person has the cause and the command.
|
|
125
|
+
8. **Close** with `./node_modules/.bin/cockpit work signoff --config cockpit.toml --work-order WO-001`
|
|
126
|
+
once graded; under `signoff = "person"` it answers `WORK_PERSON_REQUIRED` as step 2 describes.
|
|
127
|
+
It refuses while a recorded decision is unresolved or its record still holds placeholders.
|
|
128
|
+
An order that cannot be finished closes with `--partial --note <what is left>` or
|
|
129
|
+
`--abandon --note <why>`. A command refused because another holds the order's lock: when that
|
|
130
|
+
command crashed, run `work recover --work-order WO-001 --apply`, which removes the lock only once it
|
|
131
|
+
has shown the holder gone and otherwise names what it could not check. Done when `work status` names how it closed.
|
|
132
|
+
|
|
133
|
+
Report each criterion's verdict and note, how the order closed (`work status` names it), and any
|
|
134
|
+
step you could not run.
|