@starci/hfs 4.7.32 → 4.7.34
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 +10 -0
- package/README.md +13 -6
- package/emit/contracts.mjs +4 -3
- package/emit/form-bounds-reader.ts.partial +58 -0
- package/emit/form-bounds.mjs +155 -0
- package/emit/graphql-input-bounds.mjs +97 -0
- package/emit/input-bounds.mjs +44 -0
- package/emit/operation-schemas.mjs +137 -0
- package/emit/operations-worker.mjs +2 -2
- package/emit/operations.mjs +52 -16
- package/emit/schema-worker.mjs +17 -4
- package/emit/type-schema.mjs +17 -5
- package/package.json +9 -2
- package/release/gate.mjs +18 -23
- package/release/index.mjs +1 -1
- package/release/push.mjs +4 -5
- package/runtime/engine/admission.mjs +331 -0
- package/runtime/engine/canonical-json.mjs +14 -0
- package/runtime/engine/db/blob.mjs +380 -0
- package/runtime/engine/db/event-compact.mjs +73 -0
- package/runtime/engine/db/ledger-open.mjs +38 -0
- package/runtime/engine/db/ledger-paths.mjs +87 -0
- package/runtime/engine/db/ledger.mjs +1068 -0
- package/runtime/engine/db/machine-connection.mjs +150 -0
- package/runtime/engine/db/machine-open.mjs +60 -0
- package/runtime/engine/db/machine-schema.mjs +105 -0
- package/runtime/engine/db/machine.mjs +1317 -0
- package/runtime/engine/db/provider-reservations.mjs +127 -0
- package/runtime/engine/db/provision-authority.mjs +76 -0
- package/runtime/engine/db/provision-lock.mjs +29 -0
- package/runtime/engine/db/provision-operations.mjs +146 -0
- package/runtime/engine/db/ref-value.mjs +67 -0
- package/runtime/engine/db/schema/machine.sql +920 -0
- package/runtime/engine/db/schema/runtime.sql +1113 -0
- package/runtime/engine/refuse.mjs +11 -0
- package/runtime/knowledge/hfs/canon-pins.yaml +65 -9
- package/runtime/knowledge/hfs/design-truths.yaml +149 -0
- package/runtime/knowledge/hfs/fe-stack.yaml +23 -5
- package/runtime/knowledge/hfs/rules.yaml +269 -48
- package/runtime/knowledge/hfs/slots.yaml +113 -53
- package/runtime/knowledge/patterns/be/api.yaml +46 -20
- package/runtime/knowledge/patterns/be/event-bus.yaml +19 -12
- package/runtime/knowledge/patterns/be/idempotency.yaml +265 -0
- package/runtime/knowledge/patterns/be/jobs.yaml +17 -12
- package/runtime/knowledge/patterns/be/projections.yaml +2 -2
- package/runtime/knowledge/patterns/be/queues.yaml +57 -22
- package/runtime/knowledge/patterns/be/reactors.yaml +1 -1
- package/runtime/knowledge/patterns/be/realtime.yaml +326 -27
- package/runtime/knowledge/patterns/be/saga.yaml +2 -2
- package/runtime/knowledge/sonar-gate.yaml +1 -1
- package/runtime/modules/kernel/command-policy.yaml +249 -0
- package/runtime/modules/kernel/failure-codes.yaml +211 -52
- package/runtime/modules/kernel/hook-input.yaml +6 -0
- package/runtime/modules/kernel/protected-zone.yaml +81 -0
- package/runtime/modules/kernel/removed-vocabulary.yaml +62 -0
- package/runtime/modules/kernel/roles.yaml +405 -0
- package/runtime/modules/models/registry.yaml +3 -1
- package/runtime/modules/models/runtimes.yaml +2 -0
- package/runtime/modules/schemas/application-stacks.schema.yaml +10 -2
- package/runtime/packages/cli/src/catalog.generated.mjs +46 -59
- package/runtime/packages/grammar/scripts/build-stamp.mjs +98 -0
- package/runtime/scripts/agent/codex-app-server.mjs +79 -0
- package/runtime/scripts/agent/codex-mirror-source.mjs +34 -0
- package/runtime/scripts/agent/host-agents.mjs +80 -0
- package/runtime/scripts/agent/launch-trust-policy.mjs +53 -0
- package/runtime/scripts/agent/trust-launch.mjs +191 -0
- package/runtime/scripts/agent/trust.mjs +523 -0
- package/runtime/scripts/api/fs/rename-over.mjs +21 -0
- package/runtime/scripts/api/fs/temp-path.mjs +8 -0
- package/runtime/scripts/api/fs/write-json-file.mjs +10 -0
- package/runtime/scripts/api/git/diff-names.mjs +8 -0
- package/runtime/scripts/api/git/head-time.mjs +10 -0
- package/runtime/scripts/api/git/index-lock.mjs +78 -0
- package/runtime/scripts/api/git/is-ancestor.mjs +5 -0
- package/runtime/scripts/api/git/log.mjs +5 -0
- package/runtime/scripts/api/git/merge-base-query.mjs +5 -0
- package/runtime/scripts/api/git/merge-tree.mjs +5 -0
- package/runtime/scripts/api/git/rev-list.mjs +5 -0
- package/runtime/scripts/api/git/rev-parse.mjs +13 -0
- package/runtime/scripts/api/git/status-query.mjs +5 -0
- package/runtime/scripts/api/git/worktree-list-query.mjs +5 -0
- package/runtime/scripts/api/node/spawn-node.mjs +6 -0
- package/runtime/scripts/api/npm/dist-tag.mjs +8 -0
- package/runtime/scripts/api/npm/lib.mjs +32 -0
- package/runtime/scripts/api/npm/pack-dry-run.mjs +9 -0
- package/runtime/scripts/api/npm/run-npm.mjs +6 -0
- package/runtime/scripts/api/npm/view.mjs +30 -0
- package/runtime/scripts/api/npm/whoami.mjs +8 -0
- package/runtime/scripts/api/process/hide-child-windows.mjs +31 -0
- package/runtime/scripts/api/process/kill-tree.mjs +22 -0
- package/runtime/scripts/api/process/lib.mjs +125 -0
- package/runtime/scripts/api/process/probe-guard-command.mjs +74 -0
- package/runtime/scripts/api/process/process-list.mjs +28 -0
- package/runtime/scripts/api/process/system-tool.mjs +37 -0
- package/runtime/scripts/gates/canon-digest.mjs +81 -0
- package/runtime/scripts/gates/canon-pins.mjs +16 -0
- package/runtime/scripts/gates/commit-proof.mjs +53 -0
- package/runtime/scripts/gates/gate-input.mjs +98 -0
- package/runtime/scripts/gates/gate.mjs +669 -0
- package/runtime/scripts/gates/grammar-dist.mjs +206 -0
- package/runtime/scripts/gates/runtime-package-selection.mjs +27 -0
- package/runtime/scripts/gates/test-world-run.mjs +254 -0
- package/runtime/scripts/gates/type-impact.mjs +277 -0
- package/runtime/scripts/gates/type-program.mjs +113 -0
- package/runtime/scripts/guards/assigned-command.mjs +12 -0
- package/runtime/scripts/guards/call-rights.mjs +47 -0
- package/runtime/scripts/guards/command-guard.mjs +468 -0
- package/runtime/scripts/guards/command-policy.mjs +342 -0
- package/runtime/scripts/guards/critic-reach.mjs +82 -0
- package/runtime/scripts/guards/deps-guard.mjs +150 -0
- package/runtime/scripts/guards/env-dump-verdict.mjs +89 -0
- package/runtime/scripts/guards/git-pathspec.mjs +225 -0
- package/runtime/scripts/guards/git-policy.mjs +355 -0
- package/runtime/scripts/guards/guards-root.mjs +27 -0
- package/runtime/scripts/guards/hook-install.mjs +343 -0
- package/runtime/scripts/guards/hook-io.mjs +76 -0
- package/runtime/scripts/guards/hook-verdict.mjs +12 -0
- package/runtime/scripts/guards/install-verdict.mjs +41 -0
- package/runtime/scripts/guards/kernel-seat.mjs +63 -0
- package/runtime/scripts/guards/launch-verdict.mjs +74 -0
- package/runtime/scripts/guards/op-starci.mjs +16 -0
- package/runtime/scripts/guards/op-write-scope.mjs +27 -0
- package/runtime/scripts/guards/orca-self-lifecycle.mjs +39 -0
- package/runtime/scripts/guards/process-kill-verdict.mjs +106 -0
- package/runtime/scripts/guards/protected-zone.mjs +56 -0
- package/runtime/scripts/guards/refusals.mjs +27 -0
- package/runtime/scripts/guards/release-definition.mjs +185 -0
- package/runtime/scripts/guards/release-push-gate.mjs +72 -0
- package/runtime/scripts/guards/release-record.mjs +58 -0
- package/runtime/scripts/guards/release-suite-mode.mjs +15 -0
- package/runtime/scripts/guards/rights.mjs +268 -0
- package/runtime/scripts/guards/seat-tools.mjs +47 -0
- package/runtime/scripts/guards/shell-commands.mjs +328 -0
- package/runtime/scripts/guards/supervisor-seat.mjs +80 -0
- package/runtime/scripts/guards/verdict-process.mjs +81 -0
- package/runtime/scripts/hfs/architecture/dead-exports.mjs +10 -10
- package/runtime/scripts/hfs/architecture/function-spec-providers.mjs +1 -1
- package/runtime/scripts/hfs/architecture/operation-contract-roots.mjs +53 -0
- package/runtime/scripts/hfs/architecture/reachability.mjs +1 -1
- package/runtime/scripts/hfs/architecture/sql-owner.mjs +17 -6
- package/runtime/scripts/hfs/architecture/sql-token-forms.mjs +105 -0
- package/runtime/scripts/hfs/architecture/sql-tokens.mjs +38 -52
- package/runtime/scripts/hfs/architecture/supabase-keys.mjs +261 -0
- package/runtime/scripts/hfs/architecture/transport-owner.mjs +49 -3
- package/runtime/scripts/hfs/architecture/typescript.mjs +1 -1
- package/runtime/scripts/hfs/check.mjs +6 -4
- package/runtime/scripts/hfs/coverage-scope.mjs +28 -1
- package/runtime/scripts/hfs/db-restamp-verb.mjs +56 -16
- package/runtime/scripts/hfs/declaration-shape.mjs +4 -4
- package/runtime/scripts/hfs/declaration-slots.mjs +14 -3
- package/runtime/scripts/hfs/manifest-shape.mjs +10 -6
- package/runtime/scripts/hfs/rule-params-shape.mjs +18 -6
- package/runtime/scripts/hfs/rules/a15-findings.mjs +4 -1
- package/runtime/scripts/hfs/rules/bypass-markers.mjs +22 -7
- package/runtime/scripts/hfs/rules/database-migrations.mjs +69 -14
- package/runtime/scripts/hfs/rules/database-queue-sources.mjs +9 -7
- package/runtime/scripts/hfs/rules/database-queues.mjs +68 -18
- package/runtime/scripts/hfs/rules/edition.mjs +56 -12
- package/runtime/scripts/hfs/rules/fe-contract-documents.mjs +1 -10
- package/runtime/scripts/hfs/rules/fe-stack.mjs +12 -7
- package/runtime/scripts/hfs/rules/lite-proof-lane.mjs +1 -1
- package/runtime/scripts/hfs/rules/stacks-lite-backing.mjs +75 -9
- package/runtime/scripts/hfs/rules/stacks-runtime.mjs +1 -1
- package/runtime/scripts/hfs/rules/stacks-swarm.mjs +15 -4
- package/runtime/scripts/hfs/rules/text-integrity.mjs +73 -0
- package/runtime/scripts/hfs/runtime-rules/hook-shape.mjs +74 -0
- package/runtime/scripts/hfs/runtime-rules/release-notes.mjs +44 -0
- package/runtime/scripts/hfs/sealed-members.mjs +3 -3
- package/runtime/scripts/hfs/slot-side-problems.mjs +3 -3
- package/runtime/scripts/hfs/slots.mjs +2 -1
- package/runtime/scripts/hfs/stack-deploy-config.mjs +22 -5
- package/runtime/scripts/hfs/stacks-gate.mjs +28 -7
- package/runtime/scripts/hfs/view.mjs +2 -1
- package/runtime/scripts/lib/app-data.mjs +11 -0
- package/runtime/scripts/lib/bypass-markers.mjs +272 -75
- package/runtime/scripts/lib/check-format.mjs +7 -0
- package/runtime/scripts/lib/cli-arg.mjs +120 -0
- package/runtime/scripts/lib/css-rules.mjs +220 -0
- package/runtime/scripts/lib/dom-tree.mjs +4 -0
- package/runtime/scripts/lib/escape.mjs +16 -0
- package/runtime/scripts/lib/event-items.mjs +22 -0
- package/runtime/scripts/lib/failure-code-template-errors.mjs +161 -0
- package/runtime/scripts/lib/git-dir.mjs +120 -0
- package/runtime/scripts/lib/grammar-vendor-parity.mjs +377 -0
- package/runtime/scripts/lib/guard-command.mjs +24 -0
- package/runtime/scripts/lib/hook-limits.mjs +5 -0
- package/runtime/scripts/lib/interrupt-cleanup.mjs +38 -0
- package/runtime/scripts/lib/js-lex.mjs +200 -0
- package/runtime/scripts/lib/json-formats.mjs +0 -1
- package/runtime/scripts/lib/language.mjs +94 -1
- package/runtime/scripts/lib/loosening-budgets.mjs +44 -0
- package/runtime/scripts/lib/loosening-config.mjs +361 -0
- package/runtime/scripts/lib/loosening-state.mjs +223 -0
- package/runtime/scripts/lib/menu-parts.mjs +11 -0
- package/runtime/scripts/lib/normalize.mjs +25 -0
- package/runtime/scripts/lib/op-gate.mjs +15 -0
- package/runtime/scripts/lib/redact.mjs +208 -0
- package/runtime/scripts/lib/runtime-location.mjs +21 -0
- package/runtime/scripts/lib/runtime-package-inventory.mjs +21 -0
- package/runtime/scripts/lib/runtime-package-manifests.mjs +84 -0
- package/runtime/scripts/lib/runtime-publication-tags.mjs +99 -0
- package/runtime/scripts/lib/seat-env.mjs +43 -0
- package/runtime/scripts/lib/secret-patterns.mjs +58 -9
- package/runtime/scripts/lib/shell-source.mjs +4 -0
- package/runtime/scripts/lib/source-phrases.mjs +34 -0
- package/runtime/scripts/lib/sqlite.mjs +21 -0
- package/runtime/scripts/lib/swarm-stack.mjs +2 -1
- package/runtime/scripts/lib/tar-files.mjs +39 -0
- package/runtime/scripts/lib/ts-analysis.mjs +10 -0
- package/runtime/scripts/lib/worktree-exclude.mjs +35 -0
- package/runtime/scripts/lib/worktree-record.mjs +14 -0
- package/runtime/scripts/machine/artifact-hold.mjs +52 -0
- package/runtime/scripts/machine/ask-receipts.mjs +113 -0
- package/runtime/scripts/machine/evidence-store.mjs +223 -0
- package/runtime/scripts/machine/home.mjs +216 -0
- package/runtime/scripts/machine/host-lock.mjs +184 -0
- package/runtime/scripts/machine/lock-recovery.mjs +55 -0
- package/runtime/scripts/machine/roles-contract.mjs +90 -0
- package/runtime/scripts/machine/runtime-change.mjs +20 -0
- package/runtime/scripts/machine/workflow-tree.mjs +122 -0
- package/runtime/scripts/reconciler/checklist-items.mjs +7 -0
- package/runtime/scripts/reconciler/guard-row.mjs +25 -0
- package/runtime/scripts/work/asset-slot.mjs +284 -0
- package/runtime/scripts/work/brand/brand-colour.mjs +125 -0
- package/runtime/scripts/work/brand/brand-tokens.mjs +167 -0
- package/runtime/scripts/work/brand/brand-value-source.mjs +106 -0
- package/runtime/scripts/work/brand/brand.mjs +892 -0
- package/runtime/scripts/work/draw/draw-dna-anatomy.mjs +60 -0
- package/runtime/scripts/work/draw/draw-dna-findings.mjs +256 -0
- package/runtime/scripts/work/draw/draw-dna-selector.mjs +38 -0
- package/runtime/scripts/work/draw/draw-dna.mjs +483 -0
- package/runtime/scripts/work/draw/draw-layer.mjs +305 -0
- package/runtime/scripts/work/draw/draw-rationale-page.mjs +237 -0
- package/runtime/scripts/work/draw/draw-rationale-ref.mjs +14 -0
- package/runtime/scripts/work/draw/draw-rationale.mjs +353 -0
- package/runtime/scripts/work/draw/draw-source.mjs +412 -0
- package/runtime/scripts/work/draw/draw-taste.mjs +278 -0
- package/runtime/scripts/work/draw/draw-typecheck.mjs +72 -0
- package/runtime/scripts/work/draw/rationale-findings.mjs +205 -0
- package/runtime/scripts/work/draw-grammar.mjs +175 -0
- package/runtime/scripts/work/draw-render-page.mjs +188 -0
- package/runtime/scripts/work/draw-render.mjs +626 -0
- package/runtime/scripts/work/grammar-proposal.mjs +279 -0
- package/runtime/scripts/work/png.mjs +237 -0
- package/runtime/scripts/work/render-tools.mjs +64 -0
- package/runtime/scripts/work/work-io.mjs +119 -0
- package/scaffold/add-inbox-lite.mjs +2 -2
- package/scaffold/add-plan.mjs +40 -13
- package/scaffold/add-queue-lite.mjs +372 -0
- package/scaffold/add.mjs +5 -2
- package/scaffold/app.mjs +1 -2
- package/scaffold/edition-gate.mjs +11 -7
- package/scaffold/lite-exports.mjs +10 -0
- package/scaffold/pattern-file-slots.mjs +33 -0
- package/scaffold/test-world.mjs +1 -1
- package/scaffold/yaml-block-edit.mjs +117 -0
- package/src/main.mjs +5 -4
- package/stack/deploy.mjs +7 -3
- package/stack/post-deploy.mjs +48 -0
- package/sync/index.mjs +10 -0
- package/templates/app/ci-workflows/github/workflows/stack-deploy.yml +1 -1
- package/templates/app/ci-workflows-lite/github/workflows/stack-deploy.yml +1 -1
- package/templates/app/codegen-graphql.mjs.partial +59 -12
- package/templates/app/hooks/husky/pre-commit +2 -2
- package/templates/app/hooks/husky/pre-push +10 -3
- package/templates/app/package-scripts/redis-dev.json +3 -0
- package/templates/app/package-scripts-lite/package.json +1 -0
- package/templates/app/skeleton/.starcistacks/application-stacks.yaml +36 -8
- package/templates/app/skeleton/.starcistacks/dev/README.md +1 -1
- package/templates/app/skeleton/.starcistacks/production/README.md +10 -9
- package/templates/app/skeleton/.starcistacks/production/infra/swarm/postgres-init.sh +21 -0
- package/templates/app/skeleton/.starcistacks/production/infra/swarm/recovery/restore-proof.md +1 -1
- package/templates/app/skeleton/.starcistacks/production/infra/swarm/releases/images.lock.yaml +1 -0
- package/templates/app/skeleton/.starcistacks/production/infra/swarm/stack.yaml +47 -5
- package/templates/app/skeleton/.starcistacks/production/runtime/env/KEYS.md +5 -3
- package/templates/app/skeleton/README.md +2 -0
- package/templates/app/skeleton-lite/.starcistacks/application-stacks.yaml +5 -0
- package/templates/app/skeleton-lite/.starcistacks/dev/README.md +2 -2
- package/templates/app/skeleton-lite/.starcistacks/production/README.md +1 -1
- package/templates/app/skeleton-lite/README.md +1 -1
- package/templates/be/inbox/platform/client-operation-outcomes.sql.tpl +18 -0
- package/templates/be/inbox/platform/event-bus/errors/event-bus.error.ts.tpl +16 -0
- package/templates/be/inbox/platform/event-bus/event-bus.contracts.ts.tpl +10 -0
- package/templates/be/inbox/platform/event-bus/event-bus.port.ts.tpl +1 -1
- package/templates/be/inbox/platform/event-bus/event-bus.service.spec.ts.tpl +15 -3
- package/templates/be/inbox/platform/event-bus/event-bus.service.ts.tpl +11 -3
- package/templates/be/inbox/platform/event-bus/index.ts.tpl +2 -0
- package/templates/be/inbox/platform/event-bus/messages/event-bus.messages.ts.tpl +7 -0
- package/templates/be/inbox/platform/event-bus/persistence/event-bus.sql.ts.tpl +2 -2
- package/templates/be/inbox/platform/idempotency/errors/idempotency.error.ts.tpl +19 -0
- package/templates/be/inbox/platform/idempotency/index.ts.tpl +2 -0
- package/templates/be/inbox/platform/idempotency/messages/idempotency.messages.ts.tpl +13 -0
- package/templates/be/inbox/platform/inbox/client-operation.policy.spec.ts.tpl +32 -0
- package/templates/be/inbox/platform/inbox/client-operation.policy.ts.tpl +17 -0
- package/templates/be/inbox/platform/inbox/errors/inbox.error.ts.tpl +22 -0
- package/templates/be/inbox/platform/inbox/inbox.port.ts.tpl +21 -0
- package/templates/be/inbox/platform/inbox/inbox.service.spec.ts.tpl +334 -11
- package/templates/be/inbox/platform/inbox/inbox.service.ts.tpl +55 -4
- package/templates/be/inbox/platform/inbox/index.ts.tpl +2 -0
- package/templates/be/inbox/platform/inbox/messages/inbox.messages.ts.tpl +15 -0
- package/templates/be/inbox/platform/inbox/persistence/inbox.rows.ts.tpl +33 -0
- package/templates/be/inbox/platform/inbox/persistence/inbox.sql.ts.tpl +26 -0
- package/templates/be/inbox/platform/inbox/request-fingerprint.policy.spec.ts.tpl +76 -0
- package/templates/be/inbox/platform/inbox/request-fingerprint.policy.ts.tpl +36 -0
- package/templates/be/inbox/platform/migration.sql.tpl +1 -0
- package/templates/be/inbox/service.spec.ts.tpl +4 -4
- package/templates/be/inbox/service.ts.tpl +3 -1
- package/templates/be/inbox/webhook-door.spec.ts.tpl +3 -2
- package/templates/be/inbox/webhook-door.ts.tpl +3 -2
- package/templates/be/patterns/event-bus/platform/errors/event-bus.error.ts.tpl +3 -0
- package/templates/be/patterns/event-bus/platform/event-bus.contracts.ts.tpl +10 -0
- package/templates/be/patterns/event-bus/platform/event-bus.port.ts.tpl +2 -2
- package/templates/be/patterns/event-bus/platform/event-bus.service.spec.ts.tpl +16 -3
- package/templates/be/patterns/event-bus/platform/event-bus.service.ts.tpl +11 -3
- package/templates/be/patterns/event-bus/platform/event-envelope.policy.spec.ts.tpl +139 -50
- package/templates/be/patterns/event-bus/platform/event-envelope.policy.ts.tpl +25 -2
- package/templates/be/patterns/event-bus/platform/event-relay.service.spec.ts.tpl +139 -78
- package/templates/be/patterns/event-bus/platform/event-relay.service.ts.tpl +10 -6
- package/templates/be/patterns/event-bus/platform/event-runner.service.spec.ts.tpl +262 -159
- package/templates/be/patterns/event-bus/platform/event-runner.service.ts.tpl +32 -5
- package/templates/be/patterns/event-bus/platform/messages/event-bus.messages.ts.tpl +2 -0
- package/templates/be/patterns/event-bus/platform/persistence/entities/event-outbox.entity.ts.tpl +5 -1
- package/templates/be/patterns/event-bus/platform/persistence/event-bus.rows.ts.tpl +2 -0
- package/templates/be/patterns/event-bus/platform/persistence/event-bus.sql.ts.tpl +4 -4
- package/templates/be/patterns/event-bus/platform/persistence/migrations/1789800009000-create-event-outbox.ts.tpl +1 -0
- package/templates/be/patterns/idempotency/platform/idempotency/errors/idempotency.error.ts.tpl +19 -0
- package/templates/be/patterns/idempotency/platform/idempotency/index.ts.tpl +2 -0
- package/templates/be/patterns/idempotency/platform/idempotency/messages/idempotency.messages.ts.tpl +13 -0
- package/templates/be/patterns/idempotency/platform/inbox/client-operation.policy.spec.ts.tpl +32 -0
- package/templates/be/patterns/idempotency/platform/inbox/client-operation.policy.ts.tpl +17 -0
- package/templates/be/patterns/idempotency/platform/inbox/client-outcome-backfill.client.spec.ts.tpl +66 -0
- package/templates/be/patterns/idempotency/platform/inbox/client-outcome-backfill.client.ts.tpl +24 -0
- package/templates/be/patterns/idempotency/platform/inbox/delivery-claim-backfill.client.spec.ts.tpl +60 -0
- package/templates/be/patterns/idempotency/platform/inbox/delivery-claim-backfill.client.ts.tpl +12 -0
- package/templates/be/patterns/idempotency/platform/inbox/delivery-claim-release.client.spec.ts.tpl +49 -0
- package/templates/be/patterns/idempotency/platform/inbox/delivery-claim-release.client.ts.tpl +12 -0
- package/templates/be/patterns/idempotency/platform/inbox/effectful.decorators.ts.tpl +7 -0
- package/templates/be/patterns/idempotency/platform/inbox/errors/inbox.error.ts.tpl +22 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.decorators.ts.tpl +17 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.module-definition.ts.tpl +7 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.module.ts.tpl +28 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.options.ts.tpl +7 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.port.ts.tpl +44 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.service.spec.ts.tpl +388 -0
- package/templates/be/patterns/idempotency/platform/inbox/inbox.service.ts.tpl +77 -0
- package/templates/be/patterns/idempotency/platform/inbox/index.ts.tpl +10 -0
- package/templates/be/patterns/idempotency/platform/inbox/messages/inbox.messages.ts.tpl +15 -0
- package/templates/be/patterns/idempotency/platform/inbox/persistence/connection.ts.tpl +9 -0
- package/templates/be/patterns/idempotency/platform/inbox/persistence/entities/inbox-claim.entity.ts.tpl +25 -0
- package/templates/be/patterns/idempotency/platform/inbox/persistence/inbox.rows.ts.tpl +33 -0
- package/templates/be/patterns/idempotency/platform/inbox/persistence/inbox.sql.ts.tpl +39 -0
- package/templates/be/patterns/idempotency/platform/inbox/persistence/migrations/1789800005000-create-inbox-claims.ts.tpl +21 -0
- package/templates/be/patterns/idempotency/platform/inbox/persistence/migrations/1792800000000-client-operation-outcomes.ts.tpl +21 -0
- package/templates/be/patterns/idempotency/platform/inbox/request-fingerprint.policy.spec.ts.tpl +76 -0
- package/templates/be/patterns/idempotency/platform/inbox/request-fingerprint.policy.ts.tpl +36 -0
- package/templates/be/patterns/jobs/platform/fenced.processor.spec.ts.tpl +1 -0
- package/templates/be/patterns/jobs/platform/job-claim.service.spec.ts.tpl +4 -3
- package/templates/be/patterns/jobs/platform/job-claim.service.ts.tpl +2 -0
- package/templates/be/patterns/jobs/platform/job-runner.service.spec.ts.tpl +20 -2
- package/templates/be/patterns/jobs/platform/job-runner.service.ts.tpl +1 -0
- package/templates/be/patterns/jobs/platform/jobs.contracts.ts.tpl +4 -0
- package/templates/be/patterns/jobs/platform-lite/jobs.index.ts.tpl +10 -0
- package/templates/be/patterns/jobs/platform-lite/jobs.sql.tpl +44 -0
- package/templates/be/patterns/jobs/platform-lite/persistence.jobs.sql.ts.tpl +33 -0
- package/templates/be/patterns/queues/platform/bullmq-queue-transport.client.spec.ts.tpl +203 -18
- package/templates/be/patterns/queues/platform/bullmq-queue-transport.client.ts.tpl +78 -22
- package/templates/be/patterns/queues/platform/errors/queue.error.ts.tpl +19 -0
- package/templates/be/patterns/queues/platform/messages/queue.messages.ts.tpl +13 -0
- package/templates/be/patterns/queues/platform/persistence.migration.ts.tpl +1 -0
- package/templates/be/patterns/queues/platform/persistence.queue-outbox.entity.ts.tpl +4 -0
- package/templates/be/patterns/queues/platform/persistence.queue.rows.ts.tpl +2 -0
- package/templates/be/patterns/queues/platform/persistence.queue.sql.ts.tpl +4 -4
- package/templates/be/patterns/queues/platform/queue-outbox.service.spec.ts.tpl +14 -2
- package/templates/be/patterns/queues/platform/queue-outbox.service.ts.tpl +5 -2
- package/templates/be/patterns/queues/platform/queue-relay.service.spec.ts.tpl +72 -74
- package/templates/be/patterns/queues/platform/queue-relay.service.ts.tpl +1 -1
- package/templates/be/patterns/queues/platform/queue-transport.port.ts.tpl +23 -8
- package/templates/be/patterns/queues/platform/queue-worker.service.spec.ts.tpl +29 -8
- package/templates/be/patterns/queues/platform/queue-worker.service.ts.tpl +7 -3
- package/templates/be/patterns/queues/platform/queue.contracts.ts.tpl +5 -0
- package/templates/be/patterns/queues/platform/queue.index.ts.tpl +2 -0
- package/templates/be/patterns/queues/platform/queue.log-events.ts.tpl +4 -0
- package/templates/be/patterns/queues/platform/queue.module.ts.tpl +2 -1
- package/templates/be/patterns/queues/platform/queue.port.ts.tpl +1 -1
- package/templates/be/patterns/queues/platform-lite/bullmq-queue-transport.client.spec.ts.tpl +417 -0
- package/templates/be/patterns/queues/platform-lite/bullmq-queue-transport.client.ts.tpl +172 -0
- package/templates/be/patterns/queues/platform-lite/persistence.queue.sql.ts.tpl +12 -0
- package/templates/be/patterns/queues/platform-lite/queue-outbox.sql.tpl +32 -0
- package/templates/be/patterns/queues/platform-lite/queue-relay.service.spec.ts.tpl +148 -0
- package/templates/be/patterns/queues/platform-lite/queue-relay.service.ts.tpl +51 -0
- package/templates/be/patterns/queues/platform-lite/queue-transport.port.ts.tpl +163 -0
- package/templates/be/patterns/queues/platform-lite/queue.config.ts.tpl +17 -0
- package/templates/be/patterns/queues/platform-lite/queue.error.ts.tpl +25 -0
- package/templates/be/patterns/queues/platform-lite/queue.index.ts.tpl +8 -0
- package/templates/be/patterns/queues/platform-lite/queue.messages.ts.tpl +21 -0
- package/templates/be/patterns/queues/platform-lite/queue.module.ts.tpl +74 -0
- package/templates/be/patterns/queues/platform-lite/queue.options.ts.tpl +38 -0
- package/templates/be/patterns/queues/queue.queue.ts.tpl +2 -2
- package/templates/be/patterns/reactors/application.contracts.ts.tpl +2 -0
- package/templates/be/patterns/reactors/consumer.ts.tpl +5 -1
- package/templates/be/platform/graphql/graphql.contracts.ts +2 -1
- package/templates/be/platform/graphql/localize-errors.mapper.spec.ts +1 -1
- package/templates/be/skeleton/apps/__app__/src/compose/platform.ts +6 -1
- package/templates/be/skeleton/apps/__app__/src/main.ts +7 -4
- package/templates/be/skeleton/apps/cli/src/compose/platform.ts +4 -0
- package/templates/be/skeleton/apps/cli/src/main.ts +7 -4
- package/templates/be/skeleton/src/modules/platform/database/index.ts +1 -1
- package/templates/be/skeleton/src/modules/platform/http/errors/http.error.ts +22 -0
- package/templates/be/skeleton/src/modules/platform/http/fetch-http-client.client.spec.ts +235 -0
- package/templates/be/skeleton/src/modules/platform/http/fetch-http-client.client.ts +85 -0
- package/templates/be/skeleton/src/modules/platform/http/graphql-call.mapper.spec.ts +92 -0
- package/templates/be/skeleton/src/modules/platform/http/graphql-call.mapper.ts +52 -0
- package/templates/be/skeleton/src/modules/platform/http/http.decorators.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/http/http.module-definition.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/http/http.module.ts +19 -0
- package/templates/be/skeleton/src/modules/platform/http/http.options.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/http/http.port.ts +40 -0
- package/templates/be/skeleton/src/modules/platform/http/index.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/http/messages/http.messages.ts +15 -0
- package/templates/be/skeleton/src/modules/platform/ids/ids.decorators.ts +9 -0
- package/templates/be/skeleton/src/modules/platform/ids/ids.module-definition.ts +7 -0
- package/templates/be/skeleton/src/modules/platform/ids/ids.module.ts +19 -0
- package/templates/be/skeleton/src/modules/platform/ids/ids.options.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/ids/ids.port.ts +5 -0
- package/templates/be/skeleton/src/modules/platform/ids/index.ts +4 -0
- package/templates/be/skeleton/src/modules/platform/ids/system-ids.service.spec.ts +15 -0
- package/templates/be/skeleton/src/modules/platform/ids/system-ids.service.ts +10 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation-request.policy.spec.ts +59 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation-request.policy.ts +21 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation.contracts.ts +16 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation.policy.spec.ts +150 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation.policy.ts +42 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation.port.ts +15 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation.service.spec.ts +23 -0
- package/templates/be/skeleton/src/modules/platform/logging/correlation.service.ts +28 -0
- package/templates/be/skeleton/src/modules/platform/logging/index.ts +14 -1
- package/templates/be/skeleton/src/modules/platform/logging/json-logger.service.spec.ts +39 -6
- package/templates/be/skeleton/src/modules/platform/logging/json-logger.service.ts +15 -3
- package/templates/be/skeleton/src/modules/platform/logging/logging.decorators.ts +17 -2
- package/templates/be/skeleton/src/modules/platform/logging/logging.log-events.ts +13 -1
- package/templates/be/skeleton/src/modules/platform/logging/logging.module.ts +13 -3
- package/templates/be/skeleton/src/modules/platform/logging/nest-logger.service.spec.ts +69 -0
- package/templates/be/skeleton/src/modules/platform/logging/nest-logger.service.ts +48 -0
- package/templates/be/skeleton/src/modules/platform/primitives/index.ts +1 -0
- package/templates/be/skeleton/src/modules/platform/primitives/record.policy.spec.ts +12 -0
- package/templates/be/skeleton/src/modules/platform/primitives/record.policy.ts +3 -0
- package/templates/be/skeleton-lite/apps/api/src/compose/platform.ts +6 -1
- package/templates/be/skeleton-lite/apps/cli/src/compose/platform.ts +4 -0
- package/templates/be/skeleton-lite/src/modules/platform/database/index.ts +1 -0
- package/templates/be/skeleton-lite/src/modules/platform/logging/index.ts +14 -1
- package/templates/be/skeleton-lite/src/modules/platform/logging/logging.log-events.ts +12 -0
- package/templates/be/skeleton-lite/src/modules/platform/primitives/index.ts +2 -0
- package/templates/be/test-world/world/test-apps.options.ts.tpl +2 -0
- package/templates/be/test-world/world/test-world.config.ts.tpl +1 -0
- package/upgrade/check.mjs +12 -135
- package/upgrade/file-state.mjs +1 -16
- package/upgrade/index.mjs +34 -361
- package/runtime/scripts/lib/check-code-loosening.mjs +0 -128
- package/runtime/scripts/lib/gate-loosening.mjs +0 -292
- package/templates/app/upgrade-full/.starcistacks/application-stacks.yaml +0 -89
- package/templates/app/upgrade-full/.starcistacks/dev/README.md +0 -16
- package/templates/app/upgrade-full/.starcistacks/dev/infra/compose/api.yaml +0 -13
- package/templates/app/upgrade-full/.starcistacks/dev/infra/compose/compose.yaml +0 -3
- package/templates/app/upgrade-full/.starcistacks/dev/infra/compose/postgres.yaml +0 -12
- package/templates/app/upgrade-full/.starcistacks/dev/infra/metadata.json +0 -7
- package/templates/be/skeleton-lite/apps/api/src/main.ts +0 -26
- package/templates/be/upgrade-full/apps/cli/src/app.module.ts +0 -12
- package/templates/be/upgrade-full/apps/cli/src/cli.env.ts +0 -7
- package/templates/be/upgrade-full/apps/cli/src/compose/cli.ts +0 -5
- package/templates/be/upgrade-full/apps/cli/src/compose/platform.ts +0 -9
- package/templates/be/upgrade-full/apps/cli/src/main.ts +0 -29
- package/templates/be/upgrade-full/src/features/cli/cli.module.ts +0 -7
- package/templates/be/upgrade-full/src/features/cli/migrate/subs/run.cli.ts +0 -23
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
schema: starci/module-kernel-roles@1
|
|
2
|
+
id: kernel.roles
|
|
3
|
+
|
|
4
|
+
# The one roles contract. Every prompt and document that describes a role cites its id here; a Markdown surface carries the block
|
|
5
|
+
# generated from this file (`starci runtime check --only roles-contract -- --write` regenerates, the `roles-contract` self-check
|
|
6
|
+
# reports drift), a yaml or script surface cites `modules/kernel/roles.yaml#<id>`, and the op prompt renders the Op block at launch.
|
|
7
|
+
# A role's `never` and `cleanup` entries are the duties an instruction surface may not contradict: each `contradicts` pattern is
|
|
8
|
+
# a spelling no surface of that role may teach.
|
|
9
|
+
|
|
10
|
+
about:
|
|
11
|
+
en: >-
|
|
12
|
+
Five roles stand on one floor. The floor is the runtime (reconciler, controllers, gates, collectors): it detects, counts,
|
|
13
|
+
retries inside bounds, collects leftovers, runs checks and keeps the ledger. An agent seat is for judgment only.
|
|
14
|
+
|
|
15
|
+
principles:
|
|
16
|
+
P1: "Every thing has exactly one owner (job, resource, hold, decision); ownerless is a defect."
|
|
17
|
+
P2: "The maker never judges its own work: the Op makes, the Critic and the machine checks judge, the Kernel never does an op's work."
|
|
18
|
+
P3: "Reports go up one level and instructions go down one level, no skipping: Op to Kernel to Supervisor to owner."
|
|
19
|
+
P4: "Authority equals blast radius: Op one unit, Kernel one workflow, Supervisor all workflows on the machine, owner intent and the irreversible; changing the runtime belongs to Debug during stabilisation and to the owner's release flow after it."
|
|
20
|
+
P5: "What a rule can decide the runtime does; an agent seat is for judgment only."
|
|
21
|
+
P6: "An escalation is a hand-over with a receipt: evidence, what was tried, what is needed, an answer deadline and a return path."
|
|
22
|
+
P7: "Every role is supervised, the supervisors too."
|
|
23
|
+
P8: "State lives in the ledger, never in a seat's memory; any seat can die and be replaced."
|
|
24
|
+
|
|
25
|
+
floor:
|
|
26
|
+
id: runtime
|
|
27
|
+
does:
|
|
28
|
+
- "detects and counts every situation of the hold policy (modules/kernel/op-incident-policy.yaml) and takes its mechanical steps"
|
|
29
|
+
- "dispatches ready work, retries inside bounds and switches agent on the tier chain"
|
|
30
|
+
- "runs the checks, keeps the ledger, and collects leftovers no seat owns (reservations, leases, worktree records, queue items)"
|
|
31
|
+
- "wakes a seat only while its menu holds an item and replaces a Kernel or an idle Supervisor that has received afterWakes wakes or spent afterTokens tokens since its boot by a fresh seat that reads the stores (modules/reconciler/seat-cost.yaml), so a seat costs in proportion to its decisions; starci reconciler status prints per seat its wakes, its empty wakes and its tokens per wake"
|
|
32
|
+
never:
|
|
33
|
+
- "decides product intent or a costly-to-reverse choice"
|
|
34
|
+
|
|
35
|
+
# Where each report goes. A Critic's verdict is evidence attached to the attempt of the op it judged; the Kernel settles on it.
|
|
36
|
+
chain:
|
|
37
|
+
reports: [op, kernel, supervisor, owner]
|
|
38
|
+
attached: {critic: op}
|
|
39
|
+
besides: {debug: [op, critic, kernel, supervisor]}
|
|
40
|
+
opMayNotAddress: [supervisor]
|
|
41
|
+
runtimeChange:
|
|
42
|
+
verbs: [[supervisor, land], [supervisor, lesson-actions], [supervisor, workers, create], [supervisor, workers, stage], [supervisor, workers, spawn]]
|
|
43
|
+
use: "record the defect with starci supervisor actions record --item runtime-defect:<cause>; Debug and the owner's release flow change .claude"
|
|
44
|
+
opRefusal: {use: "starci kernel report (an outcome of blocked or ask) reaches your Kernel"}
|
|
45
|
+
ownerQuestion: "An owner-class question goes from the Kernel straight to the owner through the runtime's ask channel; the Supervisor is informed, not a relay (the one exception to P3)."
|
|
46
|
+
|
|
47
|
+
# The test that attributes a stuck thing to exactly one role, and the shape of what Debug records.
|
|
48
|
+
# Exactly two classes of error exist. A happy error is the system working as designed (a Kernel waits on a question, an Op is blocked with a
|
|
49
|
+
# clear cause, a quota runs out and the next agent takes over, a gate asks for a ruling): the roles handle it inside the chain, Op to Kernel to
|
|
50
|
+
# Supervisor to owner, through the policy, and the Supervisor, Kernel, Op and Critic handle happy errors only. A bug is a role or the runtime not
|
|
51
|
+
# doing what its contract says (a Kernel hangs or dies, a seat ignores ready work, an Op is stuck silently, a mechanism leaves a leftover, a verb
|
|
52
|
+
# misbehaves): a bug is never the chain's to fix, Debug scans every role and the runtime floor, finds it and removes it by changing .claude and recording an edge-case entry.
|
|
53
|
+
errors:
|
|
54
|
+
happy: "the system working as designed; handled inside the chain by the roles through the policy"
|
|
55
|
+
bug: "a role or the runtime does not do what its contract says; found and removed by Debug, never worked around by the chain"
|
|
56
|
+
goal: "every workflow operates completely inside Orca with no bug: no Debug is needed to change .claude"
|
|
57
|
+
menu: "everything on the Kernel's menu is a happy error for the Kernel to decide; a bug is never offered as a choice: the Kernel's exits are none-fits and the Supervisor's runtime-defect record"
|
|
58
|
+
|
|
59
|
+
findings:
|
|
60
|
+
test: "When this role met something it could not finish, did it report up through its own channel, with a cause and evidence, inside its bound?"
|
|
61
|
+
verdicts:
|
|
62
|
+
conforms: "no error: the role did its duties"
|
|
63
|
+
correct-error: "a happy error: it met something it could not finish and reported it up with a cause and evidence inside its bound: the system worked as designed, the responsibility moved one level up, and the verdict is now about how the next role handles it. A count of correct errors is information, never a problem line."
|
|
64
|
+
departs: "a bug: it was silent, late, misclassified or mishandled: stuck with no report, question or blocked cause inside its bound; claimed done without evidence; named the wrong cause class; wrote outside its scope; went around the supported path; kept retrying instead of reporting. A stuck thing is attributed to the lowest role that failed the test."
|
|
65
|
+
shape:
|
|
66
|
+
role: "the role that departed"
|
|
67
|
+
duty: "the field of that role's contract block it broke: does, cleanup, never, reportsUpWhen, or a bound"
|
|
68
|
+
evidence: "a ledger row, an event, a terminal read or a commit"
|
|
69
|
+
remedy: "a change in the runtime tree that makes the role unable to repeat it, and whether it is on the host"
|
|
70
|
+
rules:
|
|
71
|
+
- "When a role does wrong, it is wrong: no cause is recorded as 'busy', 'under load', 'the spec was outdated' or 'that is its authority'. A cause is recorded only as a fact that points at what to change."
|
|
72
|
+
- "The remedy is always a change to the contract block or generated prompt, a rule of the policy table, a gate or guard refusal, or a runtime fix. Unblocking the running system by hand keeps work moving, is recorded separately, and never counts as the remedy."
|
|
73
|
+
- "A finding stays open in the edge-case registry until its change is on the host."
|
|
74
|
+
- "An agent report that excuses a failure ('flake', 'spec assumption') is itself a finding, resolved to a cause."
|
|
75
|
+
- "A fix for a defect found on a live host is done when the runtime change that handles it and its edge-case entry land and starci runtime verify is green on that commit."
|
|
76
|
+
|
|
77
|
+
rulings:
|
|
78
|
+
defect-queue: "One queue of runtime defects: the Supervisor and the runtime's detectors record into it (starci supervisor actions record --item runtime-defect:<cause> --action recorded --reason <text> --refs <evidence>; one item per cause, so a repeat is deduplicated), Debug owns it, fixes each defect and verifies the fix is on the host."
|
|
79
|
+
runtime-changes: "Changing .claude (contracts, prompts, policy, gates, runtime code) belongs to Debug and the fix lanes it opens during the stabilisation period, and to the owner's release flow after it. The Supervisor runs no fix workers and lands nothing on the runtime repository."
|
|
80
|
+
supervisor-priority: "The Supervisor answers gates and unblocks workflows; anything the machine can resolve does not wait for it."
|
|
81
|
+
kernel-judgment: "The Kernel role is judgment only: dispatch-ready, bounded retry and agent switch belong to the runtime."
|
|
82
|
+
op-reports-to-kernel: "An Op reports into the ledger, addressed to its Kernel; never to a seat's memory or terminal, and never to the Supervisor, the owner, Debug or another workflow."
|
|
83
|
+
loosening-always-red: "A tree that holds a loosened gate or check (a bypass marker, an ignore or exclude entry the canon does not derive, a lowered threshold, an exception file) is always red: nobody relaxes a gate to let a workflow pass, and there is no approval that lets a loosening through, the owner's included (owner ruling loosening-always-red, 2026-10-22). The loosening-state self-check judges the tree as it stands, never its history, against the owner-decided manifest knowledge/hfs/design-truths.yaml (owner ruling loosening-state-check, 2026-10-24); the land gate includes it in its selected checks, and the only fix is to satisfy the check."
|
|
84
|
+
critic-coverage: "Who judges each op's product is declared once, in the required judge field of its contract (modules/kernel/op-judges.yaml): machine, critic, owner or next-leg, never nobody. An independent Critic of another provider, on the frontier tier, runs for drawing (inside the op) and, run by the runtime at settle, for scope.define, business.decide and architecture.decide (modules/kernel/critic.yaml coverage); the op-judge check holds that table and the contracts to each other."
|
|
85
|
+
debug-is-time-boxed: "Debug is a time-boxed auditor of role conformance for the stabilisation phase, bound to a chat session; the runtime is self-sufficient, every edge case Debug meets becomes a rule plus an edge-case entry, and the loop is set up no more once the end condition of the debug role holds."
|
|
86
|
+
updating-the-runtime: "The runtime tree can be updated while workflows run, and no running workflow conflicts with the update. What a change asks of each role is declared once in modules/kernel/revision-scope.yaml and checked against the tree. A change that concerns no role costs no seat anything. A live seat is updated in place by default: woken once per revision change, even with an empty menu, with exactly the changed files that concern it, it reads and attests them (one wake, never a second for the same revision; several commits deployed together are one change). A seat is replaced by a fresh one that boots from the stores only when a rule of its contract was removed or reversed (a line deleted or modified in its declared contract files; a commit may declare an edit wording-only, and the declaration holds only for a file that keeps its structure), when the files its launch prompt is built from changed, or when it is already due for rotation (the revision change folds into that replacement). A replacement happens at the seat's next yield, never in the middle of a decision. An Op is neither updated nor restarted inside an attempt: it keeps the rules of its admission, the next try and the next Critic run are admitted under the new rules, and only guards bite at once. The engine restarts only for the files its process loaded, derived from its import graph; every other command is a new process that reads the tree."
|
|
87
|
+
debug-fix-lanes: "A runtime defect Debug catches is fixed at once, never queued behind another: Debug splits it by independent cause and opens one fix lane per cause in the same turn, each in its own clone with the files it may touch named, so the lanes run in parallel; each lane's fix reaches the host as soon as `starci runtime verify` prints `verified <sha>` for it (the check, the package clean-test and the scaffold e2e on one commit; the line of `npm run check` alone runs no test and is never the report), through `starci runtime deploy --from <clone>` (one verified revision change; never a hand fast-forward of the live checkout followed by a hand restart). Nothing a lane found is left listed as later: it is fixed in that round or handed to another lane opened then. The fixes of a day are consolidated into one release cut at the end of that day."
|
|
88
|
+
debug-replay-before-done: "A fix for a defect found on a live host is done when the runtime change that handles it (the contract, prompt, policy row, gate, guard or code) and its edge-case entry (found: live, the rule that now handles it) land on one commit and starci runtime verify is green on that commit. The runtime has no specs of its own (owner ruling no-runtime-specs): no runtime spec or replay spec is written; an entry may name a package spec or the scaffold e2e that already covers it."
|
|
89
|
+
debug-channels: "Debug speaks only through runtime channels (starci supervisor tell; a durable ruling to a Kernel through the Supervisor's notify), never by typing into a seat's terminal, and never to an Op or a Critic."
|
|
90
|
+
|
|
91
|
+
# What EVERY role block must declare and what must exist in the runtime for it. The `roles-contract` check (scripts/checks/
|
|
92
|
+
# check-roles-contract.mjs) verifies each requirement for each listed role, prints the role x requirement table, and is red
|
|
93
|
+
# for a missing requirement unless the role block carries a dated `pending:` entry that names the lane owning it. The
|
|
94
|
+
# owner's two classes of error are the vocabulary: a HAPPY error is the system working as designed and meeting a stop,
|
|
95
|
+
# handled inside the chain through a policy row; a BUG is a role or the runtime not doing what its contract says, never the
|
|
96
|
+
# chain's to fix, detected by a signal and removed by Debug with a change to .claude and an edge-case entry.
|
|
97
|
+
standard:
|
|
98
|
+
about:
|
|
99
|
+
en: >-
|
|
100
|
+
The five roles (the owner stands outside the standard) are described to one shape. A role that lacks a requirement is
|
|
101
|
+
listed as pending with the lane that is building it, so the gap is visible and never silent.
|
|
102
|
+
roles: [op, critic, kernel, supervisor, debug]
|
|
103
|
+
fields: [scope, does, owns, decidesAlone, reportsUpWhen, reportsTo, overseenBy, measure, cleanup, never]
|
|
104
|
+
requirements:
|
|
105
|
+
fields: "every field of `fields` above is declared"
|
|
106
|
+
happy-errors: "`happyErrors`: the happy errors this role handles, each {id, row, what} naming a row, hold or gate cause of modules/kernel/op-incident-policy.yaml"
|
|
107
|
+
bug-surface: "`bugSurface`: how a bug in this role is detected, each {bug, signal, detectedBy} naming the signal and an existing file or check that reads it"
|
|
108
|
+
prompt-block: "a surface in `block` mode that exists and carries the generated block of the role"
|
|
109
|
+
guard-binding: "`guard: {role}` naming a role of modules/kernel/command-policy.yaml roles.bound, or the explicit form `noSeat: true` with a `noSeatReason` for a role that owns no seat or terminal"
|
|
110
|
+
budget: "`tokenBudget` or `wakeBudget` (turns or tokens per unit of the role's work), or `noBudget` with the reason the role has none"
|
|
111
|
+
chain: "the role stands in the reporting chain (`chain.reports`, `chain.attached` or `chain.besides`)"
|
|
112
|
+
revision-ack: "`revisionAck`: how the role learns that the runtime tree changed: a seated role names the verb and event that attest the files it was sent (`scope`, `verb`, `file`, `event`); an Op or a Critic keeps the rules of its admission (`scope`, `admission: true`, `reason`); a role with no runtime to read says why (`noAck`). The table of what concerns whom is modules/kernel/revision-scope.yaml"
|
|
113
|
+
onBug:
|
|
114
|
+
chain: "records the evidence and keeps working inside its contract; it never fixes the bug and never works around it. Debug scans every role and removes the bug by changing .claude and recording an edge-case entry."
|
|
115
|
+
debug: "removes the bug by changing .claude (contract, prompt, policy row, guard refusal or runtime code) with an edge-case entry."
|
|
116
|
+
pendingShape: "{requirements: [<requirement ids>], lane or entry: <the lane building them, or the open edge-case registry entry that tracks what no mechanism yet provides>, since: <date>}"
|
|
117
|
+
|
|
118
|
+
roles:
|
|
119
|
+
- id: op
|
|
120
|
+
label: Op
|
|
121
|
+
scope: "One unit of work of one workflow."
|
|
122
|
+
does:
|
|
123
|
+
- "Does exactly one job under its contract, applying modules/kernel/check-policy.yaml worker and selection to its checks, commit and evidence report."
|
|
124
|
+
- "When it cannot decide or is blocked, reports up to its Kernel with the cause: that is a correct error."
|
|
125
|
+
owns: "one attempt and its worktree"
|
|
126
|
+
decidesAlone: "how to do the work and select its checks inside its contract"
|
|
127
|
+
reportsUpWhen: "done, blocked, or a question"
|
|
128
|
+
reportsTo: kernel
|
|
129
|
+
overseenBy: [kernel]
|
|
130
|
+
measure: "passes its gate first time"
|
|
131
|
+
tokenBudget:
|
|
132
|
+
status: provisional
|
|
133
|
+
source: "the usage rows of the first real workflows: a decision leg spent 6 to 17 million tokens (10.8 million in the audit of the first real workflow)"
|
|
134
|
+
perAttempt: {default: 6000000}
|
|
135
|
+
onExceed: "the runtime measures each attempt from its usage rows when it settles, and a running attempt from its session file on the minute poll that snapshots it (the first reading past the budget is one attempt-budget-overrun event); for a job waiting on its Kernel it opens a Decision Item budget-overrun, once: the Kernel continues once, replaces the agent or re-scopes the leg; for an attempt still running it opens one whose only option is to let it finish (a retry is refused while a try is open and no verb stops a live worker), asked again after the snooze, and a second item with the retries opens when the attempt settles and its usage rows measure it"
|
|
136
|
+
cleanup:
|
|
137
|
+
- "its own processes, temp files and servers, before it reports"
|
|
138
|
+
never:
|
|
139
|
+
- "grades itself"
|
|
140
|
+
- "writes outside its scope"
|
|
141
|
+
- "runs a command outside its allowed list"
|
|
142
|
+
- "starts a server outside the runtime-slot verbs"
|
|
143
|
+
- "addresses anyone but its Kernel: its reports, questions, blocked causes and owner asks all go to its Kernel"
|
|
144
|
+
- "sits stuck without reporting"
|
|
145
|
+
escalatesTo: kernel
|
|
146
|
+
guard: {role: op}
|
|
147
|
+
happyErrors:
|
|
148
|
+
- {id: asks-a-question, row: ask-worker-question, what: "the Op cannot decide inside its contract and reports an ask up to its Kernel, which answers from the goal and the recorded decisions"}
|
|
149
|
+
- {id: asks-the-owner, row: ask-owner, what: "the matter is the owner's (intent, credentials, spend): the Kernel sends it to the owner and the leg waits"}
|
|
150
|
+
- {id: red-check, row: error-work, what: "a check is red because the work is not good yet: the Kernel retries with the failure fed back, then on another agent"}
|
|
151
|
+
- {id: provider-quota, row: quota-or-circuit, what: "the provider quota ran out or its circuit opened: the next agent of the tier takes the job"}
|
|
152
|
+
- {id: login-expired, row: error-login-expired, what: "the provider login expired: the job moves to the next eligible agent and the owner logs in again in Orca"}
|
|
153
|
+
bugSurface:
|
|
154
|
+
- {bug: "an Op addresses a role above its Kernel", signal: "OP_REPORTS_TO_KERNEL when an Op addresses the Supervisor", detectedBy: scripts/cli/roles.mjs}
|
|
155
|
+
- {bug: "an Op runs a control-plane verb that is not its own", signal: "RIGHTS_OP_CONTROL_PLANE from the command guard", detectedBy: scripts/guards/op-starci.mjs}
|
|
156
|
+
- {bug: "an Op writes outside the paths its attempt owns", signal: "RIGHTS_OP_OUTSIDE_OWNED from the file-write guard", detectedBy: scripts/guards/op-write-scope.mjs}
|
|
157
|
+
- {bug: "an Op spends more tokens than its attempt budget", signal: "budget-overrun Decision Item and budgetOverruns in the Kernel status", detectedBy: scripts/reconciler/budget-plan.mjs}
|
|
158
|
+
revisionAck:
|
|
159
|
+
scope: op
|
|
160
|
+
admission: true
|
|
161
|
+
reason: "an Op keeps the rules of the revision it was admitted under for the whole attempt and is never updated or restarted inside it; the next try is admitted under the new rules"
|
|
162
|
+
binds: [P2, P3, P4, P8]
|
|
163
|
+
contradicts:
|
|
164
|
+
- {pattern: 'starci\s+supervisor\s+(?:tell|channel|notify)', why: "an Op never messages the Supervisor"}
|
|
165
|
+
- {pattern: 'op (?:may|should|can) (?:message|tell|ask) the (?:Supervisor|owner)', why: "an Op reports only to its Kernel"}
|
|
166
|
+
surfaces:
|
|
167
|
+
- {file: scripts/kernel/op-prompt.mjs, mode: cite}
|
|
168
|
+
- {file: docs/ops.md, mode: block}
|
|
169
|
+
|
|
170
|
+
- id: critic
|
|
171
|
+
label: Critic
|
|
172
|
+
scope: "One product of one op."
|
|
173
|
+
does:
|
|
174
|
+
- "Grades that product independently: from a different provider than the op that made it, picked through the tier picker (tier frontier, modules/models/tiers.yaml seats.critic), seeing only the product bytes and the rubric handed to it, not the op's context."
|
|
175
|
+
- "Returns ONE typed verdict (starci/critic-verdict@1): pass or fail with evidence for every rubric check, the score against the declared minimum, and the digests of the product bytes it judged. The runtime attaches it to the attempt of the op it judged and the settle gate requires it; a verdict whose digests do not match the attempt's product is refused as stale."
|
|
176
|
+
- "Is owed by the op kinds listed in modules/kernel/critic.yaml coverage (today interface.draw, scope.define, business.decide and architecture.decide); a decision leg is judged by the Critic the runtime runs itself when the op reports done (scripts/kernel/settle/critic-run.mjs, once per version of the records, event runtime-critic-run) against its rubric in modules/kernel/critic-rubrics.yaml, handed the op's decision records and the records they cite, and `starci kernel settle` refuses its done without a fresh passing verdict of that run for exactly those bytes; a verdict the maker attaches is ignored (event runtime-critic-op-verdict-ignored); a kind declared owed there has no Critic yet."
|
|
177
|
+
owns: "one verdict"
|
|
178
|
+
decidesAlone: "the score by the rubric"
|
|
179
|
+
reportsUpWhen: "always, as the verdict attached to the op's attempt"
|
|
180
|
+
reportsTo: kernel
|
|
181
|
+
overseenBy: [kernel, runtime]
|
|
182
|
+
measure: "its verdict agrees with the later outcome"
|
|
183
|
+
guard: {role: critic}
|
|
184
|
+
tokenBudget:
|
|
185
|
+
status: provisional
|
|
186
|
+
source: "an estimate for one round (two renders, the HTML source and the rubric), not yet measured from usage rows"
|
|
187
|
+
perAttempt: {default: 1000000}
|
|
188
|
+
byKind: "a decision leg declares its own budget in modules/kernel/critic-rubrics.yaml kinds[].tokenBudget (provisional, unmeasured)"
|
|
189
|
+
onExceed: "the wall bound allocation.drawLoop.criticTimeoutMs stops and releases the worker with no verdict (a happy error, critic-unavailable); the token overrun is read from the usage rows once the attempt budget measurement covers Critic dispatches"
|
|
190
|
+
cleanup:
|
|
191
|
+
- "its placement worktree and processes, before it returns the verdict"
|
|
192
|
+
never:
|
|
193
|
+
- "edits the product"
|
|
194
|
+
- "grades when it shares the maker's provider"
|
|
195
|
+
- "addresses anyone but through the attempt"
|
|
196
|
+
- "reads anything but the product files and the rubric handed to it: not the op's worktree, the ledger, a transcript or any other path"
|
|
197
|
+
- "runs anything but the read-only commands and the one write of its verdict file"
|
|
198
|
+
happyErrors:
|
|
199
|
+
- {id: failing-verdict, row: error-work, what: "the verdict fails the minimum: the work is not good yet; the op redraws (a decision leg revises its records and runs the Critic again) and the next round is judged again"}
|
|
200
|
+
- {id: no-independent-member, row: critic-no-independent-member, what: "no member of the Critic tier is of another provider than the maker: the critique is refused with CRITIC_NO_INDEPENDENT_MEMBER and the op's leg reports blocked 'no independent critic available'; the maker's provider never judges"}
|
|
201
|
+
- {id: critic-unavailable, row: critic-unavailable, what: "the independent members cannot start (login, circuit, capacity, a refused launch, a timeout): the leg reports blocked and finishes again when a member returns"}
|
|
202
|
+
- {id: critic-quota-out, row: critic-quota-out, what: "every independent member is out of tokens: the next independent member takes over, and when none is left the leg waits for the quota to reset"}
|
|
203
|
+
bugSurface:
|
|
204
|
+
- {bug: "the Critic returns no verdict although it reported done", signal: "CRITIC_NO_VERDICT on the round's critique.json (outcome verdict-missing)", detectedBy: scripts/work/critic-verdict.mjs}
|
|
205
|
+
- {bug: "the Critic edited the product bytes it was handed", signal: "CRITIC_PRODUCT_MODIFIED: the digests of the handed files differ after the run", detectedBy: scripts/work/critic-verdict.mjs}
|
|
206
|
+
- {bug: "the Critic judged other bytes than the attempt's product", signal: "CRITIC_VERDICT_STALE: the verdict's product digests do not match the installed part (a decision leg: the records the op owns now, judged by scripts/kernel/critic-settle.mjs at settle)", detectedBy: scripts/kernel/autopilot-state.mjs}
|
|
207
|
+
- {bug: "the Critic reached a path outside its directory", signal: "RIGHTS_CRITIC_REACH refusals of the command guard, logged with the terminal", detectedBy: scripts/guards/critic-reach.mjs}
|
|
208
|
+
escalatesTo: kernel
|
|
209
|
+
revisionAck:
|
|
210
|
+
scope: critic
|
|
211
|
+
admission: true
|
|
212
|
+
reason: "a Critic is handed its rubric when it is launched and judges under it; the next Critic run reads the new rubric"
|
|
213
|
+
binds: [P2, P3, P7]
|
|
214
|
+
contradicts:
|
|
215
|
+
- {pattern: 'critic (?:may|can|should) (?:edit|fix|repair) the (?:product|screen|draw)', why: "a Critic never edits the product"}
|
|
216
|
+
surfaces:
|
|
217
|
+
- {file: scripts/work/draw-critic.mjs, mode: cite}
|
|
218
|
+
- {file: docs/ops.md, mode: block}
|
|
219
|
+
|
|
220
|
+
- id: kernel
|
|
221
|
+
label: Kernel
|
|
222
|
+
scope: "One workflow."
|
|
223
|
+
does:
|
|
224
|
+
- "Answers the judgments of its menu: settles a non-green report under modules/kernel/check-policy.yaml settle, decides retry once the runtime's bounded retry is spent, switch agent or re-plan inside the goal, chooses the write set of a leg the plan leaves open, the checks that reconcile a stub sibling and the re-cut of a slipped seam, routes a defect the owner reported on the handover to the slice it names, and answers ops' questions from the goal and the recorded decisions. The runtime performs what is mechanical: dispatch, bounded retry, the enqueue of a leg whose plan declares its write set, the rework of a red node, the re-run of a stale proof."
|
|
225
|
+
- "Reports up to the Supervisor for: a conflict with another workflow (shared files, ports, provider capacity, a shared foundation); a suspected runtime defect, with evidence, after the workaround; a self-contradicting contract; bounds exhausted inside the workflow; a plan deadlock it cannot re-plan inside the goal. No routine status reports: the Supervisor reads the ledger."
|
|
226
|
+
- "Sends an owner-class question to the owner through the runtime's ask channel."
|
|
227
|
+
wakeBudget:
|
|
228
|
+
status: provisional
|
|
229
|
+
source: "kernel-turn usage rows of the two first real workflows (45 rows): turns p50 11, p75 19, p90 28; tokens (input, output, cache read) p50 3.7 million, p75 5.7 million, p90 9.8 million"
|
|
230
|
+
perWake: {turns: 20, tokens: 6000000}
|
|
231
|
+
perBoot: {turns: 40, tokens: 6000000}
|
|
232
|
+
bootSource: "the boot of a Kernel session reads the two Kernel contract files and the rev-ack manifest (about 20 files) before its first wake: measured 2026-10-09 on the Nivo Kernel, 19 turns and 1.75 million tokens"
|
|
233
|
+
onExceed: "the digest reports the wake as a departure of the Kernel (a bug): a wake answers the menu and yields"
|
|
234
|
+
owns: "one workflow: its plan, its jobs and its gates"
|
|
235
|
+
decidesAlone: "settle of a non-green report, retry past the runtime's bound, switch agent, re-plan inside the goal, the write set of an open leg, seam duties, the route of handover feedback, and answers to ops"
|
|
236
|
+
reportsUpWhen: "one of the five causes above"
|
|
237
|
+
reportsTo: supervisor
|
|
238
|
+
overseenBy: [runtime, supervisor, debug]
|
|
239
|
+
measure: "legs done inside their bound with zero human untangling"
|
|
240
|
+
cleanup:
|
|
241
|
+
- "everything stuck inside its workflow: held jobs, stopped ops, open Decision Items, its own worktrees and terminals, until it finishes"
|
|
242
|
+
never:
|
|
243
|
+
- "does an op's work"
|
|
244
|
+
- "changes the runtime"
|
|
245
|
+
- "touches another workflow"
|
|
246
|
+
- "decides for the owner what is costly to reverse"
|
|
247
|
+
- "leaves ready work or a reported block unhandled"
|
|
248
|
+
- "runs a mutating verb itself: it answers the items of its menu with starci kernel decide, and the runtime does the rest"
|
|
249
|
+
- "works around a bug: a bug is none-fits, recorded for Debug"
|
|
250
|
+
- "raises a supervisor-gate before the workaround its gate cause names (the gate ladder refuses it: modules/kernel/op-incident-policy.yaml gateCauses)"
|
|
251
|
+
- "pins a model around a lineage exclusion without a recorded op-override decision"
|
|
252
|
+
escalatesTo: supervisor
|
|
253
|
+
guard: {role: lead}
|
|
254
|
+
happyErrors:
|
|
255
|
+
- {id: worker-question, row: worker-question, what: "an Op asks: the Kernel answers from the goal (menu worker-question) or sends it to the owner"}
|
|
256
|
+
- {id: worker-stalled, row: worker-stalled, what: "a worker the nudges did not move: the Kernel nudges, replaces or stops it (menu worker-wedged)"}
|
|
257
|
+
- {id: peer-wait, row: peer-wait, what: "another workflow has not landed what a step needs: the Kernel waits for the typed condition or the peer's message (menu peer-message)"}
|
|
258
|
+
- {id: supervisor-gate, row: supervisor-gate, what: "a gate the Supervisor rules on: the Kernel waits for the ruling and acts on it"}
|
|
259
|
+
- {id: owner-gate, row: owner-gate, what: "a matter that is the owner's: the Kernel waits for the answer"}
|
|
260
|
+
- {id: failed-leg, row: failed-no-step, what: "a leg failed with no recorded step: the Kernel retries, switches agent or re-plans inside the goal (menu job-decision)"}
|
|
261
|
+
- {id: orphaned-frontier, row: orphaned-frontier, what: "a running workflow with nothing open: the Kernel proposes the next leg (menu decision-item)"}
|
|
262
|
+
bugSurface:
|
|
263
|
+
- {bug: "the Kernel runs a command that is not a starci verb or a pure read", signal: "KERNEL_STARCI_ONLY from the seat guard", detectedBy: scripts/guards/kernel-seat.mjs}
|
|
264
|
+
- {bug: "the Kernel uses a verb the runtime-driven menu replaces", signal: "KERNEL_USE_DECIDE from the seat guard", detectedBy: scripts/guards/kernel-seat.mjs}
|
|
265
|
+
- {bug: "a Kernel wake spends more than the per-wake budget", signal: "kernel-wake-budget problem line of the digest", detectedBy: scripts/reconciler/debug-digest-analyze.mjs}
|
|
266
|
+
- {bug: "a Kernel decision names a menu item or choice the menu does not hold, or a step fails", signal: "menu-item-unknown, menu-choice-unknown, menu-direct-option, menu-text-missing, menu-step-failed, menu-step-usage, menu-verb-unknown, menu-unreadable", detectedBy: scripts/kernel/verbs/shared/menu-decide.mjs}
|
|
267
|
+
revisionAck:
|
|
268
|
+
scope: kernel
|
|
269
|
+
verb: starci kernel revision-ack
|
|
270
|
+
file: scripts/kernel/verbs/revision-ack.mjs
|
|
271
|
+
event: runtime-rev-noticed
|
|
272
|
+
binds: [P1, P2, P3, P4, P5, P6, P8]
|
|
273
|
+
contradicts:
|
|
274
|
+
- {pattern: 'the Kernel (?:edits|fixes|patches) (?:the )?(?:runtime|\.claude)', why: "the Kernel never changes the runtime"}
|
|
275
|
+
surfaces:
|
|
276
|
+
- {file: modules/kernel/kernel-prompt.md, mode: block}
|
|
277
|
+
- {file: modules/kernel/driver-loop.yaml, mode: cite}
|
|
278
|
+
- {file: docs/workflow-kernel.md, mode: block}
|
|
279
|
+
|
|
280
|
+
- id: supervisor
|
|
281
|
+
label: Supervisor
|
|
282
|
+
scope: "All workflows on the machine, inside Orca."
|
|
283
|
+
does:
|
|
284
|
+
- "Operations: rules on the gates Kernels raise with one of the typed resolutions (fixed by a landed change it can cite, a workaround route, or not-runtime-fault back to the Kernel)."
|
|
285
|
+
- "Resolves conflicts between workflows and divides the shared resources: provider capacity, the host lock, ports."
|
|
286
|
+
- "Cleans up what no Kernel owns through the runtime's collectors."
|
|
287
|
+
- "Records runtime defects with evidence into the defect queue for Debug (starci supervisor actions record --item runtime-defect:<cause>), and gives the Kernel a workaround meanwhile."
|
|
288
|
+
owns: "the machine's operations: the shared resources and the gates Kernels raise"
|
|
289
|
+
decidesAlone: "gate rulings and the division of resources"
|
|
290
|
+
reportsUpWhen: "an owner-class matter"
|
|
291
|
+
reportsTo: owner
|
|
292
|
+
overseenBy: [runtime, debug]
|
|
293
|
+
measure: "gates answered inside their bound, and no defect left unrecorded"
|
|
294
|
+
cleanup:
|
|
295
|
+
- "what no Kernel owns: shared resources and ownerless leftovers"
|
|
296
|
+
never:
|
|
297
|
+
- "updates .claude in any way: no fix workers, no lands, no edits to contracts, prompts, policy, checks or code"
|
|
298
|
+
- "does a Kernel's work inside a workflow"
|
|
299
|
+
- "pushes or releases"
|
|
300
|
+
- "leaves a gate past its acknowledgement bound"
|
|
301
|
+
escalatesTo: owner
|
|
302
|
+
guard: {role: supervisor}
|
|
303
|
+
tokenBudget:
|
|
304
|
+
status: provisional
|
|
305
|
+
source: "the 55 supervisor-turn usage rows of the first real workflows (machine store copy of the audit): turns p50 9, p75 15, p90 20; tokens (input, output, cache read, cache write) p50 4.3 million, p75 6.2 million, p90 9.7 million"
|
|
306
|
+
perAttempt: {default: 10000000}
|
|
307
|
+
unit: wake
|
|
308
|
+
onExceed: "the usage sweep cuts the Supervisor session at its supervisor-wake events and tags every supervisor-turn row with the wake that owns it; the digest reports a wake over the budget as a departure of the Supervisor (supervisor-wake-budget)"
|
|
309
|
+
happyErrors:
|
|
310
|
+
- {id: gate-ruling, row: supervisor-gate, what: "a gate a Kernel raised: the Supervisor rules with fixed, workaround or not-runtime-fault (menu gate-ruling)"}
|
|
311
|
+
- {id: budget-gate, row: budget-gate, what: "a workflow cap exceeded holds dispatch: the Supervisor extends the budget or hands the matter to the owner"}
|
|
312
|
+
- {id: workflow-conflict, row: peer-dependency, what: "two workflows want the same files, ports or foundation: the Supervisor decides who goes first (menu workflow-conflict)"}
|
|
313
|
+
- {id: resource-division, row: pool-full, what: "provider capacity is shared by every workflow: the Supervisor divides it (menu resource-division)"}
|
|
314
|
+
- {id: runtime-defect, row: runtime-defect, what: "a suspected runtime defect: the Supervisor gives the Kernel a workaround and records the defect for Debug (menu runtime-defect)"}
|
|
315
|
+
- {id: kernel-escape, row: menu-escape, what: "a Kernel whose menu offered no fitting option escaped it with none-fits: the Supervisor answers with a ruling to the Kernel or records the defect for Debug (menu kernel-escape)"}
|
|
316
|
+
bugSurface:
|
|
317
|
+
- {bug: "the Supervisor runs a command that is not a starci verb or a pure read", signal: "SUPERVISOR_STARCI_ONLY from the seat guard", detectedBy: scripts/guards/supervisor-seat.mjs}
|
|
318
|
+
- {bug: "the Supervisor uses a verb the runtime-driven menu replaces", signal: "SUPERVISOR_USE_DECIDE from the seat guard", detectedBy: scripts/guards/supervisor-seat.mjs}
|
|
319
|
+
- {bug: "the Supervisor changes .claude", signal: "RUNTIME_CHANGE_OWNED_BY_DEBUG from the command and file guards", detectedBy: scripts/machine/runtime-change.mjs}
|
|
320
|
+
- {bug: "a menu choice of the Supervisor fails to execute", signal: "SUPERVISOR_MENU_STEP_FAILED", detectedBy: scripts/supervisor/decide.mjs}
|
|
321
|
+
- {bug: "a gate stands past its acknowledgement bound", signal: "gate-stale departure of the digest", detectedBy: scripts/reconciler/debug-digest-analyze.mjs}
|
|
322
|
+
- {bug: "a Supervisor wake spends more tokens than its wake budget", signal: "supervisor-wake-budget problem line of the digest", detectedBy: scripts/reconciler/debug-digest-analyze.mjs}
|
|
323
|
+
revisionAck:
|
|
324
|
+
scope: supervisor
|
|
325
|
+
verb: starci supervisor revision-ack
|
|
326
|
+
file: scripts/supervisor/revision-ack.mjs
|
|
327
|
+
event: runtime-rev-noticed
|
|
328
|
+
binds: [P1, P3, P4, P5, P6, P7, P8]
|
|
329
|
+
contradicts:
|
|
330
|
+
- {pattern: 'supervisor (?:may|can|should) (?:relax|loosen|waive) (?:a|the) gate', why: "loosening a gate is owner-class"}
|
|
331
|
+
surfaces:
|
|
332
|
+
- {file: modules/supervisor/supervisor-prompt.md, mode: block}
|
|
333
|
+
- {file: modules/supervisor/supervise.yaml, mode: cite}
|
|
334
|
+
- {file: docs/supervisor.md, mode: block}
|
|
335
|
+
|
|
336
|
+
- id: debug
|
|
337
|
+
label: Debug
|
|
338
|
+
scope: "The owner's eyes: a loop of the owner's chat for a limited stabilisation period, not part of steady-state operation."
|
|
339
|
+
does:
|
|
340
|
+
- "Audits whether each of the four roles above and the runtime floor did its job, each tick, through the digest: per op its attempt, report, evidence and hold; per Critic that it ran, on another provider, saw only the product, and had its verdict used; per Kernel seat that it is alive, acked the runtime revision, acts on ready work and takes the policy steps; per Supervisor seat that it is alive and answers gates inside their bound. Each stuck thing is a happy error or a bug of exactly one role; Debug removes bugs only, and happy errors stay with the chain."
|
|
341
|
+
- "For every departure records a finding (role, broken duty, evidence, remedy) and changes .claude at once so the role cannot repeat it: the contract block or generated prompt, a policy-table rule, a gate or guard refusal, or a runtime fix, carried onto the host. Records the case in the edge-case registry in the same change. A fix of a defect found on a live host is done when the runtime change and its edge-case entry land and starci runtime verify is green (ruling debug-replay-before-done)."
|
|
342
|
+
- "Owns the edge-case registry, the operating standard and the queue of runtime defects the Supervisor records. A leftover is evidence that its owner failed its cleanup duty; Debug may trigger the existing collector to unblock, and the finding is still the owner's."
|
|
343
|
+
- "Reports results to the owner, and retires itself when the stable criteria below hold."
|
|
344
|
+
owns: "the edge-case registry, the operating standard and the queue of runtime defects"
|
|
345
|
+
decidesAlone: "which role failed which duty, which collector to trigger, the fix lanes it opens, and restarting a seat (the owner's authority)"
|
|
346
|
+
reportsUpWhen: "a result, or an owner-only action"
|
|
347
|
+
reportsTo: owner
|
|
348
|
+
overseenBy: [owner]
|
|
349
|
+
measure: "no edge case reaches it twice"
|
|
350
|
+
cleanup:
|
|
351
|
+
- "its own loop: it ends at the stable criteria or when no workflow is running, and leaves no process, file or lane it started; the permanent cleanup duties stay with the Kernel, the Supervisor and the runtime"
|
|
352
|
+
never:
|
|
353
|
+
- "excuses a role's wrong, or counts a hand-unblock as the remedy"
|
|
354
|
+
- "edits a store or ledger by hand"
|
|
355
|
+
- "resolves a gate as someone else"
|
|
356
|
+
- "enters a credential"
|
|
357
|
+
- "types into a seat's terminal"
|
|
358
|
+
- "addresses an Op or a Critic"
|
|
359
|
+
escalatesTo: owner
|
|
360
|
+
oversees: [op, critic, kernel, supervisor, runtime]
|
|
361
|
+
endCondition:
|
|
362
|
+
about: "The goal: every workflow operates completely inside Orca with no bug, so no Debug is needed to change .claude. Debug is set up no more once the system is stable: every criterion holds, and the digest prints the current standing against each."
|
|
363
|
+
criteria:
|
|
364
|
+
- {id: clean-workflows, min: 5, rule: "consecutive workflows ran start to handover with zero departures from the operating standard and zero human interventions"}
|
|
365
|
+
- {id: no-open-edge-case, min: 0, rule: "no entry of the edge-case registry is open"}
|
|
366
|
+
- {id: survived-restart, min: 1, rule: "one of those workflows ran across a host restart and resumed without lost or repeated work"}
|
|
367
|
+
noSeat: true
|
|
368
|
+
noSeatReason: "Debug is a loop of the owner's own chat session: it has no seat and no bound terminal, so the guard resolves its caller to the owner; its limits are the never list, the channels it speaks through and the loosening-state check on what it changes"
|
|
369
|
+
noBudget: "Debug is the owner's chat loop: its turns are the owner's session and no ledger row records them; it is bounded by its time box and its end condition, not by tokens"
|
|
370
|
+
happyErrors:
|
|
371
|
+
- {id: owner-matter, row: owner-gate, what: "a matter that is the owner's (credentials, spend, a release): Debug reports it to the owner and does not decide it"}
|
|
372
|
+
- {id: owner-question, row: ask-owner, what: "a question only the owner can answer: Debug names it in its result and waits"}
|
|
373
|
+
bugSurface:
|
|
374
|
+
- {bug: "a departure of a role stands with no edge-case entry", signal: "a departure printed with remedy none in starci debug digest", detectedBy: scripts/reconciler/debug-digest-analyze.mjs}
|
|
375
|
+
- {bug: "Debug loosens a gate or check to let a workflow pass", signal: "RT_LOOSENING_STATE over the tree as it stands", detectedBy: scripts/checks/check-loosening-state.mjs}
|
|
376
|
+
- {bug: "Debug changes the runtime without recording the case", signal: "RT_EDGE_CASE_REGISTRY: a covered entry without its rule", detectedBy: scripts/checks/check-edge-case-registry.mjs}
|
|
377
|
+
- {bug: "the loop runs on after its end condition holds, or its standing is not printed", signal: "the standing against each end-condition criterion in the digest", detectedBy: scripts/reconciler/debug-questions.mjs}
|
|
378
|
+
revisionAck:
|
|
379
|
+
noAck: "Debug is the owner's chat session and reads the tree itself each time it acts; it has no seat the runtime could wake or replace"
|
|
380
|
+
binds: [P1, P5, P6, P7]
|
|
381
|
+
contradicts:
|
|
382
|
+
- {pattern: 'change nothing and fix nothing', why: "Debug fixes .claude so a role cannot repeat a departure"}
|
|
383
|
+
- {pattern: 'Kernel terminal', why: "Debug speaks through runtime channels, never a seat's terminal"}
|
|
384
|
+
- {pattern: 'job is a clean host', why: "Debug audits whether each role did its job; it is not the permanent cleaner"}
|
|
385
|
+
surfaces:
|
|
386
|
+
- {file: skills/starci/references/debug-loop.md, mode: block}
|
|
387
|
+
- {file: docs/debugging.md, mode: block}
|
|
388
|
+
|
|
389
|
+
- id: owner
|
|
390
|
+
label: Owner
|
|
391
|
+
scope: "Product intent, credentials and logins, spend, irreversible choices, and naming a release milestone."
|
|
392
|
+
does:
|
|
393
|
+
- "Decides what only a person can: intent, credentials, spend, the irreversible, a release."
|
|
394
|
+
owns: "the goal and every owner-class decision"
|
|
395
|
+
decidesAlone: "everything in scope"
|
|
396
|
+
reportsUpWhen: "never"
|
|
397
|
+
reportsTo: null
|
|
398
|
+
overseenBy: []
|
|
399
|
+
measure: "asked only what no record answers"
|
|
400
|
+
cleanup: []
|
|
401
|
+
never: []
|
|
402
|
+
escalatesTo: null
|
|
403
|
+
binds: [P4]
|
|
404
|
+
contradicts: []
|
|
405
|
+
surfaces: []
|
|
@@ -192,7 +192,9 @@ costPolicy: |-
|
|
|
192
192
|
imagegen call tier (tiers.yaml calls, tierUse) and holds one provider slot while it runs. Every automatic launch contains only worker-start candidates and advances only
|
|
193
193
|
after a verified no-effect failure. Agents have explicit turn, wall-time and tool-call ceilings; a ceiling stop is a
|
|
194
194
|
failed attempt and never proof of completion. Never infer price or quality superiority from a subscription label;
|
|
195
|
-
|
|
195
|
+
a tier change is proposed only on live ledger evidence: `starci machine op-metrics --by op` (success rate, retry
|
|
196
|
+
chains and repeated failures per op) and the ledger view `v_model_scorecard` (pass rate and tokens per op, agent
|
|
197
|
+
and model). A native worker is released
|
|
196
198
|
after its exact worker_done result is accepted; the workflow child remains until integration is complete.
|
|
197
199
|
assetFallback: When image generation is unavailable, reuse verified assets first; Claude may leave
|
|
198
200
|
decorative image slots blank with a concrete deferred brief. Never mark missing artwork generated
|
|
@@ -442,6 +442,7 @@ allocation:
|
|
|
442
442
|
interface.audit: {mb: 3000, class: heavy}
|
|
443
443
|
brand.decide: {mb: 3000, class: heavy}
|
|
444
444
|
code.refactor: {mb: 2000, class: heavy}
|
|
445
|
+
code.fix: {mb: 2000, class: heavy}
|
|
445
446
|
test.author: {mb: 2500, class: heavy}
|
|
446
447
|
task.execute: {mb: 2000, class: heavy}
|
|
447
448
|
backend.scaffold: {mb: 2000, class: heavy}
|
|
@@ -513,6 +514,7 @@ roleOfKind:
|
|
|
513
514
|
package.scaffold: {role: implement, work: hands-on, floor: easy}
|
|
514
515
|
scope.define: {role: decide, work: think, floor: hard}
|
|
515
516
|
code.refactor: {role: implement, work: hands-on, floor: easy}
|
|
517
|
+
code.fix: {role: implement, work: hands-on, floor: medium}
|
|
516
518
|
test.author: {role: implement, work: hands-on, floor: easy}
|
|
517
519
|
grammar.update: {role: implement, work: hands-on, floor: hard}
|
|
518
520
|
architecture.revise: {role: decide, work: think, floor: hard}
|
|
@@ -84,14 +84,16 @@ properties:
|
|
|
84
84
|
schedule: {type: string, minLength: 1}
|
|
85
85
|
command: {type: string, minLength: 1}
|
|
86
86
|
backing:
|
|
87
|
-
description:
|
|
87
|
+
description: >-
|
|
88
|
+
Supabase backing: local Docker containers managed by the Supabase CLI in development and a hosted
|
|
89
|
+
service in production. Every other dependency is a Docker component, on Swarm in production.
|
|
88
90
|
type: object
|
|
89
91
|
additionalProperties:
|
|
90
92
|
type: object
|
|
91
93
|
additionalProperties: false
|
|
92
94
|
required: [provider, managed]
|
|
93
95
|
properties:
|
|
94
|
-
provider: {
|
|
96
|
+
provider: {const: supabase}
|
|
95
97
|
managed: {const: true}
|
|
96
98
|
environments:
|
|
97
99
|
type: object
|
|
@@ -599,6 +601,11 @@ $defs:
|
|
|
599
601
|
verify: {$ref: '#/$defs/deployVerify'}
|
|
600
602
|
jobs: {$ref: '#/$defs/deployJobs'}
|
|
601
603
|
tasks: {$ref: '#/$defs/deployTasks'}
|
|
604
|
+
postDeploy:
|
|
605
|
+
description: 'The release tasks (names declared under tasks) a deploy runs inside the running task of their service after convergence and before verification, in order; each command is an idempotent write, verification stays read-only.'
|
|
606
|
+
type: array
|
|
607
|
+
uniqueItems: true
|
|
608
|
+
items: {type: string, pattern: '^[a-z][a-z0-9-]{0,40}$'}
|
|
602
609
|
backup: {$ref: '#/$defs/deployBackup'}
|
|
603
610
|
registry: {$ref: '#/$defs/deployRegistry'}
|
|
604
611
|
ingress:
|
|
@@ -799,6 +806,7 @@ $defs:
|
|
|
799
806
|
properties:
|
|
800
807
|
service: {$ref: '#/$defs/deployName'}
|
|
801
808
|
command: {$ref: '#/$defs/deployCommand'}
|
|
809
|
+
timeoutSeconds: {type: integer, minimum: 1, maximum: 3600, description: 'Seconds a post-deploy run of the task may take before the deploy fails and rolls back (default 600).'}
|
|
802
810
|
deployBackup:
|
|
803
811
|
type: object
|
|
804
812
|
additionalProperties: false
|