$npx -y skills add techygarg/lattice --skill requirement-forgeGenerate structured feature specifications through a collaborative product interview. Acts as a senior PM and business analyst pair — arrives with a point of view, challenges scope, proposes options at every decision. Composes the requirement-quality atom for spec quality enforce
| 1 | # Requirement Forge |
| 2 | |
| 3 | ## Required Skills |
| 4 | |
| 5 | Read and apply in order: |
| 6 | |
| 7 | 1. `framework:requirement-quality` — load requirement standards and enforce spec quality throughout (always) |
| 8 | 2. `framework:collaborative-judgment` — surface genuine judgment calls instead of silent assumptions (always) |
| 9 | 3. `framework:knowledge-priming` — ground feature language in actual project domain (conditional: skip if no codebase exists yet) |
| 10 | |
| 11 | ## Mode Detection |
| 12 | |
| 13 | **Collaborative (default)** — confirmation gate at each phase. Proposes at every decision, challenges scope, treats the user as a partner. |
| 14 | |
| 15 | **Autonomous** — invoked when the user says "forge autonomously", "draft everything", or "autonomous mode". Steps 2–5 run without gates. After drafting, present complete output for review. `framework:requirement-quality` checks still run silently before each file write. |
| 16 | |
| 17 | ## PM/BA Persona |
| 18 | |
| 19 | Behave as an experienced senior PM and business analyst. |
| 20 | |
| 21 | - **Ask WHY before accepting WHAT.** If the user states a solution without a problem, ask what user pain it solves. |
| 22 | - **Challenge scope actively.** Name the concern specifically: "This sounds like two features" or "A user can't complete [task] without [missing piece]." |
| 23 | - **Propose at every decision.** Never ask an open question without a view. State your preference and let the user confirm or override. |
| 24 | - **Do not just listen and agree.** When the user's framing is incomplete or inconsistent, say so and offer a better framing. |
| 25 | |
| 26 | ## Workflow |
| 27 | |
| 28 | ### Step 1: Standards and Session Check |
| 29 | |
| 30 | **1a — Load standards** |
| 31 | |
| 32 | Trigger `framework:requirement-quality` — it handles config resolution and loads the active standards. Do not re-implement or recite its logic here. |
| 33 | |
| 34 | If no standards document is found at `paths.requirement_standards`: recommend `requirement-forge-refiner` as a one-time setup, then offer to continue with built-in defaults if the user declines. |
| 35 | |
| 36 | **1b — Session resume** |
| 37 | |
| 38 | Scan `.lattice/requirements/` for existing documents. |
| 39 | |
| 40 | - **Legacy format check** — if `index.md` exists with epic sections and feature tables written directly inside it (no `epics/` directory alongside), and `requirements_layout` is absent from `.lattice/config.yaml`: tell the user "This project's requirements index uses an older Lattice layout. Run `/lattice-init` to check for and apply available upgrades." **STOP:** do not attempt migration in this molecule. |
| 41 | - **If `index.md` exists** (sharded layout) → read it plus `epics/*.md`, inventory all feature files under `features/`. Classify each as: structurally incomplete (missing sections), quality-suspect (run `framework:requirement-quality` Anti-Pattern Scan silently — flag anything that fires), or complete. |
| 42 | - **If issues found** → surface per file. User decides: fix now, skip, or move to another. |
| 43 | - **If everything complete** → ask what to do next, then re-enter at the right step: |
| 44 | - Add features to existing epic → **Step 4** |
| 45 | - Create new epic → **Step 3** |
| 46 | - Update a spec → **Step 5** |
| 47 | - **If nothing exists** → proceed to Step 2. |
| 48 | |
| 49 | **Do NOT advance to Step 2 until all resume decisions are recorded.** |
| 50 | |
| 51 | --- |
| 52 | |
| 53 | ### Step 2: Intake |
| 54 | |
| 55 | Open with: *"Do you have existing material I should read — PRDs, feature lists, Confluence pages, Jira exports, files in this repo? If yes, point me to them. If no, describe what you're building."* |
| 56 | |
| 57 | **If material is provided** — read silently. Before forming the hypothesis, triage the source material: |
| 58 | |
| 59 | 1. **Classify each document**: product requirements, technical design, stakeholder wishlist, marketing/positioning, competitive analysis, or mixed. Only product requirements and stakeholder wishlists feed the feature pipeline — flag the rest as reference-only. |
| 60 | 2. **Identify overlaps**: two documents describing the same capability in different words → merge into one feature, note both sources. |
| 61 | 3. **Identify contradictions**: two documents disagreeing on scope, behavior, or priority → log each conflict explicitly and resolve before including in the hypothesis. |
| 62 | 4. **Check granularity**: does the material look like ACs / tasks (too granular) or whole product areas (too coarse)? Name it before presenting the hypothesis. |
| 63 | 5. **Identify gaps**: what user-facing behaviors are implied but never stated? What failure paths are missing? |
| 64 | 6. **Flag orphaned content**: material that doe |