BOHICA-LABS / BOHICA-LABS/vsdd-factory
process-gap(pr-manager): post-merge audit artifacts (pr-description.md + pr-review.md) left uncommitted
- Dominant language
- Rust
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 29
Description
## Class of failure
The pr-manager agent's 9-step PR process (per `per-story-delivery.md` and `workflows/code-delivery.lobster`) generates two valuable audit-trail artifacts during execution:
1. **Step 1: populate-pr-description** → writes `.factory/code-delivery/STORY-NNN/pr-description.md` (PR body, convergence summary, deferrals)
2. **Step 5: review-convergence** → writes `.factory/code-delivery/STORY-NNN/pr-review.md` (pr-reviewer findings, verdict, convergence cycles)
Neither file is committed to `factory-artifacts` by default. They linger as uncommitted artifacts in the worktree until manually committed post-merge (often hours later — or never if the human doesn't notice).
## Pattern observed
In an external pilot project, after 2 successful PR merges in the same cycle:
```
$ cd .factory && git status --porcelain
?? code-delivery/STORY-A.AA.XXX/
?? code-delivery/STORY-B.BB.YYY/
```
3 audit-trail artifacts (2× pr-description.md + 1× pr-review.md, total ~50 KB) sat uncommitted for hours until the orchestrator caught it via factory-health.
When a session resumes from a clean state, the absence of these artifacts in `factory-artifacts` history loses:
- The exact PR body language the pr-manager generated (useful for post-mortem)
- The pr-reviewer's findings + convergence trajectory (useful for retrospective)
- The decision rationale captured in the PR body (deferrals, accepted trade-offs)
## Root cause
The pr-manager 9-step process doesn't have an explicit "commit + push these artifacts" sub-step at step 9 (post-merge). Step 9 currently focuses on worktree removal + local branch deletion.
## Proposed remediation
Extend per-story-delivery step 9 (post-merge):
```
Step 9.x: pr-manager — commit + push:
.factory/code-delivery/STORY-NNN/pr-description.md
.factory/code-delivery/STORY-NNN/pr-review.md
(if either was written during steps 1+5)
to factory-artifacts with signed commit message:
"chore(audit): pr-manager artifacts for STORY-NNN (PR #X merged)"
```
Optionally enforce via factory-health: warn if `.factory/code-delivery/` has untracked files.
## Labels
- `process-gap`
- `pr-manager`
- `per-story-delivery`
- `audit-trail`
Contributor guide
Assessment
This issue has not been assessed yet.