@fitlab-ai/agent-infra 0.9.13 → 0.9.15
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 +10 -0
- package/README.zh-CN.md +10 -0
- package/bin/cli.ts +26 -9
- package/bin/internal-cli.sh +45 -0
- package/dist/bin/cli.js +173 -157
- package/dist/bin/internal-cli.js +126 -42
- package/dist/lib/agent-client.js +5 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/capability-store.js +165 -27
- package/dist/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.js +3 -2
- package/dist/lib/defaults.json +103 -103
- package/dist/lib/fs/durable-write.js +37 -0
- package/dist/lib/fs/file-lock.js +111 -0
- package/dist/lib/host-control/audit.js +19 -0
- package/dist/lib/host-control/client.js +142 -0
- package/dist/lib/host-control/command.js +49 -0
- package/dist/lib/host-control/path.js +160 -0
- package/dist/lib/host-control/secure-fs.js +140 -0
- package/dist/lib/host-control/server.js +159 -0
- package/dist/lib/host-control/service.js +112 -0
- package/dist/lib/init.js +11 -2
- package/dist/lib/internal/agent-client.js +5 -2
- package/dist/lib/internal/cli-route-inventory.js +154 -0
- package/dist/lib/internal/codex-lifecycle.js +15 -12
- package/dist/lib/internal/codex-sandbox-controller.js +8 -2
- package/dist/lib/internal/demo-promotion.js +322 -0
- package/dist/lib/internal/demo-transcript.js +454 -0
- package/dist/lib/internal/git-workflow.js +10 -6
- package/dist/lib/internal/host-control.js +28 -0
- package/dist/lib/internal/manual-validation.js +322 -0
- package/dist/lib/internal/platform-checks.js +16 -4
- package/dist/lib/internal/platform-comment.js +16 -4
- package/dist/lib/internal/platform-context.js +4 -1
- package/dist/lib/internal/platform-issue.js +12 -4
- package/dist/lib/internal/platform-metadata.js +88 -0
- package/dist/lib/internal/platform-pr-review.js +16 -3
- package/dist/lib/internal/platform-pr.js +42 -14
- package/dist/lib/internal/platform-release-notes.js +6 -3
- package/dist/lib/internal/platform-security.js +93 -0
- package/dist/lib/internal/pr-review-grade.js +14 -3
- package/dist/lib/internal/release-workflow.js +82 -89
- package/dist/lib/internal/sandbox-control.js +171 -7
- package/dist/lib/internal/task-activity.js +13 -4
- package/dist/lib/internal/task-artifact.js +19 -107
- package/dist/lib/internal/task-context.js +4 -1
- package/dist/lib/internal/task-create.js +48 -14
- package/dist/lib/internal/task-delivery.js +4 -1
- package/dist/lib/internal/task-event.js +38 -35
- package/dist/lib/internal/task-finalization.js +4 -1
- package/dist/lib/internal/task-invalidation.js +4 -1
- package/dist/lib/internal/task-ledger.js +12 -1
- package/dist/lib/internal/task-lifecycle.js +4 -1
- package/dist/lib/internal/task-operation-registry.js +519 -0
- package/dist/lib/internal/task-orchestration.js +12 -0
- package/dist/lib/internal/task-override.js +10 -3
- package/dist/lib/internal/task-qualification.js +90 -0
- package/dist/lib/internal/task-review.js +10 -52
- package/dist/lib/internal/task-short-id.js +11 -1
- package/dist/lib/internal/task-snapshot.js +4 -1
- package/dist/lib/internal/task-validate.js +37 -12
- package/dist/lib/internal/task-verify.js +5 -1
- package/dist/lib/internal/task-warning.js +8 -1
- package/dist/lib/owned-path.js +33 -0
- package/dist/lib/platform/check-status.js +11 -0
- package/dist/lib/platform/comment-safety.js +229 -0
- package/dist/lib/platform/completion-backfill.js +1 -1
- package/dist/lib/platform/github-data.js +241 -0
- package/dist/lib/platform/github-provider.js +248 -26
- package/dist/lib/platform/issue-comments.js +146 -34
- package/dist/lib/platform/issues.js +1 -179
- package/dist/lib/platform/pr-change-report.js +6 -12
- package/dist/lib/platform/pr-checks.js +12 -65
- package/dist/lib/platform/pr-summary.js +83 -10
- package/dist/lib/platform/provider-contract.d.ts +67 -1
- package/dist/lib/platform/provider-contract.js +6 -2
- package/dist/lib/platform/provider-validation.js +76 -3
- package/dist/lib/platform/pull-requests.js +117 -275
- package/dist/lib/platform/repository-metadata.js +377 -0
- package/dist/lib/platform/security-alerts.js +155 -0
- package/dist/lib/platform/snapshots.js +2 -0
- package/dist/lib/platform/verification-sync.js +154 -162
- package/dist/lib/process-data/index.js +7 -0
- package/dist/lib/release/workflow.js +1 -1
- package/dist/lib/run/index.js +5 -0
- package/dist/lib/sandbox/commands/control-status.js +22 -0
- package/dist/lib/sandbox/commands/create.js +39 -8
- package/dist/lib/sandbox/commands/ls.js +5 -0
- package/dist/lib/sandbox/commands/rm.js +3 -807
- package/dist/lib/sandbox/commands/show.js +16 -0
- package/dist/lib/sandbox/control/audit.js +203 -0
- package/dist/lib/sandbox/control/client.js +125 -12
- package/dist/lib/sandbox/control/completed-reentry.js +85 -0
- package/dist/lib/sandbox/control/container-identity.js +28 -31
- package/dist/lib/sandbox/control/executor.js +233 -34
- package/dist/lib/sandbox/control/finalization-response.js +27 -0
- package/dist/lib/sandbox/control/identity-sentinel.js +107 -0
- package/dist/lib/sandbox/control/lifecycle.js +656 -128
- package/dist/lib/sandbox/control/native-file-lock.js +85 -0
- package/dist/lib/sandbox/control/protocol.js +55 -4
- package/dist/lib/sandbox/control/server.js +720 -79
- package/dist/lib/sandbox/control/state.js +63 -3
- package/dist/lib/sandbox/control/task-view.js +183 -0
- package/dist/lib/sandbox/control/task-workflow.js +74 -0
- package/dist/lib/sandbox/control/workflow-executor.js +99 -0
- package/dist/lib/sandbox/engines/authority.js +289 -0
- package/dist/lib/sandbox/engines/docker-exact-discovery.js +97 -0
- package/dist/lib/sandbox/index.js +7 -2
- package/dist/lib/sandbox/recovery.js +49 -5
- package/dist/lib/sandbox/removal.js +1717 -0
- package/dist/lib/sandbox/task-cleanup.js +217 -0
- package/dist/lib/sandbox/workspace-view.js +15 -15
- package/dist/lib/sandbox/worktree-safety.js +4 -1
- package/dist/lib/server/index.js +8 -0
- package/dist/lib/task/activity-intent.js +2 -1
- package/dist/lib/task/activity-log.js +30 -24
- package/dist/lib/task/artifact-command.js +101 -0
- package/dist/lib/task/artifact-lifecycle.js +71 -40
- package/dist/lib/task/artifact-name.js +36 -0
- package/dist/lib/task/artifact-operations.js +474 -0
- package/dist/lib/task/artifact-receipts.js +3 -15
- package/dist/lib/task/artifact-repair-intent.js +130 -0
- package/dist/lib/task/artifact-schema.js +127 -0
- package/dist/lib/task/capabilities.js +83 -19
- package/dist/lib/task/codex-orchestration.js +71 -25
- package/dist/lib/task/commit-identity.js +28 -0
- package/dist/lib/task/commit-operation.js +2 -16
- package/dist/lib/task/control-authority.js +375 -5
- package/dist/lib/task/control-recovery.js +128 -0
- package/dist/lib/task/create-service.js +103 -4
- package/dist/lib/task/create.js +80 -2
- package/dist/lib/task/decision-details.js +2 -46
- package/dist/lib/task/events.js +306 -76
- package/dist/lib/task/finalization-state.js +9 -0
- package/dist/lib/task/human-override.js +3 -6
- package/dist/lib/task/implementation-inputs.js +3 -3
- package/dist/lib/task/index.js +11 -3
- package/dist/lib/task/intermediate-cleanup.js +383 -0
- package/dist/lib/task/invalidation.js +18 -65
- package/dist/lib/task/ledger-intents.js +7 -22
- package/dist/lib/task/ledger.js +1 -3
- package/dist/lib/task/lifecycle.js +19 -1
- package/dist/lib/task/local-artifact-finalization.js +190 -290
- package/dist/lib/task/manual-validation-completion.js +26 -0
- package/dist/lib/task/manual-validation-evidence.js +130 -0
- package/dist/lib/task/manual-validation-receipt.js +101 -0
- package/dist/lib/task/manual-validation-shared.js +40 -0
- package/dist/lib/task/manual-validation-transaction.js +243 -0
- package/dist/lib/task/markdown.js +47 -0
- package/dist/lib/task/orchestration.js +206 -69
- package/dist/lib/task/qualification-audit.js +476 -0
- package/dist/lib/task/qualification-confirmation.js +109 -0
- package/dist/lib/task/qualification-intents.js +148 -0
- package/dist/lib/task/review-artifacts.js +23 -40
- package/dist/lib/task/review-command.js +25 -0
- package/dist/lib/task/review-finalization.js +146 -97
- package/dist/lib/task/review-fingerprint.js +2 -2
- package/dist/lib/task/sections.js +34 -54
- package/dist/lib/task/verification-config.js +11 -0
- package/dist/lib/task/verification-engine.js +170 -327
- package/dist/lib/task/verification.js +1 -1
- package/dist/lib/task/workflow-command.js +17 -0
- package/dist/lib/task/workflow-warning-intents.js +0 -16
- package/dist/lib/task/workflow-warnings.js +28 -2
- package/dist/lib/update.js +2 -0
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-client.ts +9 -0
- package/lib/agent-clients/adapters/codex-lifecycle/capability-store.ts +223 -33
- package/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.ts +3 -2
- package/lib/fs/durable-write.ts +29 -0
- package/lib/fs/file-lock.ts +113 -0
- package/lib/host-control/audit.ts +22 -0
- package/lib/host-control/client.ts +172 -0
- package/lib/host-control/command.ts +60 -0
- package/lib/host-control/path.ts +167 -0
- package/lib/host-control/secure-fs.ts +135 -0
- package/lib/host-control/server.ts +180 -0
- package/lib/host-control/service.ts +133 -0
- package/lib/init.ts +15 -2
- package/lib/internal/agent-client.ts +4 -2
- package/lib/internal/cli-route-inventory.ts +142 -0
- package/lib/internal/codex-lifecycle.ts +14 -12
- package/lib/internal/codex-sandbox-controller.ts +7 -2
- package/lib/internal/demo-promotion.ts +354 -0
- package/lib/internal/demo-transcript.ts +419 -0
- package/lib/internal/git-workflow.ts +9 -6
- package/lib/internal/host-control.ts +28 -0
- package/lib/internal/manual-validation.ts +306 -0
- package/lib/internal/platform-checks.ts +12 -4
- package/lib/internal/platform-comment.ts +12 -4
- package/lib/internal/platform-context.ts +3 -1
- package/lib/internal/platform-issue.ts +11 -4
- package/lib/internal/platform-metadata.ts +70 -0
- package/lib/internal/platform-pr-review.ts +14 -3
- package/lib/internal/platform-pr.ts +38 -14
- package/lib/internal/platform-release-notes.ts +5 -3
- package/lib/internal/platform-security.ts +83 -0
- package/lib/internal/pr-review-grade.ts +10 -3
- package/lib/internal/release-workflow.ts +91 -87
- package/lib/internal/sandbox-control.ts +181 -6
- package/lib/internal/task-activity.ts +12 -4
- package/lib/internal/task-artifact.ts +15 -79
- package/lib/internal/task-context.ts +3 -1
- package/lib/internal/task-create.ts +76 -15
- package/lib/internal/task-delivery.ts +3 -1
- package/lib/internal/task-event.ts +21 -10
- package/lib/internal/task-finalization.ts +3 -1
- package/lib/internal/task-invalidation.ts +3 -1
- package/lib/internal/task-ledger.ts +11 -1
- package/lib/internal/task-lifecycle.ts +3 -1
- package/lib/internal/task-operation-registry.ts +590 -0
- package/lib/internal/task-orchestration.ts +12 -0
- package/lib/internal/task-override.ts +9 -3
- package/lib/internal/task-qualification.ts +61 -0
- package/lib/internal/task-review.ts +7 -50
- package/lib/internal/task-short-id.ts +10 -1
- package/lib/internal/task-snapshot.ts +3 -1
- package/lib/internal/task-validate.ts +32 -12
- package/lib/internal/task-verify.ts +4 -1
- package/lib/internal/task-warning.ts +7 -1
- package/lib/owned-path.ts +26 -0
- package/lib/platform/check-status.ts +9 -0
- package/lib/platform/comment-safety.ts +255 -0
- package/lib/platform/completion-backfill.ts +1 -1
- package/lib/platform/github-data.ts +322 -0
- package/lib/platform/github-provider.ts +244 -27
- package/lib/platform/issue-comments.ts +159 -35
- package/lib/platform/issues.ts +4 -245
- package/lib/platform/pr-change-report.ts +6 -12
- package/lib/platform/pr-checks.ts +13 -77
- package/lib/platform/pr-summary.ts +88 -11
- package/lib/platform/provider-contract.ts +78 -3
- package/lib/platform/provider-validation.ts +85 -3
- package/lib/platform/pull-requests.ts +129 -348
- package/lib/platform/repository-metadata.ts +453 -0
- package/lib/platform/security-alerts.ts +191 -0
- package/lib/platform/snapshots.ts +53 -0
- package/lib/platform/verification-sync.ts +171 -177
- package/lib/process-data/index.ts +7 -0
- package/lib/release/workflow.ts +3 -3
- package/lib/run/index.ts +5 -0
- package/lib/sandbox/commands/control-status.ts +26 -0
- package/lib/sandbox/commands/create.ts +53 -12
- package/lib/sandbox/commands/ls.ts +7 -0
- package/lib/sandbox/commands/rm.ts +3 -996
- package/lib/sandbox/commands/show.ts +16 -0
- package/lib/sandbox/control/audit.ts +253 -0
- package/lib/sandbox/control/client.ts +150 -13
- package/lib/sandbox/control/completed-reentry.ts +98 -0
- package/lib/sandbox/control/container-identity.ts +27 -43
- package/lib/sandbox/control/executor.ts +262 -37
- package/lib/sandbox/control/finalization-response.ts +29 -0
- package/lib/sandbox/control/identity-sentinel.ts +137 -0
- package/lib/sandbox/control/lifecycle.ts +672 -18
- package/lib/sandbox/control/native-file-lock.ts +108 -0
- package/lib/sandbox/control/protocol.ts +80 -8
- package/lib/sandbox/control/server.ts +779 -82
- package/lib/sandbox/control/state.ts +84 -3
- package/lib/sandbox/control/task-view.ts +240 -0
- package/lib/sandbox/control/task-workflow.ts +95 -0
- package/lib/sandbox/control/workflow-executor.ts +102 -0
- package/lib/sandbox/engines/authority.ts +365 -0
- package/lib/sandbox/engines/docker-exact-discovery.ts +132 -0
- package/lib/sandbox/index.ts +9 -2
- package/lib/sandbox/recovery.ts +49 -6
- package/lib/sandbox/removal.ts +2144 -0
- package/lib/sandbox/task-cleanup.ts +209 -0
- package/lib/sandbox/workspace-view.ts +26 -18
- package/lib/sandbox/worktree-safety.ts +4 -1
- package/lib/server/index.ts +10 -0
- package/lib/task/activity-intent.ts +2 -2
- package/lib/task/activity-log.ts +27 -19
- package/lib/task/artifact-command.ts +104 -0
- package/lib/task/artifact-lifecycle.ts +66 -39
- package/lib/task/artifact-name.ts +55 -0
- package/lib/task/artifact-operations.ts +580 -0
- package/lib/task/artifact-receipts.ts +3 -14
- package/lib/task/artifact-repair-intent.ts +152 -0
- package/lib/task/artifact-schema.ts +163 -0
- package/lib/task/capabilities.ts +82 -22
- package/lib/task/codex-orchestration.ts +85 -24
- package/lib/task/commit-identity.ts +31 -0
- package/lib/task/commit-operation.ts +2 -16
- package/lib/task/control-authority.ts +513 -6
- package/lib/task/control-recovery.ts +174 -0
- package/lib/task/create-service.ts +131 -6
- package/lib/task/create.ts +83 -1
- package/lib/task/decision-details.ts +3 -71
- package/lib/task/events.ts +292 -75
- package/lib/task/finalization-state.ts +11 -0
- package/lib/task/human-override.ts +3 -8
- package/lib/task/implementation-inputs.ts +3 -3
- package/lib/task/index.ts +16 -3
- package/lib/task/intermediate-cleanup.ts +455 -0
- package/lib/task/invalidation.ts +18 -62
- package/lib/task/ledger-intents.ts +7 -24
- package/lib/task/ledger.ts +1 -3
- package/lib/task/lifecycle.ts +17 -1
- package/lib/task/local-artifact-finalization.ts +223 -388
- package/lib/task/manual-validation-completion.ts +40 -0
- package/lib/task/manual-validation-evidence.ts +209 -0
- package/lib/task/manual-validation-receipt.ts +152 -0
- package/lib/task/manual-validation-shared.ts +50 -0
- package/lib/task/manual-validation-transaction.ts +304 -0
- package/lib/task/markdown.ts +70 -0
- package/lib/task/orchestration.ts +191 -68
- package/lib/task/qualification-audit.ts +588 -0
- package/lib/task/qualification-confirmation.ts +117 -0
- package/lib/task/qualification-intents.ts +150 -0
- package/lib/task/review-artifacts.ts +21 -41
- package/lib/task/review-command.ts +23 -0
- package/lib/task/review-finalization.ts +154 -153
- package/lib/task/review-fingerprint.ts +2 -2
- package/lib/task/sections.ts +33 -52
- package/lib/task/verification-config.ts +12 -0
- package/lib/task/verification-engine.ts +165 -370
- package/lib/task/verification-types.ts +17 -0
- package/lib/task/verification.ts +1 -1
- package/lib/task/workflow-command.ts +18 -0
- package/lib/task/workflow-warning-intents.ts +0 -13
- package/lib/task/workflow-warnings.ts +21 -2
- package/lib/update.ts +6 -0
- package/package.json +7 -2
- package/templates/.agents/hooks/lifecycle-delegation.js +6 -6
- package/templates/.agents/rules/README.en.md +2 -0
- package/templates/.agents/rules/README.zh-CN.md +2 -0
- package/templates/.agents/rules/decision-qualification.en.md +22 -0
- package/templates/.agents/rules/decision-qualification.zh-CN.md +22 -0
- package/templates/.agents/rules/evidence-reporting.en.md +28 -0
- package/templates/.agents/rules/evidence-reporting.zh-CN.md +28 -0
- package/templates/.agents/rules/label-milestone-setup.en.md +7 -7
- package/templates/.agents/rules/label-milestone-setup.zh-CN.md +7 -7
- package/templates/.agents/rules/local-artifact-repair.en.md +5 -1
- package/templates/.agents/rules/local-artifact-repair.zh-CN.md +5 -1
- package/templates/.agents/rules/security-alerts.en.md +8 -8
- package/templates/.agents/rules/security-alerts.zh-CN.md +8 -8
- package/templates/.agents/rules/testing-discipline.en.md +2 -0
- package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -0
- package/templates/.agents/scripts/package.json +3 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +15 -2
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +19 -2
- package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -12
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -12
- package/templates/.agents/skills/close-codescan/SKILL.en.md +2 -2
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/SKILL.en.md +14 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/code-task/config/verify.en.json +5 -14
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +5 -14
- package/templates/.agents/skills/code-task/reference/code-rules.en.md +5 -4
- package/templates/.agents/skills/code-task/reference/code-rules.zh-CN.md +5 -4
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +3 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +3 -1
- package/templates/.agents/skills/code-task/reference/report-template.en.md +42 -15
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +39 -12
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +37 -21
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +37 -21
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.en.md +4 -0
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.zh-CN.md +4 -0
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +16 -7
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +16 -7
- package/templates/.agents/skills/complete-task/SKILL.en.md +10 -23
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +10 -23
- package/templates/.agents/skills/create-task/SKILL.en.md +8 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +7 -0
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/init-labels/SKILL.en.md +8 -8
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/init-milestones/SKILL.en.md +9 -11
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +9 -11
- package/templates/.agents/skills/plan-task/SKILL.en.md +14 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +16 -1
- package/templates/.agents/skills/plan-task/config/verify.en.json +4 -14
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +4 -14
- package/templates/.agents/skills/release/SKILL.en.md +7 -3
- package/templates/.agents/skills/release/SKILL.zh-CN.md +7 -3
- package/templates/.agents/skills/review-analysis/SKILL.en.md +14 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -18
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -18
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +50 -23
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +45 -18
- package/templates/.agents/skills/review-code/SKILL.en.md +14 -1
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -23
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -23
- package/templates/.agents/skills/review-code/reference/report-template.en.md +49 -22
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +45 -18
- package/templates/.agents/skills/review-plan/SKILL.en.md +14 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -18
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -18
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +49 -22
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +45 -18
- package/templates/.agents/skills/review-pr/SKILL.en.md +5 -1
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/review-pr/reference/report-template.en.md +4 -3
- package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +4 -3
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +25 -4
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +25 -4
- package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.en.md +4 -1
- package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.zh-CN.md +4 -1
- package/templates/.agents/skills/run-manual-validation/reference/report-template.en.md +5 -1
- package/templates/.agents/skills/run-manual-validation/reference/report-template.zh-CN.md +5 -1
- package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/test/SKILL.en.md +29 -7
- package/templates/.agents/skills/test/SKILL.zh-CN.md +29 -7
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +14 -0
- package/templates/.agents/templates/task.en.md +6 -0
- package/templates/.agents/templates/task.zh-CN.md +6 -0
- package/templates/.claude/commands/run-manual-validation.en.md +1 -1
- package/templates/.claude/commands/run-manual-validation.zh-CN.md +1 -1
- package/dist/lib/platform/adapters.js +0 -56
- package/lib/platform/adapters.ts +0 -197
- package/templates/.agents/scripts/security-alerts.github.sh +0 -151
- package/templates/.agents/scripts/security-alerts.sh +0 -31
- package/templates/.agents/skills/init-labels/scripts/init-labels.github.sh +0 -146
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +0 -32
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.github.sh +0 -294
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +0 -6
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
import type fs from 'node:fs';
|
|
2
|
+
|
|
3
|
+
export type VerificationShared = {
|
|
4
|
+
repoRoot: string;
|
|
5
|
+
loadTask: (taskDir: string) => { ok: true; content: string; metadata: Record<string, string> } | { ok: false; message: string };
|
|
6
|
+
getCheckedRequirements: (content: string) => string[];
|
|
7
|
+
normalizeContent: (text: unknown) => string;
|
|
8
|
+
isBlank: (value: unknown) => boolean;
|
|
9
|
+
escapeRegExp: (value: string) => string;
|
|
10
|
+
passResult: (type: string, message: string, warnings?: string[]) => VerificationCheckResult;
|
|
11
|
+
failResult: (type: string, message: string, failType?: string) => VerificationCheckResult;
|
|
12
|
+
blockedResult: (type: string, message: string, failType?: string) => VerificationCheckResult;
|
|
13
|
+
safeStat: (filePath: string) => fs.Stats | null;
|
|
14
|
+
parseIssueNumber: (value: unknown) => number | null;
|
|
15
|
+
parsePrNumber: (value: unknown) => number | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
1
18
|
type VerificationStatus = 'pass' | 'fail' | 'blocked';
|
|
2
19
|
type VerificationCheckResult = {
|
|
3
20
|
type: string;
|
package/lib/task/verification.ts
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
// checks are provided by typed domain modules without a stdout protocol.
|
|
4
4
|
import { verifyInProcess } from './verification-engine.ts';
|
|
5
5
|
|
|
6
|
-
import { parseArtifactName } from './artifact-
|
|
6
|
+
import { parseArtifactName } from './artifact-name.ts';
|
|
7
7
|
import type { ArtifactFamily } from './artifact-lifecycle.ts';
|
|
8
8
|
import { resolveTaskRef } from './resolve-ref.ts';
|
|
9
9
|
import type { TaskWorkspaceState } from './resolve-ref.ts';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const TASK_WORKFLOW_COMMANDS = Object.freeze({
|
|
2
|
+
'artifact-inspect': ['task-artifact', 'inspect'],
|
|
3
|
+
'artifact-init': ['task-artifact', 'init'],
|
|
4
|
+
'artifact-repair': ['task-artifact', 'repair'],
|
|
5
|
+
'artifact-finalize-local': ['task-artifact', 'finalize-local'],
|
|
6
|
+
'review-finalize-summary': ['task-review', 'finalize-summary'],
|
|
7
|
+
event: ['task-event', null],
|
|
8
|
+
'ledger-finding-response': ['task-ledger', 'finding-respond'],
|
|
9
|
+
'ledger-finding-review': ['task-ledger', 'finding-review'],
|
|
10
|
+
'ledger-finding-upsert': ['task-ledger', 'finding-upsert'],
|
|
11
|
+
'decision-next-id': ['task-ledger', 'decision-next-id'],
|
|
12
|
+
'decision-upsert': ['task-ledger', 'decision-upsert'],
|
|
13
|
+
'invalidation-reconcile': ['task-invalidation', 'reconcile'],
|
|
14
|
+
'warning-add': ['task-warning', 'add']
|
|
15
|
+
} as const);
|
|
16
|
+
export type TaskWorkflowOperation = keyof typeof TASK_WORKFLOW_COMMANDS;
|
|
17
|
+
export const TASK_WORKFLOW_OPERATIONS = Object.freeze(Object.keys(TASK_WORKFLOW_COMMANDS) as TaskWorkflowOperation[]);
|
|
18
|
+
export type WorkflowCommand = typeof TASK_WORKFLOW_COMMANDS[TaskWorkflowOperation][0];
|
|
@@ -52,17 +52,6 @@ function nextWarningId(rows: readonly WorkflowWarning[]): string {
|
|
|
52
52
|
return `WW-${max + 1}`;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function validateRows(rows: readonly WorkflowWarning[]): { code: string; message: string } | null {
|
|
56
|
-
const ids = new Set<string>();
|
|
57
|
-
for (const row of rows) {
|
|
58
|
-
if (!/^WW-[1-9]\d*$/.test(row.id)) return { code: 'WARNING_ID_INVALID', message: `warning id '${row.id}' is invalid` };
|
|
59
|
-
if (ids.has(row.id)) return { code: 'WARNING_DUPLICATE_ID', message: `duplicate warning id '${row.id}'` };
|
|
60
|
-
ids.add(row.id);
|
|
61
|
-
if (!WORKFLOW_WARNING_SEVERITIES.has(row.severity) || !WORKFLOW_WARNING_STATUSES.has(row.status)) return { code: 'WARNING_DOCUMENT_INVALID', message: `warning '${row.id}' has invalid severity or status` };
|
|
62
|
-
}
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
55
|
function sectionMutation(content: string): TaskMutation[] {
|
|
67
56
|
if (/^##\s+(工作流告警|Workflow Warnings)\s*$/m.test(content)) return [];
|
|
68
57
|
const english = /^##\s+Activity Log\s*$/m.test(content);
|
|
@@ -98,8 +87,6 @@ function applyWorkflowWarningIntent(intent: WorkflowWarningIntent, options: Task
|
|
|
98
87
|
const code = error && typeof error === 'object' && 'code' in error ? String(error.code) : 'WARNING_DOCUMENT_INVALID';
|
|
99
88
|
return failed(intent, code, error instanceof Error ? error.message : String(error), resolved.taskId);
|
|
100
89
|
}
|
|
101
|
-
const invalid = validateRows(rows);
|
|
102
|
-
if (invalid) return failed(intent, invalid.code, invalid.message, resolved.taskId);
|
|
103
90
|
if (intent.kind === 'list') {
|
|
104
91
|
if (intent.status && !WORKFLOW_WARNING_STATUSES.has(intent.status)) return failed(intent, 'WARNING_PAYLOAD_INVALID', 'warning status is invalid', resolved.taskId);
|
|
105
92
|
const warnings = rows.filter((row) => !intent.status || row.status === intent.status);
|
|
@@ -4,6 +4,7 @@ const WORKFLOW_WARNING_HEADINGS = ['工作流告警', 'Workflow Warnings'];
|
|
|
4
4
|
const WORKFLOW_WARNING_STATUSES = new Set(['open', 'resolved', 'ignored']);
|
|
5
5
|
const WORKFLOW_WARNING_SEVERITIES = new Set(['IMPORTANT', 'ACTION_REQUIRED']);
|
|
6
6
|
const WORKFLOW_WARNING_COLUMNS = ['id', 'time', 'step', 'severity', 'code', 'status', 'target', 'message', 'action', 'resolved_at', 'resolution'] as const;
|
|
7
|
+
const WARNING_TIME_PATTERN = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:[+-]\d{2}:\d{2})?$/;
|
|
7
8
|
|
|
8
9
|
type WorkflowWarning = {
|
|
9
10
|
id: string;
|
|
@@ -19,14 +20,32 @@ type WorkflowWarning = {
|
|
|
19
20
|
resolution: string;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
/** Parses
|
|
23
|
+
/** Parses warning structure and lifecycle fields using one contract for all readers. */
|
|
23
24
|
function parseWorkflowWarnings(content: string): WorkflowWarning[] {
|
|
24
25
|
const table = parseTable(content, { sectionAliases: WORKFLOW_WARNING_HEADINGS, columns: WORKFLOW_WARNING_COLUMNS });
|
|
25
|
-
|
|
26
|
+
const warnings = table?.rows.map(({ values }) => ({
|
|
26
27
|
id: values.id!, time: values.time!, step: values.step!, severity: values.severity!,
|
|
27
28
|
code: values.code!, status: values.status!, target: values.target!, message: values.message!,
|
|
28
29
|
action: values.action!, resolvedAt: values.resolved_at!, resolution: values.resolution!
|
|
29
30
|
})) ?? [];
|
|
31
|
+
const errors: { code: string; message: string }[] = [];
|
|
32
|
+
const invalid = (message: string, code = 'WARNING_DOCUMENT_INVALID') => errors.push({ code, message });
|
|
33
|
+
for (const warning of warnings) {
|
|
34
|
+
const { id, time, severity, status, action, resolvedAt, resolution } = warning;
|
|
35
|
+
if (!/^WW-[1-9]\d*$/.test(id)) invalid(`${id || '(empty id)'}: invalid id`, 'WARNING_ID_INVALID');
|
|
36
|
+
if (!WARNING_TIME_PATTERN.test(time)) invalid(`${id}: invalid time '${time}'`);
|
|
37
|
+
for (const field of ['step', 'code', 'target', 'message'] as const) {
|
|
38
|
+
if (!warning[field].trim()) invalid(`${id}: ${field} is required`);
|
|
39
|
+
}
|
|
40
|
+
if (!WORKFLOW_WARNING_SEVERITIES.has(severity)) invalid(`${id}: illegal severity '${severity}'`);
|
|
41
|
+
if (!WORKFLOW_WARNING_STATUSES.has(status)) invalid(`${id}: illegal status '${status}'`);
|
|
42
|
+
if (status === 'open' && !action.trim()) invalid(`${id}: open warning requires action`);
|
|
43
|
+
if ((status === 'resolved' || status === 'ignored') && (!resolvedAt.trim() || !resolution.trim())) {
|
|
44
|
+
invalid(`${id}: ${status} warning requires resolved_at and resolution`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (errors.length) throw Object.assign(new Error(errors.map((error) => error.message).join('; ')), { code: errors[0]!.code });
|
|
48
|
+
return warnings;
|
|
30
49
|
}
|
|
31
50
|
|
|
32
51
|
function getOpenWorkflowWarnings(content: string): WorkflowWarning[] {
|
package/lib/update.ts
CHANGED
|
@@ -119,6 +119,12 @@ async function cmdSync(): Promise<void> {
|
|
|
119
119
|
replacements
|
|
120
120
|
);
|
|
121
121
|
ok('Updated .agents/scripts/lib/agent-infra-package.js');
|
|
122
|
+
renderFile(
|
|
123
|
+
path.join(templateDir, '.agents', 'scripts', 'package.json'),
|
|
124
|
+
path.join('.agents', 'scripts', 'package.json'),
|
|
125
|
+
replacements
|
|
126
|
+
);
|
|
127
|
+
ok('Updated .agents/scripts/package.json');
|
|
122
128
|
const added = {
|
|
123
129
|
managed: workflowPlan.projectAssets.registry.managed.filter(
|
|
124
130
|
(entry) => !currentRegistry.managed.includes(entry)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fitlab-ai/agent-infra",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.15",
|
|
4
4
|
"description": "Bootstrap tool for AI multi-tool collaboration infrastructure — works with Claude Code, Codex, Antigravity CLI, and OpenCode",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,12 +26,13 @@
|
|
|
26
26
|
"bin": {
|
|
27
27
|
"agent-infra": "./dist/bin/cli.js",
|
|
28
28
|
"ai": "./dist/bin/cli.js",
|
|
29
|
-
"agent-infra-internal": "./
|
|
29
|
+
"agent-infra-internal": "./bin/internal-cli.sh"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist/",
|
|
33
33
|
"!dist/**/*.map",
|
|
34
34
|
"bin/cli.ts",
|
|
35
|
+
"bin/internal-cli.sh",
|
|
35
36
|
"lib/",
|
|
36
37
|
"runtime/",
|
|
37
38
|
"templates/"
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"@clack/prompts": "1.7.0",
|
|
55
56
|
"@larksuiteoapi/node-sdk": "^1.68.0",
|
|
56
57
|
"cross-spawn": "^7.0.6",
|
|
58
|
+
"fs-native-extensions": "1.5.1",
|
|
57
59
|
"picocolors": "1.1.1",
|
|
58
60
|
"semver": "^7.8.1",
|
|
59
61
|
"smol-toml": "^1.6.1",
|
|
@@ -65,6 +67,9 @@
|
|
|
65
67
|
"prepare": "git config core.hooksPath .git-hooks || true",
|
|
66
68
|
"typecheck": "tsc -p tsconfig.test.json --noEmit && tsc -p tsconfig.jschecks.json --noEmit",
|
|
67
69
|
"test:smoke": "node scripts/run-tests.js \"tests/unit/**/*.test.ts\"",
|
|
70
|
+
"test:smoke:fast": "node scripts/run-tests.js --skip-build \"tests/unit/**/*.test.ts\"",
|
|
71
|
+
"test:platform-smoke": "node scripts/run-tests.js \"tests/integration/platform-smoke/**/*.test.ts\"",
|
|
72
|
+
"test:platform-smoke:fast": "node scripts/run-tests.js --skip-build \"tests/integration/platform-smoke/**/*.test.ts\"",
|
|
68
73
|
"test:core": "node scripts/run-tests.js \"tests/unit/**/*.test.ts\" \"tests/integration/**/*.test.ts\"",
|
|
69
74
|
"test:integration": "node scripts/run-tests.js \"tests/integration/**/*.test.ts\" \"tests/e2e/**/*.test.ts\"",
|
|
70
75
|
"check": "npm run typecheck && npm test",
|
|
@@ -16,7 +16,7 @@ function internalCliInvocation(args) {
|
|
|
16
16
|
return { command: 'agent-infra-internal', commandArgs: args, shell: process.platform === 'win32' };
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function
|
|
19
|
+
function findCapabilityRef(value, depth = 0) {
|
|
20
20
|
if (depth > 5 || value == null) return '';
|
|
21
21
|
if (typeof value === 'string') {
|
|
22
22
|
const match = /agent-infra-codex-capability:([A-Za-z0-9_-]{20,})/.exec(value);
|
|
@@ -24,14 +24,14 @@ function findCapabilityToken(value, depth = 0) {
|
|
|
24
24
|
}
|
|
25
25
|
if (Array.isArray(value)) {
|
|
26
26
|
for (const entry of value) {
|
|
27
|
-
const found =
|
|
27
|
+
const found = findCapabilityRef(entry, depth + 1);
|
|
28
28
|
if (found) return found;
|
|
29
29
|
}
|
|
30
30
|
return '';
|
|
31
31
|
}
|
|
32
32
|
if (typeof value === 'object') {
|
|
33
33
|
for (const entry of Object.values(value)) {
|
|
34
|
-
const found =
|
|
34
|
+
const found = findCapabilityRef(entry, depth + 1);
|
|
35
35
|
if (found) return found;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -77,11 +77,11 @@ process.stdin.on('end', () => {
|
|
|
77
77
|
process.exit(1);
|
|
78
78
|
}
|
|
79
79
|
const managedAgent = /^agent-infra-lifecycle-(executor|reviewer)$/.test(String(nativeAgent || ''));
|
|
80
|
-
const
|
|
80
|
+
const capabilityRef = hook === 'post-tool' ? findCapabilityRef(toolResponse) : '';
|
|
81
81
|
const parentReconcile = hook === 'post-tool'
|
|
82
82
|
&& toolName === 'collaborationwait_agent'
|
|
83
83
|
&& toolResponse.timed_out !== true;
|
|
84
|
-
if (!managedAgent && !parentReconcile && !
|
|
84
|
+
if (!managedAgent && !parentReconcile && !capabilityRef) process.exit(0);
|
|
85
85
|
const hookDefinitionHash = createHash('sha256').update(readFileSync(codexHooks)).digest('hex');
|
|
86
86
|
const normalized = {
|
|
87
87
|
sessionId: String(event.session_id || ''),
|
|
@@ -96,7 +96,7 @@ process.stdin.on('end', () => {
|
|
|
96
96
|
taskName: String(toolInput.task_name || ''),
|
|
97
97
|
transcriptPath: String(event.transcript_path || '')
|
|
98
98
|
};
|
|
99
|
-
if (
|
|
99
|
+
if (capabilityRef) normalized.capabilityRef = capabilityRef;
|
|
100
100
|
const args = ['codex-lifecycle', 'hook-event', '--event', hook, '--bridge', 'true'];
|
|
101
101
|
try {
|
|
102
102
|
const { command, commandArgs, shell } = internalCliInvocation(args);
|
|
@@ -13,7 +13,9 @@ so you can quickly find "which ones to read" without opening each file.
|
|
|
13
13
|
- [`version-stamp.md`](version-stamp.md) — How and when to stamp `agent_infra_version`.
|
|
14
14
|
- [`debugging-guide.md`](debugging-guide.md) — Structured debugging flow: gather evidence → form hypothesis → verify hypothesis → fix the root cause; no blind patch-and-retry.
|
|
15
15
|
- [`compatibility-policy.md`](compatibility-policy.md) — Compatibility by exception: admission evidence, implementation boundaries, exit conditions, and lifecycle review requirements.
|
|
16
|
+
- [`evidence-reporting.md`](evidence-reporting.md) — Minimum evidence semantics for state checks, successful summaries, exceptional results, identity fields, and sensitive data boundaries.
|
|
16
17
|
- [`sync-content-generation.md`](sync-content-generation.md) — Producer-side Markdown constraints for task and lifecycle content synchronized to Issues.
|
|
18
|
+
- [`decision-qualification.md`](decision-qualification.md) — Constraint, candidate, human-confirmation, and six-artifact qualification-audit contract.
|
|
17
19
|
|
|
18
20
|
## Issue / PR
|
|
19
21
|
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
- [`version-stamp.md`](version-stamp.md) — `agent_infra_version` 版本戳的取值命令与写入时机。
|
|
13
13
|
- [`debugging-guide.md`](debugging-guide.md) — 结构化调试流程:收集证据→形成假设→验证假设→修复根因,禁止盲目改代码重试。
|
|
14
14
|
- [`compatibility-policy.md`](compatibility-policy.md) — 兼容性默认关闭:准入证据、实现边界、退出条件与生命周期审查要求。
|
|
15
|
+
- [`evidence-reporting.md`](evidence-reporting.md) — 生命周期报告的状态核对、成功摘要、异常证据、身份字段和敏感信息边界。
|
|
15
16
|
- [`sync-content-generation.md`](sync-content-generation.md) — 同步到 Issue 的任务和生命周期 Markdown 生成约束。
|
|
17
|
+
- [`decision-qualification.md`](decision-qualification.md) — 约束、候选、人工确认和六类 artifact 资格审计契约。
|
|
16
18
|
|
|
17
19
|
## Issue / PR
|
|
18
20
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Decision Qualification and Constraint Audit
|
|
2
|
+
|
|
3
|
+
Any analysis, plan, implementation, or review that decides whether a human decision is needed must audit qualification from the normalized constraints and candidates in `task.md` before creating `HD-N`.
|
|
4
|
+
|
|
5
|
+
## Single source of truth
|
|
6
|
+
|
|
7
|
+
- The `### Constraints` and `### Candidate and Rejected Options` tables in `task.md` are the only constraint and candidate fact source.
|
|
8
|
+
- The constraint table uses `constraint_id`, `statement`, `status`, `authority`, `source`, `evidence`, `derived_from`, and `approval_evidence`; the candidate table uses `candidate_id`, `statement`, `status`, `constraint_ids`, `impact`, and `evidence`.
|
|
9
|
+
- All six artifact families must include `## Qualification Audit` with actual constraint dependencies, candidate qualification, classification results, upstream relations, and a dependency snapshot. Each upstream relation records family, file name, round, and SHA-256.
|
|
10
|
+
|
|
11
|
+
## Status and confirmation
|
|
12
|
+
|
|
13
|
+
- A `confirmed` constraint requires source evidence, the current semantic digest, and a qualification confirmation record; a confirmation for an old digest cannot be reused.
|
|
14
|
+
- `derived`, `assumption`, `open`, `conflicted`, and `superseded` are pending facts and cannot automatically exclude a candidate.
|
|
15
|
+
- The internal proposal entry point may write only non-confirmed constraints and `pending` candidates. It cannot write actor, QCR, confirmed, or approval fields.
|
|
16
|
+
- `agent-infra-internal task-qualification` is the internal confirmation, supersession, and revocation entry point for agents and skills; ordinary users are not exposed to the constraint-digest protocol. `human-declared` is an audit label, not identity authentication. On confirmation, the core generates the QCR and binds it to the current post-write per-constraint digest, request id, time, and a single-line rationale. Supersession and revocation move the constraint to `superseded` and `open`, respectively, clear current approval evidence, and retain historical QCRs.
|
|
17
|
+
|
|
18
|
+
## Invalidation and review
|
|
19
|
+
|
|
20
|
+
When a constraint changes, only artifacts declaring the affected `C-N` can be direct invalidation seeds; the change then follows the real downstream closure. All six families, including reviews, are symmetric. If snapshots, relations, or change classification cannot prove a pure constraint change, use the existing full invalidation path. The newly completed source artifact, its receipt, and its derived snapshot are excluded from the old target graph.
|
|
21
|
+
|
|
22
|
+
Missing or unknown references, digest mismatches, dangling relations, and cycles fail closed. Formatting-only changes must not change semantic digests; changes to meaning, provenance, status, candidates, or upstream identity require a new audit.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 决策资格与约束审计
|
|
2
|
+
|
|
3
|
+
涉及“是否需要人工裁决”的分析、方案、实现或审查,必须先基于 `task.md` 的规范化约束和候选表完成资格审计,再决定是否创建 `HD-N`。
|
|
4
|
+
|
|
5
|
+
## 唯一事实源
|
|
6
|
+
|
|
7
|
+
- `task.md` 的 `### 约束` 和 `### 候选与否决方案` 是唯一约束/候选事实源。
|
|
8
|
+
- 约束表必须使用 `constraint_id`、`statement`、`status`、`authority`、`source`、`evidence`、`derived_from`、`approval_evidence`;候选表必须使用 `candidate_id`、`statement`、`status`、`constraint_ids`、`impact`、`evidence`。
|
|
9
|
+
- 六类阶段产物都要在 `## 资格审计` 中声明实际约束依赖、候选资格、分类结果、上游关系和依赖快照。上游关系必须保存 artifact 的 family、文件名、round 和 SHA-256。
|
|
10
|
+
|
|
11
|
+
## 状态与确认
|
|
12
|
+
|
|
13
|
+
- `confirmed` 约束必须有来源证据、当前语义 digest 和 `资格确认记录`;旧 digest 的确认不能复用。
|
|
14
|
+
- `derived`、`assumption`、`open`、`conflicted`、`superseded` 只能作为待审事实,不能自动排除候选。
|
|
15
|
+
- 内部 proposal 入口只能写入非 confirmed 约束和 `pending` 候选,不能写 actor、QCR、confirmed 或 approval 字段。
|
|
16
|
+
- `agent-infra-internal task-qualification` 是供 Agent/skill 使用的内部确认、替代和撤销入口,不向普通用户暴露 constraint digest 协议;`human-declared` 是审计标签,不是身份认证。确认时 QCR 由核心生成并绑定确认写入后的当前单约束 digest、request id、时间和单行理由;替代与撤销分别把约束转为 `superseded` 与 `open`,清空当前 approval evidence,并保留历史 QCR。
|
|
17
|
+
|
|
18
|
+
## 失效与审查
|
|
19
|
+
|
|
20
|
+
约束变化时,只有声明受影响 `C-N` 的 artifact 才能成为直接失效种子,并沿真实上游关系的下游闭包传播;六类 artifact(含 review)对等处理。快照、关系图或变化分类无法证明为纯约束变化时,回退既有全量失效路径。新完成的 source artifact、自身 receipt 和派生快照不作为旧图目标。
|
|
21
|
+
|
|
22
|
+
缺失、未知引用、digest 不匹配、悬空关系或环都必须 fail closed。排版变化不应改变语义 digest;语义、来源、状态、候选或上游 identity 变化必须触发重新审计。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Lifecycle Evidence Reporting
|
|
2
|
+
|
|
3
|
+
This rule governs lifecycle reports persisted in the task workspace or synchronized to an Issue. It defines the minimum evidence semantics without changing artifact identity, receipts, synchronization, or restore protocols.
|
|
4
|
+
|
|
5
|
+
## State Check
|
|
6
|
+
|
|
7
|
+
- Record the `task-snapshot` command and its task, artifact, and scope.
|
|
8
|
+
- For normal results, record the key conclusion and exceptions; do not repeat the full directory listing or `task.md` tail.
|
|
9
|
+
- For identity mismatches, failures, blocking conditions, or disputes, retain the decisive raw lines that support the judgment.
|
|
10
|
+
|
|
11
|
+
## Successful Checks
|
|
12
|
+
|
|
13
|
+
Every successful check records the command or an allowed public command name, target and scope, exit status or structured result, actual result, and uncovered parts. Do not write only “passed” or “tests passed”, and do not paste complete successful stdout by default.
|
|
14
|
+
|
|
15
|
+
## Failures, Blocking Conditions, and Disputes
|
|
16
|
+
|
|
17
|
+
Record a reproducible command or entry point, the exact file/line/object/version location, exit status, and the smallest decisive excerpt supporting the conclusion. If reproduction is unavailable, state the limitation explicitly rather than presenting incomplete evidence as success.
|
|
18
|
+
|
|
19
|
+
## Preserved Identity and Security Boundaries
|
|
20
|
+
|
|
21
|
+
- Preserve artifact SHA-256, semantic digest, review head, receipt, request-id, snapshot tree, and platform marker exactly.
|
|
22
|
+
- The Issue continues to mirror the complete report; the report must not depend on logs accessible only on the local machine.
|
|
23
|
+
- Manual validation keeps its stricter basename-only and sanitized-result rules; this shared rule does not expand public fields.
|
|
24
|
+
- A `$ ` command line satisfies the structural gate but does not require complete successful output.
|
|
25
|
+
|
|
26
|
+
## Evidence Pairing
|
|
27
|
+
|
|
28
|
+
Pair every verification claim with a `$ ` command and a proportionate result summary. Include a decisive raw excerpt only for failure, blocking, or dispute conclusions. When a command contains sensitive arguments, use its allowed public name or a redacted command.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 生命周期报告证据记录规则
|
|
2
|
+
|
|
3
|
+
本规则约束会持久化到任务目录或同步到 Issue 的生命周期报告。它统一报告的最低证据语义,不改变 artifact 身份、receipt、同步或恢复协议。
|
|
4
|
+
|
|
5
|
+
## 状态核对
|
|
6
|
+
|
|
7
|
+
- 记录 `task-snapshot` 命令及任务、产物和检查范围。
|
|
8
|
+
- 正常结果记录关键结论和异常;不要重复粘贴完整目录清单或 `task.md` 尾部。
|
|
9
|
+
- 身份不一致、失败、阻塞或争议时,保留能支持判断的决定性原文行。
|
|
10
|
+
|
|
11
|
+
## 成功检查
|
|
12
|
+
|
|
13
|
+
成功路径至少记录:命令或允许公开的命令名称、目标与检查范围、退出状态或结构化结果、实际结果、未覆盖部分。不能只写“通过”或“测试通过”,也不默认粘贴完整成功 stdout。
|
|
14
|
+
|
|
15
|
+
## 失败、阻塞和争议
|
|
16
|
+
|
|
17
|
+
记录可复现的命令或调用入口、准确的文件/行号/对象/版本位置、退出状态,以及决定结论的最小决定性摘录。无法复现时明确写出限制,不把不完整证据写成成功。
|
|
18
|
+
|
|
19
|
+
## 不变的身份与安全边界
|
|
20
|
+
|
|
21
|
+
- artifact SHA-256、semantic digest、review head、receipt、request-id、快照树和平台 marker 必须精确保留。
|
|
22
|
+
- Issue 继续镜像报告全文;报告不得依赖只有本机可访问的日志。
|
|
23
|
+
- 人工验证继续使用 basename-only、sanitized result 等更严格规则;共享规则不扩大可公开字段。
|
|
24
|
+
- `$ ` 命令行标记满足结构门禁,但不要求附带完整成功输出。
|
|
25
|
+
|
|
26
|
+
## 证据配对
|
|
27
|
+
|
|
28
|
+
报告中的每个验证断言都应配一个 `$ ` 命令和相称结果摘要;只有失败、阻塞或争议结论才附决定性原文摘录。命令含敏感参数时使用允许公开的命令名或脱敏命令。
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Read this rule before initializing labels or milestones, or before changing milestone metadata during release work.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Runtime intent entry points
|
|
6
6
|
|
|
7
|
-
Use the
|
|
7
|
+
Use the internal runtime intents rather than composing platform commands in a skill:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
agent-infra-internal platform-metadata init-labels [--cleanup-stale-in]
|
|
11
|
+
agent-infra-internal platform-metadata init-milestones [--history]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
`init-labels
|
|
14
|
+
The `init-labels` runtime intent reads the repository's `labels.in` configuration, creates or updates the declared `in:` labels, and preserves unrelated labels. `--cleanup-stale-in` is destructive and may only be passed after explicit confirmation; it removes stale `in:` labels that are no longer declared.
|
|
15
15
|
|
|
16
|
-
`init-milestones
|
|
16
|
+
The `init-milestones` runtime intent owns milestone planning and result reporting. Callers must pass the requested arguments through unchanged and must not rebuild milestone discovery, ordering, or write logic.
|
|
17
17
|
|
|
18
|
-
Both
|
|
18
|
+
Both intents return a stable status. A successful no-op is still success; a degraded result must be reported without claiming that remote metadata was changed. Failed or cancelled operations must not be reported as completed.
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
在初始化 label、milestone,或在发布工作中修改 milestone 元数据前,先阅读本规则。
|
|
4
4
|
|
|
5
|
-
## 入口
|
|
5
|
+
## Runtime intent 入口
|
|
6
6
|
|
|
7
|
-
SKILL
|
|
7
|
+
SKILL 应调用内部 runtime intent,不得自行拼装平台命令:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
agent-infra-internal platform-metadata init-labels [--cleanup-stale-in]
|
|
11
|
+
agent-infra-internal platform-metadata init-milestones [--history]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
`init-labels
|
|
14
|
+
`init-labels` runtime intent 读取仓库的 `labels.in` 配置,创建或更新声明的 `in:` label,并保留无关 label。`--cleanup-stale-in` 具有破坏性,只有在得到明确确认后才能传入;它会删除不再声明的过期 `in:` label。
|
|
15
15
|
|
|
16
|
-
`init-milestones
|
|
16
|
+
`init-milestones` runtime intent 负责 milestone 规划和结果报告。调用方应原样传递请求参数,不得重新实现 milestone 发现、排序或写入逻辑。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
两个 intent 都返回稳定状态。成功的 no-op 仍算成功;degraded 结果必须如实报告,不能声称远端元数据已变更。失败或取消的操作不得报告为已完成。
|
|
@@ -5,7 +5,7 @@ This rule applies when `analyze-task`, `plan-task`, or `code-task` handles **the
|
|
|
5
5
|
## Pre-completion gate for analysis, plan, and code artifacts
|
|
6
6
|
|
|
7
7
|
- `analyze-task`, `plan-task`, and `code-task` must call `task-artifact ... finalize-local` before publishing a completed event; pass only that call's `artifactSha256` and `semanticDigest` to the completed event.
|
|
8
|
-
- `finalize-local` does not modify the artifact or task state, but it writes a one-shot local provenance intent in the repository workspace. After `failed`, the model may make one minimal edit in the same artifact only when `repairable=true` and the diagnostic explicitly describes
|
|
8
|
+
- `finalize-local` does not modify the artifact or task state, but it writes a one-shot local provenance intent in the repository workspace. After `failed`, the model may make one minimal edit in the same artifact only when `repairable=true` and the diagnostic explicitly describes one provably safe structural operation (the current shared engine operations are `replace-line` and `insert-section`), then rerun the same call completely; count each byte-changing edit, up to 8.
|
|
9
9
|
- The first repairable failure's semantic digest is retained in that intent; a later `passed` result must match the baseline, and the completed event must verify and atomically transition the same intent to `consumed` before writing `task.md` under the task lock. A consumption failure must not write the task; the consumed intent is durable and retryable, so no failure-prone post-write deletion is attempted. Do not replace a failed baseline with a newly computed digest or publish a completed event without the finalizer.
|
|
10
10
|
- After `failed`, no progress, or a repeated diagnostic or fingerprint, do not publish a completed event. After `passed`, do not rescan or manually write summary data.
|
|
11
11
|
|
|
@@ -40,6 +40,10 @@ If any condition fails, stop immediately without invoking a model edit. The mode
|
|
|
40
40
|
|
|
41
41
|
The repair count exists only in the in-memory context of the current skill invocation. Do not write it to `task.md`, the ledger, or a public receipt. Do not create different normal budgets by error code, skill, or problem type.
|
|
42
42
|
|
|
43
|
+
## Shared Structural Engine
|
|
44
|
+
|
|
45
|
+
The report skeleton is created by `agent-infra-internal task-artifact {task-id} init --family {family} --artifact {artifact}`. The skeleton writes only identity, headings, and `artifact-section:{family}:{section-id}` markers; it does not represent semantic completion. The current skill must fill each slot with real content. When the finalizer returns one provably safe structural operation, use that result's SHA and semantic digest with `task-artifact {task-id} repair --family {family} --artifact {artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`. Repair executes only the one operation from the shared engine, does not write `task.md`, the ledger, receipts, Git, or platform resources, and must be followed by a complete rerun of the original finalizer.
|
|
46
|
+
|
|
43
47
|
## Completion Events and User Output
|
|
44
48
|
|
|
45
49
|
- After the final complete finalizer result succeeds, publish the review completed event using that same result's provenance, ledger state, verdict, and counts. Generate cross-stage next-step commands only when `stageStatus.canAdvance=true` and the verdict is Approved; when `canAdvance=false`, still record the result and route to same-stage revision/review.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 分析、方案和代码产物完成前门禁
|
|
6
6
|
|
|
7
7
|
- `analyze-task`、`plan-task` 和 `code-task` 必须在发布 completed 事件前调用 `task-artifact ... finalize-local`;只有同一次返回的 `artifactSha256` 和 `semanticDigest` 才能传给 completed 事件。
|
|
8
|
-
- `finalize-local` 不修改产物或任务状态,但会在仓库工作区写入一次性的本地 provenance intent。返回 `failed` 时,只有 `repairable=true`
|
|
8
|
+
- `finalize-local` 不修改产物或任务状态,但会在仓库工作区写入一次性的本地 provenance intent。返回 `failed` 时,只有 `repairable=true` 且诊断明确为一个可证明安全的结构操作(当前共享引擎操作为 `replace-line` 或 `insert-section`),模型才可在同一产物中执行一次最小编辑,然后完整重跑同一调用;每次实际字节修改计一次,最多 8 次。
|
|
9
9
|
- 首次可修复失败的 semantic digest 会保存在该 intent 中;后续 `passed` 必须匹配该基线,completed event 还必须在任务锁内验证并在写 task.md 前原子转换为 `consumed` 状态。消费失败时不得写任务;转换后的 intent 是可重试的 durable 记录,成功写入后不再执行可能失败的后置删除。不得用重新计算的新摘要替换失败基线,也不得绕过 finalizer 直接发布 completed event。
|
|
10
10
|
- 返回 `failed`、无进展、诊断或指纹重复时不得发布 completed 事件;返回 `passed` 后也不得重新扫描或手工补写摘要。
|
|
11
11
|
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
|
|
41
41
|
修复次数只存在于当前 skill invocation 的内存上下文,不写入 task.md、ledger 或公共 receipt。不得按错误码、技能或问题类型设置不同的正常预算。
|
|
42
42
|
|
|
43
|
+
## 共享结构引擎
|
|
44
|
+
|
|
45
|
+
报告骨架由 `agent-infra-internal task-artifact {task-id} init --family {family} --artifact {artifact}` 创建。骨架只写身份、标题和 `artifact-section:{family}:{section-id}` marker,不代表语义完成;槽位必须由当前 skill 填入真实内容。finalizer 返回单一可证明结构操作时,使用同一返回值的 SHA 和 semantic digest 调用 `task-artifact {task-id} repair --family {family} --artifact {artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`。repair 只执行共享引擎给出的一个结构操作,不写 task.md、ledger、receipt、Git 或平台资源,之后必须完整重跑原 finalizer。
|
|
46
|
+
|
|
43
47
|
## 完成事件与用户输出
|
|
44
48
|
|
|
45
49
|
- 最终一次完整 finalizer 成功后,必须使用同一次返回的 provenance、账本状态、verdict 和计数发布 review completed 事件;`stageStatus.canAdvance=true` 且结论为 Approved 时才可生成跨阶段 next-step 命令,`canAdvance=false` 时仍须登记结果并路由到同阶段修订/复审。
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Read this rule before importing or dismissing dependency or code-scanning alerts.
|
|
4
4
|
|
|
5
|
-
## Shared
|
|
5
|
+
## Shared runtime intent
|
|
6
6
|
|
|
7
|
-
All callers use the
|
|
7
|
+
All callers use the runtime security intent and parse its single JSON result:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
agent-infra-internal platform-security read --kind dependabot --number {number}
|
|
11
|
+
agent-infra-internal platform-security dismiss --kind dependabot --number {number} --reason {reason} --comment-file {file}
|
|
12
|
+
agent-infra-internal platform-security read --kind code-scanning --number {number}
|
|
13
|
+
agent-infra-internal platform-security dismiss --kind code-scanning --number {number} --reason {reason} --comment-file {file}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The result contains `status`, `operation`, and either `data` or `error.code` plus `error.message`. The status is one of `applied`, `no-op`, `degraded`, or `failed`. Diagnostics belong on stderr; stdout must contain exactly one JSON object.
|
|
17
17
|
|
|
18
|
-
Read the current alert before any dismiss operation.
|
|
18
|
+
Read the current alert before any dismiss operation. The runtime intent validates the structured reason, and the generated task or Issue comment must be passed through `--comment-file`.
|
|
19
19
|
|
|
20
|
-
Do not
|
|
20
|
+
Do not execute platform commands or implement the platform state machine directly from a SKILL. A degraded or failed result must be reported accurately, and cancelled or failed operations must not be recorded as successful.
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
在导入或关闭依赖告警、代码扫描告警前,先阅读本规则。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 共享 runtime intent 入口
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
所有调用方都使用 runtime security intent,并解析其单个 JSON 结果:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
agent-infra-internal platform-security read --kind dependabot --number {number}
|
|
11
|
+
agent-infra-internal platform-security dismiss --kind dependabot --number {number} --reason {reason} --comment-file {file}
|
|
12
|
+
agent-infra-internal platform-security read --kind code-scanning --number {number}
|
|
13
|
+
agent-infra-internal platform-security dismiss --kind code-scanning --number {number} --reason {reason} --comment-file {file}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
结果包含 `status`、`operation`,以及 `data` 或 `error.code` 与 `error.message`。`status` 只能是 `applied`、`no-op`、`degraded` 或 `failed`。诊断信息写入 stderr;stdout 必须只包含一个 JSON 对象。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
任何关闭操作前都必须先读取当前告警。关闭原因由 runtime intent 作为结构化输入校验,生成的任务或 Issue 评论必须通过 `--comment-file` 传入。
|
|
19
19
|
|
|
20
|
-
SKILL
|
|
20
|
+
SKILL 不得直接执行平台命令或实现平台状态机。degraded 或 failed 结果必须如实报告,取消或失败的操作不得记录为成功。
|
|
@@ -43,6 +43,8 @@ This mirrors "Goal-Driven Execution" in AGENTS.md: define a verifiable success c
|
|
|
43
43
|
|
|
44
44
|
Complete each item below for this repository. Record the chosen behavior and its boundaries so contributors can select and validate tests consistently.
|
|
45
45
|
|
|
46
|
+
When a project uses a cross-platform smoke boundary, keep real CLI, git, shell, environment-forwarding, and process-lifecycle tests outside the unit tier. Document which operating systems execute that boundary and keep structural tier checks separate from line coverage.
|
|
47
|
+
|
|
46
48
|
### 1. Test commands
|
|
47
49
|
|
|
48
50
|
> TODO: Document the complete test command and any faster commands used during development.
|
|
@@ -43,6 +43,8 @@ assert.match(content, /^name: code-task$/m); // 正向断言已足够
|
|
|
43
43
|
|
|
44
44
|
请为本仓库填写以下各项,记录选定行为及其边界,以便贡献者一致地选择并验证测试。
|
|
45
45
|
|
|
46
|
+
如果项目使用跨平台 smoke 边界,应将真实 CLI、git、shell、环境透传和进程生命周期测试放在 unit 层之外;记录该边界运行的操作系统,并将测试层级结构检查与代码行覆盖率分开。
|
|
47
|
+
|
|
46
48
|
### 1. 测试命令
|
|
47
49
|
|
|
48
50
|
> TODO: 记录完整测试命令,以及开发期间使用的可选快速命令。
|
|
@@ -13,6 +13,11 @@ If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--or
|
|
|
13
13
|
|
|
14
14
|
## Boundary / Critical Rules
|
|
15
15
|
|
|
16
|
+
### Persisted Report Evidence
|
|
17
|
+
|
|
18
|
+
Before generating the analysis report, read `.agents/rules/evidence-reporting.md`. Record the command, target scope, status or structured result, actual result, and uncovered parts for state checks and successful checks; include decisive raw excerpts only for failures, blocking conditions, or disputes.
|
|
19
|
+
|
|
20
|
+
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the five qualification-audit tables in the analysis artifact; unknown or unconfirmed constraints must not automatically exclude a candidate
|
|
16
21
|
- This skill only outputs a requirements analysis document (`analysis.md` or `analysis-r{N}.md`) and does not modify any business code
|
|
17
22
|
- Base the analysis strictly on the existing task input, requirements, context, and source information in `task.md`
|
|
18
23
|
- Before generating task or lifecycle Markdown that will be synchronized to an Issue, read `.agents/rules/sync-content-generation.md` and apply its producer-side constraints; the sync path does not parse or rewrite the body
|
|
@@ -25,7 +30,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
25
30
|
|
|
26
31
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
|
|
27
32
|
|
|
28
|
-
Run these commands and
|
|
33
|
+
Run these commands and record the task/artifact scope, key result, and uncovered parts in this round's `## State Check` section; do not paste complete directory listings or task tails on normal success. Retain decisive raw lines only for failures, blocking conditions, identity mismatches, or disputes:
|
|
29
34
|
|
|
30
35
|
```bash
|
|
31
36
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -129,6 +134,14 @@ Follow the `analysis` step in `.agents/workflows/feature-development.yaml`:
|
|
|
129
134
|
|
|
130
135
|
### 6. Output Analysis Document
|
|
131
136
|
|
|
137
|
+
Before writing this round's `{analysis-artifact}`, create the controlled report skeleton:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
agent-infra-internal task-artifact {task-id} init --family analysis --artifact {analysis-artifact} --locale en
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The skeleton contains identity metadata, stable section markers, and required headings only; real analysis content is required before the completion gate can pass. If the finalizer returns one provably safe structural error, call `task-artifact {task-id} repair --family analysis --artifact {analysis-artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`, then rerun the same finalizer.
|
|
144
|
+
|
|
132
145
|
> Steps 6–9 are the **Scenario A (normal output)** path. **Scenario B (ask and early-exit)** already finished its state update, task-comment sync, and verification inside step 4 and STOPped, so it does not enter these steps.
|
|
133
146
|
|
|
134
147
|
Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
@@ -143,7 +156,7 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
|
143
156
|
|
|
144
157
|
## State Check
|
|
145
158
|
|
|
146
|
-
>
|
|
159
|
+
> Record the Step 0 state-check command, task/artifact scope, key result, and uncovered parts; each command starts with `$ `. Do not paste complete directory listings or task tails on normal success; retain decisive raw lines only for failures, blocking conditions, identity mismatches, or disputes.
|
|
147
160
|
|
|
148
161
|
## Requirement Source
|
|
149
162
|
|