@opengsd/gsd-path 1.3.1 → 1.4.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/AGENTS.md +2 -207
- package/CHANGELOG.md +281 -0
- package/DOCS.md +13 -7
- package/FULL.md +9 -3
- package/GUIDE.md +1 -1
- package/HOOKS.md +9 -6
- package/QUICK.md +4 -1
- package/README.md +63 -11
- package/RUNTIME.md +1 -1
- package/UPDATE.md +57 -8
- package/WORKFLOW.md +22 -6
- package/package.json +9 -8
- package/scripts/_common.py +472 -19
- package/scripts/archive_milestone.py +146 -73
- package/scripts/bootstrap_repository.py +8 -5
- package/scripts/build_recovery.py +4 -1
- package/scripts/build_state.py +66 -23
- package/scripts/check_docs_audit.py +14 -3
- package/scripts/check_handoffs.py +116 -20
- package/scripts/check_task_briefs.py +60 -8
- package/scripts/check_update.py +2 -2
- package/scripts/core_hook_gate.py +10 -1
- package/scripts/core_hook_settings.py +11 -4
- package/scripts/detect_project.py +345 -15
- package/scripts/discussion_records.py +19 -13
- package/scripts/discussion_validate.py +66 -21
- package/scripts/dispatch_driver.py +111 -26
- package/scripts/git_guard.py +116 -29
- package/scripts/guard_hook.py +151 -29
- package/scripts/install.mjs +54 -38
- package/scripts/install.py +562 -41
- package/scripts/integration.py +434 -24
- package/scripts/isolation.py +1077 -28
- package/scripts/lean_verification.py +99 -19
- package/scripts/loop_run.py +20 -30
- package/scripts/members.py +704 -0
- package/scripts/migrate_core.py +2 -2
- package/scripts/path_config.py +2 -2
- package/scripts/pipeline_diagnose.py +82 -31
- package/scripts/pipeline_git.py +61 -22
- package/scripts/pipeline_state.py +176 -54
- package/scripts/pipeline_undo.py +117 -22
- package/scripts/promote_lookahead.py +1 -1
- package/scripts/review_panel.py +1 -1
- package/scripts/runtime_store.py +35 -9
- package/scripts/skill-resources.json +28 -3
- package/scripts/state_checkpoint.py +140 -31
- package/scripts/state_promote.py +2 -0
- package/scripts/status_runtime.py +36 -6
- package/scripts/sync_skill_resources.py +8 -7
- package/scripts/token_budget.py +12 -8
- package/scripts/workflow_run.py +103 -29
- package/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path/BUILD.md +7 -1
- package/skills/gsd-path/DECIDE.md +11 -4
- package/skills/gsd-path/DEFINE.md +8 -1
- package/skills/gsd-path/DOCS-AUDIT.md +6 -4
- package/skills/gsd-path/INSPECT.md +5 -4
- package/skills/gsd-path/PLAN.md +7 -1
- package/skills/gsd-path/RESEARCH.md +2 -1
- package/skills/gsd-path/ROADMAP.md +2 -1
- package/skills/gsd-path/SHIP.md +27 -10
- package/skills/gsd-path/SKILL.md +45 -1
- package/skills/gsd-path/references/build-native.md +47 -14
- package/skills/gsd-path/references/codebase-mapper.md +2 -1
- package/skills/gsd-path/references/docs-auditor.md +2 -1
- package/skills/gsd-path/references/operating-rules.md +214 -0
- package/skills/gsd-path/references/planner.md +8 -0
- package/skills/gsd-path/references/reviewer-wave.md +3 -1
- package/skills/gsd-path/scripts/__pycache__/_common.cpython-312.pyc +0 -0
- package/skills/gsd-path/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
- package/skills/gsd-path/scripts/_common.py +472 -19
- package/skills/gsd-path/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path/scripts/bootstrap_repository.py +8 -5
- package/skills/gsd-path/scripts/build_recovery.py +4 -1
- package/skills/gsd-path/scripts/build_state.py +66 -23
- package/skills/gsd-path/scripts/check_docs_audit.py +14 -3
- package/skills/gsd-path/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path/scripts/check_update.py +2 -2
- package/skills/gsd-path/scripts/detect_project.py +345 -15
- package/skills/gsd-path/scripts/discussion_records.py +19 -13
- package/skills/gsd-path/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path/scripts/dispatch_driver.py +111 -26
- package/skills/gsd-path/scripts/git_guard.py +116 -29
- package/skills/gsd-path/scripts/integration.py +434 -24
- package/skills/gsd-path/scripts/isolation.py +1077 -28
- package/skills/gsd-path/scripts/lean_verification.py +99 -19
- package/skills/gsd-path/scripts/loop_run.py +20 -30
- package/skills/gsd-path/scripts/members.py +704 -0
- package/skills/gsd-path/scripts/path_config.py +2 -2
- package/skills/gsd-path/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path/scripts/review_panel.py +1 -1
- package/skills/gsd-path/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path/scripts/state_promote.py +2 -0
- package/skills/gsd-path/scripts/status_runtime.py +36 -6
- package/skills/gsd-path/scripts/token_budget.py +12 -8
- package/skills/gsd-path/scripts/workflow_run.py +103 -29
- package/skills/gsd-path/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path/templates/codebase.md +1 -1
- package/skills/gsd-path/templates/docs-audit.md +1 -1
- package/skills/gsd-path/templates/final-review.md +5 -2
- package/skills/gsd-path/templates/gap-review.md +2 -1
- package/skills/gsd-path/templates/task.md +1 -0
- package/skills/gsd-path/templates/wave-review.md +3 -1
- package/skills/gsd-path-build/SKILL.md +7 -1
- package/skills/gsd-path-build/references/build-native.md +47 -14
- package/skills/gsd-path-build/references/operating-rules.md +214 -0
- package/skills/gsd-path-build/references/reviewer-wave.md +3 -1
- package/skills/gsd-path-build/scripts/__pycache__/_common.cpython-312.pyc +0 -0
- package/skills/gsd-path-build/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
- package/skills/gsd-path-build/scripts/_common.py +472 -19
- package/skills/gsd-path-build/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-build/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-build/scripts/build_state.py +66 -23
- package/skills/gsd-path-build/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-build/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-build/scripts/detect_project.py +345 -15
- package/skills/gsd-path-build/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-build/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-build/scripts/dispatch_driver.py +111 -26
- package/skills/gsd-path-build/scripts/integration.py +434 -24
- package/skills/gsd-path-build/scripts/isolation.py +1077 -28
- package/skills/gsd-path-build/scripts/loop_run.py +20 -30
- package/skills/gsd-path-build/scripts/members.py +704 -0
- package/skills/gsd-path-build/scripts/path_config.py +2 -2
- package/skills/gsd-path-build/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-build/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-build/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-build/scripts/review_panel.py +1 -1
- package/skills/gsd-path-build/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-build/scripts/state_promote.py +2 -0
- package/skills/gsd-path-build/scripts/token_budget.py +12 -8
- package/skills/gsd-path-build/scripts/workflow_run.py +103 -29
- package/skills/gsd-path-build/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-build/templates/task.md +1 -0
- package/skills/gsd-path-build/templates/wave-review.md +3 -1
- package/skills/gsd-path-decide/SKILL.md +11 -4
- package/skills/gsd-path-decide/references/operating-rules.md +214 -0
- package/skills/gsd-path-decide/scripts/_common.py +472 -19
- package/skills/gsd-path-decide/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-decide/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-decide/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-decide/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-decide/scripts/detect_project.py +345 -15
- package/skills/gsd-path-decide/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-decide/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-decide/scripts/integration.py +434 -24
- package/skills/gsd-path-decide/scripts/isolation.py +1077 -28
- package/skills/gsd-path-decide/scripts/loop_run.py +20 -30
- package/skills/gsd-path-decide/scripts/members.py +704 -0
- package/skills/gsd-path-decide/scripts/path_config.py +2 -2
- package/skills/gsd-path-decide/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-decide/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-decide/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-decide/scripts/review_panel.py +1 -1
- package/skills/gsd-path-decide/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-decide/scripts/state_promote.py +2 -0
- package/skills/gsd-path-decide/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-define/SKILL.md +8 -1
- package/skills/gsd-path-define/references/operating-rules.md +214 -0
- package/skills/gsd-path-define/scripts/_common.py +472 -19
- package/skills/gsd-path-define/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-define/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-define/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-define/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-define/scripts/detect_project.py +345 -15
- package/skills/gsd-path-define/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-define/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-define/scripts/integration.py +434 -24
- package/skills/gsd-path-define/scripts/isolation.py +1077 -28
- package/skills/gsd-path-define/scripts/loop_run.py +20 -30
- package/skills/gsd-path-define/scripts/members.py +704 -0
- package/skills/gsd-path-define/scripts/path_config.py +2 -2
- package/skills/gsd-path-define/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-define/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-define/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-define/scripts/review_panel.py +1 -1
- package/skills/gsd-path-define/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-define/scripts/state_promote.py +2 -0
- package/skills/gsd-path-define/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-discuss/SKILL.md +2 -1
- package/skills/gsd-path-discuss/references/operating-rules.md +214 -0
- package/skills/gsd-path-discuss/scripts/_common.py +472 -19
- package/skills/gsd-path-discuss/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-discuss/scripts/loop_run.py +20 -30
- package/skills/gsd-path-discuss/scripts/path_config.py +2 -2
- package/skills/gsd-path-discuss/scripts/review_panel.py +1 -1
- package/skills/gsd-path-discuss/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-docs-audit/SKILL.md +6 -4
- package/skills/gsd-path-docs-audit/references/docs-auditor.md +2 -1
- package/skills/gsd-path-docs-audit/references/operating-rules.md +214 -0
- package/skills/gsd-path-docs-audit/scripts/_common.py +472 -19
- package/skills/gsd-path-docs-audit/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-docs-audit/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-docs-audit/scripts/check_docs_audit.py +14 -3
- package/skills/gsd-path-docs-audit/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-docs-audit/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-docs-audit/scripts/detect_project.py +345 -15
- package/skills/gsd-path-docs-audit/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-docs-audit/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-docs-audit/scripts/integration.py +434 -24
- package/skills/gsd-path-docs-audit/scripts/isolation.py +1077 -28
- package/skills/gsd-path-docs-audit/scripts/loop_run.py +20 -30
- package/skills/gsd-path-docs-audit/scripts/members.py +704 -0
- package/skills/gsd-path-docs-audit/scripts/path_config.py +2 -2
- package/skills/gsd-path-docs-audit/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-docs-audit/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-docs-audit/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-docs-audit/scripts/review_panel.py +1 -1
- package/skills/gsd-path-docs-audit/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-docs-audit/scripts/state_promote.py +2 -0
- package/skills/gsd-path-docs-audit/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-docs-audit/templates/docs-audit.md +1 -1
- package/skills/gsd-path-forensics/SKILL.md +2 -1
- package/skills/gsd-path-forensics/references/operating-rules.md +214 -0
- package/skills/gsd-path-forensics/scripts/_common.py +472 -19
- package/skills/gsd-path-forensics/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-forensics/scripts/loop_run.py +20 -30
- package/skills/gsd-path-forensics/scripts/path_config.py +2 -2
- package/skills/gsd-path-forensics/scripts/pipeline_diagnose.py +82 -31
- package/skills/gsd-path-forensics/scripts/pipeline_undo.py +117 -22
- package/skills/gsd-path-forensics/scripts/review_panel.py +1 -1
- package/skills/gsd-path-forensics/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-inspect/SKILL.md +5 -4
- package/skills/gsd-path-inspect/references/codebase-mapper.md +2 -1
- package/skills/gsd-path-inspect/references/docs-auditor.md +2 -1
- package/skills/gsd-path-inspect/references/operating-rules.md +214 -0
- package/skills/gsd-path-inspect/scripts/__pycache__/_common.cpython-312.pyc +0 -0
- package/skills/gsd-path-inspect/scripts/_common.py +472 -19
- package/skills/gsd-path-inspect/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-inspect/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-inspect/scripts/check_docs_audit.py +14 -3
- package/skills/gsd-path-inspect/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-inspect/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-inspect/scripts/detect_project.py +345 -15
- package/skills/gsd-path-inspect/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-inspect/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-inspect/scripts/integration.py +434 -24
- package/skills/gsd-path-inspect/scripts/isolation.py +1077 -28
- package/skills/gsd-path-inspect/scripts/loop_run.py +20 -30
- package/skills/gsd-path-inspect/scripts/members.py +704 -0
- package/skills/gsd-path-inspect/scripts/path_config.py +2 -2
- package/skills/gsd-path-inspect/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-inspect/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-inspect/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-inspect/scripts/review_panel.py +1 -1
- package/skills/gsd-path-inspect/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-inspect/scripts/state_promote.py +2 -0
- package/skills/gsd-path-inspect/scripts/workflow_run.py +103 -29
- package/skills/gsd-path-inspect/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-inspect/templates/codebase.md +1 -1
- package/skills/gsd-path-inspect/templates/docs-audit.md +1 -1
- package/skills/gsd-path-loop/SKILL.md +2 -1
- package/skills/gsd-path-loop/references/operating-rules.md +214 -0
- package/skills/gsd-path-loop/scripts/_common.py +472 -19
- package/skills/gsd-path-loop/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-loop/scripts/loop_run.py +20 -30
- package/skills/gsd-path-loop/scripts/path_config.py +2 -2
- package/skills/gsd-path-loop/scripts/review_panel.py +1 -1
- package/skills/gsd-path-loop/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-migrate/SKILL.md +2 -1
- package/skills/gsd-path-migrate/references/operating-rules.md +214 -0
- package/skills/gsd-path-migrate/scripts/_common.py +472 -19
- package/skills/gsd-path-migrate/scripts/core_hook_gate.py +10 -1
- package/skills/gsd-path-migrate/scripts/core_hook_settings.py +11 -4
- package/skills/gsd-path-migrate/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-migrate/scripts/loop_run.py +20 -30
- package/skills/gsd-path-migrate/scripts/migrate_core.py +2 -2
- package/skills/gsd-path-migrate/scripts/path_config.py +2 -2
- package/skills/gsd-path-migrate/scripts/review_panel.py +1 -1
- package/skills/gsd-path-plan/SKILL.md +7 -1
- package/skills/gsd-path-plan/references/operating-rules.md +214 -0
- package/skills/gsd-path-plan/references/planner.md +8 -0
- package/skills/gsd-path-plan/scripts/__pycache__/_common.cpython-312.pyc +0 -0
- package/skills/gsd-path-plan/scripts/_common.py +472 -19
- package/skills/gsd-path-plan/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-plan/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-plan/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-plan/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-plan/scripts/detect_project.py +345 -15
- package/skills/gsd-path-plan/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-plan/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-plan/scripts/integration.py +434 -24
- package/skills/gsd-path-plan/scripts/isolation.py +1077 -28
- package/skills/gsd-path-plan/scripts/loop_run.py +20 -30
- package/skills/gsd-path-plan/scripts/members.py +704 -0
- package/skills/gsd-path-plan/scripts/path_config.py +2 -2
- package/skills/gsd-path-plan/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-plan/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-plan/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-plan/scripts/review_panel.py +1 -1
- package/skills/gsd-path-plan/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-plan/scripts/state_promote.py +2 -0
- package/skills/gsd-path-plan/scripts/workflow_run.py +103 -29
- package/skills/gsd-path-plan/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-plan/templates/task.md +1 -0
- package/skills/gsd-path-research/SKILL.md +2 -1
- package/skills/gsd-path-research/references/operating-rules.md +214 -0
- package/skills/gsd-path-research/scripts/_common.py +472 -19
- package/skills/gsd-path-research/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-research/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-research/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-research/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-research/scripts/detect_project.py +345 -15
- package/skills/gsd-path-research/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-research/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-research/scripts/integration.py +434 -24
- package/skills/gsd-path-research/scripts/isolation.py +1077 -28
- package/skills/gsd-path-research/scripts/loop_run.py +20 -30
- package/skills/gsd-path-research/scripts/members.py +704 -0
- package/skills/gsd-path-research/scripts/path_config.py +2 -2
- package/skills/gsd-path-research/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-research/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-research/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-research/scripts/review_panel.py +1 -1
- package/skills/gsd-path-research/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-research/scripts/state_promote.py +2 -0
- package/skills/gsd-path-research/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-roadmap/SKILL.md +2 -1
- package/skills/gsd-path-roadmap/references/operating-rules.md +214 -0
- package/skills/gsd-path-roadmap/scripts/_common.py +472 -19
- package/skills/gsd-path-roadmap/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-roadmap/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-roadmap/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-roadmap/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-roadmap/scripts/detect_project.py +345 -15
- package/skills/gsd-path-roadmap/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-roadmap/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-roadmap/scripts/integration.py +434 -24
- package/skills/gsd-path-roadmap/scripts/isolation.py +1077 -28
- package/skills/gsd-path-roadmap/scripts/loop_run.py +20 -30
- package/skills/gsd-path-roadmap/scripts/members.py +704 -0
- package/skills/gsd-path-roadmap/scripts/path_config.py +2 -2
- package/skills/gsd-path-roadmap/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-roadmap/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-roadmap/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-roadmap/scripts/review_panel.py +1 -1
- package/skills/gsd-path-roadmap/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-roadmap/scripts/state_promote.py +2 -0
- package/skills/gsd-path-roadmap/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-ship/SKILL.md +27 -10
- package/skills/gsd-path-ship/references/operating-rules.md +214 -0
- package/skills/gsd-path-ship/references/reviewer-wave.md +3 -1
- package/skills/gsd-path-ship/scripts/__pycache__/_common.cpython-312.pyc +0 -0
- package/skills/gsd-path-ship/scripts/_common.py +472 -19
- package/skills/gsd-path-ship/scripts/archive_milestone.py +146 -73
- package/skills/gsd-path-ship/scripts/build_recovery.py +4 -1
- package/skills/gsd-path-ship/scripts/build_state.py +66 -23
- package/skills/gsd-path-ship/scripts/check_handoffs.py +116 -20
- package/skills/gsd-path-ship/scripts/check_task_briefs.py +60 -8
- package/skills/gsd-path-ship/scripts/detect_project.py +345 -15
- package/skills/gsd-path-ship/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-ship/scripts/discussion_validate.py +66 -21
- package/skills/gsd-path-ship/scripts/integration.py +434 -24
- package/skills/gsd-path-ship/scripts/isolation.py +1077 -28
- package/skills/gsd-path-ship/scripts/lean_verification.py +99 -19
- package/skills/gsd-path-ship/scripts/loop_run.py +20 -30
- package/skills/gsd-path-ship/scripts/members.py +704 -0
- package/skills/gsd-path-ship/scripts/path_config.py +2 -2
- package/skills/gsd-path-ship/scripts/pipeline_git.py +61 -22
- package/skills/gsd-path-ship/scripts/pipeline_state.py +176 -54
- package/skills/gsd-path-ship/scripts/promote_lookahead.py +1 -1
- package/skills/gsd-path-ship/scripts/review_panel.py +1 -1
- package/skills/gsd-path-ship/scripts/state_checkpoint.py +140 -31
- package/skills/gsd-path-ship/scripts/state_promote.py +2 -0
- package/skills/gsd-path-ship/scripts/workflow_run.py +103 -29
- package/skills/gsd-path-ship/scripts/worktree_paths.py +18 -8
- package/skills/gsd-path-ship/templates/final-review.md +5 -2
- package/skills/gsd-path-ship/templates/gap-review.md +2 -1
- package/skills/gsd-path-ship/templates/wave-review.md +3 -1
- package/skills/gsd-path-undo/SKILL.md +2 -1
- package/skills/gsd-path-undo/references/operating-rules.md +214 -0
- package/skills/gsd-path-undo/scripts/_common.py +472 -19
- package/skills/gsd-path-undo/scripts/discussion_records.py +19 -13
- package/skills/gsd-path-undo/scripts/loop_run.py +20 -30
- package/skills/gsd-path-undo/scripts/path_config.py +2 -2
- package/skills/gsd-path-undo/scripts/pipeline_undo.py +117 -22
- package/skills/gsd-path-undo/scripts/review_panel.py +1 -1
- package/skills/gsd-path-undo/scripts/worktree_paths.py +18 -8
- package/skills/path/BUILD.md +7 -1
- package/skills/path/DECIDE.md +11 -4
- package/skills/path/DEFINE.md +8 -1
- package/skills/path/DOCS-AUDIT.md +6 -4
- package/skills/path/INSPECT.md +5 -4
- package/skills/path/PLAN.md +7 -1
- package/skills/path/RESEARCH.md +2 -1
- package/skills/path/ROADMAP.md +2 -1
- package/skills/path/SHIP.md +27 -10
- package/skills/path/SKILL.md +45 -1
- package/skills/path/references/build-native.md +47 -14
- package/skills/path/references/codebase-mapper.md +2 -1
- package/skills/path/references/docs-auditor.md +2 -1
- package/skills/path/references/operating-rules.md +214 -0
- package/skills/path/references/planner.md +8 -0
- package/skills/path/references/reviewer-wave.md +3 -1
- package/skills/path/scripts/_common.py +472 -19
- package/skills/path/scripts/archive_milestone.py +146 -73
- package/skills/path/scripts/bootstrap_repository.py +8 -5
- package/skills/path/scripts/build_recovery.py +4 -1
- package/skills/path/scripts/build_state.py +66 -23
- package/skills/path/scripts/check_docs_audit.py +14 -3
- package/skills/path/scripts/check_handoffs.py +116 -20
- package/skills/path/scripts/check_task_briefs.py +60 -8
- package/skills/path/scripts/check_update.py +2 -2
- package/skills/path/scripts/detect_project.py +345 -15
- package/skills/path/scripts/discussion_records.py +19 -13
- package/skills/path/scripts/discussion_validate.py +66 -21
- package/skills/path/scripts/dispatch_driver.py +111 -26
- package/skills/path/scripts/git_guard.py +116 -29
- package/skills/path/scripts/integration.py +434 -24
- package/skills/path/scripts/isolation.py +1077 -28
- package/skills/path/scripts/lean_verification.py +99 -19
- package/skills/path/scripts/loop_run.py +20 -30
- package/skills/path/scripts/members.py +704 -0
- package/skills/path/scripts/path_config.py +2 -2
- package/skills/path/scripts/pipeline_git.py +61 -22
- package/skills/path/scripts/pipeline_state.py +176 -54
- package/skills/path/scripts/promote_lookahead.py +1 -1
- package/skills/path/scripts/review_panel.py +1 -1
- package/skills/path/scripts/state_checkpoint.py +140 -31
- package/skills/path/scripts/state_promote.py +2 -0
- package/skills/path/scripts/status_runtime.py +36 -6
- package/skills/path/scripts/token_budget.py +12 -8
- package/skills/path/scripts/workflow_run.py +103 -29
- package/skills/path/scripts/worktree_paths.py +18 -8
- package/skills/path/templates/codebase.md +1 -1
- package/skills/path/templates/docs-audit.md +1 -1
- package/skills/path/templates/final-review.md +5 -2
- package/skills/path/templates/gap-review.md +2 -1
- package/skills/path/templates/task.md +1 -0
- package/skills/path/templates/wave-review.md +3 -1
package/scripts/workflow_run.py
CHANGED
|
@@ -5,27 +5,45 @@ import argparse
|
|
|
5
5
|
import hashlib
|
|
6
6
|
import json
|
|
7
7
|
import os
|
|
8
|
+
import re
|
|
8
9
|
import subprocess
|
|
9
10
|
import sys
|
|
10
11
|
import tempfile
|
|
11
12
|
from pathlib import Path
|
|
12
13
|
|
|
13
14
|
try:
|
|
14
|
-
from scripts import _common
|
|
15
|
+
from scripts import _common, isolation
|
|
15
16
|
except ImportError: # bundled copy inside a skill's scripts directory
|
|
16
17
|
import _common
|
|
18
|
+
import isolation
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
class StepFailed(RuntimeError):
|
|
20
22
|
pass
|
|
21
23
|
|
|
24
|
+
|
|
25
|
+
def _table_rows(body):
|
|
26
|
+
"""Cells of a Markdown table's data rows (header and separator skipped)."""
|
|
27
|
+
lines = [line.strip() for line in (body or "").splitlines() if line.strip().startswith("|")]
|
|
28
|
+
return [[cell.strip() for cell in re.split(r"(?<!\\)\|", line.strip("|"))] for line in lines[2:]]
|
|
29
|
+
|
|
22
30
|
INSPECTION_SPECS = (("inspect_codebase", "codebase-mapper", "codebase", "evidence-codebase.md"),
|
|
23
31
|
("inspect_docs", "docs-auditor", "docs-audit", "DOCS-AUDIT.md"))
|
|
24
32
|
|
|
25
33
|
|
|
34
|
+
def _task_member(repo: Path, project_dir: str, task_id: str):
|
|
35
|
+
"""The `repo:` member a task names, or None for a coordinator task."""
|
|
36
|
+
for path in sorted((repo / project_dir / "tasks").glob(f"{task_id}-*.md")):
|
|
37
|
+
fields, error = isolation.task_frontmatter(path.read_text(encoding="utf-8"))
|
|
38
|
+
if error:
|
|
39
|
+
raise StepFailed(error)
|
|
40
|
+
return fields.get("repo")
|
|
41
|
+
return None
|
|
42
|
+
|
|
43
|
+
|
|
26
44
|
def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str = None,
|
|
27
45
|
task_id: str = None, round_size: int = None, inspection: Path = None,
|
|
28
|
-
mapper_reviewed: bool = False) -> dict:
|
|
46
|
+
mapper_reviewed: bool = False, kind: str = None) -> dict:
|
|
29
47
|
steps = []
|
|
30
48
|
outputs = {}
|
|
31
49
|
scripts = Path(__file__).resolve().parent
|
|
@@ -33,7 +51,7 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
33
51
|
|
|
34
52
|
def step(script, *arguments, raw=False):
|
|
35
53
|
command = [sys.executable, "-B", str(helpers / script), *arguments]
|
|
36
|
-
completed = subprocess.run(command, cwd=repo, capture_output=True,
|
|
54
|
+
completed = subprocess.run(command, cwd=repo, capture_output=True, encoding="utf-8", errors="replace")
|
|
37
55
|
receipt = {"script": script, "command": command, "exit_code": completed.returncode,
|
|
38
56
|
"stdout": completed.stdout, "stderr": completed.stderr}
|
|
39
57
|
steps.append(receipt)
|
|
@@ -50,12 +68,29 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
50
68
|
return receipt["result"]
|
|
51
69
|
|
|
52
70
|
common = ["--repo", str(repo), "--project-dir", project_dir]
|
|
71
|
+
next_step = "$gsd-path-forensics"
|
|
72
|
+
|
|
73
|
+
def gate_plan():
|
|
74
|
+
if step("discussion_records.py", "pending", "--repo", str(repo))["pending"]:
|
|
75
|
+
raise StepFailed("pending discussion requires its owner disposition")
|
|
76
|
+
step("check_handoffs.py", "plan", *common)
|
|
77
|
+
head = subprocess.run(["git", "rev-parse", "--verify", "HEAD"],
|
|
78
|
+
cwd=repo, capture_output=True, encoding="utf-8", errors="replace", check=True).stdout.strip()
|
|
79
|
+
step("check_task_briefs.py", "--repo", str(repo), "--base", head,
|
|
80
|
+
"--tasks-dir", f"{project_dir}/tasks")
|
|
81
|
+
panel = ["validate-plan", "--plan", str(repo / project_dir / "plan/PLAN.md"),
|
|
82
|
+
"--intent", str(repo / project_dir / "intent/INTENT.md")]
|
|
83
|
+
charter = repo / ".project/CHARTER.md"
|
|
84
|
+
if charter.exists():
|
|
85
|
+
panel += ["--charter", str(charter)]
|
|
86
|
+
return step("review_panel.py", *panel)
|
|
87
|
+
|
|
53
88
|
try:
|
|
54
89
|
if os.path.lexists(repo / ".gsd-path/runtime.json"):
|
|
55
90
|
resolved = subprocess.run(
|
|
56
91
|
[sys.executable, "-B", str(repo / ".gsd-path/status_runtime.py"),
|
|
57
92
|
"--repo", str(repo), "--runtime-path"],
|
|
58
|
-
cwd=repo, capture_output=True,
|
|
93
|
+
cwd=repo, capture_output=True, encoding="utf-8", errors="replace")
|
|
59
94
|
if resolved.returncode:
|
|
60
95
|
sys.stderr.write(resolved.stderr)
|
|
61
96
|
raise StepFailed(resolved.stderr.strip())
|
|
@@ -71,7 +106,7 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
71
106
|
(repo / project_dir / "research" / spec[3]).is_symlink() for spec in specs):
|
|
72
107
|
raise StepFailed("prior inspection evidence requires the re-inspection contract")
|
|
73
108
|
branch = subprocess.run(["git", "branch", "--show-current"], cwd=repo,
|
|
74
|
-
capture_output=True,
|
|
109
|
+
capture_output=True, encoding="utf-8", errors="replace", check=True).stdout.strip()
|
|
75
110
|
if branch != state["branch"]:
|
|
76
111
|
raise StepFailed("current branch differs from the recorded inspection branch")
|
|
77
112
|
pending = step("discussion_records.py", "pending", "--repo", str(repo))
|
|
@@ -87,7 +122,7 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
87
122
|
raise StepFailed(f"missing inspection resource: {path}")
|
|
88
123
|
staging = Path(tempfile.mkdtemp(prefix="gsd-path-inspect-"))
|
|
89
124
|
inventory_file = staging / "inventory.txt"
|
|
90
|
-
inventory_file.
|
|
125
|
+
inventory_file.write_bytes(inventory.encode("utf-8"))
|
|
91
126
|
assignments = []
|
|
92
127
|
for task_name, role, template, filename in specs:
|
|
93
128
|
isolated = step("isolation.py", "isolate-verify", "--repo", str(repo),
|
|
@@ -100,13 +135,14 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
100
135
|
f"Template: {template_path}\nRepository and command cwd: {isolated['worktree']}\n"
|
|
101
136
|
f"Recorded baseline and Audited HEAD: {isolated['base']}\n"
|
|
102
137
|
f"Write only: {Path(isolated['worktree']) / output}\n"
|
|
138
|
+
f"Write header Repo root: {repo}\n"
|
|
103
139
|
"Use only this supplied sidecar for project commands; do not create worktrees.\n"
|
|
104
140
|
"The parent owns gates, collection, retirement, and phase state.\n"
|
|
105
141
|
"Exclude .git, node_modules, .project/archive, and installed GSD Path and path skill bundles.\n")
|
|
106
142
|
if task_name == "inspect_docs":
|
|
107
143
|
brief += ("Alignment mode: false. No prior audit or changed set.\n"
|
|
108
144
|
"Frozen inventory follows; use it exactly, without rediscovery:\n" + inventory)
|
|
109
|
-
brief_file.
|
|
145
|
+
brief_file.write_bytes(brief.encode("utf-8"))
|
|
110
146
|
assignments.append({**isolated, "task_name": task_name, "role": str(role_path),
|
|
111
147
|
"template": str(template_path), "output": output,
|
|
112
148
|
"brief_file": str(brief_file)})
|
|
@@ -136,16 +172,16 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
136
172
|
if state["phase"] != "inspect" or state["status"] != "active":
|
|
137
173
|
raise StepFailed("inspection completion requires inspect/active")
|
|
138
174
|
branch = subprocess.run(["git", "branch", "--show-current"], cwd=repo,
|
|
139
|
-
capture_output=True,
|
|
175
|
+
capture_output=True, encoding="utf-8", errors="replace", check=True).stdout.strip()
|
|
140
176
|
if state["branch"] != branch:
|
|
141
177
|
raise StepFailed("current branch differs from the recorded inspection branch")
|
|
142
178
|
pending = step("discussion_records.py", "pending", "--repo", str(repo))
|
|
143
179
|
if pending["pending"]:
|
|
144
180
|
raise StepFailed("pending discussion requires its owner disposition")
|
|
145
181
|
docs = assignments["inspect_docs"]
|
|
146
|
-
step("check_docs_audit.py", "--repo", docs["worktree"], "--
|
|
147
|
-
"--inventory", str(inventory_file))
|
|
148
|
-
if f"Audited HEAD: {expected_head}" not in (Path(docs["worktree"]) / docs["output"]).read_text().splitlines():
|
|
182
|
+
step("check_docs_audit.py", "--repo", docs["worktree"], "--primary", str(repo),
|
|
183
|
+
"--audit", docs["output"], "--inventory", str(inventory_file))
|
|
184
|
+
if f"Audited HEAD: {expected_head}" not in (Path(docs["worktree"]) / docs["output"]).read_text(encoding="utf-8").splitlines():
|
|
149
185
|
raise StepFailed("audit does not name the supplied inspection baseline")
|
|
150
186
|
for task_name, _, _, _ in INSPECTION_SPECS:
|
|
151
187
|
assignment = assignments[task_name]
|
|
@@ -161,10 +197,14 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
161
197
|
"--set-phase", "inspect", "--set-status", "done", "--event", "inspection artifacts passed")
|
|
162
198
|
elif action == "lint-round":
|
|
163
199
|
head = subprocess.run(["git", "rev-parse", "--verify", "HEAD"],
|
|
164
|
-
cwd=repo, capture_output=True,
|
|
200
|
+
cwd=repo, capture_output=True, encoding="utf-8", errors="replace", check=True).stdout.strip()
|
|
165
201
|
step("check_task_briefs.py", "--repo", str(repo), "--base", head,
|
|
166
202
|
"--tasks-dir", f"{project_dir}/tasks")
|
|
167
203
|
step("check_handoffs.py", "plan", *common)
|
|
204
|
+
elif action == "prepare-task" and _task_member(repo, project_dir, task_id):
|
|
205
|
+
# A member task works in a sidecar of its member; its Verify runs there at finish.
|
|
206
|
+
step("isolation.py", "isolate-member-task", "--repo", str(repo),
|
|
207
|
+
"--member", _task_member(repo, project_dir, task_id), "--task-id", task_id)
|
|
168
208
|
elif action == "prepare-task":
|
|
169
209
|
task = step("isolation.py", "isolate-task", "--repo", str(repo),
|
|
170
210
|
"--base", expected_head, "--task-id", task_id,
|
|
@@ -186,33 +226,64 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
|
|
|
186
226
|
raise StepFailed("pending discussion requires its owner disposition")
|
|
187
227
|
step("build_state.py", "verify-landed", *common, "--head", expected_head)
|
|
188
228
|
step("lean_verification.py", "--repo", str(repo), "--expected-head", expected_head)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
229
|
+
elif action == "preauthorize":
|
|
230
|
+
# A block here is not a failure: the gate asks its owner as usual.
|
|
231
|
+
next_step = "ask the owner at this gate"
|
|
232
|
+
if project_dir != ".project" or kind not in {"intent", "plan"}:
|
|
233
|
+
raise StepFailed("pre-approval covers only intent or plan on the active track")
|
|
234
|
+
routed = step("pipeline_state.py", "route", *common)
|
|
235
|
+
if routed["route"].get("action") != "run-phase" or "recovery" in routed:
|
|
236
|
+
raise StepFailed("pre-approval needs an ordinary phase route")
|
|
237
|
+
if step("discussion_records.py", "pending", "--repo", str(repo))["pending"]:
|
|
192
238
|
raise StepFailed("pending discussion requires its owner disposition")
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
239
|
+
track = repo / project_dir
|
|
240
|
+
intent = (track / "intent/INTENT.md").read_text(encoding="utf-8")
|
|
241
|
+
lane = re.search(r"(?m)^Lane:\s*(.+)$", intent)
|
|
242
|
+
if not lane or lane.group(1).split("<!--", 1)[0].strip().strip("`") != "quick":
|
|
243
|
+
raise StepFailed("pre-approval covers only the quick lane")
|
|
244
|
+
intent = re.sub(r"(?s)<!--.*?-->", "", intent)
|
|
245
|
+
if re.search(r"(?m)^\s*-\s*\[(RESEARCH|NEEDS-USER)\]", _common.section_body(intent, "Open questions") or ""):
|
|
246
|
+
raise StepFailed("INTENT.md has open RESEARCH or NEEDS-USER questions")
|
|
247
|
+
audit_path = track / "research/DOCS-AUDIT.md"
|
|
248
|
+
if audit_path.exists():
|
|
249
|
+
audit = audit_path.read_text(encoding="utf-8")
|
|
250
|
+
queue = _table_rows(_common.section_body(audit, "Remediation queue"))
|
|
251
|
+
ruled = set()
|
|
252
|
+
for row in _table_rows(_common.section_body(audit, "User rulings")):
|
|
253
|
+
if len(row) != 4 or row[1] not in {"fix-code", "fix-doc", "accept-drift"}:
|
|
254
|
+
continue
|
|
255
|
+
words = row[2].strip().strip('`"').strip()
|
|
256
|
+
if words and words.casefold() != "none" and not re.fullmatch(r"<[^>]*>", words):
|
|
257
|
+
ruled.add(row[0])
|
|
258
|
+
if any(len(row) == 6 and row[4] == "NEEDS-USER" and row[0] not in ruled for row in queue):
|
|
259
|
+
raise StepFailed("DOCS-AUDIT.md has NEEDS-USER rows without a user ruling")
|
|
260
|
+
if kind == "plan":
|
|
261
|
+
if gate_plan()["mode"] != "off":
|
|
262
|
+
raise StepFailed("pre-approval requires review_panel off")
|
|
263
|
+
plan = re.sub(r"(?s)<!--.*?-->", "", (track / "plan/PLAN.md").read_text(encoding="utf-8"))
|
|
264
|
+
config = _common.section_body(plan, "Config") or ""
|
|
265
|
+
skeptics = re.search(r"(?m)^[ \t]*-[ \t]*finding_skeptics:[ \t]*(\S+)", config)
|
|
266
|
+
if skeptics and skeptics.group(1) != "off":
|
|
267
|
+
raise StepFailed("pre-approval requires finding_skeptics off")
|
|
268
|
+
# Quick-lane limit from project policy (gsd-path-plan Quick mode): one wave, at most two tasks.
|
|
269
|
+
if (len(re.findall(r"(?m)^## Wave \d+ — ", plan)) != 1
|
|
270
|
+
or len(list((track / "tasks").glob("T[0-9][0-9][0-9]-*.md"))) > 2):
|
|
271
|
+
raise StepFailed("pre-approval requires one wave and at most two tasks")
|
|
272
|
+
step("pipeline_state.py", "pre-approve", "--repo", str(repo), "--use", kind)
|
|
273
|
+
else:
|
|
274
|
+
gate_plan()
|
|
204
275
|
if action == "approve-plan":
|
|
205
276
|
step("pipeline_state.py", "approve", *common, "--kind", "plan",
|
|
206
277
|
"--expected-head", expected_head)
|
|
207
278
|
except (StepFailed, OSError, subprocess.CalledProcessError, ValueError, KeyError, TypeError) as error:
|
|
208
279
|
return {"status": "blocked", "reason": str(error), "steps": steps,
|
|
209
|
-
"next":
|
|
280
|
+
"next": next_step}
|
|
210
281
|
return {"status": "complete", "steps": steps, **outputs}
|
|
211
282
|
|
|
212
283
|
|
|
213
284
|
def main(argv=None):
|
|
214
285
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
215
|
-
parser.add_argument("action", choices=("route", "gate-plan", "approve-plan", "build-evidence", "lint-round", "prepare-task", "prepare-final", "prepare-inspect", "finish-inspect"))
|
|
286
|
+
parser.add_argument("action", choices=("route", "gate-plan", "approve-plan", "build-evidence", "lint-round", "prepare-task", "prepare-final", "prepare-inspect", "finish-inspect", "preauthorize"))
|
|
216
287
|
parser.add_argument("--repo", type=Path, required=True)
|
|
217
288
|
parser.add_argument("--project-dir", choices=(".project", ".project/next"), default=".project")
|
|
218
289
|
parser.add_argument("--expected-head")
|
|
@@ -220,15 +291,18 @@ def main(argv=None):
|
|
|
220
291
|
parser.add_argument("--round-size", type=int)
|
|
221
292
|
parser.add_argument("--inspection", type=Path)
|
|
222
293
|
parser.add_argument("--mapper-reviewed", action="store_true")
|
|
294
|
+
parser.add_argument("--kind", choices=("intent", "plan"))
|
|
223
295
|
arguments = parser.parse_args(argv)
|
|
224
296
|
if arguments.action in {"approve-plan", "build-evidence", "prepare-task", "prepare-final", "prepare-inspect", "finish-inspect"} and not arguments.expected_head:
|
|
225
297
|
parser.error(f"{arguments.action} requires --expected-head")
|
|
226
298
|
if arguments.action == "prepare-task" and (not arguments.task_id or arguments.round_size is None):
|
|
227
299
|
parser.error("prepare-task requires --task-id and --round-size")
|
|
300
|
+
if arguments.action == "preauthorize" and not arguments.kind:
|
|
301
|
+
parser.error("preauthorize requires --kind")
|
|
228
302
|
result = run_workflow(arguments.repo.resolve(), arguments.action,
|
|
229
303
|
arguments.project_dir, arguments.expected_head,
|
|
230
304
|
arguments.task_id, arguments.round_size, arguments.inspection,
|
|
231
|
-
arguments.mapper_reviewed)
|
|
305
|
+
arguments.mapper_reviewed, arguments.kind)
|
|
232
306
|
print(json.dumps(result, sort_keys=True))
|
|
233
307
|
return 0 if result["status"] == "complete" else 1
|
|
234
308
|
|
|
@@ -13,10 +13,13 @@ import os
|
|
|
13
13
|
import tempfile
|
|
14
14
|
from pathlib import Path
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
import _common
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
if __package__:
|
|
17
|
+
from . import _common
|
|
18
|
+
else:
|
|
19
|
+
try:
|
|
20
|
+
import _common
|
|
21
|
+
except ImportError:
|
|
22
|
+
from scripts import _common
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
def _git(primary: Path, *args: str) -> str:
|
|
@@ -27,7 +30,10 @@ def _git(primary: Path, *args: str) -> str:
|
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
def _identity(path: Path) -> str:
|
|
30
|
-
|
|
33
|
+
digest = hashlib.sha256(os.fsencode(path)).hexdigest()
|
|
34
|
+
# Two identities nest in every managed path; full digests would use about
|
|
35
|
+
# 130 of Windows' 260-character MAX_PATH before any repository content.
|
|
36
|
+
return digest[:16] if os.name == "nt" else digest
|
|
31
37
|
|
|
32
38
|
|
|
33
39
|
def _workspace(primary: Path, pin: bool) -> Path:
|
|
@@ -65,7 +71,7 @@ def _workspace(primary: Path, pin: bool) -> Path:
|
|
|
65
71
|
receipt.parent.mkdir(parents=True, exist_ok=True)
|
|
66
72
|
fd, temporary = tempfile.mkstemp(dir=receipt.parent)
|
|
67
73
|
try:
|
|
68
|
-
with os.fdopen(fd, "w", encoding="utf-8") as handle:
|
|
74
|
+
with os.fdopen(fd, "w", encoding="utf-8", newline="\n") as handle:
|
|
69
75
|
json.dump({"primary": str(primary), "root": str(workspace)}, handle)
|
|
70
76
|
try:
|
|
71
77
|
os.link(temporary, receipt)
|
|
@@ -78,15 +84,19 @@ def _workspace(primary: Path, pin: bool) -> Path:
|
|
|
78
84
|
|
|
79
85
|
def worktree_path(primary: Path, kind: str, name: str, *, pin: bool = False) -> Path:
|
|
80
86
|
primary = primary.resolve()
|
|
81
|
-
if kind not in {"task", "verify", "integrate"} or not name or Path(name).name != name or name in {".", ".."}:
|
|
87
|
+
if kind not in {"task", "verify", "integrate", "bound"} or not name or Path(name).name != name or name in {".", ".."}:
|
|
82
88
|
raise ValueError("invalid managed worktree kind or name")
|
|
89
|
+
if kind == "bound":
|
|
90
|
+
return _workspace(primary, pin) / kind / name
|
|
83
91
|
legacy = (primary.parent / f".{primary.name}-gsd-path-integrate-{name}"
|
|
84
92
|
if kind == "integrate" else primary.parent / f"{primary.name}.gsd-path" / kind / name)
|
|
85
93
|
branch = f"refs/heads/gsd-path-{kind}/{name}"
|
|
86
94
|
records = _git(primary, "worktree", "list", "--porcelain", "-z").split("\0\0")
|
|
87
95
|
for record in records:
|
|
88
96
|
fields = record.split("\0")
|
|
89
|
-
|
|
97
|
+
# Compare as paths: git prints forward slashes on Windows.
|
|
98
|
+
worktrees = [Path(field[len("worktree "):]) for field in fields if field.startswith("worktree ")]
|
|
99
|
+
if legacy in worktrees and f"branch {branch}" in fields:
|
|
90
100
|
return legacy
|
|
91
101
|
# Keep collision checks and missing-directory recovery at the old location.
|
|
92
102
|
if os.path.lexists(legacy):
|
package/skills/gsd-path/BUILD.md
CHANGED
|
@@ -3,7 +3,8 @@ name: gsd-path-build
|
|
|
3
3
|
description: Execute or resume an approved GSD Path plan with isolated task worktrees, deterministic commits, and independent wave review. Use only when the user explicitly invokes $gsd-path-build or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Build Orchestrator
|
|
9
10
|
|
|
@@ -100,6 +101,11 @@ rule; never invoke an explicit-only sibling skill yourself.
|
|
|
100
101
|
checkpoint `.project/` records uses this helper. Record the exact full HEAD
|
|
101
102
|
before the first metadata change in that checkpoint, then run:
|
|
102
103
|
|
|
104
|
+
Before dispatch, also checkpoint a pre-existing `.project/build/verify-ledger.jsonl`
|
|
105
|
+
when it is an ignored regular file absent from HEAD, even if Git reports no
|
|
106
|
+
other pending paths. The `build:` checkpoint validates and force-adds only
|
|
107
|
+
that ledger; a malformed ledger blocks the checkpoint.
|
|
108
|
+
|
|
103
109
|
Explicit configuration edits in `.project/config.json` and
|
|
104
110
|
`.project/model-policy.json` are expected bookkeeping. Include them in the next
|
|
105
111
|
normal checkpoint before a clean dispatch base; they may remain pending while
|
|
@@ -3,7 +3,8 @@ name: gsd-path-decide
|
|
|
3
3
|
description: Decide implementation direction from approved intent and complete research evidence, recording settled choices in SYNTHESIS.md. Use only when the user explicitly invokes $gsd-path-decide or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Decide Phase
|
|
9
10
|
|
|
@@ -24,7 +25,11 @@ checking. Legal entry is `research/done` or `decide/active|blocked`. On
|
|
|
24
25
|
`research/done`, enter with `pipeline_state.py transition`, expected
|
|
25
26
|
phase/status `research/done`, exact branch and archive values, event `decision
|
|
26
27
|
synthesis started`, and set phase/status `decide/active` (plus the same
|
|
27
|
-
lookahead project dir)
|
|
28
|
+
lookahead project dir). Resume `decide/blocked` through the same helper with
|
|
29
|
+
the complete current state as expected, `--set-phase decide --set-status
|
|
30
|
+
active`, event `decision synthesis resumed`, and the same lookahead project
|
|
31
|
+
dir when supplied. Require the returned track state to be `decide/active`;
|
|
32
|
+
never edit STATE directly. `decide/done` or any later phase blocks rather
|
|
28
33
|
than replacing decisions beneath an existing plan. When an active router
|
|
29
34
|
supplies the lookahead track root `.project/next/`, evaluate these
|
|
30
35
|
preconditions against the track instead; see Lookahead mode. Require
|
|
@@ -60,8 +65,10 @@ rules are unchanged; never write an active-path artifact.
|
|
|
60
65
|
|
|
61
66
|
1. Read the local [synthesis template](templates/synthesis.md),
|
|
62
67
|
`.project/research/RESEARCH.md`, and the bundled `scripts/check_handoffs.py`;
|
|
63
|
-
resolve each to an absolute path.
|
|
64
|
-
|
|
68
|
+
resolve each to an absolute path. At `decide/active`, before dispatch, run
|
|
69
|
+
`python3 <absolute check_handoffs.py> research --repo <absolute root>
|
|
70
|
+
[--project-dir .project/next]` so decide receives a complete, intentional
|
|
71
|
+
evidence set.
|
|
65
72
|
2. Read the local [decider role](references/decider.md), then follow
|
|
66
73
|
the local [runtime dispatch contract](references/dispatch.md) with
|
|
67
74
|
deterministic logical task name `decide`. Give it absolute paths to the role,
|
|
@@ -3,7 +3,8 @@ name: gsd-path-define
|
|
|
3
3
|
description: Define and approve project or milestone intent through an interview or milestone confirmation, writing .project/CHARTER.md or .project/intent/INTENT.md. Use only when the user explicitly invokes $gsd-path-define or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Define Phase
|
|
9
10
|
|
|
@@ -281,6 +282,12 @@ runtimes without config support). Include that preference in the draft.
|
|
|
281
282
|
Retain `Review panel:` as reviewed: the CHARTER copy, the explicit user choice,
|
|
282
283
|
or the configured future preference. Quick lane keeps the panel off.
|
|
283
284
|
|
|
285
|
+
When the active router recorded an `intent` pre-approval grant and the draft
|
|
286
|
+
needs no answer from the user, run the router's `workflow_run.py preauthorize
|
|
287
|
+
--kind intent` before asking. On `complete`, present Outcome and Review, say
|
|
288
|
+
the owner's pre-approval passed this gate, and continue as approved. On
|
|
289
|
+
`blocked`, ask as usual.
|
|
290
|
+
|
|
284
291
|
After approval, finalize `.project/intent/INTENT.md` and run
|
|
285
292
|
`pipeline_state.py transition` with expected `define/active`, the exact
|
|
286
293
|
current milestone/branch/archive values, event `milestone intent approved`,
|
|
@@ -3,7 +3,8 @@ name: gsd-path-docs-audit
|
|
|
3
3
|
description: Verify Markdown claims against the actual code, commands, and GSD Path artifacts. Use only when the user explicitly invokes $gsd-path-docs-audit or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Docs Audit
|
|
9
10
|
|
|
@@ -59,7 +60,8 @@ would dirty execution, invalidate review, or mutate shipped history.
|
|
|
59
60
|
non-`.project` worktree changes, the orchestrator creates a verify sidecar
|
|
60
61
|
with `python3 <absolute isolation.py> isolate-verify --repo <absolute
|
|
61
62
|
primary> --base <HEAD> --name docs-audit` for project commands. The auditor
|
|
62
|
-
writes only its assigned output under that sidecar
|
|
63
|
+
writes only its assigned output under that sidecar; its `Repo root` header
|
|
64
|
+
still names the absolute primary. Gate it there before
|
|
63
65
|
collection. Then run `python3 <absolute isolation.py> collect-artifact
|
|
64
66
|
--repo <absolute primary> --source <returned worktree> --base <recorded
|
|
65
67
|
HEAD> --branch <returned branch> --source-path
|
|
@@ -74,8 +76,8 @@ would dirty execution, invalidate review, or mutate shipped history.
|
|
|
74
76
|
it carries `none`. The auditor writes that baseline as `Audited HEAD`.
|
|
75
77
|
2. Gate the artifact with the bundled helper: write the frozen inventory to
|
|
76
78
|
a temporary file (one path per line) and run
|
|
77
|
-
`python3 <absolute check_docs_audit.py> --repo <docs sidecar> --
|
|
78
|
-
<file> [--prior-audit <temporary prior-audit file>] [--changed <temporary
|
|
79
|
+
`python3 <absolute check_docs_audit.py> --repo <docs sidecar> --primary
|
|
80
|
+
<absolute primary> --inventory <file> [--prior-audit <temporary prior-audit file>] [--changed <temporary
|
|
79
81
|
changed-set file>]`.
|
|
80
82
|
It enforces the contract — every doc with at least one testable claim has
|
|
81
83
|
a claims table, every claim a valid type and verdict with evidence, every
|
|
@@ -3,7 +3,8 @@ name: gsd-path-inspect
|
|
|
3
3
|
description: Inspect an existing codebase and its documentation to establish brownfield ground truth before intent is defined. Use only when the user explicitly invokes $gsd-path-inspect or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Inspect Phase
|
|
9
10
|
|
|
@@ -112,15 +113,15 @@ Preparation never changes phase state; neither command dispatches agents.
|
|
|
112
113
|
includes its path and revision for project commands; expected new pipeline
|
|
113
114
|
artifacts do not make product code dirty. Each agent writes only its
|
|
114
115
|
assigned output under that sidecar and keeps it there for the gates in step
|
|
115
|
-
3. Otherwise no
|
|
116
|
+
3; its `Repo root` header still names the absolute primary. Otherwise no
|
|
116
117
|
project command may run. The docs-auditor brief carries current HEAD as the
|
|
117
118
|
audit baseline only when its verify sidecar was created at HEAD; otherwise
|
|
118
119
|
it carries `none`. The auditor writes that baseline as `Audited HEAD`.
|
|
119
120
|
3. Gate both artifacts against their templates: the codebase evidence needs
|
|
120
121
|
a filled `## Map` plus findings as observed — no quota, but an empty
|
|
121
122
|
findings section must say why; the docs audit must pass the bundled
|
|
122
|
-
`python3 <absolute check_docs_audit.py> --repo <docs sidecar> --
|
|
123
|
-
<track-relative DOCS-AUDIT.md> --inventory <frozen inventory file>`, where
|
|
123
|
+
`python3 <absolute check_docs_audit.py> --repo <docs sidecar> --primary
|
|
124
|
+
<absolute primary> --audit <track-relative DOCS-AUDIT.md> --inventory <frozen inventory file>`, where
|
|
124
125
|
the audit path is `.project/research/DOCS-AUDIT.md` normally and
|
|
125
126
|
`.project/next/research/DOCS-AUDIT.md` in Lookahead mode; add
|
|
126
127
|
`--prior-audit <temporary prior-audit file>` when one was preserved and
|
package/skills/gsd-path/PLAN.md
CHANGED
|
@@ -3,7 +3,8 @@ name: gsd-path-plan
|
|
|
3
3
|
description: Create and validate dependency-ordered GSD Path build waves and complete task contracts. Use only when the user explicitly invokes $gsd-path-plan or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Planning Phase
|
|
9
10
|
|
|
@@ -226,6 +227,11 @@ as stated in Lookahead mode.
|
|
|
226
227
|
Before asking for approval, require exactly one panel artifact for non-off
|
|
227
228
|
Config: `PLAN-PANEL.md` for `ready`, or `PLAN-PANEL.skipped.json` for
|
|
228
229
|
`skipped`. Off Config requires neither. A mismatch blocks approval.
|
|
230
|
+
When the active router recorded a `plan` pre-approval grant, first run
|
|
231
|
+
`python3 <absolute workflow_run.py> preauthorize --repo <absolute root>
|
|
232
|
+
--kind plan`. On `complete`, present Outcome and Review, say the owner's
|
|
233
|
+
pre-approval passed this gate, and continue at step 6 as approved. On
|
|
234
|
+
`blocked`, ask as below.
|
|
229
235
|
Ask one explicit next question: whether to approve this plan and start the
|
|
230
236
|
build. When PLAN-PANEL.md has `Actionable: 0` or the panel did not run,
|
|
231
237
|
list `Approve and start build (recommended)` first, with `Request changes`
|
|
@@ -3,7 +3,8 @@ name: gsd-path-research
|
|
|
3
3
|
description: Dispatch parallel researchers and collect cited GSD Path evidence about domain, stack, pitfalls, and comparable products. Use only when the user explicitly invokes $gsd-path-research or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Research Phase
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@ name: gsd-path-roadmap
|
|
|
3
3
|
description: Slice an approved GSD Path program charter into a dependency-ordered roadmap of independently shippable milestones. Use only when the user explicitly invokes $gsd-path-roadmap or an active $gsd-path router explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Roadmap Phase
|
|
9
10
|
|
package/skills/gsd-path/SHIP.md
CHANGED
|
@@ -3,7 +3,8 @@ name: gsd-path-ship
|
|
|
3
3
|
description: Verify a completed GSD Path milestone, manage evidence-backed patch decisions, request final shipping approval, and archive the validated result. Use only when the user explicitly invokes $gsd-path-ship or an active $gsd-path router or build orchestrator explicitly routes to this phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
6
|
+
Before executing project helpers, read [runtime selection](references/runtime-selection.md)
|
|
7
|
+
and [operating rules](references/operating-rules.md).
|
|
7
8
|
|
|
8
9
|
# GSD Path Ship Phase
|
|
9
10
|
|
|
@@ -82,10 +83,13 @@ so the position is unchanged. Then:
|
|
|
82
83
|
This owns pending-discussion and landing checks, project Verify isolation,
|
|
83
84
|
execution, output recording, collection, cleanup, and final-review reuse.
|
|
84
85
|
Keep its JSON receipt; do not reconstruct those operations in shell calls.
|
|
85
|
-
|
|
86
|
-
`final-gap-1.md` is the generated view
|
|
87
|
-
|
|
88
|
-
and
|
|
86
|
+
For a single-repo milestone, exact stdout/stderr live once in
|
|
87
|
+
`.project/build/verify-ledger.jsonl`; `final-gap-1.md` is the generated view
|
|
88
|
+
referencing that entry. For a member milestone, the gap records each member
|
|
89
|
+
head and holds the exact output; there is no reusable ledger entry.
|
|
90
|
+
Single-repo re-entry at the same command and commit reuses the execution,
|
|
91
|
+
including a failed one, and finishes interrupted collection without running
|
|
92
|
+
the command again.
|
|
89
93
|
Missing legacy output requires evidence reconciliation, not a blind rerun.
|
|
90
94
|
Any non-zero result stops this step; preserve its stderr and diagnose through
|
|
91
95
|
the bundled forensics contract. Do not launch reviewers while project Verify
|
|
@@ -121,9 +125,10 @@ so the position is unchanged. Then:
|
|
|
121
125
|
step 3 or create a fresh sidecar with `isolate-verify --name review-final`
|
|
122
126
|
and dispatch the integration reviewer under logical task name
|
|
123
127
|
`review_final`, assigning only
|
|
124
|
-
`.project/review/FINAL.md`. Its complete brief includes the
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
`.project/review/FINAL.md`. Its complete brief includes the project Verify
|
|
129
|
+
evidence from the ledger or the member milestone's gap output, every
|
|
130
|
+
collected gap verdict so Overall verdict is consistent with them, and
|
|
131
|
+
PLAN.md's `## Surface contract` when INTENT.md
|
|
127
132
|
names surfaces — that reviewer performs each Walkthrough and records the
|
|
128
133
|
surface and what it showed on every criterion the contract lists. Collect FINAL.md and retire its sidecar through the
|
|
129
134
|
same helper flow.
|
|
@@ -253,6 +258,14 @@ The persisted `STATE.archive` field is the transaction identity.
|
|
|
253
258
|
at the current HEAD is the only artifact-producing remedy. The archive helper independently binds every FINAL.md
|
|
254
259
|
`SCn` heading id and normalized text to the archived INTENT.md; a renamed or
|
|
255
260
|
easier criterion blocks even if the earlier handoff gate was bypassed.
|
|
261
|
+
For a multi-repo milestone (the archive holds `build/members.json`), run
|
|
262
|
+
`python3 <absolute archive_milestone.py> close-members --repo <root>`
|
|
263
|
+
after preflight passes and before recording shipment. It closes each
|
|
264
|
+
locked member in lock order in that member's integration mode and
|
|
265
|
+
journals each one. When it returns `awaiting-merge`, report the member PR
|
|
266
|
+
link, stop, and rerun the same command after the user merges it; never
|
|
267
|
+
merge a member PR yourself. When it returns `integrated`, keep its `body`
|
|
268
|
+
for the ship commit below.
|
|
256
269
|
5. Only after preflight passes, record shipment through the journaled helper;
|
|
257
270
|
for a program it atomically replaces both ROADMAP.md and STATE.md, setting
|
|
258
271
|
the current entry to `Status: shipped` with the exact `Archive:` pointer:
|
|
@@ -270,10 +283,14 @@ The persisted `STATE.archive` field is the transaction identity.
|
|
|
270
283
|
idempotent after completion. Stage only
|
|
271
284
|
`.project/` paths, inspect the staged path list against the transaction and
|
|
272
285
|
create the ship phase's one commit with exact subject
|
|
273
|
-
`ship: M00N — <milestone-slug
|
|
286
|
+
`ship: M00N — <milestone-slug>`. For a single-repo milestone, its body has
|
|
287
|
+
exactly two consecutive lines,
|
|
274
288
|
`Archive: .project/archive/<NNN>-<slug>` then
|
|
275
289
|
`Reviewed-HEAD: <reviewed SHA>`, with no comment lines or blank line between them.
|
|
276
|
-
|
|
290
|
+
A multi-repo milestone's body is exactly the `body` that `close-members`
|
|
291
|
+
returned: those two lines, then one `Member-Reviewed-HEAD:` and one
|
|
292
|
+
`Member:` line per member.
|
|
293
|
+
Write the subject, a blank line, and the body lines to a message file,
|
|
277
294
|
then use `git commit -F <message-file>`. M00N and NNN come from STATE.archive.
|
|
278
295
|
There is no untracked-project exception and no product or older-archive
|
|
279
296
|
path may enter this commit.
|