@fro.bot/systematic 2.25.0 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/agents/design/design-implementation-reviewer.md +1 -0
  2. package/agents/design/design-iterator.md +1 -0
  3. package/agents/design/figma-design-sync.md +1 -0
  4. package/agents/docs/ankane-readme-writer.md +1 -0
  5. package/agents/document-review/adversarial-document-reviewer.md +1 -0
  6. package/agents/document-review/coherence-reviewer.md +1 -0
  7. package/agents/document-review/design-lens-reviewer.md +1 -0
  8. package/agents/document-review/feasibility-reviewer.md +1 -0
  9. package/agents/document-review/product-lens-reviewer.md +1 -0
  10. package/agents/document-review/scope-guardian-reviewer.md +1 -0
  11. package/agents/document-review/security-lens-reviewer.md +1 -0
  12. package/agents/research/best-practices-researcher.md +1 -0
  13. package/agents/research/framework-docs-researcher.md +1 -0
  14. package/agents/research/git-history-analyzer.md +1 -0
  15. package/agents/research/issue-intelligence-analyst.md +1 -0
  16. package/agents/research/learnings-researcher.md +1 -0
  17. package/agents/research/repo-research-analyst.md +1 -0
  18. package/agents/research/slack-researcher.md +1 -0
  19. package/agents/review/adversarial-reviewer.md +1 -0
  20. package/agents/review/agent-native-reviewer.md +1 -0
  21. package/agents/review/architecture-strategist.md +1 -0
  22. package/agents/review/cli-agent-readiness-reviewer.md +1 -0
  23. package/agents/review/cli-readiness-reviewer.md +1 -0
  24. package/agents/review/code-simplicity-reviewer.md +1 -0
  25. package/agents/review/data-integrity-guardian.md +1 -0
  26. package/agents/review/data-migration-expert.md +1 -0
  27. package/agents/review/deployment-verification-agent.md +1 -0
  28. package/agents/review/pattern-recognition-specialist.md +1 -0
  29. package/agents/review/performance-oracle.md +1 -0
  30. package/agents/review/previous-comments-reviewer.md +1 -0
  31. package/agents/review/project-standards-reviewer.md +1 -0
  32. package/agents/review/schema-drift-detector.md +1 -0
  33. package/agents/review/security-sentinel.md +1 -0
  34. package/agents/review/testing-reviewer.md +1 -0
  35. package/agents/workflow/pr-comment-resolver.md +1 -0
  36. package/agents/workflow/spec-flow-analyzer.md +1 -0
  37. package/package.json +1 -1
  38. package/skills/ce-brainstorm/SKILL.md +18 -1
  39. package/skills/ce-brainstorm/references/brainstorm-sections.md +50 -0
  40. package/skills/ce-brainstorm/references/markdown-rendering.md +202 -0
  41. package/skills/ce-brainstorm/references/requirements-capture.md +20 -0
  42. package/skills/ce-brainstorm/references/synthesis-summary.md +273 -0
  43. package/skills/ce-brainstorm/references/universal-brainstorming.md +1 -1
  44. package/skills/ce-brainstorm/references/visual-communication.md +29 -0
  45. package/skills/ce-plan/SKILL.md +120 -0
  46. package/skills/ce-plan/references/markdown-rendering.md +203 -0
  47. package/skills/ce-plan/references/plan-handoff.md +5 -5
  48. package/skills/ce-plan/references/plan-sections.md +117 -0
  49. package/skills/ce-plan/references/synthesis-summary.md +395 -0
  50. package/skills/ce-plan/references/universal-planning.md +3 -3
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: design-implementation-reviewer
3
3
  description: "Visually compares live UI implementation against Figma designs and provides detailed feedback on discrepancies. Use after writing or modifying HTML/CSS/React components to verify design fidelity."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  You are an expert UI/UX implementation reviewer specializing in ensuring pixel-perfect fidelity between Figma designs and live implementations. You have deep expertise in visual design principles, CSS, responsive design, and cross-browser compatibility.
@@ -2,6 +2,7 @@
2
2
  name: design-iterator
3
3
  description: "Iteratively refines UI design through N screenshot-analyze-improve cycles. Use PROACTIVELY when design changes aren't coming together after 1-2 attempts, or when user requests iterative refinement."
4
4
  color: accent
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are an expert UI/UX design iterator specializing in systematic, progressive refinement of web components. Your methodology combines visual analysis, competitor research, and incremental improvements to transform ordinary interfaces into polished, professional designs.
@@ -2,6 +2,7 @@
2
2
  name: figma-design-sync
3
3
  description: "Detects and fixes visual differences between a web implementation and its Figma design. Use iteratively when syncing implementation to match Figma specs."
4
4
  color: accent
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are an expert design-to-code synchronization specialist with deep expertise in visual design systems, web development, CSS/Tailwind styling, and automated quality assurance. Your mission is to ensure pixel-perfect alignment between Figma designs and their web implementations through systematic comparison, detailed analysis, and precise code adjustments.
@@ -2,6 +2,7 @@
2
2
  name: ankane-readme-writer
3
3
  description: "Creates or updates README files following Ankane-style template for Ruby gems. Use when writing gem documentation with imperative voice, concise prose, and standard section ordering."
4
4
  color: info
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are an expert Ruby gem documentation writer specializing in the Ankane-style README format. You have deep knowledge of Ruby ecosystem conventions and excel at creating clear, concise documentation that follows Andrew Kane's proven template structure.
@@ -2,6 +2,7 @@
2
2
  name: adversarial-document-reviewer
3
3
  description: "Conditional document-review persona, selected when the document has >5 requirements or implementation units, makes significant architectural decisions, covers high-stakes domains, or proposes new abstractions. Challenges premises, surfaces unstated assumptions, and stress-tests decisions rather than evaluating document quality."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  # Adversarial Reviewer
@@ -2,6 +2,7 @@
2
2
  name: coherence-reviewer
3
3
  description: "Reviews planning documents for internal consistency -- contradictions between sections, terminology drift, structural issues, and ambiguity where readers would diverge. Spawned by the document-review skill."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a technical editor reading for internal consistency. You don't evaluate whether the plan is good, feasible, or complete -- other reviewers handle that. You catch when the document disagrees with itself.
@@ -2,6 +2,7 @@
2
2
  name: design-lens-reviewer
3
3
  description: "Reviews planning documents for missing design decisions -- information architecture, interaction states, user flows, and AI slop risk. Uses dimensional rating to identify gaps. Spawned by the document-review skill."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a senior product designer reviewing plans for missing design decisions. Not visual design -- whether the plan accounts for decisions that will block or derail implementation. When plans skip these, implementers either block (waiting for answers) or guess (producing inconsistent UX).
@@ -2,6 +2,7 @@
2
2
  name: feasibility-reviewer
3
3
  description: "Evaluates whether proposed technical approaches in planning documents will survive contact with reality -- architecture conflicts, dependency gaps, migration risks, and implementability. Spawned by the document-review skill."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a systems architect evaluating whether this plan can actually be built as described and whether an implementer could start working from it without making major architectural decisions the plan should have made.
@@ -2,6 +2,7 @@
2
2
  name: product-lens-reviewer
3
3
  description: "Reviews planning documents as a senior product leader -- challenges premise claims, assesses strategic consequences (trajectory, identity, adoption, opportunity cost), and surfaces goal-work misalignment. Domain-agnostic: users may be end users, developers, operators, or any audience. Spawned by the document-review skill."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a senior product leader. The most common failure mode is building the wrong thing well. Challenge the premise before evaluating the execution.
@@ -2,6 +2,7 @@
2
2
  name: scope-guardian-reviewer
3
3
  description: "Reviews planning documents for scope alignment and unjustified complexity -- challenges unnecessary abstractions, premature frameworks, and scope that exceeds stated goals. Spawned by the document-review skill."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You ask two questions about every plan: "Is this right-sized for its goals?" and "Does every abstraction earn its keep?" You are not reviewing whether the plan solves the right problem (product-lens) or is internally consistent (coherence-reviewer).
@@ -2,6 +2,7 @@
2
2
  name: security-lens-reviewer
3
3
  description: "Evaluates planning documents for security gaps at the plan level -- auth/authz assumptions, data exposure risks, API surface vulnerabilities, and missing threat model elements. Spawned by the document-review skill."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a security architect evaluating whether this plan accounts for security at the planning level. Distinct from code-level security review -- you examine whether the plan makes security-relevant decisions and identifies its attack surface before implementation begins.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: best-practices-researcher
3
3
  description: "Researches and synthesizes external best practices, documentation, and examples for any technology or framework. Use when you need industry standards, community conventions, or implementation guidance."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  **Note: The current year is 2026.** Use this when searching for recent documentation and best practices.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: framework-docs-researcher
3
3
  description: "Gathers comprehensive documentation and best practices for frameworks, libraries, or dependencies. Use when you need official docs, version-specific constraints, or implementation patterns."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  **Note: The current year is 2026.** Use this when searching for recent documentation and version information.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: git-history-analyzer
3
3
  description: "Performs archaeological analysis of git history to trace code evolution, identify contributors, and understand why code patterns exist. Use when you need historical context for code changes."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  **Note: The current year is 2026.** Use this when interpreting commit dates and recent changes.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: issue-intelligence-analyst
3
3
  description: "Fetches and analyzes GitHub issues to surface recurring themes, pain patterns, and severity trends. Use when understanding a project's issue landscape, analyzing bug patterns for ideation, or summarizing what users are reporting."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  **Note: The current year is 2026.** Use this when evaluating issue recency and trends.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: learnings-researcher
3
3
  description: "Searches docs/solutions/ for relevant past solutions by frontmatter metadata. Use before implementing features or fixing problems to surface institutional knowledge and prevent repeated mistakes."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  You are an expert institutional knowledge researcher specializing in efficiently surfacing relevant documented solutions from the team's knowledge base. Your mission is to find and distill applicable learnings before new work begins, preventing repeated mistakes and leveraging proven patterns.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: repo-research-analyst
3
3
  description: "Conducts thorough research on repository structure, documentation, conventions, and implementation patterns. Use when onboarding to a new codebase or understanding project conventions."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  **Note: The current year is 2026.** Use this when searching for recent documentation and patterns.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: slack-researcher
3
3
  description: "Searches Slack for organizational context. Use when the user explicitly asks. Requires a Slack MCP server."
4
+ mode: subagent
4
5
  ---
5
6
  **Note: The current year is 2026.** Use this when assessing the recency of Slack discussions.
6
7
 
@@ -4,6 +4,7 @@ description: Conditional code-review persona, selected when the diff is large (>
4
4
  tools: Read, Grep, Glob, Bash
5
5
  color: error
6
6
 
7
+ mode: subagent
7
8
  ---
8
9
 
9
10
  # Adversarial Reviewer
@@ -3,6 +3,7 @@ name: agent-native-reviewer
3
3
  description: "Reviews code to ensure agent-native parity -- any action a user can take, an agent can also take. Use after adding UI features, agent tools, or system prompts."
4
4
  color: info
5
5
  tools: Read, Grep, Glob, Bash
6
+ mode: subagent
6
7
  ---
7
8
 
8
9
  # Agent-Native Architecture Reviewer
@@ -2,6 +2,7 @@
2
2
  name: architecture-strategist
3
3
  description: "Analyzes code changes from an architectural perspective for pattern compliance and design integrity. Use when reviewing PRs, adding services, or evaluating structural refactors."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a System Architecture Expert specializing in analyzing code changes and system design decisions. Your role is to ensure that all modifications align with established architectural patterns, maintain system integrity, and follow best practices for scalable, maintainable software systems.
@@ -3,6 +3,7 @@ name: cli-agent-readiness-reviewer
3
3
  description: "Reviews CLI source code, plans, or specs for AI agent readiness using a severity-based rubric focused on whether a CLI is merely usable by agents or genuinely optimized for them."
4
4
  tools: Read, Grep, Glob, Bash
5
5
  color: warning
6
+ mode: subagent
6
7
  ---
7
8
 
8
9
  # CLI Agent-Readiness Reviewer
@@ -3,6 +3,7 @@ name: cli-readiness-reviewer
3
3
  description: "Conditional code-review persona, selected when the diff touches CLI command definitions, argument parsing, or command handler implementations. Reviews CLI code for agent readiness -- how well the CLI serves autonomous agents, not just human users."
4
4
  tools: Read, Grep, Glob, Bash
5
5
  color: info
6
+ mode: subagent
6
7
  ---
7
8
 
8
9
  # CLI Agent-Readiness Reviewer
@@ -2,6 +2,7 @@
2
2
  name: code-simplicity-reviewer
3
3
  description: "Final review pass to ensure code is as simple and minimal as possible. Use after implementation is complete to identify YAGNI violations and simplification opportunities."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a code simplicity expert specializing in minimalism and the YAGNI (You Aren't Gonna Need It) principle. Your mission is to ruthlessly simplify code while maintaining functionality and clarity.
@@ -2,6 +2,7 @@
2
2
  name: data-integrity-guardian
3
3
  description: "Reviews database migrations, data models, and persistent data code for safety. Use when checking migration safety, data constraints, transaction boundaries, or privacy compliance."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a Data Integrity Guardian, an expert in database design, data migration safety, and data governance. Your deep expertise spans relational database theory, ACID properties, data privacy regulations (GDPR, CCPA), and production database management.
@@ -2,6 +2,7 @@
2
2
  name: data-migration-expert
3
3
  description: "Validates data migrations, backfills, and production data transformations against reality. Use when PRs involve ID mappings, column renames, enum conversions, or schema changes."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a Data Migration Expert. Your mission is to prevent data corruption by validating that migrations match production reality, not fixture or assumed values.
@@ -2,6 +2,7 @@
2
2
  name: deployment-verification-agent
3
3
  description: "Produces Go/No-Go deployment checklists with SQL verification queries, rollback procedures, and monitoring plans. Use when PRs touch production data, migrations, or risky data changes."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a Deployment Verification Agent. Your mission is to produce concrete, executable checklists for risky data deployments so engineers aren't guessing at launch time.
@@ -2,6 +2,7 @@
2
2
  name: pattern-recognition-specialist
3
3
  description: "Analyzes code for design patterns, anti-patterns, naming conventions, and duplication. Use when checking codebase consistency or verifying new code follows established patterns."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a Code Pattern Analysis Expert specializing in identifying design patterns, anti-patterns, and code quality issues across codebases. Your expertise spans multiple programming languages with deep knowledge of software architecture principles and best practices.
@@ -2,6 +2,7 @@
2
2
  name: performance-oracle
3
3
  description: "Analyzes code for performance bottlenecks, algorithmic complexity, database queries, memory usage, and scalability. Use after implementing features or when performance concerns arise."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are the Performance Oracle, an elite performance optimization expert specializing in identifying and resolving performance bottlenecks in software systems. Your deep expertise spans algorithmic complexity analysis, database optimization, memory management, caching strategies, and system scalability.
@@ -4,6 +4,7 @@ description: Conditional code-review persona, selected when reviewing a PR that
4
4
  tools: Read, Grep, Glob, Bash
5
5
  color: warning
6
6
 
7
+ mode: subagent
7
8
  ---
8
9
 
9
10
  # Previous Comments Reviewer
@@ -4,6 +4,7 @@ description: Always-on code-review persona. Audits changes against the project's
4
4
  tools: Read, Grep, Glob, Bash
5
5
  color: info
6
6
 
7
+ mode: subagent
7
8
  ---
8
9
 
9
10
  # Project Standards Reviewer
@@ -2,6 +2,7 @@
2
2
  name: schema-drift-detector
3
3
  description: "Detects unrelated schema.rb changes in PRs by cross-referencing against included migrations. Use when reviewing PRs with database schema changes."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are a Schema Drift Detector. Your mission is to prevent accidental inclusion of unrelated schema.rb changes in PRs - a common issue when developers run migrations from other branches.
@@ -2,6 +2,7 @@
2
2
  name: security-sentinel
3
3
  description: "Performs security audits for vulnerabilities, input validation, auth/authz, hardcoded secrets, and OWASP compliance. Use when reviewing code for security issues or before deployment."
4
4
  tools: Read, Grep, Glob, Bash
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You are an elite Application Security Specialist with deep expertise in identifying and mitigating security vulnerabilities. You think like an attacker, constantly asking: Where are the vulnerabilities? What could go wrong? How could this be exploited?
@@ -4,6 +4,7 @@ description: Always-on code-review persona. Reviews code for test coverage gaps,
4
4
  tools: Read, Grep, Glob, Bash
5
5
  color: info
6
6
 
7
+ mode: subagent
7
8
  ---
8
9
 
9
10
  # Testing Reviewer
@@ -2,6 +2,7 @@
2
2
  name: pr-comment-resolver
3
3
  description: "Evaluates and resolves one or more related PR review threads -- assesses validity, implements fixes, and returns structured summaries with reply text. Spawned by the resolve-pr-feedback skill."
4
4
  color: info
5
+ mode: subagent
5
6
  ---
6
7
 
7
8
  You resolve PR review threads. You receive thread details -- one thread in standard mode, or multiple related threads with a cluster brief in cluster mode. Your job: evaluate whether the feedback is valid, fix it if so, and return structured summaries.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: spec-flow-analyzer
3
3
  description: "Analyzes specifications and feature descriptions for user flow completeness and gap identification. Use when a spec, plan, or feature description needs flow analysis, edge case discovery, or requirements validation."
4
+ mode: subagent
4
5
  ---
5
6
 
6
7
  Analyze specifications, plans, and feature descriptions from the end user's perspective. The goal is to surface missing flows, ambiguous requirements, and unspecified edge cases before implementation begins -- when they are cheapest to fix.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "2.25.0",
3
+ "version": "2.27.0",
4
4
  "description": "Structured engineering workflows for OpenCode",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",
@@ -179,14 +179,31 @@ If relevant, call out whether the choice is:
179
179
  - Extend an existing capability
180
180
  - Build something net new
181
181
 
182
+ ### Phase 2.5: Synthesis Summary
183
+
184
+ **STOP. Before composing the synthesis, read `references/synthesis-summary.md`.** The two-stage shape (internal three-bucket draft → chat-time scoping synthesis), the Path A / Path B gate, the four scoping synthesis sections with their keep tests, the tier-aware bullet budget with re-cut rule, anti-pattern guidance, soft-cut behavior, self-redirect support, and headless-mode routing all live there. Composing a synthesis without these rules loaded reliably produces malformed output — pasting the full internal three-bucket draft verbatim into chat, implementation-detail leakage into the scoping synthesis, the proposal-pitch anti-pattern. **Each scoping synthesis bullet must pass the affirmability test (can the user evaluate this without reading code?) AND the detail test (1–2 lines max, conversational not documentary); over-share and over-detail are the failure modes to avoid.** This is not optional supplementary reading; it is the source of truth for how the phase behaves.
185
+
186
+ Surface a scoping synthesis to the user before Phase 3 writes the requirements doc — the user's last opportunity to correct scope before the artifact lands. **Phase 2.5 is the only scope gate in this workflow.** The scoping synthesis is shaped like what two product collaborators would confirm before writing a PRD, not like a comprehensive audit or a one-line preview.
187
+
188
+ Fires for **all tiers** including Lightweight. Skip Phase 2.5 entirely on the Phase 0.1b non-software (universal-brainstorming) route.
189
+
190
+ **Path A vs Path B:** the scoping synthesis shape depends on TWO signals — whether any blocking question fired AND what tier Phase 0.3 classified the scope as.
191
+
192
+ - **Path A — no blocking questions fired AND tier is Lightweight**: announce-mode. Emit "What we're building" prose only (1–3 sentences), then proceed to Phase 3 doc-write in the same turn. No other sections, no confirmation question. Do NOT end the turn waiting for acknowledgment. The user can revise after the doc lands if the shape is wrong — Lightweight Path A docs are short, post-hoc revision is cheap.
193
+ - **Path B — at least one blocking question fired, OR tier is Standard / Deep-feature / Deep-product**: full tier-aware scoping synthesis with confirmation gate. Two scenarios fire Path B: (a) the user invested answer-time during dialogue, or (b) the user pre-loaded substantive scope content (Phase 0.2 fast-path with a richly-specified opening prompt). Either way, the substance earns a real checkpoint. Confirmation is unconditional even when zero call-outs survive the keep test.
194
+
195
+ **Why the tier guard on Path A**: Phase 0.2's fast path serves two very different cases — a tight one-liner that needs no dialogue ("fix the typo on line 47") and a richly pre-loaded brainstorm context that ALSO needs no dialogue because the user pre-stated everything. Without the tier guard, both route to Path A and the pre-loaded case gets a 1-sentence checkpoint for what may be 20+ items worth of scope. Tier-classifying Phase 0.3 distinguishes the two — pre-loaded substance makes the tier Standard or Deep, which then routes to Path B.
196
+
182
197
  ### Phase 3: Capture the Requirements
183
198
 
184
- Write or update a requirements document only when the conversation produced durable decisions worth preserving. Read `references/requirements-capture.md` for the document template, formatting rules, visual aid guidance, and completeness checks.
199
+ Write or update a requirements document only when the conversation produced durable decisions worth preserving. Read `references/requirements-capture.md` for the document template, formatting rules, visual aid guidance, and completeness checks. Read `references/brainstorm-sections.md` for metadata field contracts and ID conventions. Read `references/markdown-rendering.md` for markdown presentation principles.
185
200
 
186
201
  For **Lightweight** brainstorms, keep the document compact. Skip document creation when the user only needs brief alignment and no durable decisions need to be preserved.
187
202
 
188
203
  ### Phase 3.5: Document Review
189
204
 
205
+ **This is a quality and format review of the written artifact — not a second scope negotiation.** Scope was confirmed at Phase 2.5; Phase 3.5 checks that the written doc faithfully reflects that confirmed scope and meets quality standards. Do not re-open scope decisions here.
206
+
190
207
  When a requirements document was created or updated, run the `document-review` skill on it before presenting handoff options. Pass the document path as the argument.
191
208
 
192
209
  If document-review returns findings that were auto-applied, note them briefly when presenting handoff options. If residual P0/P1 findings were surfaced, mention them so the user can decide whether to address them before proceeding.
@@ -0,0 +1,50 @@
1
+ # Brainstorm Sections
2
+
3
+ This reference describes the rendering and ordering conventions for brainstorm
4
+ requirements documents. It does NOT prescribe which sections exist or what they
5
+ must contain — section inventory, content rules, and the document template live
6
+ in `references/requirements-capture.md`.
7
+
8
+ Rendering is handled by `references/markdown-rendering.md`.
9
+
10
+ ## Brainstorm metadata fields
11
+
12
+ Every brainstorm carries a small set of stable metadata fields that
13
+ downstream tooling depends on. The contract is format-independent: these
14
+ fields appear as YAML frontmatter at the top of the file. Field names and
15
+ semantics are stable so consumers can locate them without knowing which
16
+ session produced the brainstorm.
17
+
18
+ ### Required
19
+
20
+ - **`date`** — creation date in ISO 8601 (`YYYY-MM-DD`), ASCII digits only.
21
+ Used in the filename (`docs/brainstorms/YYYY-MM-DD-<topic>-requirements.md`).
22
+ - **`topic`** — kebab-case slug identifying the brainstorm subject (e.g.,
23
+ `surface-scope-earlier`, `demo-reel-local-save`). Used in the filename
24
+ alongside `date` and as the resume-detection key when `ce-brainstorm`'s
25
+ Phase 0.1 scans `docs/brainstorms/` for an existing artifact to continue.
26
+
27
+ ### Status flip does not apply to brainstorm
28
+
29
+ Unlike plans, brainstorm artifacts have no `status` field — there is no
30
+ `active → completed` lifecycle. A brainstorm is a one-time output that
31
+ downstream consumers (`ce-plan`, `document-review`) reference via the plan's
32
+ `origin:` field.
33
+
34
+ ### Field-name stability
35
+
36
+ Field names are stable across brainstorm revisions — never rename a field
37
+ or repurpose its semantics. Agents composing new brainstorms MUST use these
38
+ exact names; adding new fields is fine, but renaming `topic` to `subject`
39
+ or `date` to `created` breaks filename construction and resume detection.
40
+
41
+ > **Section inventory, content rules, and the Summary vs Problem Frame discipline are owned by `references/requirements-capture.md`; this file covers rendering conventions and metadata contracts only.**
42
+
43
+ ## Rendering
44
+
45
+ The format-specific reference describes how to render these sections:
46
+
47
+ - **Markdown rendering:** `references/markdown-rendering.md`
48
+
49
+ This reference (`brainstorm-sections.md`) is about rendering conventions and
50
+ metadata contracts; section content rules live in `references/requirements-capture.md`.
@@ -0,0 +1,202 @@
1
+ # Markdown Rendering
2
+
3
+ This is a format-rendering reference — it describes how to render any
4
+ artifact in markdown, independent of which skill is producing it.
5
+
6
+ It is paired with a section contract (`references/brainstorm-sections.md`)
7
+ that describes *what* the artifact contains. This reference describes *how*
8
+ markdown specifically presents it.
9
+
10
+ ## Hard invariants
11
+
12
+ These hold regardless of which skill produced the artifact.
13
+
14
+ - **YAML frontmatter at the top of the file.** Standard `---` delimited block
15
+ containing the artifact's stable metadata (title, status, date, type, etc.
16
+ — exact fields are per-skill, defined in the section contract). Editable
17
+ in place; tools and agents that do status flips (`active → completed`)
18
+ update the YAML directly.
19
+ - **ASCII identifiers in anchors.** Markdown headings auto-generate anchors
20
+ from the heading text. Keep headings ASCII so anchors are predictable
21
+ (`#implementation-units`, not `#implementación-units`).
22
+ - **Repo-relative paths for file references.** Always. Never absolute paths
23
+ — they break portability across machines, worktrees, teammates.
24
+ - **No HTML mixed in.** Keep the markdown pure. No `<div>`, no `<details>`,
25
+ no inline `<style>`. Markdown stays markdown.
26
+
27
+ ## Format principles
28
+
29
+ These shape what "good" markdown looks like; the agent applies them per
30
+ artifact based on content shape.
31
+
32
+ ### ID prefix format
33
+
34
+ Stable IDs (R, U, A, F, AE, KTD) appear as plain prefixes at the start of
35
+ the bullet or heading — do NOT bold the prefix. The prefix is visually
36
+ distinctive on its own; bolding it inflates visual noise.
37
+
38
+ ```markdown
39
+ - R1. The plan returns paginated sessions. ← right
40
+ - **R1.** The plan returns paginated sessions. ← wrong (bolded prefix)
41
+ ```
42
+
43
+ Same applies to unit headings: `### U1. Cloak detection in preflight contract`.
44
+
45
+ ### Content shape: prose vs bullets vs tables
46
+
47
+ The same content can be rendered three ways; the agent picks per content
48
+ shape, not by template default.
49
+
50
+ - **Prose** when the content has narrative flow (motivation, decision
51
+ rationale, problem framing). Bullets fragment narrative into
52
+ disconnected pieces.
53
+ - **Bullets** when items share a parallel shape but each carries enough
54
+ prose to not fit a table cell.
55
+ - **Tables** when 5+ items share uniform structure (`ID + body`,
56
+ `name + value`, `decision + rationale`, `risk + mitigation`). Tables
57
+ scan faster at that scale and unlock additional columns (status,
58
+ traceability, severity) that bullets can't accommodate cleanly.
59
+
60
+ The test: which shape would a reader scan fastest for this content? If
61
+ items have parallel structure and 5+ instances, table. If items are 3-5
62
+ and each has a few lines of prose, bullets. If the content is a single
63
+ narrative thought, prose.
64
+
65
+ ### Bold leader labels within bullets
66
+
67
+ When a bullet has substructure that benefits from named fields (Key Flows
68
+ with Trigger / Actors / Steps / Outcome, Acceptance Examples with Covers
69
+ / Given / When / Then), use bold leader labels at the start of nested
70
+ bullets — not deeper heading levels.
71
+
72
+ ```markdown
73
+ - F1. Anonymous capture
74
+ - **Trigger:** Agent enters Step 2a with no session.
75
+ - **Actors:** A1, A2
76
+ - **Steps:** Preflight detects cloak; agent launches; capture proceeds.
77
+ - **Covered by:** R1, R2, R5
78
+ ```
79
+
80
+ This gives the bullet structure without needing H4/H5 headings that would
81
+ clutter the doc and break TOC generation.
82
+
83
+ ### Section separators
84
+
85
+ For substantial artifacts, use horizontal rules (`---`) between top-level
86
+ H2 sections. Omit for short docs where separators would dominate.
87
+
88
+ ### Tables for genuinely comparative info only
89
+
90
+ Use tables for the uniform-shape case in "Content shape" above. Don't use
91
+ tables to render content lists that are really bullets — markdown tables
92
+ are noisier in raw form and worse for diffs.
93
+
94
+ ## Section anatomy
95
+
96
+ How section types commonly render in markdown. These are patterns, not
97
+ contracts — the agent picks the shape that fits the content.
98
+
99
+ - **Summary / Problem Frame** — prose paragraphs.
100
+ - **Requirements** — bullets with `R<N>.` prefix. When requirements span
101
+ more than one concern, grouping under bold inline headers is the default
102
+ shape, not optional polish (group by capability, not by discussion order);
103
+ render a flat list only when every requirement is about the same thing.
104
+ When requirements have status, traceability, or severity that warrant
105
+ additional columns, escalate to a table.
106
+ - **Implementation Units** — H3 heading per unit with `U<N>.` prefix.
107
+ Fields (Goal, Files, Patterns, Test Scenarios, Verification) render as
108
+ bullets with bold leader labels, or as sub-headings if the field has
109
+ multi-paragraph content.
110
+ - **Key Technical Decisions** — bullets with bold decision name + prose
111
+ rationale, or numbered KTD-N pattern when traceability matters.
112
+ - **Key Flows / Acceptance Examples** — bullets with bold leader labels
113
+ (Trigger / Actors / Steps / Outcome / Covers / Given-When-Then).
114
+ - **Scope Boundaries** — bullets, optionally split into "Deferred for
115
+ later" / "Outside this product's identity" sub-headings when the
116
+ positioning distinction matters.
117
+
118
+ The agent picks more elaborate or simpler shapes based on what each
119
+ specific artifact's content needs.
120
+
121
+ ## Diagrams
122
+
123
+ When the section contract calls for a diagram (architecture, sequence,
124
+ flowchart, state machine, swim lane, data-flow), markdown renders it as
125
+ a fenced mermaid block:
126
+
127
+ ```markdown
128
+ ` ``mermaid
129
+ flowchart TB
130
+ A[Start] --> B{Decision}
131
+ B -->|yes| C[Action]
132
+ B -->|no| D[Other action]
133
+ ` ``
134
+ ```
135
+
136
+ (`TB` direction default — keeps diagrams narrow in source view and in
137
+ narrow rendered viewports.)
138
+
139
+ For quantitative comparisons (bar charts, scatter plots) markdown has no
140
+ native equivalent — use a table with the data and let prose or caption
141
+ carry the interpretation.
142
+
143
+ ## Inline code and code blocks
144
+
145
+ - **Inline code** for identifiers (variable names, function names,
146
+ flag names, file paths, IDs that aren't section anchors).
147
+ - **Fenced code blocks** with language tag for code, shell commands,
148
+ API request/response samples. Always specify the language for syntax
149
+ highlighting and accessibility.
150
+
151
+ ```markdown
152
+ The flag `--cdp-url` accepts a URL.
153
+
154
+ ` ``bash
155
+ browser-use --cdp-url http://localhost:9222
156
+ ` ``
157
+ ```
158
+
159
+ ## No process exhaust
160
+
161
+ Engineering process metadata stays out of the artifact:
162
+
163
+ - No "captured at Phase X" notes
164
+ - No `## Next Steps` pointing to the next skill
165
+ - No italic provenance lines ("*Brainstorm completed 2026-05-13*")
166
+ - No engineering-flow shepherding ("Now read this file:", "Next, run that
167
+ command:")
168
+
169
+ This information belongs in commit messages, tool output, and agent
170
+ transcripts — not in the artifact a reader returns to weeks later.
171
+
172
+ ## Frontmatter shape
173
+
174
+ Per-skill frontmatter fields are defined in each skill's section contract
175
+ (`references/brainstorm-sections.md` lists brainstorm frontmatter). Common rules:
176
+
177
+ - YAML at the top of the file, delimited by `---` on its own line above
178
+ and below.
179
+ - Field names in lowercase snake_case (`status`, `created_at`, not
180
+ `Status`, `CreatedAt`).
181
+ - **Status lifecycle is per-contract.** When the section contract
182
+ defines a `status` field with a lifecycle (plans use
183
+ `active → completed`, flipped by ce-work at shipping time via direct
184
+ YAML edit), it is editable in place. When the section contract does
185
+ not define a status lifecycle (brainstorms have no `active → completed`
186
+ flip — they are upstream of plans and referenced via the plan's
187
+ `origin:`), do not introduce one.
188
+ - Stable across artifact revisions — never rename or repurpose a field.
189
+
190
+ ## Post-write audit
191
+
192
+ Before declaring the markdown file written, scan it for these common
193
+ slips:
194
+
195
+ - All stable IDs are plain-prefix format, not bolded.
196
+ - No HTML elements mixed in.
197
+ - All file paths are repo-relative.
198
+ - Horizontal rule separators between H2s (for Standard / Deep artifacts).
199
+ - No process exhaust (Phase X notes, Next Steps pointers, provenance
200
+ lines).
201
+ - Tables only where 5+ uniform-shape items justify them.
202
+ - Frontmatter has all the per-skill required fields with reasonable values.