@deftai/directive-content 0.55.1 → 0.56.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/.githooks/pre-commit +143 -0
- package/.githooks/pre-push +121 -0
- package/QUICK-START.md +13 -3
- package/Taskfile.yml +934 -0
- package/UPGRADING.md +82 -11
- package/events/README.md +3 -3
- package/package.json +5 -4
- package/packs/skills/skills-pack-0.1.json +22 -22
- package/scripts/_agents_md.py +494 -0
- package/scripts/_cache_fetch.py +635 -0
- package/scripts/_cache_quota.py +529 -0
- package/scripts/_cache_refresh.py +163 -0
- package/scripts/_cache_validate.py +209 -0
- package/scripts/_content_root.py +42 -0
- package/scripts/_doctor_state.py +277 -0
- package/scripts/_event_detect.py +305 -0
- package/scripts/_events.py +514 -0
- package/scripts/_lifecycle_hygiene.py +568 -0
- package/scripts/_pathspec.py +91 -0
- package/scripts/_policy_show_cli.py +266 -0
- package/scripts/_precutover.py +92 -0
- package/scripts/_project_context.py +224 -0
- package/scripts/_project_definition_io.py +164 -0
- package/scripts/_relocate_snapshot.py +209 -0
- package/scripts/_relocate_states.py +343 -0
- package/scripts/_resolve_preflight_path.py +152 -0
- package/scripts/_safe_subprocess.py +167 -0
- package/scripts/_session_start_hook.py +205 -0
- package/scripts/_sor_gate_diff.py +365 -0
- package/scripts/_stdio_utf8.py +59 -0
- package/scripts/_triage_bootstrap_gitignore.py +904 -0
- package/scripts/_triage_classify_cli.py +122 -0
- package/scripts/_triage_queue_cli.py +625 -0
- package/scripts/_triage_scope_cli.py +343 -0
- package/scripts/_triage_scope_drift_cli.py +121 -0
- package/scripts/_triage_scope_ignores.py +286 -0
- package/scripts/_triage_scope_milestone.py +432 -0
- package/scripts/_triage_scope_mutations.py +337 -0
- package/scripts/_triage_scope_renderers.py +207 -0
- package/scripts/_triage_smoketest_stages.py +674 -0
- package/scripts/_triage_subscribe_cli.py +140 -0
- package/scripts/_triage_welcome_cli.py +421 -0
- package/scripts/_vbrief_build.py +239 -0
- package/scripts/_vbrief_fidelity.py +479 -0
- package/scripts/_vbrief_legacy.py +589 -0
- package/scripts/_vbrief_reconciliation.py +883 -0
- package/scripts/_vbrief_routing.py +277 -0
- package/scripts/_vbrief_safety.py +778 -0
- package/scripts/_vbrief_sources.py +312 -0
- package/scripts/_vbrief_speckit.py +262 -0
- package/scripts/_vbrief_story_quality.py +353 -0
- package/scripts/_vbrief_validation.py +299 -0
- package/scripts/build_dist.py +412 -0
- package/scripts/cache.py +1078 -0
- package/scripts/cache_scanner.py +745 -0
- package/scripts/candidates_log.py +432 -0
- package/scripts/capacity_backfill.py +680 -0
- package/scripts/capacity_show.py +653 -0
- package/scripts/ci_local.py +689 -0
- package/scripts/code_structure_validate.py +765 -0
- package/scripts/codebase_default_extractor.py +495 -0
- package/scripts/codebase_map.py +304 -0
- package/scripts/codebase_map_fresh.py +104 -0
- package/scripts/codebase_projection_registry.py +94 -0
- package/scripts/codebase_provider.py +582 -0
- package/scripts/doctor.py +2257 -0
- package/scripts/framework_commands.py +505 -0
- package/scripts/gh_rest.py +882 -0
- package/scripts/github_auth_modes.py +437 -0
- package/scripts/github_body.py +292 -0
- package/scripts/ip_risk.py +531 -0
- package/scripts/issue_emit.py +670 -0
- package/scripts/issue_ingest.py +1064 -0
- package/scripts/migrate_preflight.py +418 -0
- package/scripts/migrate_vbrief.py +2677 -0
- package/scripts/monitor_pr.py +401 -0
- package/scripts/pack_migrate_lessons.py +336 -0
- package/scripts/pack_migrate_patterns.py +254 -0
- package/scripts/pack_migrate_rules.py +350 -0
- package/scripts/pack_migrate_skills.py +423 -0
- package/scripts/pack_migrate_strategies.py +311 -0
- package/scripts/pack_migrate_swarm_spec.py +250 -0
- package/scripts/pack_render.py +434 -0
- package/scripts/packs_slice.py +712 -0
- package/scripts/platform_capabilities.py +336 -0
- package/scripts/policy.py +2826 -0
- package/scripts/policy_set.py +324 -0
- package/scripts/pr_check_closing_keywords.py +524 -0
- package/scripts/pr_check_protected_issues.py +267 -0
- package/scripts/pr_merge_readiness.py +1004 -0
- package/scripts/pr_wait_mergeable.py +669 -0
- package/scripts/prd_render.py +159 -0
- package/scripts/preflight_architecture_sor.py +974 -0
- package/scripts/preflight_branch.py +289 -0
- package/scripts/preflight_cache.py +974 -0
- package/scripts/preflight_gh.py +721 -0
- package/scripts/preflight_implementation.py +272 -0
- package/scripts/preflight_story_start.py +838 -0
- package/scripts/preflight_wip_cap.py +149 -0
- package/scripts/probe_session.py +545 -0
- package/scripts/project_render.py +293 -0
- package/scripts/quarantine_ext.py +237 -0
- package/scripts/reconcile_issues.py +1442 -0
- package/scripts/refresh-path.ps1 +107 -0
- package/scripts/release.py +2030 -0
- package/scripts/release_e2e.py +1011 -0
- package/scripts/release_publish.py +486 -0
- package/scripts/release_rollback.py +980 -0
- package/scripts/relocate.py +1034 -0
- package/scripts/resolve_changelog_unreleased.py +667 -0
- package/scripts/resolve_version.py +490 -0
- package/scripts/resume_conditions.py +706 -0
- package/scripts/ritual_sentinel.py +609 -0
- package/scripts/roadmap_render.py +635 -0
- package/scripts/rule_ownership_lint.py +325 -0
- package/scripts/scm.py +591 -0
- package/scripts/scope_audit_log.py +387 -0
- package/scripts/scope_decompose.py +654 -0
- package/scripts/scope_demote.py +509 -0
- package/scripts/scope_lifecycle.py +1126 -0
- package/scripts/scope_undo.py +772 -0
- package/scripts/session_start.py +406 -0
- package/scripts/setup_ghx.py +339 -0
- package/scripts/setup_windows.ps1 +220 -0
- package/scripts/slice_audit.py +585 -0
- package/scripts/slice_record.py +530 -0
- package/scripts/slice_record_existing.py +692 -0
- package/scripts/slug_normalize.py +178 -0
- package/scripts/spec_render.py +477 -0
- package/scripts/spec_validate.py +238 -0
- package/scripts/subagent_monitor.py +658 -0
- package/scripts/swarm_complete_cohort.py +644 -0
- package/scripts/swarm_launch.py +1206 -0
- package/scripts/swarm_readiness.py +554 -0
- package/scripts/swarm_verify_review_clean.py +438 -0
- package/scripts/swarm_worktrees.py +497 -0
- package/scripts/toolchain-check.py +52 -0
- package/scripts/triage_actions.py +871 -0
- package/scripts/triage_bootstrap.py +1153 -0
- package/scripts/triage_bulk.py +630 -0
- package/scripts/triage_classify.py +932 -0
- package/scripts/triage_help.py +1685 -0
- package/scripts/triage_queue.py +1944 -0
- package/scripts/triage_reconcile.py +581 -0
- package/scripts/triage_refresh.py +643 -0
- package/scripts/triage_scope.py +999 -0
- package/scripts/triage_scope_drift.py +575 -0
- package/scripts/triage_smoketest.py +396 -0
- package/scripts/triage_subscribe.py +399 -0
- package/scripts/triage_summary.py +1011 -0
- package/scripts/triage_welcome.py +1178 -0
- package/scripts/ts_check_lane.py +86 -0
- package/scripts/validate-links.py +64 -0
- package/scripts/validate_strategy_output.py +212 -0
- package/scripts/vbrief_activate.py +228 -0
- package/scripts/vbrief_migrate_conformance.py +368 -0
- package/scripts/vbrief_reconcile_graph.py +306 -0
- package/scripts/vbrief_reconcile_labels.py +460 -0
- package/scripts/vbrief_reconcile_umbrellas.py +741 -0
- package/scripts/vbrief_validate.py +1195 -0
- package/scripts/verify-stubs.py +61 -0
- package/scripts/verify_capacity.py +160 -0
- package/scripts/verify_encoding.py +699 -0
- package/scripts/verify_hooks_installed.py +206 -0
- package/scripts/verify_investigation.py +360 -0
- package/scripts/verify_judgment_gates.py +827 -0
- package/scripts/verify_no_task_runtime.py +171 -0
- package/scripts/verify_scm_boundary.py +509 -0
- package/scripts/verify_session_ritual.py +389 -0
- package/scripts/verify_tools.py +426 -0
- package/scripts/verify_vbrief_conformance.py +478 -0
- package/skills/deft-directive-swarm/SKILL.md +7 -26
- package/skills/deft-directive-sync/SKILL.md +1 -1
- package/tasks/architecture.yml +13 -0
- package/tasks/cache.yml +69 -0
- package/tasks/capacity.yml +38 -0
- package/tasks/change.yml +46 -0
- package/tasks/changelog.yml +24 -0
- package/tasks/ci.yml +49 -0
- package/tasks/codebase.yml +47 -0
- package/tasks/commit.yml +30 -0
- package/tasks/core.yml +126 -0
- package/tasks/deployments.yml +54 -0
- package/tasks/framework.yml +74 -0
- package/tasks/install.yml +60 -0
- package/tasks/issue.yml +50 -0
- package/tasks/migrate.yml +73 -0
- package/tasks/packs.yml +92 -0
- package/tasks/policy.yml +75 -0
- package/tasks/pr.yml +89 -0
- package/tasks/prd.yml +39 -0
- package/tasks/project.yml +27 -0
- package/tasks/reconcile.yml +32 -0
- package/tasks/relocate.yml +56 -0
- package/tasks/roadmap.yml +28 -0
- package/tasks/scm.yml +126 -0
- package/tasks/scope-undo.yml +36 -0
- package/tasks/scope.yml +141 -0
- package/tasks/session.yml +19 -0
- package/tasks/setup.yml +37 -0
- package/tasks/slice.yml +69 -0
- package/tasks/spec.yml +41 -0
- package/tasks/swarm.yml +85 -0
- package/tasks/toolchain.yml +13 -0
- package/tasks/triage-actions.yml +94 -0
- package/tasks/triage-bootstrap.yml +43 -0
- package/tasks/triage-bulk.yml +75 -0
- package/tasks/triage-classify.yml +30 -0
- package/tasks/triage-queue.yml +50 -0
- package/tasks/triage-reconcile.yml +29 -0
- package/tasks/triage-scope-drift.yml +29 -0
- package/tasks/triage-scope.yml +31 -0
- package/tasks/triage-smoketest.yml +33 -0
- package/tasks/triage-subscribe.yml +36 -0
- package/tasks/triage-summary.yml +29 -0
- package/tasks/triage-welcome.yml +32 -0
- package/tasks/ts.yml +328 -0
- package/tasks/vbrief.yml +206 -0
- package/tasks/verify.yml +292 -0
- package/templates/agents-entry.md +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
vars:
|
|
4
|
+
# See deft/Taskfile.yml for the rationale behind per-subfile DEFT_ROOT
|
|
5
|
+
# (go-task re-evaluates var templates at use site; joinPath is eager and
|
|
6
|
+
# produces a clean, native-separator path so `uv --project "{{.DEFT_ROOT}}" run python` resolves it
|
|
7
|
+
# correctly on Windows -- #566).
|
|
8
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
9
|
+
|
|
10
|
+
tasks:
|
|
11
|
+
preflight:
|
|
12
|
+
# Agent-side environment preflight for `task migrate:vbrief` (#793).
|
|
13
|
+
# Reifies the prose contract documented in
|
|
14
|
+
# `skills/deft-directive-setup/SKILL.md` § Environment Preflight as a
|
|
15
|
+
# runnable task so consumers running `task migrate:vbrief` directly
|
|
16
|
+
# (not via the agent-driven setup skill) get the same checks
|
|
17
|
+
# (uv on PATH, v0.20+ layout, document model, git working tree) before
|
|
18
|
+
# any destructive mutation runs. Three-state exit (0 ready / 1 not-ready / 2 config
|
|
19
|
+
# error) mirrors `scripts/preflight_branch.py` (#747).
|
|
20
|
+
#
|
|
21
|
+
# NO `sources:` / `generates:` per `conventions/task-caching.md`: the
|
|
22
|
+
# script forwards user-facing CLI flags (`--project-root`, `--deft-root`,
|
|
23
|
+
# `--quiet`) via `{{.CLI_ARGS}}` and a cached cmds skip would silently
|
|
24
|
+
# swallow them.
|
|
25
|
+
desc: "Verify environment readiness for `task migrate:vbrief` (uv on PATH, v0.20+ layout, document model, git tree). Three-state exit (#793)."
|
|
26
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
27
|
+
env:
|
|
28
|
+
PYTHONUTF8: "1"
|
|
29
|
+
cmds:
|
|
30
|
+
- uv --project "{{.DEFT_ROOT}}" run --frozen python "{{.DEFT_ROOT}}/scripts/migrate_preflight.py" --project-root "{{.USER_WORKING_DIR}}" --deft-root "{{.DEFT_ROOT}}" {{.CLI_ARGS}}
|
|
31
|
+
|
|
32
|
+
vbrief:
|
|
33
|
+
desc: >
|
|
34
|
+
Migrate existing project files to vBRIEF-centric folder structure (RFC #309).
|
|
35
|
+
Pass safety flags after --, e.g. `task migrate:vbrief -- --dry-run`,
|
|
36
|
+
`task migrate:vbrief -- --force`, `task migrate:vbrief -- --rollback` (#497, #506 D7).
|
|
37
|
+
Pass `task migrate:vbrief -- --strict` to fail the run on any SPEC/ROADMAP
|
|
38
|
+
reconciliation conflict (#496, #506).
|
|
39
|
+
Self-invokes `task migrate:preflight` first (#793) so a non-zero preflight
|
|
40
|
+
exit aborts the run before any destructive mutation; pre-existing CLI
|
|
41
|
+
flags continue to dispatch to `scripts/migrate_vbrief.py` unchanged.
|
|
42
|
+
Emits framework events on guard trip: `dirty-tree:detected` (#497-3
|
|
43
|
+
dirty-tree guard) and `pre-cutover:detected` (when
|
|
44
|
+
run::_check_upgrade_gate is consulted by the CLI flow). See
|
|
45
|
+
events/registry.json for the payload contracts and `DEFT_EVENT_LOG` for
|
|
46
|
+
opt-in JSON-line capture (#635).
|
|
47
|
+
deps:
|
|
48
|
+
# #793: gate destructive migration on the environment preflight. A
|
|
49
|
+
# non-zero exit from the preflight task aborts this task before any
|
|
50
|
+
# `cmds:` line runs. Operator-supplied `{{.CLI_ARGS}}` (e.g.
|
|
51
|
+
# `--dry-run`, `--force`, `--rollback`, `--strict`) belong to the
|
|
52
|
+
# migrator and are NOT valid migrate_preflight.py flags. go-task
|
|
53
|
+
# forwards parent CLI_ARGS into dependency tasks by default, so we
|
|
54
|
+
# explicitly clear CLI_ARGS here; otherwise `task migrate:vbrief --
|
|
55
|
+
# --dry-run` reaches the preflight argparse surface as
|
|
56
|
+
# `migrate:preflight -- --dry-run` and exits 2 (`unrecognized
|
|
57
|
+
# arguments: --dry-run`) before the migrator runs. This bug was
|
|
58
|
+
# caught by the Windows task-dispatch regression job on PR #860.
|
|
59
|
+
- task: preflight
|
|
60
|
+
vars:
|
|
61
|
+
CLI_ARGS: ""
|
|
62
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
63
|
+
env:
|
|
64
|
+
PYTHONUTF8: "1"
|
|
65
|
+
cmds:
|
|
66
|
+
# Pass Taskfile CLI args through so operators can opt into safety flags
|
|
67
|
+
# (#497) or --strict reconciliation (#496) without editing this file.
|
|
68
|
+
# Script path uses {{.DEFT_ROOT}} (defined locally in this file's
|
|
69
|
+
# `vars:` block above via `joinPath .TASKFILE_DIR ".."` -- see
|
|
70
|
+
# ../Taskfile.yml for why root-level definition is avoided) rather
|
|
71
|
+
# than {{.TASKFILE_DIR}}/.. to keep the path traversal-free; the
|
|
72
|
+
# mixed-separator form breaks `uv --project "{{.DEFT_ROOT}}" run python` on Windows (#566).
|
|
73
|
+
- uv --project "{{.DEFT_ROOT}}" run python "{{.DEFT_ROOT}}/scripts/migrate_vbrief.py" "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
package/tasks/packs.yml
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
# Pack-slicing surface (#1283 design, #1294 lessons pilot, #1295 skills pack,
|
|
4
|
+
# #1296 rules + strategies packs, ADR-001 Layer B).
|
|
5
|
+
#
|
|
6
|
+
# `packs:slice` is the agent-facing named-slice API (pack-agnostic, driven by
|
|
7
|
+
# each pack's schema x-sliceRegistry + x-display); `packs:render` regenerates
|
|
8
|
+
# every pack's projection (meta/lessons.md for lessons, the proof SKILL.md for
|
|
9
|
+
# skills, the proof coding/testing.md for rules, the proof strategies/yolo.md
|
|
10
|
+
# for strategies) from its canonical pack source; `packs:verify-drift` is the
|
|
11
|
+
# drift gate that fails when ANY committed projection diverges from a freshly
|
|
12
|
+
# rendered buffer. The pack-agnostic renderer/resolver is the #1294 machinery
|
|
13
|
+
# generalized to four packs through a shared data-driven registry, not
|
|
14
|
+
# copy-pasted per pack.
|
|
15
|
+
#
|
|
16
|
+
# DEFT_ROOT is defined locally via `{{joinPath .TASKFILE_DIR ".."}}` (same
|
|
17
|
+
# idiom as tasks/issue.yml) so the scripts dispatch traversal-free on every
|
|
18
|
+
# platform (#566). The slice / render scripts resolve their own pack source /
|
|
19
|
+
# output paths relative to the framework root, so they are CWD-independent;
|
|
20
|
+
# `dir: '{{.USER_WORKING_DIR}}'` keeps parity with the other Taskfile-
|
|
21
|
+
# dispatched scripts. Per `conventions/task-caching.md` (#574) none of these
|
|
22
|
+
# declare `sources:` / `generates:` because they forward user-facing flags via
|
|
23
|
+
# `{{.CLI_ARGS}}` (slice filters, --check) that go-task's incremental-build
|
|
24
|
+
# cache would otherwise silently swallow.
|
|
25
|
+
|
|
26
|
+
vars:
|
|
27
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
28
|
+
|
|
29
|
+
tasks:
|
|
30
|
+
slice:
|
|
31
|
+
desc: "Named, structured slice access to a content pack (#1283, #1295). -- task packs:slice <pack> <name> [-- --since YYYY-MM | --tag T | --trigger KW] [--list] [--list-packs] [--json]"
|
|
32
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
33
|
+
deps:
|
|
34
|
+
- task: ":ts:build"
|
|
35
|
+
cmds:
|
|
36
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" packs-slice {{.CLI_ARGS}}
|
|
37
|
+
|
|
38
|
+
render:
|
|
39
|
+
desc: "Regenerate every content-pack projection from its canonical source (ADR-001): meta/lessons.md (lessons), the proof SKILL.md (skills), coding/testing.md (rules), strategies/yolo.md (strategies). -- task packs:render [-- --pack rules] [--check]"
|
|
40
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
41
|
+
deps:
|
|
42
|
+
- task: ":ts:build"
|
|
43
|
+
cmds:
|
|
44
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-render {{.CLI_ARGS}}
|
|
45
|
+
|
|
46
|
+
render-skills:
|
|
47
|
+
desc: "One-shot migration: rebuild packs/skills/skills-pack-0.1.json from skills/*/SKILL.md + the AGENTS.md Skill Routing table (#1295)."
|
|
48
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
49
|
+
deps:
|
|
50
|
+
- task: ":ts:build"
|
|
51
|
+
cmds:
|
|
52
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-migrate-skills {{.CLI_ARGS}}
|
|
53
|
+
|
|
54
|
+
render-rules:
|
|
55
|
+
desc: "One-shot migration: rebuild packs/rules/rules-pack-0.1.json from the RFC2119 directives in coding/*.md (#1296)."
|
|
56
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
57
|
+
deps:
|
|
58
|
+
- task: ":ts:build"
|
|
59
|
+
cmds:
|
|
60
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-migrate-rules {{.CLI_ARGS}}
|
|
61
|
+
|
|
62
|
+
render-strategies:
|
|
63
|
+
desc: "One-shot migration: rebuild packs/strategies/strategies-pack-0.1.json from strategies/*.md (#1296)."
|
|
64
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
65
|
+
deps:
|
|
66
|
+
- task: ":ts:build"
|
|
67
|
+
cmds:
|
|
68
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-migrate-strategies {{.CLI_ARGS}}
|
|
69
|
+
|
|
70
|
+
render-patterns:
|
|
71
|
+
desc: "One-shot migration: rebuild packs/patterns/patterns-pack-0.1.json from patterns/*.md (#1637)."
|
|
72
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
73
|
+
deps:
|
|
74
|
+
- task: ":ts:build"
|
|
75
|
+
cmds:
|
|
76
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-migrate-patterns {{.CLI_ARGS}}
|
|
77
|
+
|
|
78
|
+
render-swarm-spec:
|
|
79
|
+
desc: "One-shot migration: rebuild packs/swarm-spec/swarm-spec-pack-0.1.json from swarm/*.md (#1637)."
|
|
80
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
81
|
+
deps:
|
|
82
|
+
- task: ":ts:build"
|
|
83
|
+
cmds:
|
|
84
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-migrate-swarm-spec {{.CLI_ARGS}}
|
|
85
|
+
|
|
86
|
+
verify-drift:
|
|
87
|
+
desc: "Drift gate: fail (exit 1) when ANY pack projection (meta/lessons.md, the skills proof SKILL.md, coding/testing.md, strategies/yolo.md) diverges from a freshly rendered buffer. Wired into `task check` and surfaced as `task verify:pack-drift`."
|
|
88
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
89
|
+
deps:
|
|
90
|
+
- task: ":ts:build"
|
|
91
|
+
cmds:
|
|
92
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pack-render --check {{.CLI_ARGS}}
|
package/tasks/policy.yml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
# tasks/policy.yml -- reconfiguration surface for the typed branch policy
|
|
4
|
+
# (#746) and the detection-bound gate (#747). Per `conventions/task-caching.md`,
|
|
5
|
+
# tasks that accept user-facing recovery flags via `{{.CLI_ARGS}}` (here:
|
|
6
|
+
# `--confirm`, `--note "<text>"`) MUST NOT declare `sources:` / `generates:`
|
|
7
|
+
# -- the cached cmds: skip would silently discard the recovery flag.
|
|
8
|
+
|
|
9
|
+
vars:
|
|
10
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
11
|
+
|
|
12
|
+
tasks:
|
|
13
|
+
show:
|
|
14
|
+
# N8 (#1148) of #1119 Wave-2d-1: `task policy:show` is now the
|
|
15
|
+
# CONSOLIDATED typed-policy inspector. Walks every entry in
|
|
16
|
+
# `scripts.policy._REGISTERED_POLICIES` (allowDirectCommitsToMaster #746,
|
|
17
|
+
# wipCap #1124, triageScope #1131, triageScopeIgnores #1133/#1182,
|
|
18
|
+
# triageRankingLabels #1128, triageAutoClassify #1129, triageHoldMarkers
|
|
19
|
+
# #1129) and prints current / default / source per row. Flags forwarded
|
|
20
|
+
# via {{.CLI_ARGS}}:
|
|
21
|
+
# --format=text|json -- machine-stable scripting envelope
|
|
22
|
+
# --changed-only -- drop default-source rows
|
|
23
|
+
# --field=<name> -- single-field isolation
|
|
24
|
+
# The legacy `python -m scripts.policy show` CLI continues to work for
|
|
25
|
+
# any scripts that called it directly (back-compat for #746 consumers).
|
|
26
|
+
desc: "Inspect every registered typed-policy field on vbrief/PROJECT-DEFINITION.vbrief.json (#1148 / N8). -- task policy:show [-- --format=json] [--changed-only] [--field=<name>]"
|
|
27
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
28
|
+
deps:
|
|
29
|
+
- task: :ts:build
|
|
30
|
+
cmds:
|
|
31
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" policy show --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
|
32
|
+
|
|
33
|
+
enforce-branches:
|
|
34
|
+
desc: "Set plan.policy.allowDirectCommitsToMaster=false (enforce feature branches). Audits to meta/policy-changes.log. (#746)"
|
|
35
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
36
|
+
deps:
|
|
37
|
+
- task: :ts:build
|
|
38
|
+
cmds:
|
|
39
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" policy enforce-branches --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
|
40
|
+
|
|
41
|
+
allow-direct-commits:
|
|
42
|
+
desc: "Set plan.policy.allowDirectCommitsToMaster=true (capability-cost: branch-protection OFF). Requires --confirm to apply. (#746)"
|
|
43
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
44
|
+
deps:
|
|
45
|
+
- task: :ts:build
|
|
46
|
+
cmds:
|
|
47
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" policy allow-direct-commits --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
|
48
|
+
|
|
49
|
+
wip-cap:
|
|
50
|
+
desc: "Set plan.policy.wipCap=N (#1124 / D4 of #1119). Requires --set N --confirm. Default cap is 10 per umbrella #1119 Current Shape v3."
|
|
51
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
52
|
+
deps:
|
|
53
|
+
- task: :ts:build
|
|
54
|
+
cmds:
|
|
55
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" policy-set wip-cap {{.CLI_ARGS}} --project-root "{{.USER_WORKING_DIR}}"
|
|
56
|
+
|
|
57
|
+
subagent-backend:
|
|
58
|
+
desc: "DEPRECATED (superseded by `task swarm:routing-set`, #1739). Was: Set plan.policy.swarmSubagentBackend (#1531a). -- task policy:subagent-backend -- --set composer|grok-build|cursor-cloud"
|
|
59
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
60
|
+
deps:
|
|
61
|
+
- task: :ts:build
|
|
62
|
+
cmds:
|
|
63
|
+
- cmd: echo "[deft deprecation] task policy:subagent-backend is superseded by 'task swarm:routing-set' (#1739). The swarmSubagentBackend enum is no longer the active routing surface." 1>&2
|
|
64
|
+
silent: true
|
|
65
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" policy-set subagent-backend {{.CLI_ARGS}} --project-root "{{.USER_WORKING_DIR}}"
|
|
66
|
+
|
|
67
|
+
subagent-backends:
|
|
68
|
+
desc: "DEPRECATED (superseded by `task swarm:routing-set` / `task verify:routing`, #1739). Was: Probe sub-agent backend ids, role capabilities, and availability (#1531a). -- task policy:subagent-backends [-- --format=json]"
|
|
69
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
70
|
+
deps:
|
|
71
|
+
- task: :ts:build
|
|
72
|
+
cmds:
|
|
73
|
+
- cmd: echo "[deft deprecation] task policy:subagent-backends is superseded by 'task verify:routing -- --advise' and 'task swarm:routing-set' (#1739). The swarmSubagentBackend enum is no longer the active routing surface." 1>&2
|
|
74
|
+
silent: true
|
|
75
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" policy-set subagent-backends {{.CLI_ARGS}} --project-root "{{.USER_WORKING_DIR}}"
|
package/tasks/pr.yml
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
vars:
|
|
4
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
5
|
+
|
|
6
|
+
# pr:* tasks for PR-level merge-discipline checks.
|
|
7
|
+
#
|
|
8
|
+
# pr:check-protected-issues is the Taskfile-level encoding of the Layer 3
|
|
9
|
+
# pre-merge protected-issue link inspection from
|
|
10
|
+
# skills/deft-directive-swarm/SKILL.md Phase 6 Step 1 (#701). Per the Rule
|
|
11
|
+
# Authority [AXIOM] block in main.md, deterministic and Taskfile encodings
|
|
12
|
+
# rank above prose -- this target wraps the canonical
|
|
13
|
+
# gh pr view <N> --json closingIssuesReferences
|
|
14
|
+
# query so a swarm monitor (or any operator) can verify in one command that
|
|
15
|
+
# no protected (umbrella / staying-OPEN) issue is GitHub-side linked to the
|
|
16
|
+
# PR before squash-merging.
|
|
17
|
+
#
|
|
18
|
+
# Companion script: scripts/pr_check_protected_issues.py
|
|
19
|
+
# Companion test: tests/cli/test_pr_check_protected_issues.py
|
|
20
|
+
|
|
21
|
+
tasks:
|
|
22
|
+
check-protected-issues:
|
|
23
|
+
desc: "Verify NO protected (umbrella / staying-OPEN) issue is GitHub-side linked to a PR before squash merge (#701)"
|
|
24
|
+
deps: [":ts:build"]
|
|
25
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
26
|
+
cmds:
|
|
27
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pr-protected-issues {{.CLI_ARGS}}
|
|
28
|
+
|
|
29
|
+
# pr:check-closing-keywords -- Layer 0 (prevention) closing-keyword
|
|
30
|
+
# negation-context lint introduced by #737. Refuses to push when the
|
|
31
|
+
# PR body or any commit message contains a closing-keyword token in a
|
|
32
|
+
# negation / quotation / example / code-block context. Pairs with the
|
|
33
|
+
# existing Layer 3 (recovery) ``pr:check-protected-issues`` (#701).
|
|
34
|
+
#
|
|
35
|
+
# Per ``conventions/task-caching.md`` (#574): NO ``sources:`` /
|
|
36
|
+
# ``generates:`` because user-facing recovery flags (``--pr``,
|
|
37
|
+
# ``--body-file``, ``--commits-file``, ``--allow-known-false-positives``)
|
|
38
|
+
# MUST NOT be silently swallowed by go-task's incremental-build cache.
|
|
39
|
+
check-closing-keywords:
|
|
40
|
+
desc: "Scan PR body + commit messages for closing-keyword substrings in negation/quotation/example contexts that would trigger Layer 0 false-positive auto-closes (#737)"
|
|
41
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
42
|
+
deps: [":ts:build"]
|
|
43
|
+
env:
|
|
44
|
+
PYTHONUTF8: "1"
|
|
45
|
+
cmds:
|
|
46
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pr-closing-keywords {{.CLI_ARGS}}
|
|
47
|
+
|
|
48
|
+
# pr:merge-ready -- programmatic Greptile-body verdict gate. Closes the
|
|
49
|
+
# SUCCESS-with-findings blind spot in the Phase 5 -> 6 merge-readiness
|
|
50
|
+
# checklist. Parses the Greptile rolling-summary comment body (NOT the
|
|
51
|
+
# CheckRun status) for confidence, P0/P1 findings, errored sentinel
|
|
52
|
+
# (#526), and HEAD-SHA freshness. Companion to the swarm SKILL Phase 6
|
|
53
|
+
# Step 1 prose rule. PR #652 incident motivated this gap-closer.
|
|
54
|
+
#
|
|
55
|
+
# Companion script: scripts/pr_merge_readiness.py
|
|
56
|
+
# Companion test: tests/cli/test_pr_merge_readiness.py
|
|
57
|
+
merge-ready:
|
|
58
|
+
desc: "Verify a PR's Greptile review body satisfies the merge exit condition (confidence >3, no P0/P1, HEAD-SHA fresh, not errored)"
|
|
59
|
+
deps: [":ts:build"]
|
|
60
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
61
|
+
cmds:
|
|
62
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pr-merge-readiness {{.CLI_ARGS}}
|
|
63
|
+
|
|
64
|
+
# pr:wait-mergeable-and-merge -- cascade automation surface (#1369).
|
|
65
|
+
# Wraps scripts/pr_wait_mergeable.py which composes the resilient
|
|
66
|
+
# wait-until-ready monitor (#1368) and the Layer-3 protected-issue
|
|
67
|
+
# link inspector (#701) into a single end-to-end primitive so a swarm
|
|
68
|
+
# monitor can request "wait until this PR is mergeable, then merge it"
|
|
69
|
+
# without hand-rolling the loop. The companion script invokes
|
|
70
|
+
# scripts/pr_check_protected_issues.py (Layer-3 #701) BEFORE the wait
|
|
71
|
+
# loop when --protected is supplied, so a persistent
|
|
72
|
+
# closingIssuesReferences link short-circuits the cascade with exit 1
|
|
73
|
+
# ahead of any gh pr merge call. Cascade automation on the Grok Build
|
|
74
|
+
# hybrid path MUST go through this surface per the AGENTS.md
|
|
75
|
+
# `## Cascade automation surface (#1369)` rule.
|
|
76
|
+
#
|
|
77
|
+
# Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
|
|
78
|
+
# because user-facing flags (`--cap-minutes` / `--protected` / `--repo`
|
|
79
|
+
# / `--json`) MUST NOT be silently swallowed by go-task's incremental-
|
|
80
|
+
# build cache.
|
|
81
|
+
#
|
|
82
|
+
# Companion script: scripts/pr_wait_mergeable.py
|
|
83
|
+
# Companion test: tests/cli/test_pr_wait_mergeable.py
|
|
84
|
+
wait-mergeable-and-merge:
|
|
85
|
+
desc: "Wait until PR is mergeable (resilient cascade, #1368) and squash-merge with admin (#1369); Layer-3 protected-issue check (#701) chains before any merge call"
|
|
86
|
+
deps: [":ts:build"]
|
|
87
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
88
|
+
cmds:
|
|
89
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" pr-wait-mergeable {{.CLI_ARGS}}
|
package/tasks/prd.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
vars:
|
|
4
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
5
|
+
|
|
6
|
+
# prd:render task.
|
|
7
|
+
#
|
|
8
|
+
# IMPORTANT: explicit absolute paths are passed for BOTH the input spec and
|
|
9
|
+
# the output PRD.md so a stray ``dir:`` or ``CWD`` mis-resolution can never
|
|
10
|
+
# cause the framework's own ``deft/PRD.md`` to be silently overwritten from
|
|
11
|
+
# a consumer project (#539). Standardised on ``node .../bin.js prd-render`` --
|
|
12
|
+
# the prior ``python3`` invocation was inconsistent with every other task and
|
|
13
|
+
# caused sporadic PATH issues on Windows.
|
|
14
|
+
|
|
15
|
+
tasks:
|
|
16
|
+
_ts-build:
|
|
17
|
+
internal: true
|
|
18
|
+
desc: "Build @deftai/cli dist/ before TS-backed render gates run (#1854 s2)."
|
|
19
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
20
|
+
cmds:
|
|
21
|
+
- pnpm --dir "{{.DEFT_ROOT}}" run build
|
|
22
|
+
|
|
23
|
+
render:
|
|
24
|
+
# Caching: intentionally absent. `prd:render` runs in <30ms and its
|
|
25
|
+
# CLI_ARGS carry recovery flags (e.g. `--force` from the #539
|
|
26
|
+
# refuse-to-overwrite safety check). Declaring `sources:` / `generates:`
|
|
27
|
+
# would cause go-task to short-circuit before `cmds:` runs, dropping
|
|
28
|
+
# CLI_ARGS and silently breaking the #539 recovery path (#573, #574).
|
|
29
|
+
# See deft/conventions/task-caching.md for the full rule.
|
|
30
|
+
desc: Export plan.narratives from specification.vbrief.json to a read-only PRD.md
|
|
31
|
+
summary: |
|
|
32
|
+
Reads specification.vbrief.json and extracts plan.narratives into a
|
|
33
|
+
human-readable PRD.md for stakeholder export. PRD.md is never
|
|
34
|
+
authoritative -- the vBRIEF is the source of truth.
|
|
35
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
36
|
+
deps:
|
|
37
|
+
- _ts-build
|
|
38
|
+
cmds:
|
|
39
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" prd-render --spec "{{.USER_WORKING_DIR}}/vbrief/specification.vbrief.json" --output "{{.USER_WORKING_DIR}}/PRD.md" {{.CLI_ARGS}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
vars:
|
|
4
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
5
|
+
|
|
6
|
+
# project:render task.
|
|
7
|
+
#
|
|
8
|
+
# Fixed #539: the task previously used ``{{.ROOT_DIR}}`` which is deft's
|
|
9
|
+
# own repo root when invoked via ``includes:`` -- consumers got their data
|
|
10
|
+
# scanned from ``deft/vbrief/``. Switched to ``{{.USER_WORKING_DIR}}`` to
|
|
11
|
+
# match the convention used by roadmap:render / spec:render / migrate:vbrief.
|
|
12
|
+
|
|
13
|
+
tasks:
|
|
14
|
+
_ts-build:
|
|
15
|
+
internal: true
|
|
16
|
+
desc: "Build @deftai/cli dist/ before TS-backed render gates run (#1854 s2)."
|
|
17
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
18
|
+
cmds:
|
|
19
|
+
- pnpm --dir "{{.DEFT_ROOT}}" run build
|
|
20
|
+
|
|
21
|
+
render:
|
|
22
|
+
desc: Regenerate PROJECT-DEFINITION.vbrief.json items registry from lifecycle folders
|
|
23
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
24
|
+
deps:
|
|
25
|
+
- _ts-build
|
|
26
|
+
cmds:
|
|
27
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" project-render "{{.USER_WORKING_DIR}}/vbrief"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
vars:
|
|
4
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
5
|
+
|
|
6
|
+
# reconcile issues task.
|
|
7
|
+
#
|
|
8
|
+
# IMPORTANT: runs from the consumer project root (``dir:
|
|
9
|
+
# '{{.USER_WORKING_DIR}}'``) so ``gh`` and ``git`` commands executed by
|
|
10
|
+
# ``scripts/reconcile_issues.py`` resolve against the CONSUMER's remote,
|
|
11
|
+
# not deftai/directive (#538). Script path dispatched via {{.DEFT_ROOT}}
|
|
12
|
+
# (defined locally in this file's `vars:` block via
|
|
13
|
+
# ``{{joinPath .TASKFILE_DIR ".."}}`` -- see ../Taskfile.yml for why
|
|
14
|
+
# root-level definition is avoided) to keep the path traversal-free and
|
|
15
|
+
# avoid the {{.TASKFILE_DIR}}/.. form that breaks on Windows under
|
|
16
|
+
# `uv --project "{{.DEFT_ROOT}}" run python` (#566).
|
|
17
|
+
|
|
18
|
+
tasks:
|
|
19
|
+
_ensure-ts:
|
|
20
|
+
internal: true
|
|
21
|
+
desc: "Build the TS engine before reconcile gates (#1828 s4)"
|
|
22
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
23
|
+
cmds:
|
|
24
|
+
- pnpm --dir "{{.DEFT_ROOT}}" run build
|
|
25
|
+
|
|
26
|
+
issues:
|
|
27
|
+
desc: "Reconcile GitHub issues against vBRIEF references -- report linked, unlinked, and resolved"
|
|
28
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
29
|
+
deps:
|
|
30
|
+
- _ensure-ts
|
|
31
|
+
cmds:
|
|
32
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" reconcile-issues --vbrief-dir "{{.USER_WORKING_DIR}}/vbrief" --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
# tasks/relocate.yml -- wipe-and-reinstall relocator surface (#992 PR2).
|
|
4
|
+
#
|
|
5
|
+
# Wires `task relocate` to scripts/relocate.py with full {{.CLI_ARGS}}
|
|
6
|
+
# pass-through so operators can compose flags as documented in the script
|
|
7
|
+
# docstring (--project-root / --framework-source / --force / --confirm /
|
|
8
|
+
# --no-confirm / --dry-run / --rollback / --snapshot / --no-snapshot /
|
|
9
|
+
# --json / --quiet).
|
|
10
|
+
#
|
|
11
|
+
# Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
|
|
12
|
+
# declarations because user-facing recovery flags (`--force`, `--confirm`,
|
|
13
|
+
# `--rollback`, `--dry-run`) flow via {{.CLI_ARGS}} -- a go-task cache
|
|
14
|
+
# short-circuit would silently drop the recovery flag and leave the
|
|
15
|
+
# operator following the docs against an exit-0 no-op (the same hazard
|
|
16
|
+
# `task prd:render -- --force` hit at #574).
|
|
17
|
+
#
|
|
18
|
+
# Path resolution uses the same {{.TASKFILE_DIR}} / joinPath idiom every
|
|
19
|
+
# other fragment uses (#566) so the dispatch resolves correctly under
|
|
20
|
+
# Windows / macOS / Linux. The dispatched script lives at
|
|
21
|
+
# {{.DEFT_ROOT}}/scripts/relocate.py with helper modules at
|
|
22
|
+
# {{.DEFT_ROOT}}/scripts/_relocate_states.py and
|
|
23
|
+
# {{.DEFT_ROOT}}/scripts/_relocate_snapshot.py.
|
|
24
|
+
#
|
|
25
|
+
# Usage notes for operators:
|
|
26
|
+
#
|
|
27
|
+
# - Bare invocation against a project root that needs relocating prompts
|
|
28
|
+
# `[y/N]` on stdin (auto-prompt never auto-wipe per the active vBRIEF).
|
|
29
|
+
# - For scripted use, pass `--confirm` to skip the prompt (or
|
|
30
|
+
# `--no-snapshot` for hermetic test fixtures).
|
|
31
|
+
# - For consumer projects: the canonical entry point is the webinstaller
|
|
32
|
+
# bootstrap (`upgrade.sh` / `upgrade.ps1` in the separate `webinstaller`
|
|
33
|
+
# repo) which fetches a fresh framework copy to a temp dir and runs the
|
|
34
|
+
# relocator from THAT copy -- the in-place framework about to be wiped
|
|
35
|
+
# never executes its own wipe.
|
|
36
|
+
# - `task relocate -- --rollback` extracts the most recent snapshot back
|
|
37
|
+
# into project root.
|
|
38
|
+
#
|
|
39
|
+
# Companion script: scripts/relocate.py
|
|
40
|
+
# Companion tests: tests/relocate/test_state_matrix.py
|
|
41
|
+
# tests/relocate/test_preflight.py
|
|
42
|
+
# Refs: #992 (parent issue), #11 (.deft/core/ origin),
|
|
43
|
+
# #768 (managed-section v2 contract), #794 (_wrap_legacy_in_markers),
|
|
44
|
+
# #884 (consent-gate convention).
|
|
45
|
+
|
|
46
|
+
vars:
|
|
47
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
48
|
+
|
|
49
|
+
tasks:
|
|
50
|
+
relocate:
|
|
51
|
+
desc: "Wipe-and-reinstall relocator (#992 PR2) -- task relocate [-- --confirm | --dry-run | --force | --rollback | --json | --quiet]"
|
|
52
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
53
|
+
env:
|
|
54
|
+
PYTHONUTF8: "1"
|
|
55
|
+
cmds:
|
|
56
|
+
- uv --project "{{.DEFT_ROOT}}" run python "{{.DEFT_ROOT}}/scripts/relocate.py" {{.CLI_ARGS}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
vars:
|
|
4
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
5
|
+
|
|
6
|
+
# roadmap tasks -- consumer-safe CWD + script resolution (#539, #540, #566).
|
|
7
|
+
# Scripts are dispatched via {{.DEFT_ROOT}} (defined locally in this file's
|
|
8
|
+
# `vars:` block via ``{{joinPath .TASKFILE_DIR ".."}}`` -- see
|
|
9
|
+
# ../Taskfile.yml for why root-level definition is avoided) to keep the
|
|
10
|
+
# path traversal-free and avoid the {{.TASKFILE_DIR}}/.. form that breaks
|
|
11
|
+
# on Windows under `uv --project "{{.DEFT_ROOT}}" run python` (#566).
|
|
12
|
+
|
|
13
|
+
tasks:
|
|
14
|
+
render:
|
|
15
|
+
desc: Render ROADMAP.md from vbrief/pending/ (Active) and vbrief/completed/ (Completed) lifecycle folders
|
|
16
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
17
|
+
deps:
|
|
18
|
+
- task: :ts:build
|
|
19
|
+
cmds:
|
|
20
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" roadmap-render "{{.USER_WORKING_DIR}}/vbrief/pending" "{{.USER_WORKING_DIR}}/ROADMAP.md"
|
|
21
|
+
|
|
22
|
+
check:
|
|
23
|
+
desc: Verify ROADMAP.md matches what roadmap:render would produce
|
|
24
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
25
|
+
deps:
|
|
26
|
+
- task: :ts:build
|
|
27
|
+
cmds:
|
|
28
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" roadmap-render "{{.USER_WORKING_DIR}}/vbrief/pending" "{{.USER_WORKING_DIR}}/ROADMAP.md" --check
|
package/tasks/scm.yml
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
# ---------------------------------------------------------------------------
|
|
4
|
+
# scm.yml -- STUB for #883 v1 cache layer (Story 1) + #976 REST opt-in + #1555 safe body posting.
|
|
5
|
+
#
|
|
6
|
+
# DO NOT EXTEND except for the narrow #1555 body-posting carve-out below.
|
|
7
|
+
#
|
|
8
|
+
# The full scm:* task namespace lives at #881; this file is replaced wholesale
|
|
9
|
+
# when #881 lands. The stub exposes the minimum surface the #883 v1 cache
|
|
10
|
+
# consumer (Story 2 cache:fetch-all) needs:
|
|
11
|
+
#
|
|
12
|
+
# - scm:issue:list (thin wrapper over `ghx|gh issue list`)
|
|
13
|
+
# - scm:issue:view (thin wrapper over `ghx|gh issue view`)
|
|
14
|
+
# - scm:issue:close (thin wrapper over `ghx|gh issue close`)
|
|
15
|
+
# - scm:issue:edit (thin wrapper over `ghx|gh issue edit`)
|
|
16
|
+
# - scm:body:* (#1555 safe Markdown body posting via github-body TS CLI)
|
|
17
|
+
#
|
|
18
|
+
# Each command is a thin pass-through to `ghx <verb>` (when ghx is on PATH)
|
|
19
|
+
# or `gh <verb>` (fallback). Output JSON via the consumer-supplied --json
|
|
20
|
+
# flag. The JSON-shape contract Story 2 depends on is pinned by the
|
|
21
|
+
# tests/test_scm_contract.py contract test against tests/fixtures/scm_issue_view.json.
|
|
22
|
+
#
|
|
23
|
+
# REST opt-in (#976): callers may pass `--rest` to scm:issue:view /
|
|
24
|
+
# scm:issue:list to route the read through scripts/gh_rest.py REST
|
|
25
|
+
# helpers (rest_issue_view / rest_issue_list) instead of forwarding to
|
|
26
|
+
# `ghx|gh issue view|list`. This sidesteps the GraphQL bucket entirely so
|
|
27
|
+
# a depleted graphql.remaining no longer fails read-only smoke / cache
|
|
28
|
+
# flows. The REST shape differs from the gh --json GraphQL shape (REST
|
|
29
|
+
# emits user/created_at/lowercase state vs GraphQL author/createdAt/
|
|
30
|
+
# uppercase state); only callers that opt in see the REST shape. Story 2
|
|
31
|
+
# cache:fetch-all keeps the legacy (GraphQL) path until #881. Mutations
|
|
32
|
+
# (close, edit) keep forwarding to gh -- they have non-trivial flag
|
|
33
|
+
# surfaces (--body-file, --add-label, --remove-label, ...) that this
|
|
34
|
+
# stub deliberately does not re-implement; #881 owns the full surface.
|
|
35
|
+
#
|
|
36
|
+
# Forward-compat marker: the ONLY scm:* surface in v1 is the four issue:*
|
|
37
|
+
# commands above plus the #1555 body-posting safety wrapper. PR commands
|
|
38
|
+
# (scm:pr:list/view/merge/close) and any additional scm:* surface are
|
|
39
|
+
# EXPLICITLY deferred to #881; do not add them here. See
|
|
40
|
+
# vbrief/active/2026-05-05-883-story-1-scm-stub.vbrief.json for the full
|
|
41
|
+
# Story 1 scope and vbrief/active/2026-05-05-883-deft-cache-quarantine-v1.vbrief.json
|
|
42
|
+
# for the epic chain context.
|
|
43
|
+
# ---------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
vars:
|
|
46
|
+
# Each included sub-taskfile defines its own DEFT_ROOT mirror so scripts
|
|
47
|
+
# can be dispatched via {{.DEFT_ROOT}}/scripts/<name>.py on every platform
|
|
48
|
+
# (#566). joinPath is evaluated eagerly by go-task templating and yields
|
|
49
|
+
# a native-separator absolute path that uv --project "{{.DEFT_ROOT}}" run python can open on Windows.
|
|
50
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
51
|
+
|
|
52
|
+
# Per `conventions/task-caching.md` (#574): tasks that accept user-facing
|
|
53
|
+
# CLI args via {{.CLI_ARGS}} MUST NOT declare `sources:` / `generates:` --
|
|
54
|
+
# the cached cmds skip would silently discard the recovery flag.
|
|
55
|
+
tasks:
|
|
56
|
+
issue:list:
|
|
57
|
+
desc: "[#883 stub] List issues -- task scm:issue:list -- [--rest] --repo OWNER/NAME --json number,title,state,updatedAt [--state ...] (#976 --rest routes via REST helpers; default forwards to ghx|gh)"
|
|
58
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
59
|
+
deps:
|
|
60
|
+
- task: :ts:build
|
|
61
|
+
cmds:
|
|
62
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" scm issue list {{.CLI_ARGS}}
|
|
63
|
+
|
|
64
|
+
issue:view:
|
|
65
|
+
desc: "[#883 stub] View an issue -- task scm:issue:view -- [--rest] <N> --repo OWNER/NAME --json number,title,body,state,author,createdAt,updatedAt,labels,comments (#976 --rest routes via REST helpers and emits REST shape; default forwards to ghx|gh GraphQL shape)"
|
|
66
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
67
|
+
deps:
|
|
68
|
+
- task: :ts:build
|
|
69
|
+
cmds:
|
|
70
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" scm issue view {{.CLI_ARGS}}
|
|
71
|
+
|
|
72
|
+
issue:close:
|
|
73
|
+
desc: "[#883 stub] Close an issue -- task scm:issue:close -- <N> --repo OWNER/NAME [--comment ...]"
|
|
74
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
75
|
+
deps:
|
|
76
|
+
- task: :ts:build
|
|
77
|
+
cmds:
|
|
78
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" scm issue close {{.CLI_ARGS}}
|
|
79
|
+
|
|
80
|
+
issue:edit:
|
|
81
|
+
desc: "[#883 stub] Edit an issue -- task scm:issue:edit -- <N> --repo OWNER/NAME [--add-label ...] [--body ...]"
|
|
82
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
83
|
+
deps:
|
|
84
|
+
- task: :ts:build
|
|
85
|
+
cmds:
|
|
86
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" scm issue edit {{.CLI_ARGS}}
|
|
87
|
+
|
|
88
|
+
body:issue:create:
|
|
89
|
+
desc: "[#1555] Safely create an issue body from --body-file without shell Markdown interpolation"
|
|
90
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
91
|
+
deps:
|
|
92
|
+
- task: :ts:build
|
|
93
|
+
cmds:
|
|
94
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" github-body issue-create {{.CLI_ARGS}}
|
|
95
|
+
|
|
96
|
+
body:issue:edit:
|
|
97
|
+
desc: "[#1555] Safely edit an issue body from --body-file and live gh read-back"
|
|
98
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
99
|
+
deps:
|
|
100
|
+
- task: :ts:build
|
|
101
|
+
cmds:
|
|
102
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" github-body issue-edit {{.CLI_ARGS}}
|
|
103
|
+
|
|
104
|
+
body:comment:create:
|
|
105
|
+
desc: "[#1555] Safely create an issue/PR comment body from --body-file and live gh read-back"
|
|
106
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
107
|
+
deps:
|
|
108
|
+
- task: :ts:build
|
|
109
|
+
cmds:
|
|
110
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" github-body comment-create {{.CLI_ARGS}}
|
|
111
|
+
|
|
112
|
+
body:comment:edit:
|
|
113
|
+
desc: "[#1555] Safely edit an issue comment body from --body-file and live gh read-back"
|
|
114
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
115
|
+
deps:
|
|
116
|
+
- task: :ts:build
|
|
117
|
+
cmds:
|
|
118
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" github-body comment-edit {{.CLI_ARGS}}
|
|
119
|
+
|
|
120
|
+
body:pr:edit:
|
|
121
|
+
desc: "[#1555] Safely edit a PR body from --body-file and live gh read-back"
|
|
122
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
123
|
+
deps:
|
|
124
|
+
- task: :ts:build
|
|
125
|
+
cmds:
|
|
126
|
+
- node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" github-body pr-edit {{.CLI_ARGS}}
|