Commit Graph
41 Commits
Author SHA1 Message Date
agent-exec-transport 63e11ea312 agent-exec transport 8c36954f5b4fe6129e117666f9114c7b/7cc66ad08d16 2026-10-17 06:26:30 +00:00
agent-exec-transport 74a834c786 agent-exec transport cd4961f74af64c6ebd54c5fd0bf27d27/d63165e5e315 2026-10-16 18:12:57 +00:00
agent-exec-transport 602cba9373 agent-exec transport b918a843562d4d29b3efc3da6ee19803/557f53579497 2026-10-16 16:21:24 +00:00
agent-exec-transport 56df3b11b7 agent-exec transport e8ba59dd3e1444a79fdda6e7f21ed7bd/7c8fcf53d035 2026-10-16 08:28:08 +00:00
weichen 818e17f421 Remove host fallback and enforce strict normal routes
Why: The approved contract requires exactly three safe attempts for Cursor, agy, and PI, then one Codex emergency attempt, never host implementation authority.

Evidence: Routing/config tests were RED for never, max attempts, forbidden adapters, and legacy host fallback; 133 related tests now pass with one opt-in probe skipped.

Impact: Normal emergency-mode roles reject all non-Cursor/agy/PI adapters, project fallback is never, and Codex remains available through emergency/review paths.

Refs: independent Codex review of feature/agent-cli-enforcement
2026-10-15 18:45:08 +00:00
weichen 11973f5244 Require CLI provenance without constraining agent reasoning
Why: Agents must use configured CLIs for implementation and testing, while remaining free to inspect, plan, test, and iterate within bounded scope.

Evidence: Task-card contract tests and the full 430-test governance discovery pass with 19 existing skips; diff-check passes.

Impact: Defines three safe attempts per normal CLI, one emergency Codex attempt, fail-stop terminals, and mandatory apply/admit integration.

Refs: feature/agent-cli-enforcement
2026-10-15 17:24:58 +00:00
weichen 0f4c5c017d Route project work through configured agents
Why: replace fixed Cursor execution authority with project-configured agent routing
Evidence: focused task-card contract, agent-exec validation, governance regression, and diff check
Impact: updates project policy, task templates, capability records, and current task metadata
Refs: U4; docs/superpowers/plans/2026-10-15-project-agent-execution.md
2026-10-15 05:03:14 +00:00
weichen d79d6c17e9 Require Cursor for every implementation unit
Why: Ensure implementation authorship is delegated per unit while the primary model remains responsible for planning and delivery management.

Evidence: The focused task-card generation regression went red then green, and git diff --check passed.

Impact: Every repository-writing implementation unit gets a fresh Cursor CLI run; unavailable or failed Cursor work is recorded as a blocker instead of being silently implemented by the primary model.

Refs: .task/feature-goal-first-delivery.md
2026-10-14 17:10:20 +00:00
weichen 90265ac670 Prioritize task goals and usable delivery
Why: Keep authorized work focused on its stated outcome, prevent private scope expansion, and remove mechanical human stage gates.

Evidence: make test-governance passed 344 tests with 18 environment-dependent skips; receipt is recorded in the task card.

Impact: New tasks use goal-first execution while retaining real decision points, independent review, evidence, platform admission, and high-consequence dual keys.

Refs: .task/feature-goal-first-delivery.md
2026-10-14 16:55:04 +00:00
weichen f4eeba1733 Detect squash-merged PRs when closing task cards
Why: card_merge only recognized "Merge ... from <branch> into main"
merge commits, so a PR landed as a squash (real case: #457) left its
task card in .task/ forever; task-close reported nothing to close and
precheck showed no debt. Closing required a manual backfill (PR #541).

Evidence: card_merge now returns sha|subject|pr and falls back to a
Gitea API lookup by head ref or label (deleted branches keep the
original name only in label), gated by merge_commit_sha ancestry in
origin/main; precheck [cards] reuses card_merge so both surfaces agree.
Live probe against production Gitea returns 226a4af15791|Reset
per-service runtime state in svc.sh env_config|457 for
feature/svc-pidcheck-leak; stub-server tests cover squash landing,
decoy skip and the not-on-main refusal; full governance suite follows
in-card evidence.

Impact: scripts/task.sh close and precheck detect squash-merged cards
when GITEA_TOKEN is set (merge-commit path unchanged without token);
tests/test_task.py adds two regressions; no protocol change for
existing merge-commit closures beyond the appended pr field.

Refs: card-merge-misses-squash-merges (memory); PR #541 manual closure.
2026-10-14 07:53:52 +00:00
weichen 3b0e100fba Fix facts registry commands and make precheck parsing escape-aware
ci / svc-realcombo (pull_request) Successful in 1m59s
ci / test (pull_request) Successful in 5m13s
ci / test-pg (pull_request) Successful in 8m6s
Why: F2 token extraction predates the two-section (HOME/IMC) layout of
~/.secrets/gitea so it concatenated both tokens and always failed; F6
registered a grep BRE alternation that facts-verify unescapes into a
literal pipe, failing re-verification and misaligning precheck's naive
pipe split into a spurious F6 date-format expiry warning, while both
underlying facts still hold.

Evidence: make facts-verify now 6/6 PASS with last_verified refreshed
to 2026-10-14; new regression test for escaped pipes in facts rows;
full governance suite 342 tests OK (18 skipped); precheck [facts] line
reports all facts fresh on the fixed parser.

Impact: policy/facts.md F2 (HOME-section awk extraction) and F6
(negated pipe-free grep); scripts/task.sh precheck neutralizes escaped
pipes the same way facts-verify does; tests/test_task.py covers it.

Refs: precheck WARN 过期事实 F6(日期格式); AGENTS.md 证据与验证门禁.
2026-10-14 06:13:51 +00:00
weichen deff43ae59 Close trial task cards and keep long histories visible
Why: pipefail treated a recent merged-card match as a failed git log after grep exited early, hiding completed cards from precheck and task-close.

Evidence: A disposable long-history regression failed before the fix and passed after it; make test-governance passed 341 cases. Git history confirms PR #489/#488/#486 merge SHAs.

Impact: Detect merged cards reliably and archive only the three authorized trial cards; four unrelated eligible cards remain untouched.

Refs: Dev merge queue #518; Dev #489, #488, #486
2026-10-14 04:50:06 +00:00
weichen 4629b871db Connect delivery windows and recovery to the repository rules
Why: agents need consistent entrypoints and recording defaults to avoid retrying synchronization and CI outside the final delivery window.

Evidence: SELF generated-task-card red-green regression and governance suite recorded through make evidence; pending shared record created as Issue #518.

Impact: rules, task template and capability matrix stay explicit about pending activation, default strict startup, manual coordination and unchanged CI triggers.

Refs: U4; policy/merge-queue.md; .task/feature-merge-queue-policy-draft.md
2026-10-13 08:21:46 +00:00
weichen eb46bbb296 Separate local task recovery from delivery readiness
Why: an existing authorized task should not merge a moving target merely to resume local work, while new task startup and delivery remain strict.

Evidence: SELF red-green recovery and environment regressions; task, recovery, evidence and local-mode write-guard suites passed through make evidence.

Impact: add explicit LOCAL_READY and task-resume, validate worktree/card/baseline and receipt purpose, preserve schema 1 and prevent local receipts from starting or releasing tasks.

Refs: U2; policy/merge-queue.md; .task/feature-merge-queue-policy-draft.md
2026-10-13 07:42:12 +00:00
weichen 03cbeac8e6 Avoid new commits when the task already contains the integration baseline
Why: repeated task-sync calls changed HEAD and invalidated CI even when main had not advanced.

Evidence: SELF red-green regression and 58 task lifecycle tests recorded through make evidence in the task card.

Impact: sync still fetches and validates components, creates records only for an actual merge, and reports the complete final source SHA.

Refs: U1; policy/merge-queue.md; .task/feature-merge-queue-policy-draft.md
2026-10-13 07:05:06 +00:00
weichen ab622e5bc8 Delegate reviewed PR merges to agents after conflict and CI checks
Why: make the agent responsible for merging reviewed PRs without another human merge step.

Evidence: SELF governance and generated-card checks are captured in .task/feature-agent-pr-merge.md; CI remains required on the final PR HEAD.

Impact: update project delivery policy, agent entry points, task metadata and closure guidance; preserve platform protection and scoped authorization.

Refs: .task/feature-agent-pr-merge.md; user instruction on 2026-10-12
2026-10-12 12:35:31 +00:00
weichen 908504e8b5 Connect long-term plans to task completion
Why: preserve project direction across tasks and require grounded next-task recommendations.

Evidence: the generated task-card regression fails before the template update and passes afterward; original SELF receipts are in the task card.

Impact: document the planning entrypoint and extend task records without granting new-task execution rights.

Refs: .task/feature-goal-continuity.md; policy/delivery.md
2026-10-07 06:10:51 +00:00
weichen 14c55def98 Preserve delivery references after task archival
Why: archived task cards change directory and must retain an unambiguous policy reference.

Evidence: review finding 1, focused red-green proof and 104 passing governance tests are preserved in the task card.

Impact: use a repository-root text reference; record the completed review and its resolved finding.

Refs: .task/feature-iterative-delivery.md; .task/reviews/iterative-delivery.json
2026-10-07 03:10:09 +00:00
weichen 1ac79c2a90 Define iterative delivery with explicit stage reviews
Why: make requirements, experiments and implementation revisions reviewable while retaining bounded continuous authorization.

Evidence: task-card SELF receipts include expected red regressions and 104 passing governance checks; full candidate verification follows.

Impact: add project delivery policy and generated task fields; make post-merge reminders read-only.

Refs: .task/feature-iterative-delivery.md; policy/delivery.md
2026-10-07 02:53:20 +00:00
weichen c1fdf0141c Merge current main while preserving governance repairs
Why: main advanced with merged-task-name and legacy evidence guards during this task.

Evidence: SELF 44 lifecycle regressions pass after resolving both hunks; independent review repairs are recorded in the task card.

Impact: retains both task-start protections and the stronger JSON/legacy receipt reader, without rewriting either branch history.

Refs: Dev PR #211 and #212; .task/feature-governance-reliability.md
2026-10-05 13:11:50 +00:00
weichen b84667a697 Close review gaps in cleanup and evidence handling
Why: independent review found shared submodule metadata risk, quoted header leakage, stale JSON receipt blindness and missing abandon coverage.

Evidence: SELF 92 governance regressions pass; the original review receipt and replay output are recorded in the task card.

Impact: preserves external component worktrees, handles both evidence formats and adds targeted failure-path coverage; no product behavior changes.

Refs: .task/feature-governance-reliability.md; .task/reviews/governance-reliability.json
2026-10-05 13:07:10 +00:00
weichen 8af945a1d5 Make development gates preserve work and verifiable evidence
Why: cleanup, component synchronization, receipt recording and credential handling could contradict the documented development boundaries.

Evidence: SELF 75 isolated governance tests and source checks are captured in .task/feature-governance-reliability.md; combination and CI verification follow.

Impact: hardens local task and CI tooling, aligns policy and component documentation, and adds continuous regression tests without changing product behavior.

Refs: .task/feature-governance-reliability.md; policy/governance.md; policy/platform-admission.md
2026-10-05 12:36:02 +00:00
weichen 1e0508e8a7 Skip non-hex cells in the sync evidence scan
Why: 证据命令含 || 时 evidence.sh 把表格单元格里的管道转义为 \|\|,cmd_sync 按裸 |
切行把碎片当 HEAD 传给 git diff,fatal 128 在 set -e 下杀死 sync(本卡功能负例行实测触发,
task-sync 门禁被卡死)。
Evidence: bash -n 通过;含转义管道行的本卡上 bash scripts/task.sh sync 正常完成(WARN 照发、
exit 0);修复后 make test 全链重跑。
Impact: 仅 cmd_sync 证据扫描加十六进制过滤;WARN 语义不变。
Refs: 本卡 12:30-12:32 五次 sync 中毒复现记录。
2026-10-05 12:33:06 +00:00
weichen e58035a8e4 Guard task-start against reusing a merged branch name
Why: 合入后再 task-start 同名分支会从新 main 长出第二段历史并覆盖已合入任务卡
(2026-10-05 EXT-1 复核轮实测,两轮证据差点丢失);原校验只看本地分支能否创建。
Evidence: bash -n 通过;功能负例——start feature/ext-1-inproc-handler 被拒且无
worktree 副作用;make test 全链 exit 0;task-sync 基线 43d33aa。
Impact: 仅 scripts/task.sh cmd_start 增加已合入同名分支检查,其余子命令行为不变。
Refs: EXT-1 任务卡复核轮记录(.task/archive/feature-ext-1-inproc-handler.md)。
2026-10-05 12:30:25 +00:00
weichen 0123cec450 Sharpen the sync evidence warning to non-card changes only
Why: evidence rows are written before their containing card commit, so a naive
HEAD-diff would flag every task's evidence as stale and train people to ignore
the warning.

Evidence: bash -n clean; the live task-sync for this task exercises the new
path (warning fires only when a non-.task diff follows an evidence row's HEAD).

Impact: scripts/task.sh cmd_sync now excludes .task from the staleness diff;
AGENTS.md wording aligned (three-output evidence via make evidence).

Refs: task card evidence table; guidelines verification.md tool-written rule.
2026-10-05 10:51:39 +00:00
weichen efa701279f Fix evidence CMD quoting and record first tool self-tests
Why: the make-variable pass-through re-quoted CMD and broke any command
containing quotes (caught by the redaction self-test before it could run).

Evidence: redaction self-test now records 'token <redacted> hello' with quoting
intact (row sha256 aae6a895); negative 'false' case earlier recorded exit=1
row and propagated rc — both in the task card evidence table.

Impact: CMD now travels via environment (CMD="..." make evidence); SRC/TAIL
stay make variables; usage strings updated in Makefile/AGENTS.md/task.sh
template comment.

Refs: task card evidence table; guidelines draft.10 tool-written-evidence rule.
2026-10-05 10:48:31 +00:00
weichen ba83a17c11 Add evidence gates: facts registry, evidence tooling, and precheck checks
Why: declarations were passing as capability; hand-transcribed outputs flowed
through cards and PR bodies as if they were execution evidence, and stale
external facts (e.g. the dead git-panel host) kept being trusted until burned.

Evidence: guidelines draft.10 (PR Development-Guidelines#4, merged af199ee)
pinned here; policy/facts.md F1-F4 each re-verified on 2026-10-05 before
registration (endpoint version, token HTTP 200 via header only, SSH ls-remote,
dead-host negative probe); scripts syntax-checked (bash -n); tool self-tests
and make test recorded in the task card via the new make evidence.

Impact: new AGENTS.md section (SELF/REPLAY/GATE, tool-written evidence,
replay-on-review, zero-trust facts, honest-empty); make evidence/facts-verify;
precheck gains [hooks]/[facts], task-sync gains stale-evidence-HEAD warning;
task-start cards now embed the evidence table; gitlink advances to draft.10.

Refs: task card .task/feature-evidence-driven-gates.md; guidelines CHANGELOG
0.1.0-draft.10.
2026-10-05 10:47:27 +00:00
weichenandCursor 88d5787f29 Compare pin trees offline and archive finished task cards
ci / test (pull_request) Failing after 1m0s
Why: Merge commits share a tree with the pinned feature commit, the import ratchet downloaded modules during CI, and task sync wrote the checkpoint onto the wrong card.
Evidence: check-pins accepts 6c0f1e8 (same tree as Backend squad 8e987bf) and rejects empty-tree 8db069d; both objects stayed local. An empty GOMODCACHE run of lint-boundaries matches the cached go list, 14 pairs. bash -n scripts/task.sh.
Impact: make pin no longer checks out Backend nested core or agent-command, and a failing pin check does not fail the target. task sync writes the branch card or warns. precheck reports completed-but-unarchived cards and card-close branches older than 24 hours.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 10:19:06 +00:00
weichen aeb9a6a8ea Harden task.sh materialization check and close push retry
Why: two recurring papercuts from 2026-09-30 sessions — (1) task-start treated a zero-exit submodule update as complete, but a worktree could still carry 12 drifted/uninitialized nested submodules that only surfaced at build time; (2) close ran a single git push, so a tunnel hiccup left the card-close branch unpushed and the auto-PR never created (hand-patched twice that day).
Evidence: bash -n clean; smoke start of a throwaway task measured nested drift count explicitly and abandon-path finish recycled worktree and branch cleanly (both PASS); fresh-clone commit identity probe also PASS after setting the global identity outside this repo.
Impact: scripts/task.sh cmd_start (+3-line status check) and cmd_close (one retry on push); no interface change.
Refs: .task/fix-followup-hardening.md
2026-09-30 17:11:40 +00:00
weichen 888aa9471c Retry card-close PR creation instead of failing silently
Why: cmd_close posted the PR with a single curl wrapped in
2>/dev/null || true, so any transient TLS/timeout on the git-home
HTTPS surface left the card-close branch pushed with no PR and no
diagnostics; this hit three times on 2026-09-30 and each needed a
manual API call to recover.

Evidence: bash -n clean; stub-server harness running the block
verbatim (sed-extracted from this file, executed inside the worktree
branch context): ok mode recovers the PR URL on first POST; exists
mode (POST always 500) retries 4x with visible stderr then recovers
the pre-existing open PR via GET ?state=open matching head ref;
fail mode against the retired git-panel host shows four visible
retry notices and falls through to the existing [next] hint.

Impact: scripts/task.sh cmd_close only; precheck/start/sync/finish
untouched; card-close merge authority unchanged (owner merges).
post-merge hook and task-finish auto-close inherit the fix through
the same function.

Refs: task card fix-close-pr-retry
2026-09-30 16:47:53 +00:00
weichen b46d890529 Merge remote-tracking branch 'origin/main' into fix/task-finish-close-followups 2026-09-30 16:01:38 +00:00
weichen c61920a8dc Stop task-finish from uninitializing shared submodule config
Why: cmd_finish ran git submodule deinit --all, but submodule.<name>.url entries live in the shared .git/config — finishing any task silently marked every other checkout and worktree uninitialized (observed twice on 2026-09-30: main checkout uninit=12 after each finish; a parallel session hit it minutes before this fix landed). The deinit serves no purpose: worktree removal with gitlinks is refused regardless, so cleanup already goes through rm -rf + prune. Also aligns AGENTS.md with observed hook behavior (post-merge fires on ff-only pulls too, and its inline close cannot see cards merged remotely until they are pulled), and ignores the ZCode-generated .zcodeignore that tripped the BUSY gate in every session.
Evidence: bash -n clean; abandon-path smoke of the patched script — start + FORCE_ABANDON=1 finish of a throwaway branch left shared submodule url config at 12 entries (pre-fix: 0), main checkout submodule status uninit=0, smoke worktree and branch fully recycled; the smoke close also backfilled a parallel session card left open (gitea-access-facts) via a card-close branch, proving the fallback path.
Impact: scripts/task.sh cmd_finish only (removes one line, updates comment), AGENTS.md card-close paragraph, .gitignore one entry. No product or gitlink change; make test not applicable (repo-level tooling/docs only). web_base default fix intentionally withdrawn from this PR — landed via parallel PR #73.
Refs: .task/fix-task-finish-close-followups.md
2026-09-30 16:00:31 +00:00
weichen 80cddd82d4 Fix stale Gitea host and record access facts in AGENTS.md
Why: the TASK_CARD_WEB_BASE default in scripts/task.sh still pointed at
git-panel.u1680832.nyat.app:30319, which now fails the TLS handshake
(curl exit 35), breaking card-close PR links and API calls; agents also
kept rediscovering hosts and credential locations from scratch each
session.

Evidence: curl https://git-panel...:30319/api/v1/version -> exit 35; curl
https://git-home...:30319/api/v1/version with token from ~/.secrets/gitea
-> {"version":"1.27.3"}; ssh -p 31411 git@git-ssh... -> 'Hi there,
weichen!' with key ~/.ssh/home_gitea (ED25519, fingerprint
SHA256:GYXaOXIMeloQ1fKSfdJ/ndgPQzs/Ix7Hk62ekfkfQ20, key name GMKtec).

Impact: task.sh default web base now resolves to the live host; AGENTS.md
gains a Gitea access-facts section recording hosts plus credential
locations only (no secret values, per baseline hard boundary 2). Follow-up
PRs propagate the same section to the other project repos.

Refs: task card feature-gitea-access-facts
2026-09-30 15:45:22 +00:00
weichen d3893609b7 Fix task worktree path derivation to anchor on the main checkout
Why: cmd_start derived the worktree location from $PWD, so running task.sh start from a repository subdirectory (or inside a task worktree) placed the new worktree at the wrong spot — e.g. scripts-wt-<slug> nested inside the repo.
Evidence: bash -n clean; functional smoke of the patched script from both the main checkout scripts/ subdir and the repo root created ../Agent-System-Dev-wt-<slug> as a sibling of the main checkout (paths asserted; pre-fix subdir run would nest inside the repo); git rev-parse --git-common-dir resolves to the main checkout from both locations (relative ../.git vs absolute).
Impact: scripts/task.sh cmd_start only; from the main checkout root the derived path is identical to before; new worktrees now always land as siblings of the main checkout regardless of invocation directory.
Refs: .task/feature-task-start-rootfix.md
2026-09-30 15:28:14 +00:00
weichen beaefb7549 Add task-card autoclose wiring: close subcommand, post-merge hook, gate reports
Why: 11 merged branches had left their task cards open (bookkeeping debt found on 2026-09-30); closure was manual and never triggered, so card status rotted after each merge.
Evidence: dogfood run of `task.sh close --fold` closed and archived the 11 cards (previous commit); temp-repo matrix 33/33 PASS covering detection, pending-branch idempotence, dirty/no-fold refusals, post-merge auto-close on merge-type pulls, worktree guard, and the full lifecycle (closure PR merge archives cards on main).
Impact: scripts/task.sh (+close, precheck [cards] report, finish-tail trigger), scripts/hooks/post-merge (new), Makefile (+task-close target, setup chmod), AGENTS.md rule; archive fixes correct PR links missed by the first dogfood run; no module or gitlink change.
Refs: task card feature/card-autoclose-r1
2026-09-30 07:12:54 +00:00
weichen 51543046e1 Pin T1 contracts combo and guard task-finish against wrong cwd
Why: Provider repos merged for T1 (core PR#2, agent-command PR#2, frontend
  PR#3, ui PR#3, documents PR#9); gitlinks pinned to those mains. The
  task-finish guard prevents a repeat of the T0 incident where running
  finish from the main checkout deleted it (scripts/task.sh treated $PWD as
  the worktree to remove).

Evidence: make test green on the pinned combo — core, backend 13 pkgs,
  frontend 9, ui 6, agent-command (vet + tests incl. conformance); make build
  produces the binary; combo version string now includes agentcmd SHA.

Impact: combo grows its version traceability; AGENTS.md documents the
  worktree-cwd requirement for finish.

Refs: modules/documents docs/records/2026-09-30-t1-core-cards-commands-verification.md
2026-09-30 06:29:11 +00:00
weichen 7c9c1e7b22 Align task-start guards with precheck and soften uninitialized to warning
Why: the pin-documents flow exposed guard divergence — precheck counted
submodule drift while task-start checked porcelain only, letting a task
start despite a BUSY verdict; and PR#8 overcorrected by treating
uninitialized (-) submodules as BUSY when they only block builds, not
writes.
Evidence: bash -n clean; precheck on this checkout prints tree line with
drift/uninit split and READY verdict; negative path exercised by the
real divergence that started this task.
Impact: precheck warns on uninitialized, BUSY only on +/U; task-start now
refuses on porcelain dirt and +/U drift, matching precheck.
Refs: PR#8; policy/tool-adaptation-matrix.md A1
2026-09-30 03:50:46 +00:00
weichen c2da46e4d2 Harden the gate: uninitialized-submodule detection and platform protection registration
Why: precheck missed uninitialized submodules (git submodule status '-'
prefix), and the branch protection configured today plus the second live
probe outcome must be recorded honestly in the matrices.
Evidence: platform negative: direct push to protected main rejected
(pre-receive hook declined, Logging-System probe); second write-guard probe
confirmed session-start config loading (no hook run in the pre-config
session log).
Impact: precheck sub_dirty now counts '-' prefixed entries; A3 registered
enforced at platform layer across 11 repos; zcode matrix pending-live
annotated with the loading-timing proof.
Refs: policy/tool-adaptation-matrix.md; policy/tool-adaptation-zcode.md
2026-09-30 03:47:24 +00:00
weichen fdf63e3fc8 Fall back to prune-based removal for submodule-bearing worktrees
Why: git unconditionally refuses worktree remove when the tree contains
gitlinks (index-level check; deinit does not bypass it), so the PR#4 fix
path still failed on the second real task.
Evidence: after deinit the worktree was clean and submodule dirs empty, yet
remove refused; rm -rf + worktree prune is the documented workaround and
was proven manually on the empty-list task worktree.
Impact: task-finish now completes the recycle path automatically after its
merge verification; no guard weakened.
Refs: Agent-System-Dev PR#4; policy/tool-adaptation-matrix.md A5
2026-09-30 03:37:01 +00:00
weichen a073b8712c Teach task-finish to recycle submodule-bearing worktrees
Why: git refuses to remove a worktree with initialized submodules; the first
real dogfood run of task-finish hit this on the empty-list fix task.
Evidence: the fix task's worktree recycled only after manual force-remove;
deinit-then-remove path exercised on the same state afterwards.
Impact: finish deinitializes submodules, removes, prunes, and deletes the
remote branch; unmerged-result guard unchanged.
Refs: .task/fix-empty-list-json.md
2026-09-30 03:27:06 +00:00
weichen f31fd5f62d Add the task-startup gate scripts and local hooks
Why: agents skipped triggered reading and wrote into shared checkouts holding
other tasks' in-flight changes; the 2026-09-30 empty-list incident session
found 24 overlapping in-flight files only by accident at first write.
Evidence: positive/negative suite in a real scratch repo passed 19/19
(precheck READY/BUSY/SYNC_REQUIRED, start refuse/establish, hook main/badname/
longsubject refusals, sync checkpoint, finish recycle and abandon double-
confirm); the suite caught three real defects (pipefail empty-grep abort,
worktree gitdir COMMIT_EDITMSG resolution, message checks in the wrong hook
phase).
Impact: make setup enables pre-commit/commit-msg hooks; make precheck/task-
start/task-sync/task-finish provide the governed path; no existing workflow
removed. AGENTS.md carries the resident gate rules.
Refs: Development-Guidelines 0.1.0-draft.7; task card .task/delivery-mechanism.md
2026-09-30 03:11:58 +00:00