You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pact-plugin/commands/orchestrate.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -494,7 +494,19 @@ Agent(
494
494
Completed-phase teammates remain as consultants. Do not shutdown during this workflow.
495
495
496
496
**Before next phase**:
497
-
-[ ] Outputs exist in `docs/preparation/`
497
+
-[ ]**Artifact exists and is non-empty** — for a PREPARE phase that **ran** (not skipped), the expected per-feature artifact at `docs/preparation/{feature}.md` (and any additional produced files, e.g. `environment-model-{feature}.md`) MUST exist on disk and be non-empty before you complete the phase task or emit below. A missing or empty artifact is a **failure to investigate**, not an absence of work: do **NOT** complete the phase, do **NOT** emit, and INVESTIGATE first (specialist wrote to the wrong location, produced nothing, or used a different slug), then resolve it. A **skipped** PREPARE phase is exempt — it legitimately produces no artifact, so neither the check nor the emit applies.
498
+
-[ ]**Emit `artifact_paths`** — before marking the PREPARE phase task completed, glob the worktree's `docs/preparation/` directory and write a path-only `artifact_paths` journal event so the artifact is recoverable after garbage-collection independently of any HANDOFF. Enumerate the full absolute path list yourself (do NOT read paths from a HANDOFF — a recovery pointer must not depend on the thing it recovers). If the glob finds nothing, do NOT emit an empty event (the missing-artifact case above already covers that anomaly).
-[ ]**Complete the PREPARE phase task** — ONLY after the artifact check and the `artifact_paths` emit above: `TaskUpdate(prepareTaskId, status="completed")`. This ordering is load-bearing: the emit MUST land before the phase-task completion so the durability pointer is on disk by the time completion is observed. (A skipped PREPARE phase completes earlier with `metadata.skipped=true` and runs neither the check nor the emit.)
498
510
-[ ] Specialist HANDOFF received
499
511
-[ ] If blocker reported → `/PACT:imPACT`
500
512
-[ ]**S4 Checkpoint** (see [pact-s4-checkpoints.md](../protocols/pact-s4-checkpoints.md)): Environment stable? Model aligned? Plan viable? Optionally query secretary for S4 pattern check (variety 7+). See [pact-orchestrator §Memory Management](../agents/pact-orchestrator.md#memory-management).
@@ -589,7 +601,19 @@ Agent(
589
601
Completed-phase teammates remain as consultants. Do not shutdown during this workflow.
590
602
591
603
**Before next phase**:
592
-
-[ ] Outputs exist in `docs/architecture/`
604
+
-[ ]**Artifact exists and is non-empty** — for an ARCHITECT phase that **ran** (not skipped), the expected per-feature artifact at `docs/architecture/{feature}.md` (and any additional produced files) MUST exist on disk and be non-empty before you complete the phase task or emit below. A missing or empty artifact is a **failure to investigate**, not an absence of work: do **NOT** complete the phase, do **NOT** emit, and INVESTIGATE first (specialist wrote to the wrong location, produced nothing, or used a different slug), then resolve it. A **skipped** ARCHITECT phase is exempt — it legitimately produces no artifact, so neither the check nor the emit applies.
605
+
-[ ]**Emit `artifact_paths`** — before marking the ARCHITECT phase task completed, glob the worktree's `docs/architecture/` directory and write a path-only `artifact_paths` journal event so the artifact is recoverable after garbage-collection independently of any HANDOFF. Enumerate the full absolute path list yourself (do NOT read paths from a HANDOFF). If the glob finds nothing, do NOT emit an empty event (the missing-artifact case above covers that anomaly).
-[ ]**Complete the ARCHITECT phase task** — ONLY after the artifact check and the `artifact_paths` emit above: `TaskUpdate(architectTaskId, status="completed")`. This ordering is load-bearing: the emit MUST land before the phase-task completion so the durability pointer is on disk by the time completion is observed. (A skipped ARCHITECT phase completes earlier with `metadata.skipped=true` and runs neither the check nor the emit.)
593
617
-[ ] Specialist HANDOFF received
594
618
-[ ] If blocker reported → `/PACT:imPACT`
595
619
-[ ]**S4 Checkpoint**: Environment stable? Model aligned? Plan viable?
@@ -757,6 +781,16 @@ The auditor stores its final signal as `metadata.audit_summary` via `TaskUpdate`
-[ ]**Emit `artifact_paths` for auditor decision-logs (conditional, capture-if-present)** — if a concurrent auditor produced decision-log artifacts, glob `docs/decision-logs/{feature}-*.md`; when ≥1 is present, write a path-only `artifact_paths` event (`workflow=code-auditor`) so they harvest. Unlike PREPARE/ARCHITECT, this is **capture-if-present, not flag-if-missing**: the auditor is optional, so absence is normal — emit nothing and do NOT flag a missing artifact.
Copy file name to clipboardExpand all lines: pact-plugin/commands/peer-review.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,7 +279,16 @@ See also: [Communication Charter](../protocols/pact-communication-charter.md) fo
279
279
---
280
280
281
281
**After all reviews complete**:
282
-
1. Synthesize findings into a unified review summary with consolidated recommendations
282
+
1. Synthesize findings into a unified review summary with consolidated recommendations, written to `docs/review/`. After writing it, confirm the review doc exists on disk and is non-empty before continuing.
283
+
-**Emit `artifact_paths`**: write a path-only `artifact_paths` journal event pointing at the review doc(s) so the consolidated review is recoverable after garbage-collection independently of any HANDOFF. The review doc is the lead's own product — enumerate its absolute path(s) here, not from any HANDOFF.
Copy file name to clipboardExpand all lines: pact-plugin/commands/plan-mode.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ Each consultant dispatch creates **two tasks**, not one:
194
194
-**Task A** — TEACHBACK gate. `subject = "{specialist}: TEACHBACK for plan consultation on {feature}"`, owner = consultant. Description: lightweight understanding-confirm of the consultation scope.
195
195
-**Task B** — primary consultation. `subject = "{specialist}: plan consultation for {feature}"`, owner = consultant, `blockedBy = [<Task A id>]`.
196
196
197
-
Both are created BEFORE the `Agent(...)` spawn call. The consultant claims A, submits teachback metadata, idles on `awaiting_lead_completion`. You review and accept via the two-call atomic pair: `SendMessage(to=consultant, ...)` FIRST, then `TaskUpdate(A, status="completed")` — see [Teachback Review](../protocols/pact-completion-authority.md#teachback-review) for the rationale. On accept, the consultant wakes to claim B and produce the consultation HANDOFF.
197
+
Both are created BEFORE the `Agent(...)` spawn call. The consultant claims A, submits teachback metadata, idles on `awaiting_lead_completion`. You review and accept via the two-call atomic pair: `SendMessage(to=consultant, ...)` FIRST, then `TaskUpdate(A, status="completed")` — see [Teachback Review](../protocols/pact-completion-authority.md#teachback-review) for the rationale. On accept, the consultant wakes to claim B and produce the consultation HANDOFF. The consultant writes the HANDOFF and signals stage-ready, then idles — **you (the lead) complete Task B**, not the consultant. Lead-side completion is what reliably journals the consultation HANDOFF; a consultant self-completing their own Task B can leave the HANDOFF unrecorded.
198
198
199
199
```
200
200
# A-FIRST ORDERING (required): create Task A (the teachback gate) BEFORE Task B so the gate gets the LOWER id. Creating Task B first — giving the gate the HIGHER id — is WRONG: it inverts the intuitive "lower id = earlier" reading. The blocking wiring below legitimately names both ids because it runs AFTER both tasks exist.
@@ -354,6 +354,27 @@ TaskUpdate(
354
354
355
355
Save the synthesized plan to `docs/plans/{feature-slug}-plan.md`.
356
356
357
+
**Plan-doc self-check**: after writing the plan, confirm `docs/plans/{feature-slug}-plan.md` exists on disk and is non-empty before continuing. An empty or missing plan doc is a failure to investigate (the synthesis did not land), not a no-op — resolve it before completing the planning task.
358
+
359
+
**Emit `artifact_paths`**: write a path-only `artifact_paths` journal event pointing at the plan doc so it (and the consultation work it synthesizes) is recoverable after garbage-collection independently of any HANDOFF. The plan doc is the lead's own product, so the lead knows its absolute path directly — enumerate it here, not from any HANDOFF.
**Trigger a harvest** (consult-only durability): plan-mode is a consultation-only flow with no later CODE/peer-review boundary to trigger memory harvest, so the plan doc and the consultation HANDOFFs would otherwise never reach pact-memory. Create a secretary harvest task after writing the plan so the `artifact_paths` event resolves and the consultation HANDOFFs distill into institutional memory:
description="Harvest HANDOFFs and artifact_paths for team {team_name}. Follow the Standard Harvest workflow in your pact-handoff-harvest skill, resolving artifact_paths events to read the plan doc and any consultation artifacts off disk. Report summary when done.")
0 commit comments