From context-ledger
Use when generating PRD and architecture documents that must trace back to explicit decisions. Enforces citation requirements so no spec content exists without DEC-* references.
npx claudepluginhub synaptiai/synapti-marketplace --plugin context-ledgerThis skill uses the workspace's default tool permissions.
This skill generates PRD and architecture documents that are constrained by the decision ledger.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
This skill generates PRD and architecture documents that are constrained by the decision ledger.
No spec section without a DEC- reference.*
Every requirement, every architecture choice, must trace back to an explicit decision. This prevents:
/ledger-decide)04-decisions/DECISIONS.yaml exists05-risks/RISKS.yaml existsUse TodoWrite to track these mandatory steps:
1. Load decisions and risks 2. Generate PRD with decision citations 3. Validate PRD constraint gate 4. Generate architecture with decision citations 5. Validate architecture constraint gate 6. Cross-reference risks in both documentsRead:
04-decisions/DECISIONS.yaml - All decisions05-risks/RISKS.yaml - All risks03-synthesis/CROSS-SYNTHESIS.md - ContextBuild decision index for quick lookup.
Write 06-prd/PRD.md using template from references/prd-template.md.
Constraint enforcement: Every section heading must include decision reference:
## 2. Target Users (DEC-scope-power-users-first)
Every requirement must cite decisions:
### 2.1 Primary Users
Power users within SMB organizations who manage complex workflows.
(DEC-scope-power-users-first, DEC-scope-smb-segment)
Check every PRD section:
Gate failure: If any section lacks DEC-* reference, cannot proceed.
Write 07-architecture/ARCHITECTURE.md using template from references/architecture-template.md.
Constraint enforcement:
## 3. Data Model (DEC-tech-postgres-primary, DEC-scope-power-users-first)
### 3.1 Core Entities
Based on power user workflow requirements (DEC-scope-power-users-first),
the data model supports complex nested structures.
Check every architecture section:
In both documents, note relevant risks:
### Risk Note
This approach carries RISK-tech-cold-start. See risk register for mitigations.
See references/constraint-rules.md for detailed rules.
Section headings:
## 2. MVP Scope (DEC-scope-power-users-first, DEC-scope-web-only)
Inline citations:
Users will access the application via web browser only. (DEC-scope-web-only)
Evidence when needed:
Based on user research showing 78% onboarding drop-off at team invitation
(EV-users-onboarding-dropoff), we will simplify the invitation flow.
(DEC-ux-simplified-onboarding)
```markdown
## 2. Target Users (DEC-scope-power-users-first)
Based on DEC-scope-power-users-first, the MVP targets power users within organizations who manage complex workflows. This decision was supported by evidence showing 3x higher retention among power users (EV-users-retention-power-users).
Risk: RISK-retention-expert-churn mitigated by advanced feature set.
- Section heading cites DEC-* reference
- Every requirement traces to a decision
- Evidence cited where relevant
- Risks cross-referenced
</good-example>
<bad-example>
```markdown
## 2. Target Users
We will target power users because they are important. Power users need
features like advanced workflows and keyboard shortcuts.
### 2.1 User Needs
- Complex workflow management
- Keyboard-first interaction
Use the AskUserQuestion tool when:
Question: "PRD section '[X]' has no supporting decision. How to proceed?"
Options:
- "Skip this section (out of scope)"
- "Make a new decision for this"
- "It relates to existing decision [DEC-Y]"
Question: "Requirement '[X]' seems to conflict with [DEC-Y]. How to resolve?"
Options:
- "Revise requirement to align with decision"
- "The decision should be revisited"
- "They don't actually conflict - explain how"
Question: "This section relates to [RISK-X]. Include risk note?"
Options:
- "Yes, note the risk"
- "No, not relevant here"
- "Yes, and add mitigation detail"
After spec generation:
## Spec Generation Complete
**PRD Sections:** [N] (all constrained)
**Architecture Sections:** [M] (all constrained)
**Decisions Referenced:** [X] unique DEC-* IDs
**Risks Cross-Referenced:** [Y] RISK-* IDs
### Constraint Gate Status
- PRD gate: ✓ All sections cite decisions
- Architecture gate: ✓ All sections cite decisions
### Documents Generated
- `06-prd/PRD.md`
- `07-architecture/ARCHITECTURE.md`
### Decision Coverage
| Decision | PRD Sections | Arch Sections |
|----------|--------------|---------------|
| DEC-scope-power-users-first | 1, 2, 4 | 2, 3 |
| DEC-pricing-freemium | 3, 5 | 4 |
| DEC-tech-serverless | - | 1, 3, 5 |
| ... | ... | ... |
### Next Step
Run `/ledger-plan` to generate implementation backlog.