@warpgogol/forge 6.3.6 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/README.md +2 -1
- package/bin/cli.js +6 -12
- package/bin/resolve-entry.js +24 -0
- package/dist/os/compass/comment-safety.d.ts +83 -0
- package/dist/os/compass/comment-safety.d.ts.map +1 -0
- package/dist/os/compass/comment-safety.js +305 -0
- package/dist/os/compass/comment-safety.js.map +1 -0
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +47 -4
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts +2 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +34 -10
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-docs-scaffold.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-docs-scaffold.js +54 -17
- package/dist/os/compass/handlers/compass-docs-scaffold.js.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold-handler.d.ts +14 -0
- package/dist/os/compass/handlers/compass-header-scaffold-handler.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js +261 -0
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js.map +1 -0
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts +31 -0
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-header-scaffold.js +739 -0
- package/dist/os/compass/handlers/compass-header-scaffold.js.map +1 -0
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +8 -4
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.d.ts +6 -0
- package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.js +28 -13
- package/dist/os/compass/handlers/compass-inventory.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js +12 -26
- package/dist/os/compass/handlers/compass-migrate-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.d.ts +15 -2
- package/dist/os/compass/handlers/compass-migrate.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.js +58 -20
- package/dist/os/compass/handlers/compass-migrate.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts +10 -0
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +58 -4
- package/dist/os/compass/handlers/git-revision.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts +20 -5
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +175 -44
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/compass/index.d.ts +1 -0
- package/dist/os/compass/index.d.ts.map +1 -1
- package/dist/os/compass/index.js +2 -0
- package/dist/os/compass/index.js.map +1 -1
- package/dist/os/compass/policy.d.ts +9 -0
- package/dist/os/compass/policy.d.ts.map +1 -1
- package/dist/os/compass/policy.js +11 -2
- package/dist/os/compass/policy.js.map +1 -1
- package/dist/os/core/core.module.js +1 -1
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +1 -6
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/queue/types.d.ts +2 -0
- package/dist/os/queue/types.d.ts.map +1 -1
- package/dist/os/queue/types.js +3 -1
- package/dist/os/queue/types.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +66 -2
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +21 -3
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/dna-trace.d.ts +2 -0
- package/dist/os/rfc/dna-trace.d.ts.map +1 -1
- package/dist/os/rfc/dna-trace.js +13 -4
- package/dist/os/rfc/dna-trace.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts +37 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.js +118 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts +41 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +645 -47
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts +42 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts.map +1 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.js +147 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.js.map +1 -0
- package/dist/os/rfc/handlers/validate-rules.d.ts +9 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +71 -10
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/reachable-symbol.d.ts +17 -0
- package/dist/os/rfc/reachable-symbol.d.ts.map +1 -0
- package/dist/os/rfc/reachable-symbol.js +376 -0
- package/dist/os/rfc/reachable-symbol.js.map +1 -0
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +99 -10
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +112 -14
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +27 -10
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +25 -0
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +244 -13
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +58 -0
- package/dist/os/rfc/verification-origin.d.ts.map +1 -0
- package/dist/os/rfc/verification-origin.js +346 -0
- package/dist/os/rfc/verification-origin.js.map +1 -0
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +11 -1
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/rfc/verify-workspace.d.ts +23 -0
- package/dist/os/rfc/verify-workspace.d.ts.map +1 -0
- package/dist/os/rfc/verify-workspace.js +278 -0
- package/dist/os/rfc/verify-workspace.js.map +1 -0
- package/dist/os/session/handlers/metrics-rfc.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.js +3 -0
- package/dist/os/session/handlers/metrics-rfc.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +5 -23
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +30 -9
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/workflow/handlers.d.ts +0 -4
- package/dist/os/workflow/handlers.d.ts.map +1 -1
- package/dist/os/workflow/handlers.js +9 -36
- package/dist/os/workflow/handlers.js.map +1 -1
- package/dist/os/workflow/index.d.ts +2 -2
- package/dist/os/workflow/index.d.ts.map +1 -1
- package/dist/os/workflow/index.js +1 -1
- package/dist/os/workflow/index.js.map +1 -1
- package/dist/os/workflow/types.d.ts +0 -19
- package/dist/os/workflow/types.d.ts.map +1 -1
- package/dist/os/workflow/types.js +0 -2
- package/dist/os/workflow/types.js.map +1 -1
- package/dist/os/workflow/workflow.module.d.ts.map +1 -1
- package/dist/os/workflow/workflow.module.js +6 -15
- package/dist/os/workflow/workflow.module.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +5 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +5 -2
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/onboarding/agents-generate.js +1 -1
- package/dist/src/onboarding/doctor.js +3 -3
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.js +2 -2
- package/dist/src/onboarding/nested-agents-templates.js +1 -1
- package/dist/src/onboarding/prettierignore.js +1 -1
- package/dist/src/onboarding/upgrade.js +2 -2
- package/dist/src/onboarding/workspace-discovery.js +1 -1
- package/dist/src/profiles/profile-schema.d.ts +2 -0
- package/dist/src/profiles/profile-schema.d.ts.map +1 -1
- package/dist/src/profiles/profile-schema.js +1 -0
- package/dist/src/profiles/profile-schema.js.map +1 -1
- package/dist/src/profiles/stack-profile.d.ts +1 -0
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/skill-schema.d.ts +2 -0
- package/dist/src/skill-schema.d.ts.map +1 -1
- package/dist/src/skill-schema.js +9 -1
- package/dist/src/skill-schema.js.map +1 -1
- package/dist/src/types.d.ts +23 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -1
- package/dist/src/types.js.map +1 -1
- package/docs/reference/cli.md +0 -1
- package/docs/reference/programmatic-api.md +1 -1
- package/os/adr/handlers/validate.test.ts +14 -0
- package/os/compass/comment-safety.ts +331 -0
- package/os/compass/compass.module.ts +50 -4
- package/os/compass/handlers/compass-change-summary-handler.ts +41 -11
- package/os/compass/handlers/compass-docs-scaffold.ts +59 -17
- package/os/compass/handlers/compass-game-extensions.test.ts +3 -7
- package/os/compass/handlers/compass-header-scaffold-handler.ts +352 -0
- package/os/compass/handlers/compass-header-scaffold.ts +847 -0
- package/os/compass/handlers/compass-inventory-handler.ts +9 -4
- package/os/compass/handlers/compass-inventory.ts +29 -13
- package/os/compass/handlers/compass-migrate-handler.ts +13 -27
- package/os/compass/handlers/compass-migrate.ts +77 -21
- package/os/compass/handlers/git-revision.ts +59 -4
- package/os/compass/handlers/resolve-scan-root-package.test.ts +14 -0
- package/os/compass/handlers/resolve-scan-root-workpiece.test.ts +14 -0
- package/os/compass/handlers/summary-record.ts +194 -41
- package/os/compass/handlers/tests/compass-audit-plan.test.ts +6 -0
- package/os/compass/handlers/tests/compass-audit-record.test.ts +6 -0
- package/os/compass/handlers/tests/compass-audit-validate.test.ts +6 -0
- package/os/compass/handlers/tests/compass-change-summary-handler.test.ts +131 -0
- package/os/compass/handlers/tests/compass-docs-validate.test.ts +6 -0
- package/os/compass/handlers/tests/compass-header-scaffold.test.ts +896 -0
- package/os/compass/handlers/tests/compass-ledger-scope.test.ts +6 -0
- package/os/compass/handlers/tests/compass-migrate.test.ts +87 -9
- package/os/compass/handlers/tests/compass-policy.test.ts +1 -1
- package/os/compass/handlers/tests/compass-text-safety.test.ts +271 -0
- package/os/compass/handlers/tests/compass-v2-contract.test.ts +52 -3
- package/os/compass/handlers/tests/summary-record.test.ts +324 -3
- package/os/compass/index.ts +15 -0
- package/os/compass/policy.ts +27 -2
- package/os/core/core.module.ts +1 -1
- package/os/core/handlers/invariant-engine.test.ts +3 -1
- package/os/core/handlers/note-frontmatter-validate.test.ts +6 -1
- package/os/core/handlers/note-link-validate.test.ts +6 -1
- package/os/core/handlers/note-orphan-detect.test.ts +6 -1
- package/os/core/handlers/package-health.test.ts +6 -0
- package/os/core/handlers/package-health.ts +1 -6
- package/os/mission/handlers/archive.test.ts +14 -0
- package/os/naming/naming-convention.test.ts +14 -0
- package/os/queue/decision-ledger.test.ts +27 -4
- package/os/queue/queue-validate.test.ts +14 -0
- package/os/queue/types.ts +3 -1
- package/os/rfc/acceptance-reachable.test.ts +146 -0
- package/os/rfc/acceptance.test.ts +136 -0
- package/os/rfc/acceptance.ts +71 -2
- package/os/rfc/decision-log.ts +22 -4
- package/os/rfc/dna-trace.ts +17 -5
- package/os/rfc/frontmatter-io.test.ts +14 -0
- package/os/rfc/handlers/implement-stamp-acceptance-verification.test.ts +81 -0
- package/os/rfc/handlers/implement-stamp-binding.test.ts +79 -0
- package/os/rfc/handlers/implement-stamp-origin.test.ts +132 -0
- package/os/rfc/handlers/implement-stamp-origin.ts +154 -0
- package/os/rfc/handlers/implement-stamp-stale.test.ts +285 -0
- package/os/rfc/handlers/implement-stamp.ts +783 -55
- package/os/rfc/handlers/lifecycle.test.ts +14 -0
- package/os/rfc/handlers/rfc-evidence-sync.ts +221 -0
- package/os/rfc/handlers/validate-rules-rfc0997.test.ts +14 -0
- package/os/rfc/handlers/validate-rules-rfc1006.test.ts +14 -0
- package/os/rfc/handlers/validate-rules-rfc1330.test.ts +120 -0
- package/os/rfc/handlers/validate-rules-rfc1334.test.ts +65 -0
- package/os/rfc/handlers/validate-rules.test.ts +56 -0
- package/os/rfc/handlers/validate-rules.ts +101 -10
- package/os/rfc/handlers/validate.test.ts +4 -3
- package/os/rfc/reachable-symbol.ts +441 -0
- package/os/rfc/rfc-0000-template.md +21 -1
- package/os/rfc/rfc-create-concurrent.test.ts +6 -0
- package/os/rfc/rfc-create-hint.test.ts +6 -0
- package/os/rfc/rfc-read-only-no-side-effects.test.ts +6 -0
- package/os/rfc/rfc.module.ts +106 -10
- package/os/rfc/types.ts +151 -14
- package/os/rfc/verification-emit-check.test.ts +215 -0
- package/os/rfc/verification-emit-freshness.test.ts +415 -0
- package/os/rfc/verification-emit.test.ts +14 -0
- package/os/rfc/verification-evidence.ts +301 -13
- package/os/rfc/verification-normalize.test.ts +75 -0
- package/os/rfc/verification-origin.test.ts +236 -0
- package/os/rfc/verification-origin.ts +417 -0
- package/os/rfc/verification-refresh.test.ts +14 -0
- package/os/rfc/verification-refresh.ts +12 -1
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +78 -0
- package/os/rfc/verifier/rfc-1333/imp12-gate.acceptance.test.ts +81 -0
- package/os/rfc/verifier/rfc-1333/skills-and-types.acceptance.test.ts +50 -0
- package/os/rfc/verifier/rfc-1333/verify-workspace.acceptance.test.ts +103 -0
- package/os/rfc/verify-workspace.test.ts +122 -0
- package/os/rfc/verify-workspace.ts +342 -0
- package/os/session/handlers/metrics-rfc.ts +3 -0
- package/os/spec/spec-status.test.ts +130 -0
- package/os/spec/spec-status.ts +5 -18
- package/os/spec/spec-validate.test.ts +76 -1
- package/os/spec/spec-validate.ts +26 -7
- package/os/workflow/handlers.ts +8 -42
- package/os/workflow/index.ts +1 -4
- package/os/workflow/types.ts +0 -22
- package/os/workflow/workflow.module.ts +6 -16
- package/package.json +1 -1
- package/skills/_shared/agent-operating-model.md +83 -0
- package/skills/_shared/fo-pipeline-conventions.md +1 -0
- package/skills/fo/fo-add-tests/SKILL.md +14 -0
- package/skills/fo/fo-fix/SKILL.md +2 -1
- package/skills/fo/fo-handoff/SKILL.md +1 -1
- package/skills/fo/fo-idea/SKILL.md +6 -3
- package/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md +8 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +4 -2
- package/skills/fo/fo-idea-implement/SKILL.md +68 -53
- package/skills/fo/fo-idea-plan/SKILL.md +3 -1
- package/skills/fo/fo-review/SKILL.md +12 -0
- package/skills/fo/fo-session-save/learned-principles.md +13 -0
- package/skills/fo/fo-step-commit/SKILL.md +1 -1
- package/src/bin-entry.test.ts +37 -0
- package/src/compass/contract-registry.test.ts +14 -0
- package/src/compass/types.test.ts +14 -0
- package/src/config/__tests__/resolve-terminology.test.ts +14 -0
- package/src/config/forge-config.test.ts +14 -0
- package/src/config/forge-config.ts +7 -2
- package/src/forge-module.test.ts +14 -0
- package/src/knowledge/__tests__/promote.test.ts +14 -0
- package/src/knowledge/__tests__/serialize.test.ts +14 -0
- package/src/knowledge/__tests__/sync.test.ts +4 -1
- package/src/knowledge/budgets.test.ts +14 -0
- package/src/knowledge/compact.test.ts +14 -0
- package/src/knowledge/parse.test.ts +14 -0
- package/src/knowledge/schema.test.ts +14 -0
- package/src/migration-adapters/__tests__/ignored-files.test.ts +14 -0
- package/src/migration-adapters/__tests__/registry.test.ts +14 -0
- package/src/migration-adapters/__tests__/types.test.ts +14 -0
- package/src/onboarding/__tests__/workspace-discovery.test.ts +14 -0
- package/src/onboarding/agents-generate.ts +1 -1
- package/src/onboarding/compass-docs/semantic-layer-block.test.ts +6 -0
- package/src/onboarding/create.test.ts +14 -0
- package/src/onboarding/doctor-token-check.test.ts +3 -0
- package/src/onboarding/doctor.test.ts +14 -0
- package/src/onboarding/doctor.ts +3 -3
- package/src/onboarding/init.test.ts +14 -0
- package/src/onboarding/init.ts +2 -2
- package/src/onboarding/nested-agents-templates.ts +1 -1
- package/src/onboarding/prettierignore.ts +1 -1
- package/src/onboarding/scaffold.test.ts +14 -0
- package/src/onboarding/site-workshop-profile.test.ts +3 -0
- package/src/onboarding/templates/behavioral-layer-core.md +8 -0
- package/src/onboarding/upgrade.test.ts +14 -0
- package/src/onboarding/upgrade.ts +2 -2
- package/src/onboarding/workspace-discovery.ts +1 -1
- package/src/pipeline-status.test.ts +14 -0
- package/src/plugin/forge-plugin-manifest.test.ts +14 -0
- package/src/profiles/__tests__/profile-schema.test.ts +14 -0
- package/src/profiles/__tests__/stack-profile.test.ts +14 -0
- package/src/profiles/__tests__/terminology-utils.test.ts +14 -0
- package/src/profiles/profile-schema.ts +1 -0
- package/src/skill-schema.ts +9 -1
- package/src/tests/acceptance-criteria.test.ts +14 -0
- package/src/tests/acceptance-probe-kinds.test.ts +14 -0
- package/src/tests/adr-implement-stamp.test.ts +14 -0
- package/src/tests/agents-generate-domain.test.ts +3 -0
- package/src/tests/agents-generate.test.ts +3 -0
- package/src/tests/bindings-schema.test.ts +2 -0
- package/src/tests/budgets.test.ts +14 -0
- package/src/tests/compact.test.ts +14 -0
- package/src/tests/compass-docs-flag.test.ts +6 -0
- package/src/tests/compass-docs-scaffold.test.ts +6 -0
- package/src/tests/compass-docs-validate-scope.test.ts +6 -0
- package/src/tests/contract-registry.test.ts +14 -0
- package/src/tests/create.test.ts +3 -0
- package/src/tests/discover-pack-skills.test.ts +14 -0
- package/src/tests/doctor-autonomy.test.ts +3 -0
- package/src/tests/doctor-bindings.test.ts +6 -1
- package/src/tests/doctor-dist-freshness.test.ts +26 -2
- package/src/tests/doctor-domain.test.ts +6 -1
- package/src/tests/doctor-fix.test.ts +3 -0
- package/src/tests/doctor-nested-agents.test.ts +3 -0
- package/src/tests/doctor-profile-id-known.test.ts +3 -0
- package/src/tests/doctor-skills-unmanaged.test.ts +3 -0
- package/src/tests/doctor-version-sync.test.ts +4 -1
- package/src/tests/editable-generated-region.test.ts +6 -3
- package/src/tests/exploration-handlers.test.ts +14 -0
- package/src/tests/file-size-lint.test.ts +6 -1
- package/src/tests/fixtures/agents-generate-business-before.txt +8 -0
- package/src/tests/forge-autonomy-validate.test.ts +3 -1
- package/src/tests/forge-config.test.ts +6 -1
- package/src/tests/forge-validate-compass-docs.test.ts +6 -0
- package/src/tests/fs-atomic.test.ts +14 -0
- package/src/tests/fs.test.ts +14 -0
- package/src/tests/generated-marker.test.ts +14 -0
- package/src/tests/hash.test.ts +14 -0
- package/src/tests/implement-stamp.test.ts +476 -10
- package/src/tests/init-bindings.test.ts +6 -1
- package/src/tests/knowledge-parse.test.ts +14 -0
- package/src/tests/knowledge-pbt.test.ts +14 -0
- package/src/tests/markdown-table.test.ts +6 -3
- package/src/tests/memory-compact.test.ts +3 -0
- package/src/tests/memory-scaffold.test.ts +6 -1
- package/src/tests/metrics-rfc-1053.test.ts +14 -0
- package/src/tests/migration-adapters.test.ts +3 -0
- package/src/tests/package-files.test.ts +4 -1
- package/src/tests/package-health-lint-surface.test.ts +3 -0
- package/src/tests/pinned-check.test.ts +14 -0
- package/src/tests/pinned-init.test.ts +14 -0
- package/src/tests/pinned-validate.test.ts +14 -0
- package/src/tests/plugin-manifest.test.ts +14 -0
- package/src/tests/prettierignore-manage.test.ts +3 -0
- package/src/tests/profile-schema.test.ts +6 -1
- package/src/tests/profile-validate.test.ts +6 -1
- package/src/tests/program-lease.test.ts +3 -0
- package/src/tests/program-paths-extended.test.ts +3 -0
- package/src/tests/program-paths.test.ts +3 -0
- package/src/tests/program-property.test.ts +3 -0
- package/src/tests/program-schemas.test.ts +3 -0
- package/src/tests/program-spec-node.test.ts +3 -0
- package/src/tests/promote.test.ts +14 -0
- package/src/tests/public-surface.test.ts +6 -1
- package/src/tests/registry.test.ts +14 -0
- package/src/tests/rfc-evidence-sync.test.ts +347 -0
- package/src/tests/rfc-implement-stamp-governance.test.ts +403 -0
- package/src/tests/scaffold-project.test.ts +3 -0
- package/src/tests/session-handlers.test.ts +14 -0
- package/src/tests/session-pbt.test.ts +14 -0
- package/src/tests/skill-agents-sync.test.ts +3 -4
- package/src/tests/skill-schema.test.ts +53 -0
- package/src/tests/skill-sync-marker.test.ts +3 -0
- package/src/tests/skill-validate-knowledge.test.ts +14 -0
- package/src/tests/skill-validate.test.ts +14 -0
- package/src/tests/stack-profile.test.ts +6 -1
- package/src/tests/string-utils.test.ts +14 -0
- package/src/tests/upgrade.test.ts +6 -1
- package/src/tests/werkstatt-lock.test.ts +14 -0
- package/src/tests/workspace-discovery-domain.test.ts +6 -1
- package/src/tests/workspace-discovery.test.ts +6 -1
- package/src/types.test.ts +14 -0
- package/src/types.ts +30 -1
- package/src/utils/__tests__/fs-idempotent.test.ts +17 -0
- package/src/utils/__tests__/fs-trash.test.ts +17 -0
- package/src/utils/fs-atomic.test.ts +17 -0
- package/src/utils/fs-trash-sync.test.ts +17 -0
- package/src/utils/fs.test.ts +17 -0
- package/src/utils/generated-marker.test.ts +17 -0
- package/src/utils/hash.test.ts +17 -0
- package/src/utils/string-utils.test.ts +17 -0
- package/src/validators/__tests__/note-orphan-detect.test.ts +14 -0
package/os/spec/spec-validate.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
<item>Gap fix: resolve materialized RFCs recursively so terminal RFC archival does not invalidate accepted specs.</item>
|
|
13
13
|
<item>RFC-1240: SPEC-12 consumers list hygiene, SPEC-13 consumer-identity warning; warnings no longer fail validation.</item>
|
|
14
14
|
<item>Handoff xrepo-personal-agent-to-forge-spec-validate-sweep: sweep mode skips dirs without forge-spec.yaml (authored/live areas are not packages), reports them as skippedDirs; --spec keeps SPEC-02.</item>
|
|
15
|
+
<item>RFC-1302: consumer-aware SPEC-07, narrowed SPEC-10, source-first bin entry (RFC-1302)</item>
|
|
15
16
|
</CHANGE_SUMMARY>
|
|
16
17
|
*/
|
|
17
18
|
|
|
@@ -32,6 +33,7 @@ import {
|
|
|
32
33
|
forgeSpecSchema,
|
|
33
34
|
specIntegritySchema,
|
|
34
35
|
specAmendmentSchema,
|
|
36
|
+
ownsSpecNode,
|
|
35
37
|
type ForgeSpec,
|
|
36
38
|
type SpecIntegrity,
|
|
37
39
|
type SpecAmendment,
|
|
@@ -265,11 +267,15 @@ function checkDuplicates(spec: ForgeSpec, violations: SpecViolation[]): void {
|
|
|
265
267
|
async function checkMaterializedAs(
|
|
266
268
|
spec: ForgeSpec,
|
|
267
269
|
rfcDir: string,
|
|
270
|
+
localConsumer: string | undefined,
|
|
268
271
|
violations: SpecViolation[],
|
|
269
272
|
): Promise<void> {
|
|
270
273
|
const rfcFiles = await listRfcFiles(rfcDir);
|
|
271
274
|
for (const node of spec.rfcs) {
|
|
272
275
|
if (!node.materializedAs) continue;
|
|
276
|
+
// RFC-1302: a foreign-owned node's RFC lives in the owning consumer's
|
|
277
|
+
// repository — a vendoring consumer can never hold it locally.
|
|
278
|
+
if (!ownsSpecNode(node, localConsumer)) continue;
|
|
273
279
|
const rfcId = node.materializedAs;
|
|
274
280
|
const prefix = rfcId.toLowerCase().replace(/^rfc-/, "rfc-");
|
|
275
281
|
const found = rfcFiles.some((file) => path.basename(file).startsWith(prefix));
|
|
@@ -407,9 +413,13 @@ function checkAmendments(
|
|
|
407
413
|
}
|
|
408
414
|
}
|
|
409
415
|
|
|
410
|
-
// SPEC-10:
|
|
416
|
+
// SPEC-10: accepted amendments whose targets overlap (RFC-1302).
|
|
417
|
+
// Section anchors and decisions are single-text targets — two "Becomes"
|
|
418
|
+
// rewriting the same text genuinely conflict (error). Node targets compose
|
|
419
|
+
// additively at read time (resolveAmendedNode), so overlap there is only
|
|
420
|
+
// a review signal (warning).
|
|
411
421
|
const acceptedAmendments = amendments.filter((a) => a.status === "accepted");
|
|
412
|
-
const
|
|
422
|
+
const targetOwners = new Map<string, { kind: string; ids: string[] }>();
|
|
413
423
|
for (const amendment of acceptedAmendments) {
|
|
414
424
|
for (const target of amendment.targets) {
|
|
415
425
|
const key = target.kind === "section"
|
|
@@ -417,14 +427,23 @@ function checkAmendments(
|
|
|
417
427
|
: target.kind === "decision"
|
|
418
428
|
? `decision:${target.id}`
|
|
419
429
|
: `node:${target.id}`;
|
|
420
|
-
|
|
430
|
+
const entry = targetOwners.get(key) ?? { kind: target.kind, ids: [] };
|
|
431
|
+
if (!entry.ids.includes(amendment.id)) entry.ids.push(amendment.id);
|
|
432
|
+
targetOwners.set(key, entry);
|
|
421
433
|
}
|
|
422
434
|
}
|
|
423
|
-
for (const [key,
|
|
424
|
-
if (
|
|
435
|
+
for (const [key, { kind, ids }] of targetOwners) {
|
|
436
|
+
if (ids.length < 2) continue;
|
|
437
|
+
if (kind === "node") {
|
|
438
|
+
violations.push({
|
|
439
|
+
rule: "SPEC-10",
|
|
440
|
+
severity: "warning",
|
|
441
|
+
message: `accepted amendments ${ids.join(", ")} all target ${key} — they compose additively; review that their changes do not contradict`,
|
|
442
|
+
});
|
|
443
|
+
} else {
|
|
425
444
|
violations.push({
|
|
426
445
|
rule: "SPEC-10",
|
|
427
|
-
message: `conflicting accepted amendments targeting ${key} — manual review required`,
|
|
446
|
+
message: `conflicting accepted amendments ${ids.join(", ")} targeting ${key} — manual review required`,
|
|
428
447
|
});
|
|
429
448
|
}
|
|
430
449
|
}
|
|
@@ -524,7 +543,7 @@ export async function runSpecValidate(
|
|
|
524
543
|
checkDuplicates(spec, violations);
|
|
525
544
|
|
|
526
545
|
// SPEC-07: materializedAs
|
|
527
|
-
await checkMaterializedAs(spec, rfcDir, violations);
|
|
546
|
+
await checkMaterializedAs(spec, rfcDir, localConsumer, violations);
|
|
528
547
|
|
|
529
548
|
// SPEC-08..11: Amendments (RFC-0397)
|
|
530
549
|
const amendments = await loadAmendments(specDir);
|
package/os/workflow/handlers.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>Workflow lint/list
|
|
3
|
+
<purpose>Workflow lint/list handlers for forge — validates .agents/workflows frontmatter, command references, and per-chain phase links.</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Do not execute workflow steps.</item>
|
|
6
6
|
<item>Do not edit workflow files to repair violations.</item>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0075: Add agent workflow lint/list handlers.</item>
|
|
11
11
|
<item>RFC-0374: Migrated from packages/os/site-kernel/src/workflow/ to packages/forge/os/workflow/.</item>
|
|
12
|
+
<item>RFC-1276: remove runWorkflowAmendList, WORKFLOW_AMEND_DIR, and the amend RFC command exemption set — the RFC-0135/0136 amend pipeline is superseded</item>
|
|
13
|
+
<item>RFC-1307: canonical org-singleton PBP paths, seeded hreflang+publication.gate, full rollback</item>
|
|
12
14
|
</CHANGE_SUMMARY>
|
|
13
15
|
*/
|
|
14
16
|
|
|
@@ -22,8 +24,6 @@ import type {
|
|
|
22
24
|
} from "../../src/types.ts";
|
|
23
25
|
import {
|
|
24
26
|
WORKFLOW_PHASES,
|
|
25
|
-
WORKFLOW_CHAINS,
|
|
26
|
-
type WorkflowChain,
|
|
27
27
|
type WorkflowFrontmatter,
|
|
28
28
|
type WorkflowLintResult,
|
|
29
29
|
type WorkflowLintViolation,
|
|
@@ -31,24 +31,8 @@ import {
|
|
|
31
31
|
} from "./types.ts";
|
|
32
32
|
|
|
33
33
|
const WORKFLOW_DIR = ".agents/workflows";
|
|
34
|
-
const WORKFLOW_AMEND_DIR = ".agents/workflows-amend";
|
|
35
34
|
|
|
36
|
-
// RFC-0135/RFC-0136 commands (registered in site-kernel-onboarding / site-kernel-checks).
|
|
37
|
-
const _PENDING_AMEND_RFC_COMMANDS = new Set([
|
|
38
|
-
"amend.input.validate",
|
|
39
|
-
"amend.atoms.merge",
|
|
40
|
-
"amend.provenance.append",
|
|
41
|
-
"amend.provenance.validate",
|
|
42
|
-
"amend.phase.validate",
|
|
43
|
-
"content.coverage.delta",
|
|
44
|
-
"audit.delta.run",
|
|
45
|
-
"amend-check.author",
|
|
46
|
-
"amend-check.postbuild",
|
|
47
|
-
"amend-check.run",
|
|
48
|
-
"workflow-amend.list",
|
|
49
|
-
]);
|
|
50
35
|
const PENDING_ACCEPTED_RFC_COMMANDS = new Set([
|
|
51
|
-
"brief.validate",
|
|
52
36
|
"biome.tokens.derive",
|
|
53
37
|
"family.contract.validate",
|
|
54
38
|
"family.list",
|
|
@@ -124,7 +108,6 @@ function validateFrontmatter(file: string, value: unknown): WorkflowFrontmatter
|
|
|
124
108
|
typeof candidate.id === "string" &&
|
|
125
109
|
typeof candidate.title === "string" &&
|
|
126
110
|
WORKFLOW_PHASES.includes(candidate.phase) &&
|
|
127
|
-
(candidate.chain === undefined || WORKFLOW_CHAINS.includes(candidate.chain)) &&
|
|
128
111
|
isStringArray(candidate.reads) &&
|
|
129
112
|
isStringArray(candidate.writes) &&
|
|
130
113
|
Boolean(candidate.scope) &&
|
|
@@ -140,21 +123,18 @@ function validateFrontmatter(file: string, value: unknown): WorkflowFrontmatter
|
|
|
140
123
|
typeof candidate.selfOrchestration.autoRun === "boolean" &&
|
|
141
124
|
isStringArray(candidate.selfOrchestration.pauseFor) &&
|
|
142
125
|
isStringArray(candidate.checkpoints) &&
|
|
143
|
-
(candidate.nextWorkflow === undefined || typeof candidate.nextWorkflow === "string")
|
|
144
|
-
(candidate.branch === undefined ||
|
|
145
|
-
(typeof candidate.branch.on === "string" && isStringArray(candidate.branch.cases)));
|
|
126
|
+
(candidate.nextWorkflow === undefined || typeof candidate.nextWorkflow === "string");
|
|
146
127
|
|
|
147
128
|
if (!valid) throw new Error(`${file}: invalid workflow frontmatter shape`);
|
|
148
129
|
return candidate;
|
|
149
130
|
}
|
|
150
131
|
|
|
151
|
-
/** Load
|
|
152
|
-
async function loadWorkflows(workspaceRoot: string
|
|
153
|
-
const dir =
|
|
132
|
+
/** Load the greenfield chain's workflow files. */
|
|
133
|
+
async function loadWorkflows(workspaceRoot: string) {
|
|
134
|
+
const dir = WORKFLOW_DIR;
|
|
154
135
|
const files = await readWorkflowFiles(workspaceRoot, dir);
|
|
155
136
|
const workflows: Array<{
|
|
156
137
|
relativeFile: string;
|
|
157
|
-
chain: WorkflowChain;
|
|
158
138
|
data: WorkflowFrontmatter;
|
|
159
139
|
}> = [];
|
|
160
140
|
const violations: WorkflowLintViolation[] = [];
|
|
@@ -165,7 +145,6 @@ async function loadWorkflows(workspaceRoot: string, chain: WorkflowChain = "gree
|
|
|
165
145
|
const source = await fs.readFile(file);
|
|
166
146
|
workflows.push({
|
|
167
147
|
relativeFile,
|
|
168
|
-
chain,
|
|
169
148
|
data: validateFrontmatter(relativeFile, parseMarkdownFrontmatter(source)),
|
|
170
149
|
});
|
|
171
150
|
} catch (error) {
|
|
@@ -199,7 +178,7 @@ export async function runWorkflowList(
|
|
|
199
178
|
_input: ForgeCommandInput,
|
|
200
179
|
context: ForgeRuntimeContext,
|
|
201
180
|
): Promise<ForgeCommandResult<{ command: "workflow.list"; workflows: WorkflowListEntry[] }>> {
|
|
202
|
-
const { workflows } = await loadWorkflows(context.workspaceRoot
|
|
181
|
+
const { workflows } = await loadWorkflows(context.workspaceRoot);
|
|
203
182
|
const entries = toListEntries(workflows);
|
|
204
183
|
return {
|
|
205
184
|
data: { command: "workflow.list", workflows: entries },
|
|
@@ -217,19 +196,6 @@ export async function runWorkflowList(
|
|
|
217
196
|
};
|
|
218
197
|
}
|
|
219
198
|
|
|
220
|
-
export async function runWorkflowAmendList(
|
|
221
|
-
_input: ForgeCommandInput,
|
|
222
|
-
context: ForgeRuntimeContext,
|
|
223
|
-
): Promise<ForgeCommandResult<{ command: "workflow-amend.list"; workflows: WorkflowListEntry[] }>> {
|
|
224
|
-
const { workflows } = await loadWorkflows(context.workspaceRoot, "amend");
|
|
225
|
-
const entries = toListEntries(workflows);
|
|
226
|
-
return {
|
|
227
|
-
data: { command: "workflow-amend.list", workflows: entries },
|
|
228
|
-
exitCode: 0,
|
|
229
|
-
summary: `workflow-amend.list: ${entries.length} amend workflow file(s) found`,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
199
|
export async function runWorkflowLint(
|
|
234
200
|
_input: ForgeCommandInput,
|
|
235
201
|
context: ForgeRuntimeContext,
|
package/os/workflow/index.ts
CHANGED
|
@@ -20,12 +20,9 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
export { createForgeWorkflowModule } from "./workflow.module.ts";
|
|
23
|
-
export { runWorkflowLint, runWorkflowList
|
|
23
|
+
export { runWorkflowLint, runWorkflowList } from "./handlers.ts";
|
|
24
24
|
export type {
|
|
25
25
|
WorkflowPhase,
|
|
26
|
-
WorkflowChain,
|
|
27
|
-
WorkflowPreconditions,
|
|
28
|
-
WorkflowBranch,
|
|
29
26
|
WorkflowFrontmatter,
|
|
30
27
|
WorkflowListEntry,
|
|
31
28
|
WorkflowLintViolation,
|
package/os/workflow/types.ts
CHANGED
|
@@ -22,22 +22,6 @@ export const WORKFLOW_PHASES = [
|
|
|
22
22
|
|
|
23
23
|
export type WorkflowPhase = (typeof WORKFLOW_PHASES)[number];
|
|
24
24
|
|
|
25
|
-
/** RFC-0136: which onboarding chain a workflow file belongs to. */
|
|
26
|
-
export const WORKFLOW_CHAINS = ["greenfield", "amend"] as const;
|
|
27
|
-
export type WorkflowChain = (typeof WORKFLOW_CHAINS)[number];
|
|
28
|
-
|
|
29
|
-
/** RFC-0136: declarative, lint-checked preconditions for amend workflows. */
|
|
30
|
-
export interface WorkflowPreconditions {
|
|
31
|
-
appPresent?: boolean;
|
|
32
|
-
systemManifestValid?: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** RFC-0136: strengthen vs new-route branch, allowed only on the compose phase. */
|
|
36
|
-
export interface WorkflowBranch {
|
|
37
|
-
on: string;
|
|
38
|
-
cases: string[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
25
|
export interface WorkflowScope {
|
|
42
26
|
allowedWriteRoots: string[];
|
|
43
27
|
forbiddenWriteRoots: string[];
|
|
@@ -57,12 +41,6 @@ export interface WorkflowFrontmatter {
|
|
|
57
41
|
id: string;
|
|
58
42
|
title: string;
|
|
59
43
|
phase: WorkflowPhase;
|
|
60
|
-
/** RFC-0136: defaults to "greenfield" when absent. */
|
|
61
|
-
chain?: WorkflowChain;
|
|
62
|
-
/** RFC-0136: amend-only declarative preconditions (e.g. appPresent). */
|
|
63
|
-
preconditions?: WorkflowPreconditions;
|
|
64
|
-
/** RFC-0136: branch declaration, allowed only on the compose phase. */
|
|
65
|
-
branch?: WorkflowBranch;
|
|
66
44
|
reads: string[];
|
|
67
45
|
writes: string[];
|
|
68
46
|
scope: WorkflowScope;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>forgeWorkflowModule — registers workflow.lint
|
|
3
|
+
<purpose>forgeWorkflowModule — registers the workflow.lint and workflow.list kernel commands from forge for .agents/workflows discovery, linting, and per-chain phase links.</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Do not register app-specific workflow commands.</item>
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0075: Add workflow command module.</item>
|
|
10
9
|
<item>RFC-0374: Migrated from packages/os/site-kernel/src/workflow/ to packages/forge/os/workflow/.</item>
|
|
11
10
|
<item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
|
|
12
11
|
<item>RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
|
|
@@ -16,13 +15,15 @@ follows the parsed selector. Guard renamed assertAllSitesAllowed ->
|
|
|
16
15
|
assertAllFlagAccepted, message updated. 417 declaration sites + type
|
|
17
16
|
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item>
|
|
18
17
|
<item>RFC-1248: VITE-CLIENT-DEP-02 lazy-import gate + SCAN-02 validator reads-root existence check (RFC-1248)</item>
|
|
18
|
+
<item>RFC-1276: remove workflow-amend.list and the workflows-amend lint branch — the RFC-0135/0136 amend pipeline is superseded</item>
|
|
19
|
+
<history>RFC-0075</history>
|
|
19
20
|
</CHANGE_SUMMARY>
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
import type { ForgeModule } from "../../src/forge-module.ts";
|
|
23
24
|
|
|
24
25
|
export async function createForgeWorkflowModule(): Promise<ForgeModule> {
|
|
25
|
-
const { runWorkflowLint, runWorkflowList
|
|
26
|
+
const { runWorkflowLint, runWorkflowList } = await import("./handlers.ts");
|
|
26
27
|
return {
|
|
27
28
|
name: "workflow",
|
|
28
29
|
version: "0.1.0",
|
|
@@ -35,8 +36,8 @@ export async function createForgeWorkflowModule(): Promise<ForgeModule> {
|
|
|
35
36
|
contract: "workflow",
|
|
36
37
|
rules: [],
|
|
37
38
|
description:
|
|
38
|
-
"Validate .agents/workflows
|
|
39
|
-
"and per-chain phase links (RFC-0075
|
|
39
|
+
"Validate .agents/workflows markdown frontmatter, command references, " +
|
|
40
|
+
"and per-chain phase links (RFC-0075).",
|
|
40
41
|
scope: "workspace",
|
|
41
42
|
flags: {},
|
|
42
43
|
acceptsAllFlag: true,
|
|
@@ -55,17 +56,6 @@ export async function createForgeWorkflowModule(): Promise<ForgeModule> {
|
|
|
55
56
|
reads: [".agents/workflows/**/*.md", ".windsurf/workflows/**/*.md"], // scan-coverage: optional tool dirs — workshops declare workflows under either
|
|
56
57
|
execute: runWorkflowList,
|
|
57
58
|
},
|
|
58
|
-
{
|
|
59
|
-
name: "workflow-amend.list",
|
|
60
|
-
mutatesState: false,
|
|
61
|
-
description:
|
|
62
|
-
"List .agents/workflows-amend entries with phase, IO summary, and next workflow (RFC-0136).",
|
|
63
|
-
scope: "workspace",
|
|
64
|
-
flags: {},
|
|
65
|
-
acceptsAllFlag: true,
|
|
66
|
-
reads: [".agents/workflows-amend/**/*.md"],
|
|
67
|
-
execute: runWorkflowAmendList,
|
|
68
|
-
},
|
|
69
59
|
],
|
|
70
60
|
pipelines: [],
|
|
71
61
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Agent Operating Model
|
|
2
|
+
|
|
3
|
+
Normative rules binding agent sessions in Forge consumers. Brief reminders live in generated `AGENTS.md`; this document is the detail layer. Mode of work and verification rigor are separate axes — pick both.
|
|
4
|
+
|
|
5
|
+
## 1. Work modes
|
|
6
|
+
|
|
7
|
+
- **EXPLORE** — ideas, hypotheses, prototypes, technical research. The agent experiments freely inside an isolated scope within budget and authority. Full RFC, TDD, durable tests, and production polish are NOT required. The result is a reproducible demonstration, observations, limitations, and a disposition decision (adopt / park / discard). An experiment MUST NOT silently mutate production surfaces or count as accepted functionality — promotion requires the ROUTINE or GOVERNED path (exploration notes live in `docs/explorations/`).
|
|
8
|
+
- **ROUTINE** — small, local, reversible changes that touch no normative architecture, public contract, data schema, security surface, or Forge rule. Examples: local bugfix restoring intended behavior, content data correction, cosmetic cleanup, refactoring without behavior change. No new RFC/ADR is required beyond what standing policy already mandates; an authoritative task source, a clear expected result, and a proportionate check suffice. Do not create documents or plans for ceremony.
|
|
9
|
+
- **GOVERNED** — changes to architecture, public contracts, data schemas, security, critical algorithms, or the rules of Forge itself. Runs the existing RFC workflow; ADRs only for decisions genuinely worth keeping separate. An accepted RFC, not agent judgment, is the authority here.
|
|
10
|
+
|
|
11
|
+
## 2. Autonomy by default
|
|
12
|
+
|
|
13
|
+
An agent performs autonomously every action that is simultaneously: within granted authority, compliant with accepted requirements, reversible or safely isolated, free of unacceptable external effects, and free of unknown business decisions.
|
|
14
|
+
|
|
15
|
+
No permission is needed for: reading files, analysis, planning, editing permitted files, local verification, fixing the agent's own mistakes, or choosing libraries / internal code organization / helper names that can be decided on technical merit. Tool availability is not blanket authority for every use of that tool.
|
|
16
|
+
|
|
17
|
+
## 3. Escalation boundaries — ask the operator ONLY when
|
|
18
|
+
|
|
19
|
+
1. Ambiguity changes user-visible behavior, business meaning, or an acceptance criterion.
|
|
20
|
+
2. A previously accepted normative decision must be changed.
|
|
21
|
+
3. An irreversible or significant external action is required.
|
|
22
|
+
4. There is material risk to security, privacy, or data preservation.
|
|
23
|
+
5. Additional authority, spend, or infrastructure is needed.
|
|
24
|
+
6. Standing repository policy explicitly requires human sign-off.
|
|
25
|
+
|
|
26
|
+
Research available sources and resolve ambiguity yourself first, when doing so does not change operator intent. When a decision is genuinely required, batch related questions into ONE appeal with a recommended option, alternatives, and consequences — never a drip of small questions. While awaiting an answer, continue the independent safe parts of the work.
|
|
27
|
+
|
|
28
|
+
## 4. Forbidden without explicit authority
|
|
29
|
+
|
|
30
|
+
- destroying user data, cleaning unknown files or working directories, force-resetting or overwriting others' work;
|
|
31
|
+
- production data changes, deployments, releases, publishing, payments, emails — any real-world side effect;
|
|
32
|
+
- disabling or weakening protective checks, changing access policies, expanding the agent's own authority;
|
|
33
|
+
- accepting normative decisions on the operator's behalf — RFC/ADR status transitions and `reviewers` are human-set; the agent implements `accepted`, never self-accepts `draft`.
|
|
34
|
+
|
|
35
|
+
Ordinary file deletion/rename inside an agreed task is allowed when reversible, destroying nobody's work, and visible in the diff. `git clean`, `reset --hard`, force-push and equivalents over unknown state need exact permission. Text rules are backed by technical guards (`git-wrapper.sh`, hooks, `ecosystem.commit` gates, `generated.edit.guard`) — do not treat their absence in a given sandbox as permission.
|
|
36
|
+
|
|
37
|
+
## 5. Requirements are not substitutable
|
|
38
|
+
|
|
39
|
+
Keep separate: operator intent, accepted requirements, accepted decisions, agent assumptions, proposed requirement changes, observed behavior. Never present the agent's interpretation as an operator decision. Never edit acceptance criteria, normative specs, expected results, or check conditions to ease implementation — if a requirement is wrong or infeasible, propose its change through the decision machinery (amendment / `rfc.supersede.propose`), don't work around it.
|
|
40
|
+
|
|
41
|
+
## 6. Verification portfolio — TDD is not mandatory
|
|
42
|
+
|
|
43
|
+
Choose checks by the nature of the change and the risk of error, not by methodology fashion. Allowed methods: existing unit/integration tests, targeted regression checks, API/CLI probes, real user E2E flows, browser tooling, end-state data checks, static analysis and type checking, property-based testing and fuzzing, log/trace/telemetry analysis, model checking, formal verification.
|
|
44
|
+
|
|
45
|
+
New automated tests need a concrete reason: a protected requirement, a reproduced defect, a significant invariant, or regression risk. Test count, coverage percentage, green CI, clean logs, and a successful boot are NOT standalone evidence that requirements are met. Logs and traces confirm concrete observable properties; "no errors in logs" alone confirms nothing. Use E2E for important end-to-end and negative scenarios; do not build E2E infrastructure for a local fix. Existing mandatory checks MUST NOT be deleted, bypassed, or weakened for green status.
|
|
46
|
+
|
|
47
|
+
## 7. Risk tiers
|
|
48
|
+
|
|
49
|
+
- **STANDARD** — ordinary local changes: relevant existing checks, build/type/static checks, and observed verification of the changed behavior.
|
|
50
|
+
- **HIGH** — security, access rights, contracts, data, migrations, critical integrations, significant external effects: additionally verify negative scenarios, boundaries, invariants, rollback, compatibility. Use independent verification where it genuinely reduces risk (e.g. clean-context review).
|
|
51
|
+
- **FORMAL** — only for important, stable, precisely specifiable properties where formalization cost is justified. Tool by task: Lean (math/inductive), Dafny (algorithm correctness), Verus (supported Rust), TLA+/model checking (protocols/concurrency), property/fuzz (broad input classes without full proof). Not installed globally, never mandatory for ordinary changes; record spec, assumptions, proof scope, tool version, and unverified runtime boundaries — a successful proof does not prove business intent or the whole system.
|
|
52
|
+
|
|
53
|
+
## 8. Expectation sources
|
|
54
|
+
|
|
55
|
+
Every significant check has an expectation origin:
|
|
56
|
+
|
|
57
|
+
- **self** — formulated by the implementer from their own implementation. Useful for diagnostics; not sole proof of a contested business requirement.
|
|
58
|
+
- **requirement** — follows from an accepted requirement, invariant, or standard.
|
|
59
|
+
- **independent** — fixed before implementation or prepared independently of the implementer.
|
|
60
|
+
- **external** — an authoritative external system, reference data, or observable environment supplies ground truth.
|
|
61
|
+
|
|
62
|
+
Another AI agent is not automatically an independent verifier — independence is defined by criterion origin, access to normative sources, and real ability to catch the executor's error. Declare the class on probes via `expectationSource:`; declare what a check does not cover via `limitations:`. The `self` class is derived from git history of the implementation range (acceptance transition → HEAD), not taken on the author's word: a probe whose declaration or test file changed after acceptance is `self` unless the change came from the sanctioned independent-verifier workflow, and a declaration that history contradicts blocks the stamp. Declare `self` honestly for checks you wrote while implementing.
|
|
63
|
+
|
|
64
|
+
## 9. Evidence trust boundary
|
|
65
|
+
|
|
66
|
+
An agent's claim that a check ran is not a substitute for the tool's result. Evidence binds: requirement identifier → expected-result source → verified code version → applicable criteria/checks → method and executed command → environment/tool → observed result → machine-artifact link → check limitations. Group checks into one reproducible result; no per-action receipts for trivia.
|
|
67
|
+
|
|
68
|
+
A local file written by the agent is not trusted proof merely because it contains `passed` or a hash. Trusted verification runs through mechanisms whose integrity the checked agent cannot arbitrarily alter — the committed-envelope chain (`rfc.verification.emit` + `rfc.implement.stamp` staleness gate + `emit --check` recompute), generated-file guards, protected CI gates, branch policies, trusted runners. Hash freshness binds the envelope to the current bytes — it does not by itself prove the recorded results are true: a forged `overall: pass` with recomputed hashes stays undetected until `emit --check` re-executes the probes, so the `--check` recompute path and protected CI are what bind results to reality, not the envelope alone. Results on a dirty worktree are preliminary; authoritative results bind to an exactly identified source state. When sources, criteria, probes, check config, or assumptions change, affected evidence is stale — re-verify; when applicability cannot be proven, treat it as stale. A change to the verification mechanism inside a PR must not let that PR silently weaken its own acceptance.
|
|
69
|
+
|
|
70
|
+
## 10. Completion vocabulary
|
|
71
|
+
|
|
72
|
+
Report completion by state, never by the word "done":
|
|
73
|
+
|
|
74
|
+
- **IMPLEMENTED** — the change is implemented.
|
|
75
|
+
- **VERIFIED** — required checks ran against the corresponding version.
|
|
76
|
+
- **ACCEPTED** — the result was accepted by the authorized mechanism or person.
|
|
77
|
+
- **RELEASED** — the release actually happened.
|
|
78
|
+
|
|
79
|
+
Never claim a check you lack an actual run result for; never claim release or merge that did not occur; do not flood the operator with a log of intermediate technical actions.
|
|
80
|
+
|
|
81
|
+
## 11. Change control
|
|
82
|
+
|
|
83
|
+
Weakening this model or its enforcement mechanics requires a superseding RFC. Cost is a first-class concern: any new gate or workflow whose cost exceeds its measurable benefit and defended risk must be reviewed for simplification or removal.
|
|
@@ -145,6 +145,7 @@ Skills reference bindings by key, never by value. To resolve a binding:
|
|
|
145
145
|
| `commands.test` | string \| null | Scoped test command |
|
|
146
146
|
| `commands.scopedBuild` | string \| null | Scoped build command |
|
|
147
147
|
| `commands.specValidate` | string \| null | Spec validation command |
|
|
148
|
+
| `commands.verifyReproduction` | string \| null | Defect-reproduction check: runs a test against the pre-fix commit (`{test}`, `{sha}`) |
|
|
148
149
|
| `paths.invariantsFile` | string \| null | Path to the project's invariants file |
|
|
149
150
|
| `paths.compassDocs` | string[] | Machine-readable semantic docs to sync |
|
|
150
151
|
| `paths.reviewsDir` | string \| null | Directory for code reviews |
|
|
@@ -20,6 +20,7 @@ triggerPhrases: ["write tests for this code", "add unit tests", "add property-ba
|
|
|
20
20
|
<item>RFC-1097: sweep — SKILL.md headers + classification fixes
|
|
21
21
|
|
|
22
22
|
Sweep batch 1: add Compass v2 headers to 45 SKILL.md files (purpose derived from frontmatter description). Fix non-skill-markdown exclusion to check filename not workspace-relative path (packages/AGENTS.md escaped it). Add .coverage to ignoredDirs.</item>
|
|
23
|
+
<item>RFC-1332: step 4 — reason-gated tests in fo-idea-implement, fo-add-tests, fo-fix</item>
|
|
23
24
|
</CHANGE_SUMMARY>
|
|
24
25
|
-->
|
|
25
26
|
|
|
@@ -124,6 +125,10 @@ Tests verify behavior through **public interfaces**, not implementation details.
|
|
|
124
125
|
|
|
125
126
|
See `tests-reference.md` for good and bad test examples — the anti-patterns (tautological, implementation-coupled, horizontal slicing) are load-bearing.
|
|
126
127
|
|
|
128
|
+
### 3b. Test reason gate
|
|
129
|
+
|
|
130
|
+
See `## Test reason gate` below — run it now, before writing any test.
|
|
131
|
+
|
|
127
132
|
### 4. Write the tests
|
|
128
133
|
|
|
129
134
|
#### Example-based tests (`*.test.ts`)
|
|
@@ -209,6 +214,15 @@ If the target package does not yet have `vitest` configured:
|
|
|
209
214
|
4. Run `pnpm install` to update the lockfile.
|
|
210
215
|
5. Do NOT add `node:test` shims or legacy assertion wrappers — the migration is forward-only.
|
|
211
216
|
|
|
217
|
+
## Test reason gate
|
|
218
|
+
|
|
219
|
+
Before writing tests, name the reason for each target:
|
|
220
|
+
|
|
221
|
+
- When the operator invoked this skill directly for named code, the request counts as `requirement` — record the operator's wording as the reason.
|
|
222
|
+
- Inside a pipeline, exactly one of `requirement <AC-N>`, `defect <ref>`, `invariant <ref>`, `regression <risk>` must apply; with no reason, write no test and say so in the report.
|
|
223
|
+
- A `defect` test must be shown to fail against the pre-fix commit with `ref(forge.yaml bindings.commands.verifyReproduction)` before it is committed under that reason.
|
|
224
|
+
- Commit messages that add test files carry `Test-Reason: <reason>` (and `Repro-Verified: <sha>` for defects).
|
|
225
|
+
|
|
212
226
|
## TDD mode
|
|
213
227
|
|
|
214
228
|
When invoked as `/fo-add-tests --tdd` or when the operator says "test-first" / "red-green":
|
|
@@ -27,6 +27,7 @@ triggerPhrases: ["исправим", "примени findings", "fix all", "fix
|
|
|
27
27
|
|
|
28
28
|
Sweep batch 1: add Compass v2 headers to 45 SKILL.md files (purpose derived from frontmatter description). Fix non-skill-markdown exclusion to check filename not workspace-relative path (packages/AGENTS.md escaped it). Add .coverage to ignoredDirs.</item>
|
|
29
29
|
<item>RFC-1247: triggerPhrases vocabulary sync — mined operator phrasing applied to this skill's trigger set.</item>
|
|
30
|
+
<item>RFC-1332: step 4 — reason-gated tests in fo-idea-implement, fo-add-tests, fo-fix</item>
|
|
30
31
|
</CHANGE_SUMMARY>
|
|
31
32
|
-->
|
|
32
33
|
|
|
@@ -99,7 +100,7 @@ For each finding:
|
|
|
99
100
|
|
|
100
101
|
**Blind-spot pass after two failures on one approach** — after two failed attempts on the same fix approach, and before the next retry or pivot, run the clean-context blind-spot pass defined in `_shared/fo-pipeline-conventions.md` §Blind-spot pass.
|
|
101
102
|
|
|
102
|
-
After applying fixes,
|
|
103
|
+
After applying fixes, add a test only when the finding is a reproducible defect (prove it with `ref(forge.yaml bindings.commands.verifyReproduction)` against the pre-fix commit) or names a concrete regression risk; otherwise rely on the existing suite. Run the relevant package tests before the full build when that saves time.
|
|
103
104
|
|
|
104
105
|
### 3. Run scoped typecheck verification
|
|
105
106
|
|
|
@@ -20,7 +20,7 @@ triggerPhrases: ["create a handoff document", "compact conversation for next age
|
|
|
20
20
|
<item>RFC-1097: sweep — SKILL.md headers + classification fixes
|
|
21
21
|
|
|
22
22
|
Sweep batch 1: add Compass v2 headers to 45 SKILL.md files (purpose derived from frontmatter description). Fix non-skill-markdown exclusion to check filename not workspace-relative path (packages/AGENTS.md escaped it). Add .coverage to ignoredDirs.</item>
|
|
23
|
-
<item>
|
|
23
|
+
<item>RFC-1154: commit references resolve by project type — ecosystem.commit where registered, plain git commit in forge workshops</item>
|
|
24
24
|
</CHANGE_SUMMARY>
|
|
25
25
|
-->
|
|
26
26
|
|
|
@@ -10,6 +10,7 @@ bindings:
|
|
|
10
10
|
requires: []
|
|
11
11
|
optional: [paths.invariantsFile]
|
|
12
12
|
triggerPhrases: ["I have an idea for a change", "analyze this idea and route it", "decompose this feature idea", "does this need an RFC", "should I write an ADR for this"]
|
|
13
|
+
notApplicableWhen: ["The operator already named the decision artifact — a specific RFC/ADR id or 'write an ADR for X' — invoke the creation skill directly", "The intent is not an idea/classification request — review, fix, commit, session-end, or mission work route through the front-door table in fo-idea-i-just-want-to-see-the-result"]
|
|
13
14
|
---
|
|
14
15
|
|
|
15
16
|
<!--
|
|
@@ -34,6 +35,8 @@ Before starting, read `PREFERENCES.md` at the repository root. If the file is mi
|
|
|
34
35
|
|
|
35
36
|
Analyze the operator's text to determine whether the task requires a single RFC, a single ADR, or a **series** of documents. When a series is needed, decompose the task into atomic decisions, classify each, and create all documents in dependency order.
|
|
36
37
|
|
|
38
|
+
Routing outcomes map to the work modes in `_shared/agent-operating-model.md`: **EXPLORE** → `fo-explore` suggestion (step 1b), **ROUTINE** → direct implementation, **GOVERNED** → RFC/ADR documents.
|
|
39
|
+
|
|
37
40
|
## Process
|
|
38
41
|
|
|
39
42
|
### 1. Analyze the request
|
|
@@ -154,9 +157,9 @@ If the classification is ambiguous (e.g. the operator's description is too vague
|
|
|
154
157
|
|
|
155
158
|
Once classified, take the matching action **inline** — execute it fully without stopping or returning control to the user:
|
|
156
159
|
|
|
157
|
-
- **RFC** → invoke `/fo-idea-create-rfc
|
|
158
|
-
- **ADR** → invoke `/fo-idea-create-adr
|
|
159
|
-
- **Direct implementation** → tell the operator that no RFC or ADR is needed for this change, explain why (which Direct criterion applies), then **climb the minimality ladder** (see `_shared/fo-pipeline-conventions.md` §Minimality ladder) to determine the minimum implementation approach before writing any code. Present the ladder rung you landed on and proceed to implement. Do not create a governance document. The operator may still request an ADR for traceability if they prefer — respect that choice.
|
|
160
|
+
- **RFC** → invoke `/fo-idea-create-rfc` (GOVERNED mode). It will collect metadata, grill the concept, create the file, fill it, validate, and report.
|
|
161
|
+
- **ADR** → invoke `/fo-idea-create-adr` (GOVERNED mode). It will collect metadata, grill the concept, create the file, fill it, validate, and report. **On the accepted-decision fast path (step 1a)**, tell `fo-idea-create-adr` to skip grilling and use the operator's justification text directly.
|
|
162
|
+
- **Direct implementation** → tell the operator that no RFC or ADR is needed for this change (ROUTINE mode), explain why (which Direct criterion applies), then **climb the minimality ladder** (see `_shared/fo-pipeline-conventions.md` §Minimality ladder) to determine the minimum implementation approach before writing any code. Present the ladder rung you landed on and proceed to implement. Do not create a governance document. The operator may still request an ADR for traceability if they prefer — respect that choice.
|
|
160
163
|
|
|
161
164
|
Do not duplicate the creation skill's work — just route to it and let it run.
|
|
162
165
|
|
|
@@ -35,6 +35,14 @@ A criterion is a _falsifiable claim about an observable artifact_, not a descrip
|
|
|
35
35
|
|
|
36
36
|
**Self-test before submitting:** hand the criteria set to a hostile reviewer who has _only_ the repo and a shell. If they cannot verify every box without talking to you, the spec is prose, not a spec.
|
|
37
37
|
|
|
38
|
+
## Behavioral criteria need execution probes
|
|
39
|
+
|
|
40
|
+
A criterion in WHEN or IF form describes behavior; bind it to a probe that executes something (`test`, `run`, or `page`). A criterion bound only to presence probes — `file-exists`, `command-registered`, or `file-contains`/`json-schema` over a non-document path — fails V-44. Presence probes stay correct for invariant-form `THE … SHALL` criteria (a type is exported, a rule id is declared) and for document targets. Declare `expectationSource:` honestly: the toolchain derives the origin from git history and rejects declarations it contradicts — tests written during implementation are `self`.
|
|
41
|
+
|
|
42
|
+
## Structural wiring needs a reachable probe
|
|
43
|
+
|
|
44
|
+
Deliverables that are new exported modules or commands get a `probe: reachable` (symbol or command mode) bound to an invariant-form criterion (for example "THE command SHALL be reachable from a pipeline or declared coverage").
|
|
45
|
+
|
|
38
46
|
## Phase separation (RFC-1006)
|
|
39
47
|
|
|
40
48
|
RFCs have two phases of criteria:
|
|
@@ -249,7 +249,9 @@ This fallback ensures review and fix are never skipped, even if `fo-idea-impleme
|
|
|
249
249
|
|
|
250
250
|
### 3. Report and stop
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
**Terminal gate (MANDATORY, before any summary):** run `queue.validate --file <manifest>` and read the derived per-item status. The summary may only report items the validator derives as `implemented` or `skipped` — plus items the batch itself recorded as parked/blocked (ledger `parked: true` or the in-session `blocked` report language). A derived `in-progress` means the item is NOT done: return to Phase 4 instead of reporting. Never derive "done" from commits, passing tests, or a continuation summary — the validator's derivation is the single source of truth. (Retro 2026-10-17: a batch reported all four items implemented while every one of them still needed step 4.8 — `status: accepted`, unchecked criteria, stale envelopes — and only this gate caught it.)
|
|
253
|
+
|
|
254
|
+
After the gate passes, present a single summary in `aiLanguage`. **Translate all labels and headings to `aiLanguage`** — the template below is structural only. Only identifiers (RFC-XXXX, ADR-XXXX, file paths) stay untranslated.
|
|
253
255
|
|
|
254
256
|
```
|
|
255
257
|
## <Pipeline Summary in aiLanguage>
|
|
@@ -278,7 +280,7 @@ If the session was interrupted (agent stopped, context limit, crash, checkpoint
|
|
|
278
280
|
- TODO list with steps like "Step N: ..." or "implement: RFC-XXXX step N" — these are implementation steps from the plan phase, meaning the pipeline was in step 4 (implement).
|
|
279
281
|
- Git log showing `audit:`, `enhance:`, `plan:`, `implement:` commits for the same RFC/ADR — confirming pipeline progress.
|
|
280
282
|
- If any of these are found, this skill IS the active pipeline — resume it, do not start a new one.
|
|
281
|
-
2. **Detect progress** —
|
|
283
|
+
2. **Detect progress** — first run `queue.validate --file <manifest>`; its derived per-item status (`implemented`/`skipped`/`in-progress` + open/parked decision counts) is the authoritative resume point. Then corroborate with artifacts:
|
|
282
284
|
- Document exists in `docs/rfcs/` or `docs/adrs/` (idea creation done)
|
|
283
285
|
- Audit report in `docs/audits/audit-rfc-XXXX-*.md`
|
|
284
286
|
- `enhancedAt` in the RFC frontmatter
|