name: remove-matrix-row
description: RETIRED in Phase 4. Matrix rows no longer exist as a separate concept. To retire a question, remove its q_ref entry and audience entry from the owning screen file (and remove the input definition if it's no longer used). To retire a whole screen, delete the markdown file under content/screens/. Use change-matrix-cell if you only want to hide it from all segments.
Remove a matrix row — RETIRED
What changed
Phase 4 of the simplification plan collapsed content/generated/matrix.json
into per-screen audience: frontmatter blocks. There is no longer a separate
matrix file or a notion of a "matrix row" detached from a screen — every
question lives on exactly one owning screen, and removing the question means
editing or deleting that screen.
What to do instead
Want to retire a question completely?
- Open the owning screen under
master_template/content/screens/. - Remove the questionId from the
q_refsarray. - Remove the matching entry from the
audience:block. - Remove or rename the related
inputs[]entry if no other question on the screen uses it. - If the screen now has zero questions, consider deleting the screen file
entirely (and any orphaned
logged_asreferences in code). - Run
npm run content:check.
- Open the owning screen under
Want to hide a question from every segment but keep the data shape? Use
change-matrix-cellto set every segment tohidden. The engine silently skips it but the screen + audience entry remains — reversible later.Want to remove a
conditionalpredicate? Usechange-engine-predicate(delete the entry from theconditionalsmap insrc/lib/segmentation/engine.ts).
Cascade checklist when retiring a question
After removing the question, grep for the questionId across the codebase to catch any stragglers:
cd master_template
grep -rn "Q4.B.3" content/ src/lib/
Look for:
- Other screens with
q_refs: [..., "Q4.B.3", ...](rare — there's exactly one owning screen per question, but conditional-reveal references on sibling inputs may name it). - Engine predicates keyed on the id in
engine.ts. - Trigger DSL or
logged_asthat names the input id.
Why this skill is gone
The old remove-matrix-row skill manipulated content/generated/matrix.json,
which no longer exists. Keeping the skill alive would mislead future agents
into trying to delete from a file that's been deleted.