project-tiny-context-harness 0.2.84 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -428
- package/assets/README.md +283 -455
- package/assets/README.zh-CN.md +199 -123
- package/assets/agents/AGENTS_CORE.md +54 -67
- package/assets/context_templates/context.toml +3 -0
- package/assets/context_templates/global.md +6 -6
- package/assets/github/harness.yml +2 -2
- package/assets/skills/context_development_engineer/SKILL.md +91 -107
- package/assets/skills/context_product_plan/SKILL.md +18 -28
- package/assets/skills/context_surface_contract/SKILL.md +35 -38
- package/assets/skills/context_uiux_design/SKILL.md +31 -30
- package/assets/skills/long-task-workflow/SKILL.md +76 -0
- package/assets/skills/long-task-workflow/agents/openai.yaml +4 -0
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +41 -0
- package/assets/skills/long-task-workflow/references/contract-authoring.md +62 -0
- package/assets/skills/long-task-workflow/references/evidence-design.md +45 -0
- package/assets/skills/normal-long-task/SKILL.md +12 -489
- package/assets/skills/source-plan-authoring/SKILL.md +379 -0
- package/assets/tools/validate_context.py +293 -127
- package/dist/cli.js +3 -1
- package/dist/commands/check-modularity.js +33 -10
- package/dist/commands/composite-campaign.d.ts +1 -0
- package/dist/commands/composite-campaign.js +8 -0
- package/dist/commands/composite-long-task.d.ts +1 -6
- package/dist/commands/composite-long-task.js +7 -157
- package/dist/commands/delivery-set.d.ts +1 -0
- package/dist/commands/delivery-set.js +8 -0
- package/dist/commands/disable.d.ts +1 -0
- package/dist/commands/disable.js +15 -0
- package/dist/commands/enable.d.ts +1 -0
- package/dist/commands/enable.js +14 -0
- package/dist/commands/export-context-args.js +13 -4
- package/dist/commands/export-context.js +18 -7
- package/dist/commands/index.js +42 -30
- package/dist/commands/init.js +12 -6
- package/dist/commands/long-task-authoring.d.ts +3 -0
- package/dist/commands/long-task-authoring.js +92 -0
- package/dist/commands/long-task-explain.d.ts +1 -0
- package/dist/commands/long-task-explain.js +52 -0
- package/dist/commands/long-task.d.ts +1 -0
- package/dist/commands/long-task.js +226 -0
- package/dist/commands/package-source.js +2 -2
- package/dist/commands/upgrade.js +10 -10
- package/dist/index.d.ts +11 -1
- package/dist/index.js +8 -0
- package/dist/lib/config.js +34 -8
- package/dist/lib/context-default-footprint.d.ts +16 -0
- package/dist/lib/context-default-footprint.js +107 -0
- package/dist/lib/context-export.js +105 -41
- package/dist/lib/context-graph-snapshot.d.ts +18 -0
- package/dist/lib/context-graph-snapshot.js +171 -0
- package/dist/lib/context-manifest-schema.d.ts +28 -0
- package/dist/lib/context-manifest-schema.js +150 -0
- package/dist/lib/context-manifest.js +28 -20
- package/dist/lib/context-templates.js +5 -5
- package/dist/lib/design-md.js +1 -1
- package/dist/lib/doctor.js +54 -1
- package/dist/lib/harness-root.js +25 -8
- package/dist/lib/init.js +6 -3
- package/dist/lib/legacy-managed-scan.js +23 -7
- package/dist/lib/legacy-sdlc-migration.js +21 -11
- package/dist/lib/long-task-acceptance-reference.d.ts +22 -0
- package/dist/lib/long-task-acceptance-reference.js +46 -0
- package/dist/lib/long-task-acceptance-shape.d.ts +5 -0
- package/dist/lib/long-task-acceptance-shape.js +131 -0
- package/dist/lib/long-task-activation-validation.d.ts +21 -0
- package/dist/lib/long-task-activation-validation.js +136 -0
- package/dist/lib/long-task-artifacts.d.ts +5 -0
- package/dist/lib/long-task-artifacts.js +34 -0
- package/dist/lib/long-task-assertions-v2.d.ts +22 -0
- package/dist/lib/long-task-assertions-v2.js +212 -0
- package/dist/lib/long-task-authoring-authority-preview.d.ts +5 -0
- package/dist/lib/long-task-authoring-authority-preview.js +85 -0
- package/dist/lib/long-task-authoring-preflight-diagnostics.d.ts +8 -0
- package/dist/lib/long-task-authoring-preflight-diagnostics.js +179 -0
- package/dist/lib/long-task-authoring-preflight-repair-order.d.ts +8 -0
- package/dist/lib/long-task-authoring-preflight-repair-order.js +95 -0
- package/dist/lib/long-task-authoring-preflight-types.d.ts +46 -0
- package/dist/lib/long-task-authoring-preflight-types.js +38 -0
- package/dist/lib/long-task-authoring-preflight.d.ts +3 -0
- package/dist/lib/long-task-authoring-preflight.js +44 -0
- package/dist/lib/long-task-authority-material-diff.d.ts +17 -0
- package/dist/lib/long-task-authority-material-diff.js +152 -0
- package/dist/lib/long-task-authority-materials.d.ts +7 -0
- package/dist/lib/long-task-authority-materials.js +83 -0
- package/dist/lib/long-task-authority-policy.d.ts +168 -0
- package/dist/lib/long-task-authority-policy.js +181 -0
- package/dist/lib/long-task-authority-revision-details.d.ts +19 -0
- package/dist/lib/long-task-authority-revision-details.js +192 -0
- package/dist/lib/long-task-authority-revision-enforcement.d.ts +3 -0
- package/dist/lib/long-task-authority-revision-enforcement.js +41 -0
- package/dist/lib/long-task-authority-revision-types.d.ts +50 -0
- package/dist/lib/long-task-authority-revision-types.js +1 -0
- package/dist/lib/long-task-authority-revision.d.ts +4 -0
- package/dist/lib/long-task-authority-revision.js +188 -0
- package/dist/lib/long-task-authority-transition-policy.d.ts +62 -0
- package/dist/lib/long-task-authority-transition-policy.js +62 -0
- package/dist/lib/long-task-authority-types.d.ts +96 -0
- package/dist/lib/long-task-authority-types.js +1 -0
- package/dist/lib/long-task-authority.d.ts +7 -0
- package/dist/lib/long-task-authority.js +142 -0
- package/dist/lib/long-task-boundary-check.d.ts +15 -0
- package/dist/lib/long-task-boundary-check.js +9 -0
- package/dist/lib/long-task-check-evidence-decoder.d.ts +3 -0
- package/dist/lib/long-task-check-evidence-decoder.js +74 -0
- package/dist/lib/long-task-check-execution-policy.d.ts +18 -0
- package/dist/lib/long-task-check-execution-policy.js +36 -0
- package/dist/lib/long-task-check-runner.d.ts +2 -0
- package/dist/lib/long-task-check-runner.js +181 -0
- package/dist/lib/long-task-check-shape.d.ts +2 -0
- package/dist/lib/long-task-check-shape.js +136 -0
- package/dist/lib/long-task-claim-definitions.d.ts +7 -0
- package/dist/lib/long-task-claim-definitions.js +78 -0
- package/dist/lib/long-task-claim-proof-policy.d.ts +4 -0
- package/dist/lib/long-task-claim-proof-policy.js +57 -0
- package/dist/lib/long-task-claims.d.ts +10 -0
- package/dist/lib/long-task-claims.js +187 -0
- package/dist/lib/long-task-context-authority-topology.d.ts +7 -0
- package/dist/lib/long-task-context-authority-topology.js +37 -0
- package/dist/lib/long-task-context-authority.d.ts +14 -0
- package/dist/lib/long-task-context-authority.js +66 -0
- package/dist/lib/long-task-contract-types.d.ts +203 -0
- package/dist/lib/long-task-contract-types.js +1 -0
- package/dist/lib/long-task-counterfactual-claim-policy.d.ts +10 -0
- package/dist/lib/long-task-counterfactual-claim-policy.js +57 -0
- package/dist/lib/long-task-counterfactual-sandbox.d.ts +6 -0
- package/dist/lib/long-task-counterfactual-sandbox.js +87 -0
- package/dist/lib/long-task-counterfactual-types.d.ts +24 -0
- package/dist/lib/long-task-counterfactual-types.js +1 -0
- package/dist/lib/long-task-delivery-compiler.d.ts +10 -0
- package/dist/lib/long-task-delivery-compiler.js +129 -0
- package/dist/lib/long-task-delivery-parser.d.ts +13 -0
- package/dist/lib/long-task-delivery-parser.js +90 -0
- package/dist/lib/long-task-delivery-preflight.d.ts +5 -0
- package/dist/lib/long-task-delivery-preflight.js +151 -0
- package/dist/lib/long-task-delivery-shape.d.ts +5 -0
- package/dist/lib/long-task-delivery-shape.js +5 -0
- package/dist/lib/long-task-delivery-types.d.ts +8 -0
- package/dist/lib/long-task-delivery-types.js +8 -0
- package/dist/lib/long-task-delivery-validation.d.ts +3 -0
- package/dist/lib/long-task-delivery-validation.js +175 -0
- package/dist/lib/long-task-evidence-adapter-policy.d.ts +4 -0
- package/dist/lib/long-task-evidence-adapter-policy.js +15 -0
- package/dist/lib/long-task-evidence-adapter-types.d.ts +1 -0
- package/dist/lib/long-task-evidence-adapter-types.js +1 -0
- package/dist/lib/long-task-evidence-findings.d.ts +5 -0
- package/dist/lib/long-task-evidence-findings.js +113 -0
- package/dist/lib/long-task-evidence-sensitivity-policy.d.ts +4 -0
- package/dist/lib/long-task-evidence-sensitivity-policy.js +98 -0
- package/dist/lib/long-task-evidence-v2.d.ts +5 -0
- package/dist/lib/long-task-evidence-v2.js +226 -0
- package/dist/lib/long-task-explain-acceptance-link.d.ts +46 -0
- package/dist/lib/long-task-explain-acceptance-link.js +96 -0
- package/dist/lib/long-task-explain-claim-links.d.ts +45 -0
- package/dist/lib/long-task-explain-claim-links.js +88 -0
- package/dist/lib/long-task-explain-source-links.d.ts +93 -0
- package/dist/lib/long-task-explain-source-links.js +51 -0
- package/dist/lib/long-task-final-v2.d.ts +2 -0
- package/dist/lib/long-task-final-v2.js +124 -0
- package/dist/lib/long-task-finding-context.d.ts +3 -0
- package/dist/lib/long-task-finding-context.js +63 -0
- package/dist/lib/long-task-freshness.d.ts +3 -0
- package/dist/lib/long-task-freshness.js +80 -0
- package/dist/lib/long-task-hook-install.d.ts +9 -0
- package/dist/lib/long-task-hook-install.js +184 -0
- package/dist/lib/long-task-hook-preflight.d.ts +7 -0
- package/dist/lib/long-task-hook-preflight.js +58 -0
- package/dist/lib/long-task-observation-ownership.d.ts +2 -0
- package/dist/lib/long-task-observation-ownership.js +22 -0
- package/dist/lib/long-task-outcome-parser.d.ts +4 -0
- package/dist/lib/long-task-outcome-parser.js +100 -0
- package/dist/lib/long-task-paths.d.ts +49 -0
- package/dist/lib/long-task-paths.js +418 -0
- package/dist/lib/long-task-playwright-counterfactual-policy.d.ts +7 -0
- package/dist/lib/long-task-playwright-counterfactual-policy.js +125 -0
- package/dist/lib/long-task-playwright-evidence.d.ts +6 -0
- package/dist/lib/long-task-playwright-evidence.js +244 -0
- package/dist/lib/long-task-product-shape.d.ts +6 -0
- package/dist/lib/long-task-product-shape.js +73 -0
- package/dist/lib/long-task-progress.d.ts +4 -0
- package/dist/lib/long-task-progress.js +114 -0
- package/dist/lib/long-task-protected-files.d.ts +1 -0
- package/dist/lib/long-task-protected-files.js +30 -0
- package/dist/lib/long-task-required-proof-surfaces.d.ts +2 -0
- package/dist/lib/long-task-required-proof-surfaces.js +13 -0
- package/dist/lib/long-task-requirement-shape.d.ts +2 -0
- package/dist/lib/long-task-requirement-shape.js +18 -0
- package/dist/lib/long-task-risk-surfaces.d.ts +2 -0
- package/dist/lib/long-task-risk-surfaces.js +60 -0
- package/dist/lib/long-task-risk-types.d.ts +5 -0
- package/dist/lib/long-task-risk-types.js +12 -0
- package/dist/lib/long-task-risk.d.ts +9 -0
- package/dist/lib/long-task-risk.js +132 -0
- package/dist/lib/long-task-root-shape.d.ts +4 -0
- package/dist/lib/long-task-root-shape.js +86 -0
- package/dist/lib/long-task-runner-environment.d.ts +7 -0
- package/dist/lib/long-task-runner-environment.js +57 -0
- package/dist/lib/long-task-runner-files.d.ts +3 -0
- package/dist/lib/long-task-runner-files.js +39 -0
- package/dist/lib/long-task-runner-freeze.d.ts +2 -0
- package/dist/lib/long-task-runner-freeze.js +168 -0
- package/dist/lib/long-task-runtime-types.d.ts +214 -0
- package/dist/lib/long-task-runtime-types.js +1 -0
- package/dist/lib/long-task-shape-primitives.d.ts +17 -0
- package/dist/lib/long-task-shape-primitives.js +81 -0
- package/dist/lib/long-task-source-authority-types.d.ts +13 -0
- package/dist/lib/long-task-source-authority-types.js +1 -0
- package/dist/lib/long-task-source-claim-validation.d.ts +5 -0
- package/dist/lib/long-task-source-claim-validation.js +96 -0
- package/dist/lib/long-task-source-continuity.d.ts +4 -0
- package/dist/lib/long-task-source-continuity.js +57 -0
- package/dist/lib/long-task-source-inventory.d.ts +2 -0
- package/dist/lib/long-task-source-inventory.js +21 -0
- package/dist/lib/long-task-source-item-parser.d.ts +3 -0
- package/dist/lib/long-task-source-item-parser.js +112 -0
- package/dist/lib/long-task-source-shape.d.ts +2 -0
- package/dist/lib/long-task-source-shape.js +56 -0
- package/dist/lib/long-task-source-target-continuity.d.ts +4 -0
- package/dist/lib/long-task-source-target-continuity.js +80 -0
- package/dist/lib/long-task-source-target-index.d.ts +12 -0
- package/dist/lib/long-task-source-target-index.js +76 -0
- package/dist/lib/long-task-source-validation.d.ts +3 -0
- package/dist/lib/long-task-source-validation.js +46 -0
- package/dist/lib/long-task-state.d.ts +91 -0
- package/dist/lib/long-task-state.js +611 -0
- package/dist/lib/long-task-status-projection.d.ts +21 -0
- package/dist/lib/long-task-status-projection.js +116 -0
- package/dist/lib/long-task-status-v2.d.ts +37 -0
- package/dist/lib/long-task-status-v2.js +306 -0
- package/dist/lib/long-task-technical-shape.d.ts +3 -0
- package/dist/lib/long-task-technical-shape.js +44 -0
- package/dist/lib/long-task-verifier-authority.d.ts +12 -0
- package/dist/lib/long-task-verifier-authority.js +47 -0
- package/dist/lib/long-task-verifier-identity.d.ts +2 -0
- package/dist/lib/long-task-verifier-identity.js +55 -0
- package/dist/lib/long-task-verifier-v2.d.ts +13 -0
- package/dist/lib/long-task-verifier-v2.js +266 -0
- package/dist/lib/long-task-workspace-runtime-types.d.ts +23 -0
- package/dist/lib/long-task-workspace-runtime-types.js +1 -0
- package/dist/lib/long-task-workspace.d.ts +25 -0
- package/dist/lib/long-task-workspace.js +366 -0
- package/dist/lib/managed-file.js +20 -5
- package/dist/lib/migrations.js +156 -32
- package/dist/lib/modularity.d.ts +27 -1
- package/dist/lib/modularity.js +499 -23
- package/dist/lib/package-json-config.js +14 -5
- package/dist/lib/package-source.js +15 -3
- package/dist/lib/profiles.d.ts +13 -0
- package/dist/lib/profiles.js +66 -0
- package/dist/lib/schema-guard.js +4 -2
- package/dist/lib/source-files.js +14 -7
- package/dist/lib/source-pack-classify.js +91 -19
- package/dist/lib/source-pack-config.js +25 -8
- package/dist/lib/source-pack-export.js +84 -25
- package/dist/lib/source-pack-manifest.js +18 -6
- package/dist/lib/source-pack-records.js +35 -11
- package/dist/lib/source-pack-render.js +47 -18
- package/dist/lib/stable-json.d.ts +2 -0
- package/dist/lib/stable-json.js +21 -0
- package/dist/lib/strict-codec.d.ts +4 -0
- package/dist/lib/strict-codec.js +65 -0
- package/dist/lib/sync-engine.js +76 -24
- package/dist/lib/types.d.ts +8 -1
- package/dist/lib/upgrade.js +4 -3
- package/dist/lib/validators.js +218 -191
- package/dist/long-task-hook.d.ts +2 -0
- package/dist/long-task-hook.js +55 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +340 -0
- package/dist/schemas/long-task-delivery-v2/long-task-outcomes-v2.schema.json +18 -0
- package/migrations/README.md +8 -3
- package/package.json +17 -6
- package/source-mappings.yaml +0 -3
- package/assets/protected-harness-baseline.json +0 -20
- package/assets/skills/composite-long-task-workflow/SKILL.md +0 -244
- package/assets/skills/composite-long-task-workflow/assets/execution-binding.template.md +0 -57
- package/assets/skills/composite-long-task-workflow/assets/goal-objective.template.md +0 -17
- package/assets/skills/composite-long-task-workflow/references/composite-long-task-workflow-protocol.md +0 -675
- package/dist/commands/superpowers.d.ts +0 -1
- package/dist/commands/superpowers.js +0 -8
- package/dist/lib/composite-long-task-renderer.d.ts +0 -12
- package/dist/lib/composite-long-task-renderer.js +0 -109
- package/dist/lib/plan-acceptance-artifacts.d.ts +0 -1
- package/dist/lib/plan-acceptance-artifacts.js +0 -220
- package/dist/lib/plan-acceptance-evidence.d.ts +0 -2
- package/dist/lib/plan-acceptance-evidence.js +0 -108
- package/dist/lib/plan-acceptance-json.d.ts +0 -15
- package/dist/lib/plan-acceptance-json.js +0 -133
- package/dist/lib/plan-acceptance-validator.d.ts +0 -2
- package/dist/lib/plan-acceptance-validator.js +0 -209
- package/dist/lib/plan-contract-validator.d.ts +0 -2
- package/dist/lib/plan-contract-validator.js +0 -127
- package/dist/lib/plan-validator-common.d.ts +0 -24
- package/dist/lib/plan-validator-common.js +0 -196
- package/dist/lib/superpowers-task-ac010.d.ts +0 -6
- package/dist/lib/superpowers-task-ac010.js +0 -26
- package/dist/lib/superpowers-task-assertion-normalizers.d.ts +0 -3
- package/dist/lib/superpowers-task-assertion-normalizers.js +0 -74
- package/dist/lib/superpowers-task-assertions.d.ts +0 -20
- package/dist/lib/superpowers-task-assertions.js +0 -257
- package/dist/lib/superpowers-task-attempt.d.ts +0 -4
- package/dist/lib/superpowers-task-attempt.js +0 -102
- package/dist/lib/superpowers-task-command-run-correlation.d.ts +0 -8
- package/dist/lib/superpowers-task-command-run-correlation.js +0 -103
- package/dist/lib/superpowers-task-command-specs.d.ts +0 -3
- package/dist/lib/superpowers-task-command-specs.js +0 -52
- package/dist/lib/superpowers-task-compile-diagnostics.d.ts +0 -5
- package/dist/lib/superpowers-task-compile-diagnostics.js +0 -20
- package/dist/lib/superpowers-task-compile-guards.d.ts +0 -2
- package/dist/lib/superpowers-task-compile-guards.js +0 -66
- package/dist/lib/superpowers-task-compile.d.ts +0 -6
- package/dist/lib/superpowers-task-compile.js +0 -133
- package/dist/lib/superpowers-task-completion-output.d.ts +0 -52
- package/dist/lib/superpowers-task-completion-output.js +0 -228
- package/dist/lib/superpowers-task-conformance.d.ts +0 -2
- package/dist/lib/superpowers-task-conformance.js +0 -24
- package/dist/lib/superpowers-task-contradictions.d.ts +0 -6
- package/dist/lib/superpowers-task-contradictions.js +0 -126
- package/dist/lib/superpowers-task-current-evidence.d.ts +0 -3
- package/dist/lib/superpowers-task-current-evidence.js +0 -176
- package/dist/lib/superpowers-task-delivery.d.ts +0 -4
- package/dist/lib/superpowers-task-delivery.js +0 -96
- package/dist/lib/superpowers-task-derive.d.ts +0 -14
- package/dist/lib/superpowers-task-derive.js +0 -382
- package/dist/lib/superpowers-task-events.d.ts +0 -1
- package/dist/lib/superpowers-task-events.js +0 -13
- package/dist/lib/superpowers-task-evidence-kernel.d.ts +0 -19
- package/dist/lib/superpowers-task-evidence-kernel.js +0 -347
- package/dist/lib/superpowers-task-evidence-records.d.ts +0 -2
- package/dist/lib/superpowers-task-evidence-records.js +0 -55
- package/dist/lib/superpowers-task-evidence.d.ts +0 -10
- package/dist/lib/superpowers-task-evidence.js +0 -147
- package/dist/lib/superpowers-task-fields.d.ts +0 -22
- package/dist/lib/superpowers-task-fields.js +0 -276
- package/dist/lib/superpowers-task-final-card.d.ts +0 -3
- package/dist/lib/superpowers-task-final-card.js +0 -24
- package/dist/lib/superpowers-task-gates.d.ts +0 -12
- package/dist/lib/superpowers-task-gates.js +0 -155
- package/dist/lib/superpowers-task-harness-drift.d.ts +0 -11
- package/dist/lib/superpowers-task-harness-drift.js +0 -90
- package/dist/lib/superpowers-task-next-slices.d.ts +0 -1
- package/dist/lib/superpowers-task-next-slices.js +0 -12
- package/dist/lib/superpowers-task-protected-baseline.d.ts +0 -10
- package/dist/lib/superpowers-task-protected-baseline.js +0 -66
- package/dist/lib/superpowers-task-source-compile.d.ts +0 -5
- package/dist/lib/superpowers-task-source-compile.js +0 -226
- package/dist/lib/superpowers-task-source-parser.d.ts +0 -23
- package/dist/lib/superpowers-task-source-parser.js +0 -218
- package/dist/lib/superpowers-task-state-schema.d.ts +0 -440
- package/dist/lib/superpowers-task-state-schema.js +0 -66
- package/dist/lib/superpowers-task-state-shape.d.ts +0 -3
- package/dist/lib/superpowers-task-state-shape.js +0 -50
- package/dist/lib/superpowers-task-state.d.ts +0 -16
- package/dist/lib/superpowers-task-state.js +0 -246
- package/dist/lib/superpowers-task-status.d.ts +0 -2
- package/dist/lib/superpowers-task-status.js +0 -24
- package/dist/lib/superpowers-task-under-specified.d.ts +0 -7
- package/dist/lib/superpowers-task-under-specified.js +0 -61
- package/dist/lib/superpowers-task-unregistered-evidence.d.ts +0 -11
- package/dist/lib/superpowers-task-unregistered-evidence.js +0 -72
- package/dist/lib/superpowers-task-validator.d.ts +0 -5
- package/dist/lib/superpowers-task-validator.js +0 -290
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
export declare const SUPERPOWERS_TASK_STATE_SCHEMA_VERSION = "superpowers-task-state-v1";
|
|
2
|
-
export declare const SUPERPOWERS_TASK_STATE_JSON_SCHEMA: {
|
|
3
|
-
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
4
|
-
readonly $id: "https://project-tiny-context-harness.local/superpowers-task-state.schema.json";
|
|
5
|
-
readonly title: "Superpowers Long-Task State";
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly required: readonly ["meta", "sources", "context", "delivery", "graph", "attempts", "current_attempt_id", "required_command_specs", "command_runs", "negative_evidence_records", "slices", "evidence", "gates", "progress", "blockers", "final"];
|
|
8
|
-
readonly properties: {
|
|
9
|
-
readonly meta: {
|
|
10
|
-
readonly type: "object";
|
|
11
|
-
readonly required: readonly ["task_id", "plan_slug", "created_at", "updated_at", "schema_version", "product_goal_complete", "acceptance_target_status"];
|
|
12
|
-
readonly properties: {
|
|
13
|
-
readonly schema_version: {
|
|
14
|
-
readonly const: "superpowers-task-state-v1";
|
|
15
|
-
};
|
|
16
|
-
readonly product_goal_complete: {
|
|
17
|
-
readonly type: "boolean";
|
|
18
|
-
};
|
|
19
|
-
readonly acceptance_target_status: {
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
readonly sources: {
|
|
25
|
-
readonly type: "object";
|
|
26
|
-
};
|
|
27
|
-
readonly context: {
|
|
28
|
-
readonly type: "object";
|
|
29
|
-
};
|
|
30
|
-
readonly delivery: {
|
|
31
|
-
readonly type: "object";
|
|
32
|
-
};
|
|
33
|
-
readonly graph: {
|
|
34
|
-
readonly type: "object";
|
|
35
|
-
};
|
|
36
|
-
readonly attempts: {
|
|
37
|
-
readonly type: "array";
|
|
38
|
-
};
|
|
39
|
-
readonly current_attempt_id: {
|
|
40
|
-
readonly type: "string";
|
|
41
|
-
};
|
|
42
|
-
readonly required_command_specs: {
|
|
43
|
-
readonly type: "array";
|
|
44
|
-
};
|
|
45
|
-
readonly command_runs: {
|
|
46
|
-
readonly type: "array";
|
|
47
|
-
};
|
|
48
|
-
readonly negative_evidence_records: {
|
|
49
|
-
readonly type: "array";
|
|
50
|
-
};
|
|
51
|
-
readonly slices: {
|
|
52
|
-
readonly type: "array";
|
|
53
|
-
};
|
|
54
|
-
readonly evidence: {
|
|
55
|
-
readonly type: "array";
|
|
56
|
-
};
|
|
57
|
-
readonly gates: {
|
|
58
|
-
readonly type: "object";
|
|
59
|
-
};
|
|
60
|
-
readonly progress: {
|
|
61
|
-
readonly type: "object";
|
|
62
|
-
};
|
|
63
|
-
readonly blockers: {
|
|
64
|
-
readonly type: "array";
|
|
65
|
-
};
|
|
66
|
-
readonly final: {
|
|
67
|
-
readonly type: "object";
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export type SuperpowersProofLayerStatus = "missing" | "satisfied" | "invalidated" | "blocked";
|
|
72
|
-
export type SuperpowersPlanItemStatus = "not_started" | "in_progress" | "complete" | "partial" | "blocked" | "invalidated" | "out_of_scope_NA";
|
|
73
|
-
export type SuperpowersAcceptanceStatus = "not_run" | "complete" | "partial" | "blocked" | "invalidated" | "under_specified" | "out_of_scope_NA";
|
|
74
|
-
export type SuperpowersAttemptMode = "product_task" | "harness_task";
|
|
75
|
-
export type SuperpowersProductDeliveryScope = "system_capability_build" | "representative_sample_validation" | "full_population_operation" | "mixed_scope_requires_boundary";
|
|
76
|
-
export type SuperpowersPlanDeliveryScope = "system_capability_build" | "representative_sample_validation" | "full_population_operation" | "out_of_scope_backlog";
|
|
77
|
-
export type SuperpowersAcceptanceScope = "system_capability_build" | "representative_sample_validation" | "full_population_operation" | "full_population_not_required";
|
|
78
|
-
export type SuperpowersScopeFitDecision = "fit_for_three_inputs" | "selected_from_split" | "blocked_for_decision" | "";
|
|
79
|
-
export type CompletionOutputStatus = "accept" | "reject" | "blocked";
|
|
80
|
-
export interface SuperpowersTaskState {
|
|
81
|
-
meta: {
|
|
82
|
-
task_id: string;
|
|
83
|
-
plan_slug: string;
|
|
84
|
-
created_at: string;
|
|
85
|
-
updated_at: string;
|
|
86
|
-
schema_version: typeof SUPERPOWERS_TASK_STATE_SCHEMA_VERSION;
|
|
87
|
-
goal_type: string;
|
|
88
|
-
product_goal_complete: boolean;
|
|
89
|
-
acceptance_target_status: string;
|
|
90
|
-
audit_task_complete: boolean;
|
|
91
|
-
completion_output_status?: CompletionOutputStatus;
|
|
92
|
-
};
|
|
93
|
-
sources: Record<string, SuperpowersSourceRecord>;
|
|
94
|
-
context: {
|
|
95
|
-
product_context_delta: "none" | "required";
|
|
96
|
-
technical_context_delta: "none" | "required";
|
|
97
|
-
source_to_context_coverage: Record<string, unknown>[];
|
|
98
|
-
context_to_implementation_binding: Record<string, unknown>[];
|
|
99
|
-
};
|
|
100
|
-
delivery: SuperpowersDeliveryState;
|
|
101
|
-
graph: {
|
|
102
|
-
plan_items: Record<string, SuperpowersPlanItem>;
|
|
103
|
-
acceptance_criteria: Record<string, SuperpowersAcceptanceCriterion>;
|
|
104
|
-
proof_layers: Record<string, SuperpowersProofLayer>;
|
|
105
|
-
edges: SuperpowersGraphEdge[];
|
|
106
|
-
};
|
|
107
|
-
attempts: ExecutionAttempt[];
|
|
108
|
-
current_attempt_id: string;
|
|
109
|
-
required_command_specs: RequiredCommandSpec[];
|
|
110
|
-
command_runs: CommandRunRecord[];
|
|
111
|
-
negative_evidence_records: NegativeEvidenceRecord[];
|
|
112
|
-
slices: SuperpowersSliceRecord[];
|
|
113
|
-
evidence: SuperpowersEvidenceRecord[];
|
|
114
|
-
gates: Record<string, unknown>;
|
|
115
|
-
progress: SuperpowersProgressState;
|
|
116
|
-
blockers: unknown[];
|
|
117
|
-
final: {
|
|
118
|
-
product_goal_complete: boolean;
|
|
119
|
-
acceptance_target_status: string;
|
|
120
|
-
audit_task_complete: boolean;
|
|
121
|
-
completion_output_status?: CompletionOutputStatus;
|
|
122
|
-
final_answer_allowed?: boolean;
|
|
123
|
-
required_user_visible_status?: "accepted" | "rejected" | "blocked";
|
|
124
|
-
final_answer?: CompletionOutputStatus;
|
|
125
|
-
exit_code?: 0 | 1 | 2;
|
|
126
|
-
blocked_reasons?: string[];
|
|
127
|
-
rejection_reasons?: string[];
|
|
128
|
-
generated_output_mismatch?: boolean;
|
|
129
|
-
false_completion_phrase_findings?: unknown[];
|
|
130
|
-
completion_basis: string[];
|
|
131
|
-
next_required_actions?: string[];
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
export interface ExecutionAttempt {
|
|
135
|
-
task_attempt_id: string;
|
|
136
|
-
source_bundle_hash: string;
|
|
137
|
-
product_source_hash: string;
|
|
138
|
-
technical_plan_hash: string;
|
|
139
|
-
acceptance_checklist_hash: string;
|
|
140
|
-
git_head: string;
|
|
141
|
-
git_status_short: string;
|
|
142
|
-
tracked_diff_hash: string;
|
|
143
|
-
relevant_untracked_hash: string;
|
|
144
|
-
untracked_relevant_hash?: string;
|
|
145
|
-
worktree_fingerprint: string;
|
|
146
|
-
started_at: string;
|
|
147
|
-
ended_at: string | null;
|
|
148
|
-
finalized_at?: string | null;
|
|
149
|
-
required_command_specs_hash: string;
|
|
150
|
-
mode: SuperpowersAttemptMode;
|
|
151
|
-
changed_files?: string[];
|
|
152
|
-
}
|
|
153
|
-
export interface RequiredCommandSpec {
|
|
154
|
-
command_spec_id: string;
|
|
155
|
-
ac_id: string;
|
|
156
|
-
proof_layers: string[];
|
|
157
|
-
command: string;
|
|
158
|
-
assertion_artifacts: string[];
|
|
159
|
-
required_test_ids: string[];
|
|
160
|
-
machine_blocking: boolean;
|
|
161
|
-
assertion_result_required: boolean;
|
|
162
|
-
positive_assertions: string[];
|
|
163
|
-
negative_assertions: string[];
|
|
164
|
-
invalid_completion_signals: string[];
|
|
165
|
-
final_evidence_expected: string[];
|
|
166
|
-
}
|
|
167
|
-
export interface CommandRunRecord {
|
|
168
|
-
command_run_id: string;
|
|
169
|
-
task_attempt_id: string;
|
|
170
|
-
command_spec_id: string;
|
|
171
|
-
ac_id: string;
|
|
172
|
-
proof_layer: string;
|
|
173
|
-
command_line: string;
|
|
174
|
-
exit_code: number;
|
|
175
|
-
started_at: string;
|
|
176
|
-
completed_at?: string;
|
|
177
|
-
ended_at: string;
|
|
178
|
-
artifact_paths: string[];
|
|
179
|
-
}
|
|
180
|
-
export interface NegativeEvidenceRecord {
|
|
181
|
-
negative_evidence_id: string;
|
|
182
|
-
task_attempt_id: string;
|
|
183
|
-
target_ac_ids: string[];
|
|
184
|
-
target_proof_layers: string[];
|
|
185
|
-
artifact_path: string;
|
|
186
|
-
artifact_sha256?: string;
|
|
187
|
-
status: "passed" | "failed" | "blocked" | "stale";
|
|
188
|
-
}
|
|
189
|
-
export interface SuperpowersSourceRecord {
|
|
190
|
-
path: string;
|
|
191
|
-
sha256: string;
|
|
192
|
-
authority: string;
|
|
193
|
-
}
|
|
194
|
-
export interface SuperpowersDeliveryState {
|
|
195
|
-
product_architecture_scope: SuperpowersProductArchitectureScope;
|
|
196
|
-
scope_conflicts: string[];
|
|
197
|
-
}
|
|
198
|
-
export interface SuperpowersProductArchitectureScope {
|
|
199
|
-
delivery_scope: SuperpowersProductDeliveryScope | "";
|
|
200
|
-
full_population_required: boolean | null;
|
|
201
|
-
representative_samples_validate: string[];
|
|
202
|
-
representative_samples_do_not_validate: string[];
|
|
203
|
-
out_of_scope_backlog: string[];
|
|
204
|
-
scope_fit_decision: SuperpowersScopeFitDecision;
|
|
205
|
-
selected_scope_fit_slice: string;
|
|
206
|
-
owner_boundary: string;
|
|
207
|
-
primary_capability_path: string;
|
|
208
|
-
non_completing_outcomes: string[];
|
|
209
|
-
assertion_policy: string;
|
|
210
|
-
source_authority: string;
|
|
211
|
-
product_goal: string;
|
|
212
|
-
surface_ia_lock?: string;
|
|
213
|
-
decision_lock?: string;
|
|
214
|
-
context_delta?: string;
|
|
215
|
-
source_to_context_coverage?: string;
|
|
216
|
-
acceptance_semantics?: string;
|
|
217
|
-
impact?: string;
|
|
218
|
-
}
|
|
219
|
-
export interface SuperpowersProgressState {
|
|
220
|
-
system_capability_progress: Record<string, unknown>;
|
|
221
|
-
representative_sample_progress: Record<string, unknown>;
|
|
222
|
-
real_object_coverage: Record<string, unknown>;
|
|
223
|
-
full_population_operation_progress: Record<string, unknown>;
|
|
224
|
-
[key: string]: unknown;
|
|
225
|
-
}
|
|
226
|
-
export interface SuperpowersPlanItem {
|
|
227
|
-
requirement: string;
|
|
228
|
-
source_file: string;
|
|
229
|
-
source_start_line: number;
|
|
230
|
-
source_end_line: number;
|
|
231
|
-
delivery_scope: SuperpowersPlanDeliveryScope | "";
|
|
232
|
-
capability_target: string;
|
|
233
|
-
representative_samples: string[];
|
|
234
|
-
full_population_boundary: string;
|
|
235
|
-
non_required_population: string[];
|
|
236
|
-
owner_boundary: string;
|
|
237
|
-
primary_capability_path: string;
|
|
238
|
-
trigger_contract: string;
|
|
239
|
-
state_transition_contract: string;
|
|
240
|
-
observable_result_contract: string;
|
|
241
|
-
assertion_support: string;
|
|
242
|
-
required_assertion_commands: string[];
|
|
243
|
-
invalid_implementation_shortcuts: string[];
|
|
244
|
-
owner_surfaces: string[];
|
|
245
|
-
forbidden_surfaces: string[];
|
|
246
|
-
implementation_paths: string[];
|
|
247
|
-
required_tests: string[];
|
|
248
|
-
proof_layer_ids?: string[];
|
|
249
|
-
requirement_ref?: string;
|
|
250
|
-
decision_id?: string;
|
|
251
|
-
api_schema_changes?: string;
|
|
252
|
-
state_machine?: string;
|
|
253
|
-
data_flow?: string;
|
|
254
|
-
worker_runtime_behavior?: string;
|
|
255
|
-
ui_ia_changes?: string;
|
|
256
|
-
migration_plan?: string;
|
|
257
|
-
evidence_artifacts?: string[];
|
|
258
|
-
non_completing_shortcuts?: string[];
|
|
259
|
-
substitution_policy?: string[];
|
|
260
|
-
drift_severity?: string;
|
|
261
|
-
partial_conditions?: string[];
|
|
262
|
-
blockers?: string[];
|
|
263
|
-
explicit_no_test_scope?: boolean;
|
|
264
|
-
context_fact_refs?: string[];
|
|
265
|
-
status: SuperpowersPlanItemStatus;
|
|
266
|
-
related_acs: string[];
|
|
267
|
-
required_proof_layers: string[];
|
|
268
|
-
}
|
|
269
|
-
export interface SuperpowersAcceptanceCriterion {
|
|
270
|
-
scope: string;
|
|
271
|
-
source_file: string;
|
|
272
|
-
source_start_line: number;
|
|
273
|
-
source_end_line: number;
|
|
274
|
-
acceptance_scope: SuperpowersAcceptanceScope | "";
|
|
275
|
-
ac_validates: string[];
|
|
276
|
-
ac_does_not_validate: string[];
|
|
277
|
-
sample_boundary: string;
|
|
278
|
-
full_population_required: boolean | null;
|
|
279
|
-
related_plan_items: string[];
|
|
280
|
-
required_proof_layers: string[];
|
|
281
|
-
assertion_requirements?: AssertionRequirement[];
|
|
282
|
-
assertion_command?: string;
|
|
283
|
-
assertion_artifacts?: string[];
|
|
284
|
-
positive_assertions?: string[];
|
|
285
|
-
negative_assertions?: string[];
|
|
286
|
-
machine_blocking?: boolean | null;
|
|
287
|
-
invalid_completion_signals?: string[];
|
|
288
|
-
assertion_result_required?: boolean | null;
|
|
289
|
-
ac_type?: string;
|
|
290
|
-
proof_chain?: string[];
|
|
291
|
-
required_test_ids?: string[];
|
|
292
|
-
fail_conditions?: string[];
|
|
293
|
-
invalid_evidence?: string[];
|
|
294
|
-
substitution_policy?: string[];
|
|
295
|
-
missing_layer_downgrade?: string;
|
|
296
|
-
auditor_expectation?: string;
|
|
297
|
-
out_of_scope_na_approval_source?: string;
|
|
298
|
-
hard_blockers?: string[];
|
|
299
|
-
validates_explanation?: string;
|
|
300
|
-
does_not_validate_explanation?: string;
|
|
301
|
-
final_evidence_expected?: string[];
|
|
302
|
-
verification_method?: string[];
|
|
303
|
-
test_cases?: string[];
|
|
304
|
-
explicit_no_test_scope?: boolean;
|
|
305
|
-
status: SuperpowersAcceptanceStatus;
|
|
306
|
-
}
|
|
307
|
-
export interface AssertionRequirement {
|
|
308
|
-
proof_layer: string;
|
|
309
|
-
required: boolean;
|
|
310
|
-
machine_blocking: boolean;
|
|
311
|
-
assertion_result_required?: boolean;
|
|
312
|
-
assertion_command?: string;
|
|
313
|
-
assertion_artifacts?: string[];
|
|
314
|
-
invalid_completion_signals?: string[];
|
|
315
|
-
required_test_ids: string[];
|
|
316
|
-
positive_assertions: string[];
|
|
317
|
-
negative_assertions: string[];
|
|
318
|
-
}
|
|
319
|
-
export interface SuperpowersProofLayer {
|
|
320
|
-
required: boolean;
|
|
321
|
-
status: SuperpowersProofLayerStatus;
|
|
322
|
-
evidence_ids: string[];
|
|
323
|
-
}
|
|
324
|
-
export interface SuperpowersGraphEdge {
|
|
325
|
-
from: string;
|
|
326
|
-
to: string;
|
|
327
|
-
type: "supports" | string;
|
|
328
|
-
}
|
|
329
|
-
export interface SuperpowersSliceRecord {
|
|
330
|
-
slice_id: string;
|
|
331
|
-
slice_goal: string;
|
|
332
|
-
touched_plan_items: string[];
|
|
333
|
-
touched_acs: string[];
|
|
334
|
-
missing_layer_classes?: string[];
|
|
335
|
-
code_changes: string[];
|
|
336
|
-
evidence_records: string[];
|
|
337
|
-
closed_layers: string[];
|
|
338
|
-
remaining_layers: string[];
|
|
339
|
-
blockers: unknown[];
|
|
340
|
-
cleanup_assertions: string[];
|
|
341
|
-
progress_value: {
|
|
342
|
-
type: string;
|
|
343
|
-
closed_items: string[];
|
|
344
|
-
why_it_reduces_rework: string;
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
export interface SuperpowersEvidenceRecord {
|
|
348
|
-
schema_version?: "evidence-record-v1" | "evidence-record-v2" | string;
|
|
349
|
-
evidence_id: string;
|
|
350
|
-
task_attempt_id?: string;
|
|
351
|
-
generated_at?: string;
|
|
352
|
-
source_bundle_hash?: string;
|
|
353
|
-
product_source_hash?: string;
|
|
354
|
-
technical_plan_hash?: string;
|
|
355
|
-
acceptance_checklist_hash?: string;
|
|
356
|
-
git_head?: string;
|
|
357
|
-
git_status_short?: string;
|
|
358
|
-
tracked_diff_hash?: string;
|
|
359
|
-
relevant_untracked_hash?: string;
|
|
360
|
-
covers_dirty_worktree?: boolean;
|
|
361
|
-
worktree_fingerprint?: string;
|
|
362
|
-
command_spec_id?: string;
|
|
363
|
-
command_run_id?: string;
|
|
364
|
-
command_line?: string;
|
|
365
|
-
artifact_path?: string;
|
|
366
|
-
artifact_sha256?: string;
|
|
367
|
-
artifact_mtime?: string;
|
|
368
|
-
target_ac_ids?: string[];
|
|
369
|
-
target_pi_ids?: string[];
|
|
370
|
-
target_proof_layers?: string[];
|
|
371
|
-
slice_id: string;
|
|
372
|
-
type: string;
|
|
373
|
-
freshness: {
|
|
374
|
-
created_at: string;
|
|
375
|
-
valid_for: string;
|
|
376
|
-
stale_after: string | null;
|
|
377
|
-
};
|
|
378
|
-
command?: string;
|
|
379
|
-
command_exit_code?: number;
|
|
380
|
-
artifact_paths: string[];
|
|
381
|
-
proves: string[];
|
|
382
|
-
does_not_prove: string[];
|
|
383
|
-
redaction: {
|
|
384
|
-
checked: boolean;
|
|
385
|
-
contains_secret: boolean;
|
|
386
|
-
};
|
|
387
|
-
reviewability: {
|
|
388
|
-
external_reviewer_can_reproduce: boolean;
|
|
389
|
-
reproduction_steps: string;
|
|
390
|
-
};
|
|
391
|
-
assertion_result?: AssertionResult;
|
|
392
|
-
negative_evidence_scan?: NegativeEvidenceScan;
|
|
393
|
-
sibling_substitution_used?: boolean;
|
|
394
|
-
sibling_substitution_approval_source?: string;
|
|
395
|
-
}
|
|
396
|
-
export interface AssertionResult {
|
|
397
|
-
schema_version: "assertion-result-v1" | "assertion-result-v2";
|
|
398
|
-
status: "passed" | "failed" | "blocked" | "stale";
|
|
399
|
-
runner: string;
|
|
400
|
-
exit_code: number;
|
|
401
|
-
target_ac_ids: string[];
|
|
402
|
-
target_pi_ids?: string[];
|
|
403
|
-
target_proof_layers: string[];
|
|
404
|
-
owner_surface?: string;
|
|
405
|
-
route?: string;
|
|
406
|
-
action?: string;
|
|
407
|
-
positive_assertions: AssertionCheck[];
|
|
408
|
-
negative_assertions: AssertionCheck[];
|
|
409
|
-
invalid_completion_signals?: AssertionCheck[];
|
|
410
|
-
negative_evidence_scan?: NegativeEvidenceScan;
|
|
411
|
-
required_test_ids?: string[];
|
|
412
|
-
artifacts?: string[];
|
|
413
|
-
}
|
|
414
|
-
export interface AssertionCheck {
|
|
415
|
-
id: string;
|
|
416
|
-
status: "passed" | "failed" | "blocked" | "stale";
|
|
417
|
-
actual?: string;
|
|
418
|
-
expected?: string;
|
|
419
|
-
forbidden_text?: string;
|
|
420
|
-
}
|
|
421
|
-
export interface NegativeEvidenceScan {
|
|
422
|
-
schema_version: "negative-evidence-scan-v1";
|
|
423
|
-
status: "passed" | "failed" | "blocked" | "stale";
|
|
424
|
-
target_ac_ids: string[];
|
|
425
|
-
target_proof_layers?: string[];
|
|
426
|
-
invalid_completion_signals_checked?: string[];
|
|
427
|
-
owner_surface?: string;
|
|
428
|
-
route?: string;
|
|
429
|
-
forbidden_findings: NegativeFinding[];
|
|
430
|
-
required_findings: AssertionCheck[];
|
|
431
|
-
artifacts: string[];
|
|
432
|
-
}
|
|
433
|
-
export interface NegativeFinding {
|
|
434
|
-
id: string;
|
|
435
|
-
status: "found" | "not_found";
|
|
436
|
-
forbidden_text?: string;
|
|
437
|
-
actual?: string;
|
|
438
|
-
}
|
|
439
|
-
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
440
|
-
export declare function asStringArray(value: unknown): string[];
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export const SUPERPOWERS_TASK_STATE_SCHEMA_VERSION = "superpowers-task-state-v1";
|
|
2
|
-
export const SUPERPOWERS_TASK_STATE_JSON_SCHEMA = {
|
|
3
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
-
$id: "https://project-tiny-context-harness.local/superpowers-task-state.schema.json",
|
|
5
|
-
title: "Superpowers Long-Task State",
|
|
6
|
-
type: "object",
|
|
7
|
-
required: [
|
|
8
|
-
"meta",
|
|
9
|
-
"sources",
|
|
10
|
-
"context",
|
|
11
|
-
"delivery",
|
|
12
|
-
"graph",
|
|
13
|
-
"attempts",
|
|
14
|
-
"current_attempt_id",
|
|
15
|
-
"required_command_specs",
|
|
16
|
-
"command_runs",
|
|
17
|
-
"negative_evidence_records",
|
|
18
|
-
"slices",
|
|
19
|
-
"evidence",
|
|
20
|
-
"gates",
|
|
21
|
-
"progress",
|
|
22
|
-
"blockers",
|
|
23
|
-
"final"
|
|
24
|
-
],
|
|
25
|
-
properties: {
|
|
26
|
-
meta: {
|
|
27
|
-
type: "object",
|
|
28
|
-
required: ["task_id", "plan_slug", "created_at", "updated_at", "schema_version", "product_goal_complete", "acceptance_target_status"],
|
|
29
|
-
properties: {
|
|
30
|
-
schema_version: { const: SUPERPOWERS_TASK_STATE_SCHEMA_VERSION },
|
|
31
|
-
product_goal_complete: { type: "boolean" },
|
|
32
|
-
acceptance_target_status: { type: "string" }
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
sources: { type: "object" },
|
|
36
|
-
context: { type: "object" },
|
|
37
|
-
delivery: { type: "object" },
|
|
38
|
-
graph: { type: "object" },
|
|
39
|
-
attempts: { type: "array" },
|
|
40
|
-
current_attempt_id: { type: "string" },
|
|
41
|
-
required_command_specs: { type: "array" },
|
|
42
|
-
command_runs: { type: "array" },
|
|
43
|
-
negative_evidence_records: { type: "array" },
|
|
44
|
-
slices: { type: "array" },
|
|
45
|
-
evidence: { type: "array" },
|
|
46
|
-
gates: { type: "object" },
|
|
47
|
-
progress: { type: "object" },
|
|
48
|
-
blockers: { type: "array" },
|
|
49
|
-
final: { type: "object" }
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
export function isRecord(value) {
|
|
53
|
-
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
54
|
-
}
|
|
55
|
-
export function asStringArray(value) {
|
|
56
|
-
if (Array.isArray(value)) {
|
|
57
|
-
return value.flatMap(asStringArray);
|
|
58
|
-
}
|
|
59
|
-
if (value === undefined || value === null) {
|
|
60
|
-
return [];
|
|
61
|
-
}
|
|
62
|
-
return String(value)
|
|
63
|
-
.split(/[,;\n]/)
|
|
64
|
-
.map((item) => item.trim())
|
|
65
|
-
.filter(Boolean);
|
|
66
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { isRecord } from "./superpowers-task-state-schema.js";
|
|
2
|
-
export function validateShape(state, errors) {
|
|
3
|
-
if (state.meta?.schema_version !== "superpowers-task-state-v1") {
|
|
4
|
-
errors.push("task-state.json schema_version must be superpowers-task-state-v1");
|
|
5
|
-
}
|
|
6
|
-
for (const key of [
|
|
7
|
-
"meta",
|
|
8
|
-
"sources",
|
|
9
|
-
"context",
|
|
10
|
-
"delivery",
|
|
11
|
-
"graph",
|
|
12
|
-
"attempts",
|
|
13
|
-
"current_attempt_id",
|
|
14
|
-
"required_command_specs",
|
|
15
|
-
"command_runs",
|
|
16
|
-
"negative_evidence_records",
|
|
17
|
-
"slices",
|
|
18
|
-
"evidence",
|
|
19
|
-
"gates",
|
|
20
|
-
"progress",
|
|
21
|
-
"blockers",
|
|
22
|
-
"final"
|
|
23
|
-
]) {
|
|
24
|
-
if (!(key in state)) {
|
|
25
|
-
errors.push(`task-state.json is missing section: ${key}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export function hasUsableShape(state) {
|
|
30
|
-
const candidate = state;
|
|
31
|
-
return (isRecord(candidate.meta) &&
|
|
32
|
-
isRecord(candidate.sources) &&
|
|
33
|
-
isRecord(candidate.context) &&
|
|
34
|
-
isRecord(candidate.delivery) &&
|
|
35
|
-
isRecord(candidate.graph) &&
|
|
36
|
-
isRecord(candidate.graph.plan_items) &&
|
|
37
|
-
isRecord(candidate.graph.acceptance_criteria) &&
|
|
38
|
-
isRecord(candidate.graph.proof_layers) &&
|
|
39
|
-
Array.isArray(candidate.attempts) &&
|
|
40
|
-
typeof candidate.current_attempt_id === "string" &&
|
|
41
|
-
Array.isArray(candidate.required_command_specs) &&
|
|
42
|
-
Array.isArray(candidate.command_runs) &&
|
|
43
|
-
Array.isArray(candidate.negative_evidence_records) &&
|
|
44
|
-
Array.isArray(candidate.slices) &&
|
|
45
|
-
Array.isArray(candidate.evidence) &&
|
|
46
|
-
isRecord(candidate.gates) &&
|
|
47
|
-
isRecord(candidate.progress) &&
|
|
48
|
-
Array.isArray(candidate.blockers) &&
|
|
49
|
-
isRecord(candidate.final));
|
|
50
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type SuperpowersTaskState } from "./superpowers-task-state-schema.js";
|
|
2
|
-
export interface InitializeSuperpowersTaskOptions {
|
|
3
|
-
taskId?: string;
|
|
4
|
-
planSlug?: string;
|
|
5
|
-
goalType?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function initializeSuperpowersTask(workdir: string, options?: InitializeSuperpowersTaskOptions): Promise<SuperpowersTaskState>;
|
|
8
|
-
export declare function loadSuperpowersState(workdir: string): Promise<SuperpowersTaskState>;
|
|
9
|
-
export declare function saveSuperpowersState(workdir: string, state: SuperpowersTaskState): Promise<void>;
|
|
10
|
-
export declare function applySliceDelta(workdir: string, deltaFile: string): Promise<SuperpowersTaskState>;
|
|
11
|
-
export declare function refreshSourceHashes(workdir: string, state: SuperpowersTaskState): Promise<void>;
|
|
12
|
-
export declare function recomputeStatuses(state: SuperpowersTaskState): void;
|
|
13
|
-
export declare function emptyProgressState(): SuperpowersTaskState["progress"];
|
|
14
|
-
export declare function sourceRecords(workdir: string): Promise<SuperpowersTaskState["sources"]>;
|
|
15
|
-
export declare function sha256(value: string): string;
|
|
16
|
-
export declare function stableJson(value: unknown): string;
|