BOHICA-LABS / BOHICA-LABS/vsdd-factory

feat(demo): route demo evidence to factory-artifacts (not the product repo), with operator choice of repo / factory-artifacts / local-only

Open
#172 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2
Forks
1
Avg merge
6h 43m
Merged PRs (30d)
29

Description

## Summary

Demo evidence — binary recordings (`.gif`, `.webm`), VHS `.tape` scripts, Playwright `.spec.ts`, and `evidence-report.md` — is currently committed into the **main product repository** (feature branch → squash-merged to `develop`). These binaries become a permanent part of the product repo's git history.

At minimum, demo evidence should be committed to the **orphaned `factory-artifacts` branch** (where the rest of the pipeline's runtime/evidence artifacts already live), not the product's source history. Better still, the pipeline should **ask the operator** how to handle it: commit to the product repo, archive to `factory-artifacts`, or keep local-only.

## Current behavior (as of `1.0.0-rc.20`)

The canonical `demo-recorder` agent writes to `docs/demo-evidence//` on the story worktree/feature branch and commits there:

- `agents/demo-recorder.md:34` — "ALWAYS produce evidence in `docs/demo-evidence//` (committed to feature branch, visible in PR diff)"
- `agents/demo-recorder.md:38` / `:160` — explicitly **forbids** factory paths: "MUST NOT write to `.factory-demos/` or `.factory/demo-recordings/` — use `docs/demo-evidence//` only"
- `agents/demo-recorder.md:69-70` —
```bash
git add docs/demo-evidence//
git commit -m "evidence(STORY-NNN): add demo recordings"
```
- `agents/orchestrator/per-story-delivery.md:27-31` — dispatches demo-recorder with output to `docs/demo-evidence//` "(committed to feature branch)".
- `agents/pr-manager.md` / `skills/code-delivery/SKILL.md` — PR body embeds GIF thumbnails by repo path from `docs/demo-evidence//`, confirming the binaries are committed to the PR branch and merged to `develop`.

Artifact types produced: `.gif`, `.webm`, `.tape`, `.spec.ts`, `evidence-report.md` (per `agents/demo-recorder.md:54-64`).

Contrast: `agents/state-manager.md` commits `.factory/` artifacts to the `factory-artifacts` orphan branch at phase gates. **Demo evidence bypasses this entirely** and goes to the product branch.

There is **no configuration and no operator prompt** for where demos should go, and **no local-only option**.

## Why this is a problem

- **Repo bloat / unrecoverable history.** `.webm`/`.gif` binaries committed to `develop` live in the product repo forever. Git can't GC reachable blobs, so every demo across every story permanently inflates clone/fetch size of the *product* repo — which is supposed to hold source, not pipeline evidence.
- **Wrong separation of concerns.** Demo evidence is a pipeline/QA artifact, like specs, convergence reports, and state — all of which already live on `factory-artifacts`. Demos are the odd one out, polluting the product source tree with `docs/demo-evidence/...`.
- **No opt-out.** A team that wants demos as ephemeral local review aids (not tracked at all) has no way to express that; the agent unconditionally `git add && git commit`s them.

## Internal contradiction (already half-built the right way)

The plugin currently disagrees with itself about where demos go:

- `agents/demo-recorder.md` (canonical, used by per-story-delivery) → `docs/demo-evidence/...`, and **bans** `.factory/`.
- `skills/record-demo/SKILL.md:46,55,59` → writes to `.factory/demo-evidence/STORY-NNN/...`
- `skills/demo-recording/SKILL.md:128,151,196,237` → writes to `.factory/demo-scripts/`, `.factory/demo-recordings/`, `.factory/demo-evidence/`

So the skills already point at the factory location; the canonical agent overrides them toward the product repo. This inconsistency should be resolved as part of the fix.

## Proposed behavior

1. **Minimum bar: route demo evidence to `factory-artifacts`, not the product repo.** Write to `.factory/cycles///demo-evidence/` (or similar) and have `state-manager` commit it to the `factory-artifacts` orphan branch, the same path the rest of the evidence takes. The PR body can still link/embed them (e.g., reference the artifact on `factory-artifacts`, attach as PR/release assets, or upload to a GitHub release) without committing binaries to `develop`.

2. **Operator choice.** Add a `demo_evidence` routing option (e.g. in `.factory/merge-config.yaml` or an orchestrator prompt at pipeline/phase start):
- `factory-artifacts` (default) — archived to the orphan branch, not in product history.
- `repo` — current behavior, committed to the product branch / PR (for teams that explicitly want it in the PR diff).
- `local-only` — produced for review but never committed (gitignored / left in the worktree, cleaned up after).

3. **Resolve the contradiction.** Align `demo-recorder.md` with the chosen routing and update/retire the `.factory/`-writing language in `record-demo` and `demo-recording` skills so there's a single source of truth.

## Files likely to change

- `agents/demo-recorder.md` — output path + commit target become routing-aware (remove the hard "MUST NOT write to `.factory/`" once factory routing is the default).
- `agents/orchestrator/per-story-delivery.md` — pass the routing decision into the demo-recorder dispatch.
- `agents/state-manager.md` — include demo-evidence paths in the `factory-artifacts` commit when routing = `factory-artifacts`.
- `agents/pr-manager.md` / `skills/code-delivery/SKILL.md` / PR template — embed/link demos without assuming they're in the `develop` diff (handle factory-artifacts / release-asset references).
- `skills/record-demo/SKILL.md`, `skills/demo-recording/SKILL.md` — reconcile to the single routing model.
- `.factory/merge-config.yaml` (or equivalent) — new `demo_evidence` routing field; orchestrator prompt to set it.

## Acceptance criteria (draft)

- [ ] By default, demo evidence is committed to `factory-artifacts`, not the product repo / `develop`.
- [ ] The operator can choose `repo`, `factory-artifacts`, or `local-only` for demo evidence, and the choice is recorded in factory config/state.
- [ ] `local-only` produces demos for review but commits nothing (paths gitignored or cleaned up).
- [ ] PR descriptions still surface demos (embedded or linked) without requiring binaries in the `develop` diff.
- [ ] `demo-recorder.md` and the `record-demo` / `demo-recording` skills agree on a single routing model (no `.factory/` vs `docs/` contradiction).
- [ ] Existing `docs/demo-evidence/` references in PR/embedding logic are updated to the new location.

## Open questions

- Default routing: confirm `factory-artifacts` as the default (vs keeping `repo` default for backward compat with a config to opt into factory)?
- For `factory-artifacts`/`local-only`, how should the PR embed demos — link to the orphan-branch blob, attach as PR/release assets, or upload to a GitHub release?
- Granularity of the prompt: ask once per pipeline, or allow per-cycle/per-story override?
- Migration: leave already-committed `docs/demo-evidence/` in product history as-is, or provide guidance to relocate?

---

*Filed after tracing demo-evidence storage in `vsdd-factory@1.0.0-rc.20`. Happy to take a first cut at routing demos to `factory-artifacts` + the config/prompt if the approach is agreed.*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.