@tacuchi/agent-workflow-cli 25.8.0 → 25.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +5 -1
- package/dist/adapters/git-cli.js +225 -17
- package/dist/adapters/git-cli.js.map +1 -1
- package/dist/adapters/node-file-system.js +48 -0
- package/dist/adapters/node-file-system.js.map +1 -1
- package/dist/application/amend-service.js +51 -14
- package/dist/application/amend-service.js.map +1 -1
- package/dist/application/branch-resolver.js +6 -3
- package/dist/application/branch-resolver.js.map +1 -1
- package/dist/application/capability/design-handler.js +124 -43
- package/dist/application/capability/design-handler.js.map +1 -1
- package/dist/application/capability/dispatcher.js +4 -1
- package/dist/application/capability/dispatcher.js.map +1 -1
- package/dist/application/capability/durable-effect.js +3 -0
- package/dist/application/capability/durable-effect.js.map +1 -1
- package/dist/application/check-branch-service.js +158 -19
- package/dist/application/check-branch-service.js.map +1 -1
- package/dist/application/checkpoint/markdown.js +2 -2
- package/dist/application/checkpoint/markdown.js.map +1 -1
- package/dist/application/checkpoint/state-reader.js +12 -0
- package/dist/application/checkpoint/state-reader.js.map +1 -1
- package/dist/application/checkpoint-service.js +12 -4
- package/dist/application/checkpoint-service.js.map +1 -1
- package/dist/application/checkpoint-write-service.js +91 -17
- package/dist/application/checkpoint-write-service.js.map +1 -1
- package/dist/application/claims-ledger.js +137 -11
- package/dist/application/claims-ledger.js.map +1 -1
- package/dist/application/claims-recovery.js +85 -44
- package/dist/application/claims-recovery.js.map +1 -1
- package/dist/application/database-tool-catalog.js +33 -0
- package/dist/application/database-tool-catalog.js.map +1 -1
- package/dist/application/design/consumer-document.js +2 -2
- package/dist/application/design/consumer-document.js.map +1 -1
- package/dist/application/design/design-content-gate-service.js +20 -2
- package/dist/application/design/design-content-gate-service.js.map +1 -1
- package/dist/application/design/design-gate-service.js +2 -0
- package/dist/application/design/design-gate-service.js.map +1 -1
- package/dist/application/design/design-index-service.js +4 -0
- package/dist/application/design/design-index-service.js.map +1 -1
- package/dist/application/design/design-publish-service.js +1 -4
- package/dist/application/design/design-publish-service.js.map +1 -1
- package/dist/application/design/design-record-service.js +13 -7
- package/dist/application/design/design-record-service.js.map +1 -1
- package/dist/application/design/design-resolver-service.js +22 -3
- package/dist/application/design/design-resolver-service.js.map +1 -1
- package/dist/application/design/design-simple-service.js +24 -5
- package/dist/application/design/design-simple-service.js.map +1 -1
- package/dist/application/design/digest.js +41 -0
- package/dist/application/design/digest.js.map +1 -0
- package/dist/application/dev-only-services.js +166 -20
- package/dist/application/dev-only-services.js.map +1 -1
- package/dist/application/doc-branch-ledger.js +145 -0
- package/dist/application/doc-branch-ledger.js.map +1 -0
- package/dist/application/docs-canon-service.js +1 -1
- package/dist/application/docs-canon-service.js.map +1 -1
- package/dist/application/doctor/dist-integrity.js +113 -0
- package/dist/application/doctor/dist-integrity.js.map +1 -0
- package/dist/application/doctor/hosts.js +5 -2
- package/dist/application/doctor/hosts.js.map +1 -1
- package/dist/application/doctor/prepare.js +4 -1
- package/dist/application/doctor/prepare.js.map +1 -1
- package/dist/application/doctor/provider-installation.js +39 -19
- package/dist/application/doctor/provider-installation.js.map +1 -1
- package/dist/application/doctor/provider-mcps.js +9 -1
- package/dist/application/doctor/provider-mcps.js.map +1 -1
- package/dist/application/doctor/provider-skills.js +25 -0
- package/dist/application/doctor/provider-skills.js.map +1 -1
- package/dist/application/doctor/provider-visibility.js +76 -3
- package/dist/application/doctor/provider-visibility.js.map +1 -1
- package/dist/application/doctor/provider-workspace-block.js +156 -0
- package/dist/application/doctor/provider-workspace-block.js.map +1 -0
- package/dist/application/doctor/repair-runner.js +47 -3
- package/dist/application/doctor/repair-runner.js.map +1 -1
- package/dist/application/doctor/report.js +24 -4
- package/dist/application/doctor/report.js.map +1 -1
- package/dist/application/doctor/skills-toml-migrate.js +76 -0
- package/dist/application/doctor/skills-toml-migrate.js.map +1 -0
- package/dist/application/export-catalog-check.js +200 -0
- package/dist/application/export-catalog-check.js.map +1 -0
- package/dist/application/export-service.js +716 -79
- package/dist/application/export-service.js.map +1 -1
- package/dist/application/fix-git-service.js +285 -64
- package/dist/application/fix-git-service.js.map +1 -1
- package/dist/application/flow/advance.js +202 -25
- package/dist/application/flow/advance.js.map +1 -1
- package/dist/application/flow/annul-service.js +3 -1
- package/dist/application/flow/annul-service.js.map +1 -1
- package/dist/application/flow/batch-commit.js +189 -0
- package/dist/application/flow/batch-commit.js.map +1 -0
- package/dist/application/flow/checkout-observation.js +63 -10
- package/dist/application/flow/checkout-observation.js.map +1 -1
- package/dist/application/flow/close-artifacts.js +105 -0
- package/dist/application/flow/close-artifacts.js.map +1 -0
- package/dist/application/flow/close-at-boundary.js +25 -14
- package/dist/application/flow/close-at-boundary.js.map +1 -1
- package/dist/application/flow/close-document-guidance.js +70 -0
- package/dist/application/flow/close-document-guidance.js.map +1 -0
- package/dist/application/flow/flow-service.js +46 -3
- package/dist/application/flow/flow-service.js.map +1 -1
- package/dist/application/flow/internal-actions.js +300 -82
- package/dist/application/flow/internal-actions.js.map +1 -1
- package/dist/application/flow/internal-drive.js +24 -1
- package/dist/application/flow/internal-drive.js.map +1 -1
- package/dist/application/flow/plan-entry.js +82 -0
- package/dist/application/flow/plan-entry.js.map +1 -0
- package/dist/application/flow/prove.js +32 -1
- package/dist/application/flow/prove.js.map +1 -1
- package/dist/application/flow/quick-checkouts.js +48 -0
- package/dist/application/flow/quick-checkouts.js.map +1 -0
- package/dist/application/flow/reinfer-batch.js +177 -0
- package/dist/application/flow/reinfer-batch.js.map +1 -0
- package/dist/application/flow/reopen-run.js +12 -5
- package/dist/application/flow/reopen-run.js.map +1 -1
- package/dist/application/flow/run-state-service.js +2 -0
- package/dist/application/flow/run-state-service.js.map +1 -1
- package/dist/application/flow/submit.js +583 -116
- package/dist/application/flow/submit.js.map +1 -1
- package/dist/application/generate-launch-service.js +16 -6
- package/dist/application/generate-launch-service.js.map +1 -1
- package/dist/application/git-flow-service.js +34 -3
- package/dist/application/git-flow-service.js.map +1 -1
- package/dist/application/history-publications.js +24 -0
- package/dist/application/history-publications.js.map +1 -1
- package/dist/application/history-reconcile-service.js +45 -0
- package/dist/application/history-reconcile-service.js.map +1 -0
- package/dist/application/history-table.js +61 -12
- package/dist/application/history-table.js.map +1 -1
- package/dist/application/history-update-service.js +25 -4
- package/dist/application/history-update-service.js.map +1 -1
- package/dist/application/hook-branch-check.js +25 -3
- package/dist/application/hook-branch-check.js.map +1 -1
- package/dist/application/hook-git-commit-advisor.js +3 -4
- package/dist/application/hook-git-commit-advisor.js.map +1 -1
- package/dist/application/hook-turn-start.js +51 -0
- package/dist/application/hook-turn-start.js.map +1 -0
- package/dist/application/host-memory/codex.js +1 -1
- package/dist/application/host-memory/codex.js.map +1 -1
- package/dist/application/hub-registry.js +135 -0
- package/dist/application/hub-registry.js.map +1 -0
- package/dist/application/local-proposal.js +72 -19
- package/dist/application/local-proposal.js.map +1 -1
- package/dist/application/mcp-host-reader.js +1 -1
- package/dist/application/mcp-host-reader.js.map +1 -1
- package/dist/application/mcp-host-writer.js +16 -10
- package/dist/application/mcp-host-writer.js.map +1 -1
- package/dist/application/merge-state-service.js +150 -34
- package/dist/application/merge-state-service.js.map +1 -1
- package/dist/application/multiroot/claude.js +17 -10
- package/dist/application/multiroot/claude.js.map +1 -1
- package/dist/application/multiroot/codex.js +17 -11
- package/dist/application/multiroot/codex.js.map +1 -1
- package/dist/application/multiroot-service.js +52 -28
- package/dist/application/multiroot-service.js.map +1 -1
- package/dist/application/parsers/execution-batches.js +64 -0
- package/dist/application/parsers/execution-batches.js.map +1 -0
- package/dist/application/parsers/phases.js +23 -2
- package/dist/application/parsers/phases.js.map +1 -1
- package/dist/application/parsers/project-block.js +146 -17
- package/dist/application/parsers/project-block.js.map +1 -1
- package/dist/application/parsers/tasks.js +16 -2
- package/dist/application/parsers/tasks.js.map +1 -1
- package/dist/application/parsers/toml.js +19 -0
- package/dist/application/parsers/toml.js.map +1 -0
- package/dist/application/paths-service.js +13 -16
- package/dist/application/paths-service.js.map +1 -1
- package/dist/application/persist-service.js +118 -5
- package/dist/application/persist-service.js.map +1 -1
- package/dist/application/plan-exec-batch-service.js +162 -22
- package/dist/application/plan-exec-batch-service.js.map +1 -1
- package/dist/application/plan-exec-decision-service.js +61 -12
- package/dist/application/plan-exec-decision-service.js.map +1 -1
- package/dist/application/plan-exec-plan-diff.js +105 -0
- package/dist/application/plan-exec-plan-diff.js.map +1 -0
- package/dist/application/plan-lint-service.js +2 -0
- package/dist/application/plan-lint-service.js.map +1 -1
- package/dist/application/plan-passes.js +41 -0
- package/dist/application/plan-passes.js.map +1 -0
- package/dist/application/preparation-receipts.js +58 -0
- package/dist/application/preparation-receipts.js.map +1 -0
- package/dist/application/project-md-upsert-service.js +191 -52
- package/dist/application/project-md-upsert-service.js.map +1 -1
- package/dist/application/project-tab-data.js +40 -10
- package/dist/application/project-tab-data.js.map +1 -1
- package/dist/application/release-data/artifacts.js +15 -7
- package/dist/application/release-data/artifacts.js.map +1 -1
- package/dist/application/release-data/bundles.js +52 -6
- package/dist/application/release-data/bundles.js.map +1 -1
- package/dist/application/release-data/common.js +2 -2
- package/dist/application/release-data/common.js.map +1 -1
- package/dist/application/release-data/rollback.js +7 -0
- package/dist/application/release-data/rollback.js.map +1 -0
- package/dist/application/release-data/sessions.js +2 -2
- package/dist/application/release-data/sessions.js.map +1 -1
- package/dist/application/release-pass-ledger.js +1 -1
- package/dist/application/render/history-row.js +2 -0
- package/dist/application/render/history-row.js.map +1 -1
- package/dist/application/render/project-block.js +28 -11
- package/dist/application/render/project-block.js.map +1 -1
- package/dist/application/reseal-service.js +1 -0
- package/dist/application/reseal-service.js.map +1 -1
- package/dist/application/resume-service.js +55 -8
- package/dist/application/resume-service.js.map +1 -1
- package/dist/application/retirement/apply.js +25 -7
- package/dist/application/retirement/apply.js.map +1 -1
- package/dist/application/retirement/attribution.js +121 -48
- package/dist/application/retirement/attribution.js.map +1 -1
- package/dist/application/retirement/prepare.js +17 -11
- package/dist/application/retirement/prepare.js.map +1 -1
- package/dist/application/retirement/preview.js +2 -1
- package/dist/application/retirement/preview.js.map +1 -1
- package/dist/application/self/codex-plugin.js +1 -1
- package/dist/application/self/codex-plugin.js.map +1 -1
- package/dist/application/self/host-states.js +3 -3
- package/dist/application/self/host-states.js.map +1 -1
- package/dist/application/self/install-hooks.js +1 -1
- package/dist/application/self/install-hooks.js.map +1 -1
- package/dist/application/self/mcp-config.js +19 -11
- package/dist/application/self/mcp-config.js.map +1 -1
- package/dist/application/self/opencode-plugin.js +1 -0
- package/dist/application/self/opencode-plugin.js.map +1 -1
- package/dist/application/self/uninstall.js +1 -1
- package/dist/application/self/uninstall.js.map +1 -1
- package/dist/application/semantic-operation/protocol.js +66 -5
- package/dist/application/semantic-operation/protocol.js.map +1 -1
- package/dist/application/session-archive-service.js +113 -0
- package/dist/application/session-archive-service.js.map +1 -0
- package/dist/application/session-binding-service.js +35 -0
- package/dist/application/session-binding-service.js.map +1 -1
- package/dist/application/session-close-service.js +390 -54
- package/dist/application/session-close-service.js.map +1 -1
- package/dist/application/session-create-service.js +97 -5
- package/dist/application/session-create-service.js.map +1 -1
- package/dist/application/session-custody-recorder.js +15 -12
- package/dist/application/session-custody-recorder.js.map +1 -1
- package/dist/application/session-custody-service.js +1 -0
- package/dist/application/session-custody-service.js.map +1 -1
- package/dist/application/session-narrative.js +42 -12
- package/dist/application/session-narrative.js.map +1 -1
- package/dist/application/session-pause-service.js +46 -0
- package/dist/application/session-pause-service.js.map +1 -0
- package/dist/application/session-resolver.js +36 -11
- package/dist/application/session-resolver.js.map +1 -1
- package/dist/application/session-resume-service.js +134 -13
- package/dist/application/session-resume-service.js.map +1 -1
- package/dist/application/sessions-service.js +4 -0
- package/dist/application/sessions-service.js.map +1 -1
- package/dist/application/sessions-sweep-service.js +77 -0
- package/dist/application/sessions-sweep-service.js.map +1 -0
- package/dist/application/settle-service.js +3 -1
- package/dist/application/settle-service.js.map +1 -1
- package/dist/application/skills-resolver-service.js +1 -1
- package/dist/application/skills-resolver-service.js.map +1 -1
- package/dist/application/source-add-service.js +37 -0
- package/dist/application/source-add-service.js.map +1 -0
- package/dist/application/source-boundary-policy.js +97 -8
- package/dist/application/source-boundary-policy.js.map +1 -1
- package/dist/application/source-pipeline.js +68 -0
- package/dist/application/source-pipeline.js.map +1 -0
- package/dist/application/source-remove-service.js +15 -3
- package/dist/application/source-remove-service.js.map +1 -1
- package/dist/application/sources-service.js +71 -16
- package/dist/application/sources-service.js.map +1 -1
- package/dist/application/status-service.js +55 -5
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/unit-dependencies.js +100 -0
- package/dist/application/unit-dependencies.js.map +1 -0
- package/dist/application/unit-membership.js +37 -0
- package/dist/application/unit-membership.js.map +1 -0
- package/dist/application/unit-residue.js +72 -0
- package/dist/application/unit-residue.js.map +1 -0
- package/dist/application/visibility-doctor-service.js +66 -4
- package/dist/application/visibility-doctor-service.js.map +1 -1
- package/dist/application/working-branch-service.js +6 -0
- package/dist/application/working-branch-service.js.map +1 -1
- package/dist/application/workline-graph.js +1 -1
- package/dist/application/workline-graph.js.map +1 -1
- package/dist/application/workline-index-service.js +118 -17
- package/dist/application/workline-index-service.js.map +1 -1
- package/dist/application/workspace-commit-service.js +218 -0
- package/dist/application/workspace-commit-service.js.map +1 -0
- package/dist/application/workspace-init-service.js +64 -34
- package/dist/application/workspace-init-service.js.map +1 -1
- package/dist/application/workspace-local-config.js +90 -0
- package/dist/application/workspace-local-config.js.map +1 -0
- package/dist/application/workspace-materialization-service.js +52 -3
- package/dist/application/workspace-materialization-service.js.map +1 -1
- package/dist/application/workspace-migrate/apply.js +525 -4
- package/dist/application/workspace-migrate/apply.js.map +1 -1
- package/dist/application/workspace-migrate/markers.js +9 -6
- package/dist/application/workspace-migrate/markers.js.map +1 -1
- package/dist/application/workspace-migrate/plan.js +97 -5
- package/dist/application/workspace-migrate/plan.js.map +1 -1
- package/dist/application/workspace-move-service.js +270 -0
- package/dist/application/workspace-move-service.js.map +1 -0
- package/dist/application/workspace-untrack-service.js +28 -0
- package/dist/application/workspace-untrack-service.js.map +1 -0
- package/dist/application/worktree-service.js +654 -105
- package/dist/application/worktree-service.js.map +1 -1
- package/dist/cli/ascii.js +2 -0
- package/dist/cli/ascii.js.map +1 -1
- package/dist/cli/commands/add-source.js +38 -0
- package/dist/cli/commands/add-source.js.map +1 -0
- package/dist/cli/commands/amend.js +14 -3
- package/dist/cli/commands/amend.js.map +1 -1
- package/dist/cli/commands/capability.js +11 -0
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/designs.js +14 -5
- package/dist/cli/commands/designs.js.map +1 -1
- package/dist/cli/commands/dev-only.js +19 -6
- package/dist/cli/commands/dev-only.js.map +1 -1
- package/dist/cli/commands/doc-branch.js +184 -0
- package/dist/cli/commands/doc-branch.js.map +1 -0
- package/dist/cli/commands/doctor.js +5 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/export.js +78 -18
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/fix-git.js +89 -14
- package/dist/cli/commands/fix-git.js.map +1 -1
- package/dist/cli/commands/flow.js +120 -15
- package/dist/cli/commands/flow.js.map +1 -1
- package/dist/cli/commands/generate-launch.js +14 -2
- package/dist/cli/commands/generate-launch.js.map +1 -1
- package/dist/cli/commands/history-update.js +1 -1
- package/dist/cli/commands/history-update.js.map +1 -1
- package/dist/cli/commands/history.js +14 -0
- package/dist/cli/commands/history.js.map +1 -0
- package/dist/cli/commands/hook.js +15 -2
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/index.js +18 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/merge-state.js +2 -2
- package/dist/cli/commands/merge-state.js.map +1 -1
- package/dist/cli/commands/persist.js +6 -5
- package/dist/cli/commands/persist.js.map +1 -1
- package/dist/cli/commands/project-md-upsert.js +5 -3
- package/dist/cli/commands/project-md-upsert.js.map +1 -1
- package/dist/cli/commands/release-pass.js +3 -3
- package/dist/cli/commands/release-pass.js.map +1 -1
- package/dist/cli/commands/resume.js +12 -3
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/commands/self.js +7 -2
- package/dist/cli/commands/self.js.map +1 -1
- package/dist/cli/commands/session-close.js +64 -9
- package/dist/cli/commands/session-close.js.map +1 -1
- package/dist/cli/commands/session-create.js +4 -2
- package/dist/cli/commands/session-create.js.map +1 -1
- package/dist/cli/commands/session-pause.js +14 -0
- package/dist/cli/commands/session-pause.js.map +1 -0
- package/dist/cli/commands/sessions.js +16 -3
- package/dist/cli/commands/sessions.js.map +1 -1
- package/dist/cli/commands/set-branch.js +28 -4
- package/dist/cli/commands/set-branch.js.map +1 -1
- package/dist/cli/commands/set-edit-mode.js +20 -0
- package/dist/cli/commands/set-edit-mode.js.map +1 -0
- package/dist/cli/commands/set-pipeline.js +35 -0
- package/dist/cli/commands/set-pipeline.js.map +1 -0
- package/dist/cli/commands/sources.js +4 -0
- package/dist/cli/commands/sources.js.map +1 -1
- package/dist/cli/commands/status.js +35 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/unknown-flags.js +1 -0
- package/dist/cli/commands/unknown-flags.js.map +1 -1
- package/dist/cli/commands/visibility.js +1 -0
- package/dist/cli/commands/visibility.js.map +1 -1
- package/dist/cli/commands/workspace-commit.js +62 -0
- package/dist/cli/commands/workspace-commit.js.map +1 -0
- package/dist/cli/commands/workspace-init.js +39 -2
- package/dist/cli/commands/workspace-init.js.map +1 -1
- package/dist/cli/commands/workspace-migrate.js +31 -3
- package/dist/cli/commands/workspace-migrate.js.map +1 -1
- package/dist/cli/commands/workspace-move.js +42 -0
- package/dist/cli/commands/workspace-move.js.map +1 -0
- package/dist/cli/commands/worktree.js +4 -4
- package/dist/cli/commands/worktree.js.map +1 -1
- package/dist/cli/context-id.js +6 -0
- package/dist/cli/context-id.js.map +1 -1
- package/dist/cli/full-cli.js +555 -0
- package/dist/cli/full-cli.js.map +1 -0
- package/dist/cli/help-groups.js +75 -16
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/hook-stdin-cache.js +12 -0
- package/dist/cli/hook-stdin-cache.js.map +1 -0
- package/dist/cli/main.js +47 -453
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/parser.js +4 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/tui/app.js +1 -1
- package/dist/cli/tui/app.js.map +1 -1
- package/dist/cli/tui/components/workspace-init-form.js +4 -1
- package/dist/cli/tui/components/workspace-init-form.js.map +1 -1
- package/dist/cli/tui/data/recommended-skills.js +2 -2
- package/dist/cli/tui/data/recommended-skills.js.map +1 -1
- package/dist/cli/tui/data/workflow-content.js +6 -1
- package/dist/cli/tui/data/workflow-content.js.map +1 -1
- package/dist/cli/tui/tabs/mcp-tab.js +4 -3
- package/dist/cli/tui/tabs/mcp-tab.js.map +1 -1
- package/dist/cli/tui/tabs/project-tab.js +7 -2
- package/dist/cli/tui/tabs/project-tab.js.map +1 -1
- package/dist/dist-manifest.json +4117 -0
- package/dist/domain/capability/protocol.js.map +1 -1
- package/dist/domain/decision-note.js +13 -0
- package/dist/domain/decision-note.js.map +1 -1
- package/dist/domain/design/artifact.js +22 -3
- package/dist/domain/design/artifact.js.map +1 -1
- package/dist/domain/design/capability.js +1 -0
- package/dist/domain/design/capability.js.map +1 -1
- package/dist/domain/design/expansion.js +1 -1
- package/dist/domain/design/expansion.js.map +1 -1
- package/dist/domain/design/maturity.js +16 -0
- package/dist/domain/design/maturity.js.map +1 -1
- package/dist/domain/design/reference.js +5 -0
- package/dist/domain/design/reference.js.map +1 -1
- package/dist/domain/doctor/operations.js +28 -2
- package/dist/domain/doctor/operations.js.map +1 -1
- package/dist/domain/effective-contract.js +3 -1
- package/dist/domain/effective-contract.js.map +1 -1
- package/dist/domain/elicitation.js +1 -1
- package/dist/domain/flow/answer.js +265 -130
- package/dist/domain/flow/answer.js.map +1 -1
- package/dist/domain/flow/authority.js +193 -34
- package/dist/domain/flow/authority.js.map +1 -1
- package/dist/domain/flow/batch-review.js +65 -0
- package/dist/domain/flow/batch-review.js.map +1 -0
- package/dist/domain/flow/decision-schema.js +47 -0
- package/dist/domain/flow/decision-schema.js.map +1 -0
- package/dist/domain/flow/directive.js +16 -0
- package/dist/domain/flow/directive.js.map +1 -1
- package/dist/domain/flow/execution-result.js +91 -2
- package/dist/domain/flow/execution-result.js.map +1 -1
- package/dist/domain/flow/run-state.js +352 -24
- package/dist/domain/flow/run-state.js.map +1 -1
- package/dist/domain/flow/test-run-evidence.js +285 -0
- package/dist/domain/flow/test-run-evidence.js.map +1 -0
- package/dist/domain/flow/unchanged-phase.js +15 -0
- package/dist/domain/flow/unchanged-phase.js.map +1 -0
- package/dist/domain/harnesses.js +14 -5
- package/dist/domain/harnesses.js.map +1 -1
- package/dist/domain/isolation-unit.js +2 -2
- package/dist/domain/isolation-unit.js.map +1 -1
- package/dist/domain/lineage.js +7 -2
- package/dist/domain/lineage.js.map +1 -1
- package/dist/domain/obligation-correspondence.js +4 -2
- package/dist/domain/obligation-correspondence.js.map +1 -1
- package/dist/domain/plan-handoff.js +5 -0
- package/dist/domain/plan-handoff.js.map +1 -0
- package/dist/domain/proposal.js +18 -7
- package/dist/domain/proposal.js.map +1 -1
- package/dist/domain/reservation.js +5 -3
- package/dist/domain/reservation.js.map +1 -1
- package/dist/domain/retirement/proposal.js +1 -0
- package/dist/domain/retirement/proposal.js.map +1 -1
- package/dist/domain/session/custody.js +10 -6
- package/dist/domain/session/custody.js.map +1 -1
- package/dist/domain/session/narrative.js +4 -1
- package/dist/domain/session/narrative.js.map +1 -1
- package/dist/domain/skills.js +2 -0
- package/dist/domain/skills.js.map +1 -1
- package/dist/domain/sql-lexer.js +1 -1
- package/dist/domain/sql-lexer.js.map +1 -1
- package/dist/runtime/namespace-resolver.js +4 -0
- package/dist/runtime/namespace-resolver.js.map +1 -1
- package/dist/runtime/workline-marker.js +35 -8
- package/dist/runtime/workline-marker.js.map +1 -1
- package/dist/runtime/workspace-resolution.js +123 -0
- package/dist/runtime/workspace-resolution.js.map +1 -0
- package/package.json +5 -4
- package/skills/w/SKILL.md +3 -1
- package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +1 -1
- package/skills/w/artifacts/artifacts-core/SCRIPTS.rollback.sql +8 -0
- package/skills/w/artifacts/artifacts-core/SCRIPTS.sql +4 -8
- package/skills/w/commands/export-diagrams.md +3 -3
- package/skills/w/commands/export-manuals.md +6 -6
- package/skills/w/commands/export-reports.md +3 -3
- package/skills/w/commands/export-scripts.md +5 -5
- package/skills/w/commands/fix-git.md +12 -13
- package/skills/w/commands/persist.md +2 -2
- package/skills/w/commands/plan-exec.md +4 -2
- package/skills/w/commands/spec-new.md +1 -1
- package/skills/w/commands/workspace-init.md +2 -0
- package/skills/w/context/MANIFEST.json +1 -1
- package/skills/w/exports/export-diagrams/EXPORT.md +3 -3
- package/skills/w/exports/export-manuals/EXPORT.md +14 -16
- package/skills/w/exports/export-reports/EXPORT.md +3 -3
- package/skills/w/exports/export-scripts/EXPORT.md +45 -21
- package/skills/w/harness/HARNESS.md +2 -2
- package/skills/w/hooks/hooks.template.json +6 -4
- package/skills/w/loops/CHASSIS.md +11 -5
- package/skills/w/loops/CODE-POLICIES.md +7 -4
- package/skills/w/loops/plan-exec-loop/LOOP.md +23 -22
- package/skills/w/loops/plan-new-loop/LOOP.md +23 -31
- package/skills/w/loops/plan-refine-loop/LOOP.md +8 -2
- package/skills/w/loops/quick-loop/LOOP.md +6 -5
- package/skills/w/modules/DESIGN-REFERENCES.md +9 -11
- package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +4 -4
- package/skills/w/modules/SESSION-NUMBERING.md +2 -0
- package/skills/w/roles/design/CONTRACT.md +6 -4
- package/skills/w/roles/design/ROLE.md +4 -2
- package/skills/w/roles/git/ROLE.md +16 -9
- package/skills/w/roles/research/ROLE.md +1 -1
- package/skills/w/roles/sql/ROLE.md +16 -14
- package/skills/w/schemas/design/ui-screen.v1.schema.json +9 -0
|
@@ -52,38 +52,33 @@ Technical detail and roadmap stay inline:
|
|
|
52
52
|
> Derived from docs/specs/NNN-spec-<slug>.md · generated by plan-new-loop
|
|
53
53
|
> Estado: open
|
|
54
54
|
> Límite de ejecución: checkout
|
|
55
|
+
> Aislamiento: unidad
|
|
55
56
|
|
|
56
57
|
## Origin source spec/prompt or adopted source + attribution
|
|
57
58
|
## Solution AS-IS → TO-BE + "Final behavior" block (core)
|
|
58
59
|
## Impacted sources (core)
|
|
59
|
-
## Dependencies docs · sources ·
|
|
60
|
-
## Design references the baselines this plan's roots pin (opt. —
|
|
60
|
+
## Dependencies docs · sources · order (opt.)
|
|
61
|
+
## Design references the baselines this plan's roots pin (opt. — UI)
|
|
61
62
|
## Tasks `### Fn` blocks: the ONLY source of phases (core)
|
|
62
63
|
## Execution batches complete phase partition (core)
|
|
63
64
|
## Validations proof (core)
|
|
64
65
|
## Implementation decisions decisions, controls, risk (when used)
|
|
65
|
-
## Risks / impact
|
|
66
|
-
## Assumptions
|
|
67
|
-
##
|
|
66
|
+
## Risks / impact risks, impact (opt.)
|
|
67
|
+
## Assumptions (opt.)
|
|
68
|
+
## Handoff operativo `- Pase a cert|prod: <corte>` (opt.; no boxes)
|
|
69
|
+
## Open questions pending; OMIT the section when empty
|
|
68
70
|
```
|
|
69
71
|
|
|
70
|
-
Core sections
|
|
71
|
-
separate sections, which new plans never write.
|
|
72
|
+
Core sections are mandatory; optional ones need a cause. Legacy sections are read, never authored.
|
|
72
73
|
|
|
73
|
-
> **Header, seal and evidence.**
|
|
74
|
-
> `> Standalone: <origen> · generated by plan-new-loop` instead of `> Derived from …` (fixed label, free
|
|
75
|
-
> prose): it seals no baseline and its deviations go to the session, never to a contract note. With a
|
|
76
|
-
> spec, the `> Baseline:` the CLI seals is a **functional** digest of it: an editorial edit leaves this
|
|
77
|
-
> plan aligned, and a seal still reading one as divergent is re-sealed (`aw reseal`: `prepare` → `apply
|
|
78
|
-
> --approval`, or a re-publication), never redesigned. `## Validations` **derives** from the spec's
|
|
79
|
-
> acceptance criteria and `## Scenarios` — tests, evidence and commands live here, outcomes there.
|
|
74
|
+
> **Header, seal and evidence.** Without a spec use `> Standalone: <origen> · generated by plan-new-loop`, no baseline; deviations stay in the session. Otherwise `> Derived from …` and CLI-sealed functional `> Baseline:` apply. Editorial drift calls for `aw reseal` (`prepare` → `apply --approval`) or re-publication. `## Validations` **derives** from the spec's acceptance criteria and `## Scenarios`: outcomes there, commands here.
|
|
80
75
|
|
|
81
76
|
Batch syntax, inference and runtime semantics are defined once in
|
|
82
77
|
[`PLAN-EXECUTION-BATCHES`](../../modules/PLAN-EXECUTION-BATCHES.md).
|
|
83
78
|
|
|
84
79
|
## Phase contract (canonical)
|
|
85
80
|
|
|
86
|
-
A `### Fn`
|
|
81
|
+
A `### Fn` is a **verifiable state of the system**, never a list of layers, files or classes.
|
|
87
82
|
|
|
88
83
|
```markdown
|
|
89
84
|
### F1 — <result-oriented name>
|
|
@@ -97,32 +92,27 @@ A `### Fn` block is a **verifiable state of the system**, never a list of layers
|
|
|
97
92
|
**Condición de salida:** <falsifiable result · contract preserved>
|
|
98
93
|
```
|
|
99
94
|
|
|
100
|
-
**Required**: `Resultado
|
|
101
|
-
line · `Fuentes`. Every task declares `_(fuentes: …)_`, a phase subset (`workspace` or an exact
|
|
102
|
-
`AGENTS.md > Fuentes` alias); `Impacted` never substitutes them. **Conditional**: `Estado inicial` when unclear · `Recorrido afectado` for a distributed
|
|
103
|
-
change · `Dependencias` when direct sequence is insufficient · `Límite de simulación` (**only** when temporary behavior exists) · `Diferido` when work was consciously excluded.
|
|
104
|
-
**A new phase never writes an empty conditional block.**
|
|
95
|
+
**Required**: `Resultado`, `Trabajo`, `Validación de fase`, `Condición de salida`, state and `Fuentes`. Every task declares `_(fuentes: …)_` within its phase (`workspace` or `AGENTS.md > Fuentes`); `Impacted` is no substitute. **Conditional**: `Estado inicial` if unclear; `Recorrido afectado` if distributed; `Dependencias` if sequence is insufficient; `Límite de simulación` (**only** when temporary behavior exists); `Diferido` for excluded work. **A new phase never writes an empty conditional block.**
|
|
105
96
|
|
|
106
|
-
**
|
|
107
|
-
|
|
97
|
+
**Preexisting failures (conditional):** only when observed, add
|
|
98
|
+
`> Rojos previos: [{"file":"tests/x.test.ts","case":"suite > case"}]` inside the phase.
|
|
99
|
+
Use exact runner file/full-case identifiers (JVM: class/method), no wildcards.
|
|
100
|
+
`passed: true` then means no failures outside that list; unidentified failures still reject.
|
|
108
101
|
|
|
109
|
-
**
|
|
110
|
-
|
|
111
|
-
**alongside — not instead of —** checkboxes. `validada` requires completed work, a true exit
|
|
112
|
-
condition, its validation **ran and passed**, and a green review gate. **Never** because all its checkboxes are ticked.
|
|
113
|
-
Legacy blocks have no line; a missing one reads `pendiente`, and nothing is back-filled.
|
|
102
|
+
**Checkout is the only closing surface**: use local commands, fixtures, ephemeral DB or inspection; deployed hosts and remote reads are research or non-blocking `Handoff operativo`.
|
|
103
|
+
|
|
104
|
+
**Phase state = machine state.** One bare `> Estado: <value>` line uses `pendiente` | `en ejecución` | `bloqueada` | `validada`. It is updated in place and counted **alongside — not instead of —** checkboxes. `validada` requires completed work, a true exit condition, its validation **ran and passed**, and a green review gate. **Never** because all its checkboxes are ticked. Legacy blocks have no line; a missing one reads `pendiente`, and nothing is back-filled.
|
|
114
105
|
|
|
115
106
|
**The state line carries its value alone**; an annotated value reads as `pendiente`. A blocker
|
|
116
107
|
uses its own `> Bloqueo: <reason>` line and the session records.
|
|
117
108
|
|
|
118
109
|
**The plan carries its own state, and it is a different axis.** Its title-level value is `open` | `done`;
|
|
119
|
-
only
|
|
110
|
+
only the CLI seals `done`, `> Cierre:` (run evidence) and `> Assurance:` after final validation.
|
|
120
111
|
Position disambiguates the two marks. `done` with open work is `inconsistent`; all phases green without
|
|
121
112
|
closure is `final_validation_pending`.
|
|
122
113
|
|
|
123
|
-
**Granularity is semantic, not mechanical.**
|
|
124
|
-
|
|
125
|
-
entry. Size labels inform risk and scope; they never force a mechanical split.
|
|
114
|
+
**Granularity is semantic, not mechanical.** Tasks express purposes across files.
|
|
115
|
+
An edit is a **micro step**, not a task. Size informs risk, never forces splits.
|
|
126
116
|
|
|
127
117
|
## Delta 2 — Gap taxonomy (of "plan")
|
|
128
118
|
|
|
@@ -149,6 +139,8 @@ Replaces the spec taxonomy with a planning one:
|
|
|
149
139
|
|
|
150
140
|
> **Author the Solution the laziest-that-works way** (chassis § *Minimality*, generative side): reuse what the codebase/stdlib/platform already provides before adding abstractions, layers or dependencies — the gate then *confirms* minimality instead of repairing over-engineering.
|
|
151
141
|
|
|
142
|
+
Final validation uses source pipelines. Override under `## Validations`: `- Validación final · \`<alias>\` · build \`<comando>\` · tests \`<comando>\``. Either command may be omitted. Alias must be a phase source, not `workspace`; each clause needs local proof.
|
|
143
|
+
|
|
152
144
|
## Delta 3 — What research investigates here
|
|
153
145
|
|
|
154
146
|
Inline research maps affected code, AS-IS wiring and dependencies into `Solution`/`Impacted`.
|
|
@@ -29,7 +29,10 @@ This loop turns a plan into a sequence of **verifiable states of the system**. E
|
|
|
29
29
|
|
|
30
30
|
> `plan-exec` can implement every phase **without inventing** contracts, observable states, structural order, simulation boundary or exit evidence.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
This loop **applies** it and never redefines it: [`plan-new-loop`](../plan-new-loop/LOOP.md)
|
|
33
|
+
§ *Phase contract (canonical)*, including conditional
|
|
34
|
+
`> Rojos previos:` JSON file/case lists when failures are observed. Preserve exact identities;
|
|
35
|
+
never add an empty list or waive unidentified failures. A `### Fn` demonstrates a system state.
|
|
33
36
|
|
|
34
37
|
The plan's execution-unit interface is likewise defined once in
|
|
35
38
|
[`PLAN-EXECUTION-BATCHES`](../../modules/PLAN-EXECUTION-BATCHES.md). This loop re-infers and
|
|
@@ -37,7 +40,8 @@ writes its complete phase partition; it never asks the human to choose an optimi
|
|
|
37
40
|
can establish.
|
|
38
41
|
|
|
39
42
|
## Auxiliary / NOT mandatory
|
|
40
|
-
`plan-exec` runs **any
|
|
43
|
+
`plan-exec` runs **any executable plan**, refined or not. This optional loop incorporates changes
|
|
44
|
+
before execution and repairs unexecutable structure in place.
|
|
41
45
|
|
|
42
46
|
## Started by
|
|
43
47
|
`/w:plan-refine` — **resumable** (same chassis mechanism, keyed off CHECKPOINT) and **re-runnable on demand** (see *Compact / resume*). Second path: **the return from execution** — `plan-exec` derives here when its entry check finds a structural gap it cannot normalize, or when it stops mid-run on a structural deviation (§ *Replanning executed work*).
|
|
@@ -137,6 +141,8 @@ This loop's instance of the chassis convergence gate — the same one `plan-exec
|
|
|
137
141
|
- **Execution batches** — every phase appears once; maximal continuous ranges cross no decision, proof, handoff, irreversible action or required recovery boundary.
|
|
138
142
|
- **Resumability** — tasks legible enough for a `CHECKPOINT`, intermediate states stable, pending work distinguishable from work already `validada`.
|
|
139
143
|
|
|
144
|
+
The CLI alone seals `> Cierre:` with run evidence and `> Assurance:` after final validation; refinement only changes the plan's structure.
|
|
145
|
+
|
|
140
146
|
## Sequence
|
|
141
147
|
|
|
142
148
|
```
|
|
@@ -34,7 +34,7 @@ QUICK
|
|
|
34
34
|
|
|
35
35
|
## Internal session
|
|
36
36
|
|
|
37
|
-
- **ALWAYS** creates a light session with descriptor `<slug>-quick` → `NNN-<slug>-quick` (Type = `quick`, ≈ `exec`): `SESSION` · `DECISION` · `SCRIPTS.sql` · `CHECKPOINT` (+ `BACKLOG` only if something is deferred).
|
|
37
|
+
- **ALWAYS** creates a light session with descriptor `<slug>-quick` → `NNN-<slug>-quick` (Type = `quick`, ≈ `exec`): `SESSION` · `DECISION` · `SCRIPTS.sql` · `CHECKPOINT` (+ `BACKLOG` only if something is deferred). Research stays **inline** (`ANALYSIS-FILE`/`CONCLUSIONS` + read-only `SCRIPTS.sql`). Escalation closes this session before SPEC continues.
|
|
38
38
|
|
|
39
39
|
## Inherits
|
|
40
40
|
|
|
@@ -53,16 +53,16 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
53
53
|
- **Git and DB inline** (full policies in [`../CODE-POLICIES.md`](../CODE-POLICIES.md)): before editing, verify each source's expected branch (`aw check-branch`); **proposed** commit (approve first) — never `push`/`--amend`/`--no-verify`. The AI **never executes DML/DDL**: migrations are drafted into the session's `SCRIPTS.sql`; fixture/ephemeral checks are local proof and any remote read is research context, never closure.
|
|
54
54
|
- **Fix preview, before executing**: declare the fix you are about to make — files to touch, intent, expected shape of the diff. It is **proportional**: one line for something trivial; approach, files and risks for something complex. Above the same signal threshold that fires the entry size gate (below), a person approves it (`Ejecutar tal cual` · `Ajustar el enfoque` · `Escalar a spec` → *Mid-loop escalation*). **Below the threshold there is no human stop**: the preview stays declared in the session and the task executes.
|
|
55
55
|
- **One session. One commit** proposed at the end (only if there were code changes), **after the proportional closing review gate** ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Closing review gate*): diff re-read + ambient conventions; fix or defer; nothing reaches the commit unreviewed.
|
|
56
|
-
- **Entry SIZE GATE** (before
|
|
56
|
+
- **Entry SIZE GATE** (before implementation): a quick that should have been a spec costs more than the ceremony it saved. Recognize the signals; the threshold, anti-duplicate search and alternatives are the CLI's. A signal resolved by *adopted context* is **not** a signal (chassis § *Adopted context*). A **resume** never re-fires the gate.
|
|
57
57
|
- **`Recortar alcance`**, if chosen: propose the **sub-task that DOES fit** a quick (`SESSION.Objective` = the sub-task; the original prompt goes into `## Origin`) and defer the rest to `BACKLOG` ("trimmed at the gate — may warrant its own spec, `/w:spec-new`").
|
|
58
|
-
- **`Cambiar a SPEC
|
|
58
|
+
- **`Cambiar a SPEC`** closes the existing quick, preserving its request for *Live transition to SPEC*.
|
|
59
59
|
- **Live transition to SPEC** (shared by the gate and mid-loop escalation). On acceptance, the work line **moves to the SPEC flow**: the explicit consent in the structured-choice **equals invoking the destination command** (*consented exception* — rule 3 of the *Continuity rule*, [`../../SKILL.md`](../../SKILL.md) § *Operating context*). On the SPEC side:
|
|
60
60
|
1. **Materialize the draft** via the [`../../commands/spec-new.md`](../../commands/spec-new.md) procedure: `aw next-number docs/specs --publish spec-<slug>.md` with the finished draft on stdin (one atomic act: number assigned, document written, no reservation left), schema, single-pass **NO RESEARCH** — its bounded reconnaissance does **not** re-fire (this run's context arrives adopted). `## Origin` = "escalated from `/w:quick`" + the original prompt (+ the origin quick session if it exists). The draft is born `status: draft`: only the SPEC gate promotes it to `ready-for-plan`.
|
|
61
61
|
2. **Load and execute** [`../spec-refine-loop/LOOP.md`](../spec-refine-loop/LOOP.md) — over that spec (trampoline pattern).
|
|
62
62
|
3. The run's session is that loop's **normal** `NNN-<slug>-spec-refine` (the CLI numbers it; its `## Origin` records the escalation). **Invariant 2 intact**: quick, while it is quick, never writes `docs/` — the draft is written by the SPEC flow, post-consent.
|
|
63
63
|
- **Mid-loop escalation + handoff**: if the task grows, declare the signals again — the CLI applies the same threshold and, if it fires, asks. If the user accepts moving up:
|
|
64
64
|
1. **Any already-edited code stays** in the working tree (never reverted) and is **recorded** in `CHECKPOINT` + `BACKLOG`: "uncommitted changes in `<source>` — decide commit/discard on resume" (the "rejected commit" pattern of *Safe git*).
|
|
65
|
-
2. The
|
|
65
|
+
2. The CLI writes the escalation pointer in `BACKLOG` before closing the quick. **SPEC** continues through `/w:spec-new` with the preserved request; **PLAN** stays deferred (seed + pointer, no live entry).
|
|
66
66
|
3. The artifacts (`DECISION`, `SCRIPTS.sql`) **stay in the quick session** as referenceable context, never migrated.
|
|
67
67
|
4. **SPEC enters live**: after `finalize`, run the *Live transition to SPEC* (draft **only if no spec exists** for this objective; then the loop). **Asymmetry** intact: PLAN can **absorb** the progress (plan-exec picks up the existing working tree); SPEC **restarts** the design cycle and treats the half-done code as context/reference, never as ingested work.
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
71
71
|
```
|
|
72
72
|
quick-loop(prompt):
|
|
73
73
|
# `Cambiar a SPEC` → live transition (see delta): draft (spec-new procedure) +
|
|
74
|
-
# load
|
|
74
|
+
# load ../spec-refine-loop/LOOP.md → END (quick closed by CLI)
|
|
75
75
|
if the conversation already established analysis/conclusions → # adopted context (chassis)
|
|
76
76
|
adopt them (SESSION.Origin = "adopted from host conversation"; reference in CONCLUSIONS) — never re-derive/re-ask
|
|
77
77
|
author SESSION.Success criteria = the deliverable's check # test(s) if code · short RATIFIED rubric if analysis/design
|
|
@@ -99,6 +99,7 @@ finalize: CHECKPOINT (AFTER: Pending→Completed) + BACKLOG (only if something i
|
|
|
99
99
|
|
|
100
100
|
## Convergence / exit
|
|
101
101
|
|
|
102
|
+
- Before closing, run `aw amend apply … --check` for each spec/plan line known to be outdated. Propose its returned path; never edit without approval.
|
|
102
103
|
- Closing review gate passed and commit proposed if there was code (or skipping it approved) → `Cerrar`.
|
|
103
104
|
- `Cerrar`/`Compactar` (`flow` control) → persists `CHECKPOINT` + `BACKLOG` (resumable).
|
|
104
105
|
- **No export**: nothing goes to `docs/` (§ *Writes*); escalating is the only way up.
|
|
@@ -23,16 +23,16 @@ identical for both, and the mode decides which task-pin form is legal.
|
|
|
23
23
|
digest: `sha256:<64 hex>`
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
A simple design
|
|
26
|
+
A simple design hints `DESIGN.md`; archiving its revision keeps the hint valid.
|
|
27
27
|
|
|
28
28
|
- `package` pins **identity and revision**. `latest`, a folder slug, a bare
|
|
29
29
|
`DES-001` or a title are rejected: each answers a different question next year.
|
|
30
|
-
- `baseline_hint` is a **location hint**, never
|
|
31
|
-
|
|
30
|
+
- `baseline_hint` is a **location hint**, never identity. A renamed dossier
|
|
31
|
+
warns stale; archiving a simple revision does not.
|
|
32
32
|
- `digest` seals the exact bytes; one that no longer matches never resolves
|
|
33
33
|
quietly.
|
|
34
|
-
- Several designs are several blocks.
|
|
35
|
-
|
|
34
|
+
- Several designs are several blocks. A bare id warns only if the plan pins or
|
|
35
|
+
attempts a reference; `DES-001@alias` always warns.
|
|
36
36
|
|
|
37
37
|
**Never in the document**: Screen Specifications, flow graphs, state inventories,
|
|
38
38
|
region or component tables, mockups, embedded images. Those live at their own
|
|
@@ -87,12 +87,10 @@ claim.
|
|
|
87
87
|
|
|
88
88
|
## quick — read it, never rewrite it
|
|
89
89
|
|
|
90
|
-
`quick` **reads and validates** (`aw designs`, `aw designs --plan`); it
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
acceptance moves. Editing silently moves the revision while every consumer stays
|
|
95
|
-
pinned to the old digest.
|
|
90
|
+
`quick` **reads and validates** (`aw designs`, `aw designs --plan`); it never
|
|
91
|
+
changes sealed content, maturity or approval. A new state or journey escalates with the
|
|
92
|
+
evidence it gathered: `plan-refine` for the package, `spec-refine` when behavior
|
|
93
|
+
or acceptance moves.
|
|
96
94
|
|
|
97
95
|
## plan-refine — the delta, and only the delta
|
|
98
96
|
|
|
@@ -57,9 +57,9 @@ action go to `CHECKPOINT`.
|
|
|
57
57
|
|
|
58
58
|
## Git authorization
|
|
59
59
|
|
|
60
|
-
A green batch
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
commit
|
|
60
|
+
A green batch proposes one message and exact paths per changed source. After its approval the CLI
|
|
61
|
+
commits only those paths and verifies git before the next batch; approval alone is not a commit.
|
|
62
|
+
No paths means no commit. `done` is sealed after git/integration in the workspace plan, not in a
|
|
63
|
+
source commit; a later workspace-close commit may carry it. An unrun check is never green.
|
|
64
64
|
|
|
65
65
|
> **What proves the batch was green is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document — positionally, behind the delegated validation and the review, neither of which a narration can pass.
|
|
@@ -14,6 +14,8 @@ Loaded when the run has to locate or name a session beyond creating its own (sig
|
|
|
14
14
|
|
|
15
15
|
**Reopen to continue**: `aw session-resume --code <NNN> --reopen` reactivates a **closed** session (removes `.closed` → active) to keep working in it; without `--reopen`, resume is read-only. To detect the most recent closed one: `aw resume-summary --include-recent-closed` (or `aw sessions --state all`).
|
|
16
16
|
|
|
17
|
+
**User-owned states:** only the person marks a session `paused` (`aw session-pause --code <NNN>`) or `abandoned` (`aw session-close --code <NNN> --abandon`). A loop never assigns either state by itself. `aw session-resume --code <NNN>` activates a paused session again; an abandoned one requires the person's explicit `--reopen`.
|
|
18
|
+
|
|
17
19
|
## When the durable record fails to update
|
|
18
20
|
|
|
19
21
|
`aw session-close` also upserts the session's row in `.workflow/HISTORY.md` — the durable record, since `sessions/` is gitignored. That upsert is **non-fatal**: on `history_error` in its output, re-run `aw history-update --code <NNN> --state closed`. `aw session-artifacts` inspects what a session holds.
|
|
@@ -68,7 +68,7 @@ closed to five — one is enough:
|
|
|
68
68
|
| `design.independent-outcomes` | two or more results each worth delivering | agent |
|
|
69
69
|
| `design.functional-blocking` | an unclosed functional decision blocks the design | agent |
|
|
70
70
|
| `design.clarity-lost` | one document would stop being readable | agent |
|
|
71
|
-
| `design.governance-or-system-reuse` |
|
|
71
|
+
| `design.governance-or-system-reuse` | a **package** already carries governance or several revisions | **CLI derives** |
|
|
72
72
|
| `design.special-source-or-effect` | a sensitive source, an external transmission, or a declared source that did not contribute | **CLI derives** |
|
|
73
73
|
|
|
74
74
|
Recognizing a semantic signal is judgment and travels as `--input expansion=<id>`;
|
|
@@ -77,9 +77,11 @@ refused rather than believed. The receipt carries the mode, the signals that fir
|
|
|
77
77
|
and the one-line cause — every artifact beyond the simple document traces back to
|
|
78
78
|
the need it covers. `render` and `record` are package operations regardless.
|
|
79
79
|
|
|
80
|
-
Publishing
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
Publishing each successive simple revision (including the third and later ones)
|
|
81
|
+
archives the outgoing bytes inside the same approved proposal. The manifest stays
|
|
82
|
+
`simple`, and a reference pinned to an older revision keeps resolving. An update
|
|
83
|
+
that requires package-only behavior names its expansion signal and refuses the
|
|
84
|
+
conversion instead of changing the published mode.
|
|
83
85
|
|
|
84
86
|
## Evidence and lifecycle inside a package
|
|
85
87
|
|
|
@@ -106,7 +106,7 @@ sections admit no such claim.
|
|
|
106
106
|
| | `flow` (`workline.ui-flow/v1`) | `screen` (`workline.ui-screen/v1`) |
|
|
107
107
|
|---|---|---|
|
|
108
108
|
| Answers | how the journey runs | what one surface is |
|
|
109
|
-
| Frontmatter core | `actors`, `entry`, `nodes`, `edges` | `default_state`, `states[]`, `flow_refs`, `dependencies` |
|
|
109
|
+
| Frontmatter core | `actors`, `entry`, `nodes`, `edges` | `default_state`, `states[]`, `flow_refs`, optional `screen_refs`, `dependencies` |
|
|
110
110
|
| Sections | Goal and outcome · Preconditions and entry · Main journey · Alternatives and recovery · Permissions and privacy · Traceability | Purpose and context · Structure and content · Components and design-system deltas · Data, permissions and validation · States and transitions · Interaction and navigation · Responsive and adaptation · Localization · Accessibility · Edge cases and degradation · Traceability |
|
|
111
111
|
| Essential (no waiver) | Goal and outcome · Main journey · Traceability | Purpose and context · Structure and content · States and transitions · Interaction and navigation · Accessibility · Traceability |
|
|
112
112
|
|
|
@@ -115,7 +115,9 @@ sections admit no such claim.
|
|
|
115
115
|
`DES-001/SCR-001@r2#error` — package / artifact @ revision # state anchor. A
|
|
116
116
|
reference always pins the revision: **a later revision never invalidates a
|
|
117
117
|
reference already fixed**. Baselines are cited as `DES-001@r2` plus the digest
|
|
118
|
-
that seals them.
|
|
118
|
+
that seals them. A screen may declare `screen_refs: [DES-001/SCR-002@r1]`
|
|
119
|
+
to cite another screen or its state (`DES-001/SCR-002@r1#empty`). It does not
|
|
120
|
+
extend the package closure, just like `flow_refs`.
|
|
119
121
|
|
|
120
122
|
### Maturity: `outline` → `handoff`
|
|
121
123
|
|
|
@@ -20,6 +20,8 @@ description: >-
|
|
|
20
20
|
|
|
21
21
|
Operate git in a **safe, controlled** way: verify the expected branch before editing, **propose** commits per source, and never run destructive or publishing operations without the user's explicit request.
|
|
22
22
|
|
|
23
|
+
Use `aw git-flow` for per-source development/QA/production flows; preview and request approval before an effect. A force-push is always performed by the user.
|
|
24
|
+
|
|
23
25
|
## Composed by
|
|
24
26
|
|
|
25
27
|
- **`plan-exec-loop`** — verifies the branch before each edit; proposes commits on close/checkpoint.
|
|
@@ -50,19 +52,24 @@ And **always** forbidden, even when the user asks for a commit: `--no-verify` (r
|
|
|
50
52
|
|
|
51
53
|
### Branch verification (before editing)
|
|
52
54
|
|
|
53
|
-
The expected branch is **never assumed from the current branch** — the user may have switched it by hand. Verify
|
|
55
|
+
The expected branch is **never assumed from the current branch** — the user may have switched it by hand. Verify before any `Write/Edit`: the session's isolation unit branch when it owns a unit (`aw worktree`); otherwise its document's own, inherited, or registered work branch (in that order). An unrelated unit does not block a document editing the shared checkout in its expected branch.
|
|
54
56
|
|
|
55
|
-
**Primary mechanism**: `aw check-branch --source <alias>` (or `--file <path-of-the-imminent-edit>`; `--strict` returns exit 2 on mismatch — useful as a gate). It returns the per-source fields already computed: `alias`, `path`, `main_branch` (base), `expected_work_branch`, `current_branch`, `match` (`current == expected`), `dirty` (uncommitted changes). **Fallback** (loose repo without workspace/CLI): compute them
|
|
57
|
+
**Primary mechanism**: `aw check-branch --source <alias>` (or `--file <path-of-the-imminent-edit>`; `--strict` returns exit 2 on mismatch — useful as a gate). It returns the per-source fields already computed: `alias`, `path`, `main_branch` (base), `expected_work_branch`, `current_branch`, `match` (`current == expected`), `dirty` (uncommitted changes). **Fallback** (loose repo without workspace/CLI): compute them in the source checkout with `git -C <ruta-de-la-fuente> branch --show-current` and `git -C <ruta-de-la-fuente> status --porcelain` plus the session's declared branch. The hub's branch is never a proxy for a source's branch.
|
|
56
58
|
|
|
57
59
|
Cases:
|
|
58
60
|
|
|
59
61
|
- **`match=true`** → OK, edit.
|
|
60
|
-
- **`match=false, dirty=false`** (Case A — different branch, clean repo) → *structured-choice*: `git checkout <expected>` /
|
|
62
|
+
- **`match=false, dirty=false`** (Case A — different branch, clean repo) → *structured-choice*: `git checkout <expected>` / confirm `aw doc-branch set --doc <tipo:NNN> --source <alias> --rama <actual>` to use the current branch for this document / cancel.
|
|
61
63
|
- **`match=false, dirty=true`** (Case B — different branch + uncommitted changes) → **pause and wait for manual resolution**. Never propose checkout (it could lose work). Ask the user to commit/stash/discard and to say when to continue.
|
|
62
|
-
- **
|
|
64
|
+
- **In-place, match=true with user changes** → proceed; declare only run-owned paths against the acquisition snapshot. `branch-check` rejects development and the commit fences branch and HEAD. Never switch branches without consent.
|
|
65
|
+
- **Cross-source (hub)**: `aw sources --code <NNN>` checks each source against its own expected branch; different branch names are fine when every source matches. Pause only the divergent sources.
|
|
63
66
|
- **Detached HEAD** → treat as Case A.
|
|
64
67
|
- **Source outside git** (`is_repo=false`) → report, do not block.
|
|
65
68
|
|
|
69
|
+
To request a document branch, first run `aw doc-branch show --code <NNN>` (or `--doc <tipo:NNN>`), ask the person to confirm or change its proposed name, then run `aw doc-branch set --code <NNN> --source <alias> --rama <nombre>`. No branch is registered just by showing a proposal.
|
|
70
|
+
|
|
71
|
+
Closing, releasing or reclaiming a unit preserves the document branch and its base. A later cleanup may remove only an `aw/*` unit branch already contained in that base (decision `S049/AC-10`); it never deletes either protected branch.
|
|
72
|
+
|
|
66
73
|
### Commits — propose-then-execute, one source at a time
|
|
67
74
|
|
|
68
75
|
On any commit request or trigger (loop close, "commit this", "save the changes"):
|
|
@@ -99,11 +106,11 @@ Autonomous `git merge` is forbidden (above), **but** resolving an **in-progress*
|
|
|
99
106
|
|
|
100
107
|
**The mechanics live in the CLI** (`aw fix-git prepare | apply | commit`); what follows is the reasoning it expects from you. Never edit a conflicted file, `git add` or `git commit` by hand here — see [`../../commands/fix-git.md`](../../commands/fix-git.md) for the exact invocations.
|
|
101
108
|
|
|
102
|
-
1. **Detect + identify**: `aw fix-git prepare` (read-only)
|
|
103
|
-
2. **Analyze
|
|
104
|
-
3. **Resolve**
|
|
105
|
-
4. **Ask** (*structured-choice*) when
|
|
106
|
-
5. **Proposed commit**:
|
|
109
|
+
1. **Detect + identify**: `aw merge-state` reports unreadable sources and units, never "no merge" when they could not be inspected. `aw fix-git prepare` (read-only) summarizes each conflict's path, `kind`, binary, bytes, EOL, allowed resolutions and max bytes; it warns about multiple merge bases (virtual base). It seals the index-stage hashes but does not ship the full contents by default. Repeat `--show <path>` for each file whose three versions are needed. `--adapt <path>` includes a tracked file merged cleanly but needing a semantic adjustment, including after all conflicts were resolved while MERGE_HEAD remains.
|
|
110
|
+
2. **Analyze intent** before resolving — never pick a side blindly. With `--show` read `base` (ancestor), `ours` (destination), `theirs` (origin). Add `git log --merge -p -- <file>` when the *why* of a hunk is not evident, and read adjacent code for coherence.
|
|
111
|
+
3. **Resolve** with a complete text `{path,content}` without conflict markers, or a `resolution` `{path,choice}` where `choice` is `ours`, `theirs` or `delete`. A binary takes the intact `ours`/`theirs` blob via the CLI; absent stage → `delete`. Apply a subset and repeat prepare/apply for the remaining files. The CLI updates the index with Git plumbing and checks out with repo attributes/EOL, with no hand-run `git add` or `git checkout`.
|
|
112
|
+
4. **Ask** (*structured-choice*) when intent is ambiguous or both sides are incoherent: answer `state: "ambiguous"`, ask one content question per doubtful file/hunk (≤3 + `flow` control), with consequences for each option. Never guess. A binary is not an exception to the intent rule — choosing `ours`/`theirs` still needs evidence.
|
|
113
|
+
5. **Proposed commit**: `aw fix-git commit --message "<msg>"` without `--confirm` previews the message, build, included files and `left_out`. After approval repeat with `--confirm` and a **long host timeout**: it runs the versioned source build in the merge repo and refuses failed/undeclared builds or unmerged files. `ninguno` or `--skip-build "<motivo>"` is explicit and visible with its origin; the result also warns if build ran on a tree different from the commit. Never hand-run `git commit`, `--no-verify`, `--amend` or push.
|
|
107
114
|
6. **Escape hatch**: if the merge must not complete, `git merge --abort` **after user confirmation** (*structured-choice*) — leaves the repo as before the merge.
|
|
108
115
|
|
|
109
116
|
> **Resume via git**: the merge state in `.git` (MERGE_HEAD + index) **is** the checkpoint; re-running `/w:fix-git` resumes from the remaining conflicts. No session, no artifact.
|
|
@@ -89,7 +89,7 @@ Every loop loads it on demand:
|
|
|
89
89
|
|
|
90
90
|
### Read-only git (git-safe, invariant #5)
|
|
91
91
|
|
|
92
|
-
Only: `git log`, `git show`, `git diff`, `git blame`, `git branch --show-current`.
|
|
92
|
+
Only: `git log`, `git show`, `git diff`, `git blame`, `git -C <ruta-de-la-fuente> branch --show-current`. Read each source at its own path, never infer its branch from the hub.
|
|
93
93
|
Never during investigation: `commit`, `push`, `merge`, `rebase`, `reset`, `checkout`.
|
|
94
94
|
|
|
95
95
|
### Inconclusive closure
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
changes as versioned scripts (never executing them): writes statements to the
|
|
6
6
|
session `SCRIPTS.sql` with `@category` + `@stmt` markers, applies project SQL
|
|
7
7
|
style (canonical header, BEGIN/COMMIT, idempotency, explicit schema, CTEs over
|
|
8
|
-
|
|
8
|
+
DO/LOOP), classifies into the 5 categories, and knows how rollbacks are derived
|
|
9
9
|
on export. DB access is read-only via MCP — DML/DDL is NEVER executed (invariant 4).
|
|
10
10
|
Use when a loop writes migrations / queries, when research reads schema, or when
|
|
11
11
|
export-scripts consolidates the bundle.
|
|
@@ -41,11 +41,12 @@ The AI **never executes DML/DDL** against any DB, through any channel (MCP, `psq
|
|
|
41
41
|
- Choose only a registered connection; the registry, not environment-name conventions, supplies its exact DSN variable.
|
|
42
42
|
- A remote snapshot is recorded before plan approval and is never refreshed from `plan-exec`.
|
|
43
43
|
|
|
44
|
-
### Staging —
|
|
44
|
+
### Staging — separate forward and rollback artifacts per session
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
.workflow/sessions/<folder>/
|
|
48
|
-
|
|
48
|
+
├── SCRIPTS.sql (forward migrations and type-A reads)
|
|
49
|
+
└── SCRIPTS.rollback.sql (reverse migrations, never applied with the forward)
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
Every statement is **appended** with a pair of comment markers:
|
|
@@ -58,13 +59,13 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
|
|
|
58
59
|
);
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
- `@category` classifies (
|
|
62
|
+
- `@category` classifies (5 canonical values, below).
|
|
62
63
|
- `@stmt` gives the deterministic slug `NN-verb-target`; `export-scripts` derives the filename when splitting.
|
|
63
|
-
- Order inside the file = chronological append order. The final
|
|
64
|
+
- Order inside the file = chronological append order. The final category order (01→02→03→04→05) is resolved by `export-scripts`.
|
|
64
65
|
- A global `BEGIN;` at the top of the file, `COMMIT;` at the end. Individual statements carry **no** BEGIN/COMMIT of their own.
|
|
65
|
-
-
|
|
66
|
+
- Put session reverses in `SCRIPTS.rollback.sql`, never after the forwards. Export pairs each forward with its own `.rollback.sql` under `rollback/`.
|
|
66
67
|
|
|
67
|
-
### The
|
|
68
|
+
### The 5 categories (`@category`)
|
|
68
69
|
|
|
69
70
|
| Marker | Detection patterns |
|
|
70
71
|
|---|---|
|
|
@@ -72,8 +73,9 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
|
|
|
72
73
|
| `02-ddl-funciones` | `CREATE [OR REPLACE] FUNCTION/PROCEDURE`, `DROP FUNCTION/PROCEDURE` |
|
|
73
74
|
| `03-migracion` | `UPDATE`, `INSERT ... SELECT`, `DELETE` over existing data, column transformations |
|
|
74
75
|
| `04-inserts` | `INSERT INTO ... VALUES`, catalog seeds, initial configuration data |
|
|
76
|
+
| `05-grants` | `GRANT`/`REVOKE`, `ALTER … OWNER TO`, `ALTER DEFAULT PRIVILEGES` |
|
|
75
77
|
|
|
76
|
-
**Mandatory execution order**: 01 → 02 → 03 → 04. `SCRIPTS.sql` may mix categories chronologically; `export-scripts` orders the final bundle.
|
|
78
|
+
**Mandatory execution order**: 01 → 02 → 03 → 04 → 05. `SCRIPTS.sql` may mix categories chronologically; `export-scripts` orders the final bundle.
|
|
77
79
|
|
|
78
80
|
### SQL style
|
|
79
81
|
|
|
@@ -110,12 +112,12 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
|
|
|
110
112
|
2. **Verify idempotency** of the statement.
|
|
111
113
|
3. **Append** with the marker pair (`@category` + `@stmt`).
|
|
112
114
|
4. **Style check** — canonical header, CTEs over DO/LOOP, explicit schema.
|
|
113
|
-
5. **Never** renumber or move
|
|
114
|
-
6.
|
|
115
|
+
5. **Never** renumber or move `SCRIPTS.sql` during exec.
|
|
116
|
+
6. Keep the inverse in the separate `SCRIPTS.rollback.sql`.
|
|
115
117
|
|
|
116
|
-
### Rollback (
|
|
118
|
+
### Rollback (session draft and export)
|
|
117
119
|
|
|
118
|
-
`export-scripts`
|
|
120
|
+
Write session reverses in `SCRIPTS.rollback.sql`. `export-scripts` pairs each final forward with `rollback/<categoría>/NN-<nombre>.rollback.sql` and derives `rollback/00-global/00-ROLLBACK.sql` in safe reverse order. Know the strategies to write reversible forwards:
|
|
119
121
|
|
|
120
122
|
| Forward | Rollback |
|
|
121
123
|
|---|---|
|
|
@@ -131,8 +133,8 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
|
|
|
131
133
|
|
|
132
134
|
## Output
|
|
133
135
|
|
|
134
|
-
- During loops:
|
|
135
|
-
- Via `export-scripts`:
|
|
136
|
+
- During loops: forwards in `SCRIPTS.sql`, reverses in `SCRIPTS.rollback.sql` (session artifacts, never `docs/`).
|
|
137
|
+
- Via `export-scripts`: five category folders (`01-ddl-tablas` … `05-grants`) with numbered forwards, matching reverses in `rollback/<categoría>/` and the global reverse in `rollback/00-global/00-ROLLBACK.sql`; empty categories have no folder.
|
|
136
138
|
|
|
137
139
|
It never writes `docs/` from a loop (invariant 1: only `export-*` exports). It never executes anything against a DB (invariant 4).
|
|
138
140
|
|
|
@@ -88,6 +88,15 @@
|
|
|
88
88
|
},
|
|
89
89
|
"uniqueItems": true
|
|
90
90
|
},
|
|
91
|
+
"screen_refs": {
|
|
92
|
+
"description": "Optional screen revisions cited by this screen's body; a state anchor cites the declared revision.",
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/SCR-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
|
|
97
|
+
},
|
|
98
|
+
"uniqueItems": true
|
|
99
|
+
},
|
|
91
100
|
"dependencies": {
|
|
92
101
|
"type": "object",
|
|
93
102
|
"additionalProperties": false,
|