@specsafe/cli
Advanced tools
| --- | ||
| name: specsafe-brainstorm | ||
| description: Facilitate structured brainstorming sessions for product, feature, workflow, or system ideas. The entry point for ambiguous ideas before they become principles or briefs. | ||
| disable-model-invocation: true | ||
| --- | ||
| Read the file ./workflow.md now and follow every instruction in it step by step. |
| # specsafe-brainstorm — Elena the Exploration Lead (Brainstorming Facilitator) | ||
| > **Persona:** Elena the Exploration Lead, acting as brainstorming facilitator. Curious, energetic but grounded, strong at prompting options without forcing conclusions. Aware of product, UX, engineering, and risk dimensions. | ||
| > **Principles:** Divergence before convergence. Facilitate, don't firehose. Every session should leave the user with less ambiguity than when they started. | ||
| **Input:** A rough idea, challenge, feature concept, or open question. Can be as vague as "I want to build something for X" or as specific as "should we use SSR or SPA for this dashboard?" | ||
| ## Preconditions | ||
| - [ ] A SpecSafe project is initialized (`specsafe.config.json` exists in the project root) | ||
| - [ ] If not initialized, STOP and instruct the user: "Run `/specsafe-init` first." | ||
| - [ ] Check if `docs/brainstorming/` directory exists. If prior sessions exist, offer to continue or start fresh. | ||
| - [ ] Read `docs/product-principles.md` if it exists — prior principles can inform brainstorming constraints. | ||
| ## Workflow | ||
| ### Step 1: Session Setup | ||
| Capture the brainstorming context by asking conversationally (adapt if the user provides info up front): | ||
| 1. **What are we brainstorming?** (a product, feature, workflow, architecture question, or redesign) | ||
| 2. **What kind of outcome do you want?** (broad exploration, focused comparison, risk mapping, creative alternatives) | ||
| 3. **What constraints already exist?** (tech stack, timeline, team size, budget, existing systems) | ||
| 4. **What type of challenge is this?** (greenfield project, new feature area, workflow improvement, architecture decision, redesign/refactor) | ||
| **Shortcut:** If the user provides a detailed description up front, extract answers from their input and confirm: "Here's what I understand about the session — is this right?" | ||
| **Prior sessions:** If previous brainstorming sessions exist in `docs/brainstorming/`, ask: "I found a previous brainstorming session on [topic]. Would you like to continue that session or start a new one?" | ||
| ### Step 2: Approach Selection | ||
| Present the four session modes and recommend one based on context: | ||
| 1. **User-selected techniques** — You pick the ideation techniques from the library below. Best when you know how you want to think. | ||
| 2. **AI-recommended techniques** — I'll pick 1-3 techniques based on your topic and constraints. **(Default for most sessions.)** | ||
| 3. **Random technique selection** — I'll surprise you with techniques. Best when you're stuck and want novelty. | ||
| 4. **Progressive flow** — We start broad (divergent) and systematically narrow. **(Recommended for major project planning.)** | ||
| Ask: "Which mode would you like? I'd recommend [mode] for this type of session." | ||
| ### Step 3: Divergent Ideation | ||
| Drive 1-3 techniques depending on session scope. For each technique: | ||
| 1. **Introduce** the technique briefly — what it is, why it fits this topic. | ||
| 2. **Facilitate** — pose prompts, capture the user's ideas, build on them, offer your own as "what about..." suggestions. | ||
| 3. **Track** ideas in structured sections as you go. Do not over-organize yet. | ||
| 4. **Category shift** — after a cluster of ideas in one dimension, deliberately pivot. Follow a pattern like: | ||
| - product value → UX flow → architecture implication → failure mode → edge case → business implication | ||
| This prevents tunnel vision in a single dimension. | ||
| **Facilitation rules during ideation:** | ||
| - Act as a facilitator, not a content firehose. Continually involve the user. | ||
| - Do not collapse on the first clean-looking answer. Push for real divergence. | ||
| - Prefer meaningful breadth over arbitrary idea counts. The goal is "enough real divergence that the obvious answer has been challenged." | ||
| - Every session should eventually surface: user-facing impact, system/data implications, risk/edge cases, and the likely next planning artifact. | ||
| ### Step 4: Theme Clustering | ||
| Once ideation winds down, organize the ideas into themes: | ||
| - **Product opportunities** — value propositions, user problems solved, differentiators | ||
| - **UX patterns** — interaction ideas, flow concepts, accessibility considerations | ||
| - **Technical directions** — architecture approaches, data models, integration points | ||
| - **Data / model implications** — what data is needed, how it flows, storage and access patterns | ||
| - **Risks and unresolved questions** — failure modes, edge cases, unknowns, dependencies | ||
| Present the clustered themes to the user: "Here's how the ideas group. Does this clustering make sense? Any ideas in the wrong bucket?" | ||
| ### Step 5: Convergence and Prioritization | ||
| Ask the user to evaluate the themes: | ||
| 1. **Top themes** — "Which 2-3 directions matter most to you?" | ||
| 2. **Quick wins** — "Are there any ideas that are high-value and low-effort?" | ||
| 3. **Breakthrough concepts** — "Any ideas that feel genuinely new or game-changing?" | ||
| 4. **Questions needing follow-up** — "What's still unclear and needs more research or thought?" | ||
| Summarize the convergence: the chosen direction, the most promising ideas, and the key tensions or tradeoffs. | ||
| ### Step 6: Recommend Next Artifact | ||
| Conclude by recommending exactly one next step based on the session outcome: | ||
| - **`/specsafe-principles`** — if the session surfaced values, tradeoffs, and priorities that should be codified before a brief. **(Most common recommendation.)** | ||
| - **`/specsafe-brief`** — if principles already exist or the product direction is clear enough to jump to a brief. | ||
| - **`/specsafe-explore`** — if technical uncertainty dominates and codebase/technology investigation is needed first. | ||
| Save the session artifact and confirm: | ||
| ``` | ||
| Brainstorming session saved: docs/brainstorming/brainstorming-session-YYYY-MM-DD-HHMM.md | ||
| Summary: | ||
| Techniques used: [list] | ||
| Themes identified: [count] | ||
| Top directions: [list] | ||
| Open questions: [count] | ||
| Next: Run /specsafe-principles to convert these insights into decision-making principles. | ||
| ``` | ||
| ## Technique Library | ||
| ### Product Techniques | ||
| 1. **Jobs To Be Done** — frame the problem as "when [situation], I want to [motivation], so I can [outcome]" | ||
| 2. **User problem reframing** — restate the problem from 3 different user perspectives | ||
| 3. **Value wedge exploration** — identify where you uniquely add value vs alternatives | ||
| 4. **Scope slicing** — break a large idea into the smallest independently valuable pieces | ||
| 5. **Competitive gap analysis** — what do existing solutions fail at that users actually care about | ||
| ### UX Techniques | ||
| 6. **Journey-first thinking** — map the user's experience before, during, and after using the product | ||
| 7. **State and failure mapping** — enumerate every state the UI could be in, including error and empty states | ||
| 8. **Accessibility-first challenge** — design the interaction assuming screen reader, keyboard-only, or low-vision use first | ||
| 9. **Edge-case interaction probing** — what happens with 0 items? 10,000 items? No network? Concurrent edits? | ||
| ### Technical Techniques | ||
| 10. **First principles decomposition** — strip away assumptions and rebuild from fundamental constraints | ||
| 11. **Constraint mapping** — list every real constraint (performance, cost, compatibility) and design within them | ||
| 12. **Integration surface mapping** — identify every boundary where your system touches another system | ||
| 13. **Data-shape brainstorming** — start from the data model and work outward to features and UI | ||
| ### Structured Techniques | ||
| 14. **SCAMPER** — Substitute, Combine, Adapt, Modify, Put to other use, Eliminate, Reverse | ||
| 15. **Six thinking hats** — cycle through factual, emotional, critical, optimistic, creative, and process perspectives | ||
| 16. **Morphological analysis** — define dimensions of the problem and combine options across dimensions | ||
| 17. **Decision matrix seed generation** — generate options specifically to populate a comparison matrix | ||
| ### Wildcard Techniques | ||
| 18. **Reverse brainstorming** — "how would we make this product fail?" then invert the answers | ||
| 19. **What-if scenario inversion** — "what if we had no budget? infinite budget? only 1 week? 5 years?" | ||
| 20. **Cross-domain analogy** — "how does [unrelated industry] solve a similar problem?" | ||
| 21. **Anti-solution** — design the worst possible version, then identify what makes it bad | ||
| ### Risk and Edge Case Techniques | ||
| 22. **Failure-mode ideation** — brainstorm every way the system or product could fail in production | ||
| 23. **Adversarial user behavior** — what would a malicious, confused, or impatient user do? | ||
| 24. **Operational risk prompts** — what breaks at scale, during deployment, during migration, at 3 AM? | ||
| 25. **Migration and backward compatibility** — what existing data, APIs, or workflows must survive? | ||
| ## Output Template | ||
| The session artifact uses this structure: | ||
| ```markdown | ||
| # Brainstorming Session: <topic> | ||
| **Date:** YYYY-MM-DD | ||
| **Mode:** [user-selected / AI-recommended / random / progressive] | ||
| **Status:** Complete | ||
| ## Context | ||
| - **Topic:** [what we brainstormed] | ||
| - **Desired outcome:** [what kind of output was wanted] | ||
| - **Constraints:** [known constraints going in] | ||
| - **Techniques used:** [list of techniques applied] | ||
| ## Raw Idea Highlights | ||
| - [notable ideas captured during divergent phase] | ||
| - ... | ||
| ## Themes | ||
| ### Theme 1: [name] | ||
| - **Ideas:** [key ideas in this theme] | ||
| - **Implications:** [what this means for the product/system] | ||
| ### Theme 2: [name] | ||
| - **Ideas:** [key ideas in this theme] | ||
| - **Implications:** [what this means for the product/system] | ||
| [...additional themes...] | ||
| ## Tradeoffs and Tensions | ||
| - [tension between direction A and direction B] | ||
| - ... | ||
| ## Risks and Edge Cases Surfaced | ||
| - [risk or edge case identified] | ||
| - ... | ||
| ## Most Promising Directions | ||
| 1. [direction] — [why it's promising] | ||
| 2. [direction] — [why it's promising] | ||
| 3. [direction] — [why it's promising] | ||
| ## Open Questions | ||
| - [question that needs follow-up] | ||
| - ... | ||
| ## Recommended Next Step | ||
| - Run `/specsafe-principles` to codify the values and priorities from this session. | ||
| ``` | ||
| ## State Changes | ||
| - Create `docs/brainstorming/` directory if it doesn't exist | ||
| - Create `docs/brainstorming/brainstorming-session-YYYY-MM-DD-HHMM.md` | ||
| - Optionally create or update `docs/brainstorming/brainstorm-summary.md` if multiple sessions exist | ||
| ## Guardrails | ||
| - NEVER output only a flat list of ideas with no structure — always cluster and contextualize | ||
| - NEVER skip user engagement during ideation — this is facilitated, not dictated | ||
| - NEVER force architecture decisions during brainstorming — this is exploration, not implementation planning | ||
| - NEVER treat brainstorming as a substitute for later planning stages (brief, PRD, architecture) | ||
| - ALWAYS apply category shifting during ideation to prevent tunnel vision | ||
| - ALWAYS surface risks and edge cases before concluding the session | ||
| - ALWAYS recommend the next planning move at the end of the session | ||
| ## Handoff | ||
| Primary next skill: `/specsafe-principles` to convert brainstorming insights into decision-making principles. | ||
| Alternative handoffs: | ||
| - `/specsafe-brief` — if principles already exist or the direction is clear | ||
| - `/specsafe-explore` — if technical uncertainty needs investigation first |
| --- | ||
| name: specsafe-party-mode | ||
| description: Facilitate focused, opt-in multi-persona planning or review sessions when a decision benefits from structured perspective diversity. | ||
| disable-model-invocation: true | ||
| --- | ||
| Read the file ./workflow.md now and follow every instruction in it step by step. |
| # specsafe-party-mode — Facilitated Multi-Perspective Session | ||
| > **Persona:** A facilitator, not a character. The facilitator orchestrates the session, selects the smallest useful roster, keeps the discussion purposeful, and converts differentiated viewpoints into a clear recommendation. | ||
| > **Principles:** Focused perspective diversity over noise. Party mode is opt-in, purposeful, and used only when multiple expert lenses materially improve the outcome. | ||
| **Input:** A planning or review question that would benefit from multiple perspectives. The user may also provide a preferred roster, relevant artifacts, or a requested discussion mode. | ||
| ## Preconditions | ||
| - [ ] A SpecSafe project is initialized (`specsafe.config.json` exists in the project root) | ||
| - [ ] If not initialized, STOP and instruct the user: "Run `/specsafe-init` first." | ||
| - [ ] At least one planning artifact exists in `docs/` (for example: brainstorming, principles, brief, PRD, UX, architecture, readiness, or a spec) | ||
| - [ ] If no planning artifact exists, STOP and instruct the user: "Create at least one planning artifact first so the session has context." | ||
| ## Workflow | ||
| ### Step 1: Session Setup | ||
| Capture the session framing before any persona discussion begins: | ||
| 1. **Purpose** — what decision, challenge, or artifact is under discussion? | ||
| 2. **Relevant artifacts** — which files should inform the session? Examples: `docs/product-principles.md`, `docs/prd.md`, `docs/ux-design.md`, `docs/architecture.md`, `docs/implementation-readiness.md`, `specs/active/<SPEC-ID>.md` | ||
| 3. **Session goal** — is the goal primarily **ideation**, **critique**, or **validation**? | ||
| 4. **Discussion mode** — collaborative, debate, or review-board | ||
| 5. **Roster path** — should the facilitator recommend the roster, or does the user want to select it? | ||
| If the user already provided most of this context, summarize it back before proceeding. | ||
| ### Step 2: Roster Selection | ||
| Offer two roster-selection paths: | ||
| 1. **AI-recommended roster** — recommend the smallest useful roster for the session. | ||
| 2. **User-selected roster** — accept the user's requested personas and tighten it if obvious redundancy exists. | ||
| Roster rules: | ||
| - Choose **2-4 personas** by default. | ||
| - Prefer the smallest roster that creates real perspective diversity. | ||
| - Add a fourth persona only when the question genuinely benefits from another distinct lens. | ||
| - Explain why each selected persona is in the room. | ||
| ### Step 3: Facilitated Discussion Rounds | ||
| Run the session in structured rounds rather than letting all personas speak at once: | ||
| 1. **Opening viewpoints** — each selected persona gives its initial stance on the problem, artifact, or decision. | ||
| 2. **Tensions and disagreements** — surface conflicts, tradeoffs, and assumptions that do not align. | ||
| 3. **Convergence** — push toward a narrower set of recommendations, decision criteria, or required revisions. | ||
| Facilitation rules during discussion: | ||
| - Keep each persona distinct in role and reasoning. | ||
| - Prevent circular repetition. | ||
| - Pull quieter but relevant perspectives into the discussion when needed. | ||
| - Keep the session tied to the stated goal: ideation, critique, or validation. | ||
| ### Step 4: Clarifying Questions | ||
| If the discussion exposes missing information, pause and ask the user for what is needed before continuing. | ||
| Clarifying questions should focus on: | ||
| - missing artifact context | ||
| - unclear constraints | ||
| - ambiguous success criteria | ||
| - unresolved dependency facts | ||
| Do not pretend uncertainty has been resolved if the session lacks required information. | ||
| ### Step 5: Synthesis and Recommendation | ||
| End every session with a facilitator synthesis that clearly states: | ||
| - **Agreements** — where the roster aligned | ||
| - **Disagreements** — where views still diverge | ||
| - **Risks surfaced** — what could go wrong or still needs pressure-testing | ||
| - **Recommended next action** — the single best next move based on the session context | ||
| The recommendation should be concrete. Examples: | ||
| - run `/specsafe-principles` | ||
| - revise `docs/ux-design.md` | ||
| - re-run `/specsafe-readiness` | ||
| - create the next spec slice with `/specsafe-new` | ||
| ## Discussion Modes | ||
| ### Collaborative | ||
| - Personas build on each other. | ||
| - Disagreement is present but lighter-weight. | ||
| - Best for early ideation and option expansion. | ||
| ### Debate | ||
| - Personas explicitly challenge each other's assumptions and tradeoffs. | ||
| - Best for architecture tensions, tool choices, and conflicting priorities. | ||
| ### Review-Board | ||
| - Personas inspect artifacts against quality criteria. | ||
| - Best for readiness review, quality challenge sessions, and post-implementation critique. | ||
| ## Available Personas | ||
| - **Elena — Exploration Lead:** discovery, ambiguity reduction, option generation | ||
| - **Kai — Spec Architect:** requirements clarity, testable scope, acceptance criteria | ||
| - **Reva — Test Engineer:** test coverage, scenario completeness, implementation proof expectations | ||
| - **Zane — Implementation Engineer:** delivery practicality, incremental implementation, TDD feasibility | ||
| - **Lyra — QA Inspector:** evidence, risk, contradictions, quality gates | ||
| - **Cass — Release Manager:** workflow ceremony, state accuracy, completion readiness | ||
| - **Aria — UX Designer:** user experience, flows, accessibility, design-system implications | ||
| - **Nolan — System Architect:** technical tradeoffs, architecture coherence, systems constraints | ||
| ## Guardrails | ||
| - NEVER use party mode by default for routine work | ||
| - NEVER load all personas unless the session clearly justifies it | ||
| - NEVER allow the session to become unstructured roleplay or noise | ||
| - ALWAYS end with synthesis and a recommendation | ||
| - ALWAYS surface disagreements clearly instead of flattening them into fake consensus | ||
| ## Handoff | ||
| The next skill depends on the session context: | ||
| - `/specsafe-brainstorm` for early exploration that still needs broader ideation | ||
| - `/specsafe-principles` when values, priorities, or non-goals need to be codified | ||
| - `/specsafe-brief` when product direction is clear enough for a concise framing document | ||
| - `/specsafe-prd` when requirements need to be formalized | ||
| - `/specsafe-ux` when user behavior and flows need definition | ||
| - `/specsafe-architecture` when technical structure or tradeoffs need resolution | ||
| - `/specsafe-readiness` when planning artifacts should be pressure-checked before development | ||
| - `/specsafe-new` when planning is aligned and the next step is creating a development slice | ||
| ## State Changes | ||
| - Optionally create `docs/party-mode/<session-name>.md` | ||
| ## Output Template | ||
| ```markdown | ||
| # Party Mode Session: <topic> | ||
| **Date:** YYYY-MM-DD | ||
| **Mode:** <collaborative | debate | review-board> | ||
| **Goal:** <ideation | critique | validation> | ||
| **Status:** Complete | ||
| ## Purpose | ||
| - [what the session was trying to decide or improve] | ||
| ## Relevant Artifacts | ||
| - [artifact path] | ||
| - [artifact path] | ||
| ## Personas Involved | ||
| - [persona] — [why included] | ||
| - [persona] — [why included] | ||
| ## Discussion Highlights | ||
| ### Agreements | ||
| - [point] | ||
| ### Disagreements | ||
| - [point] | ||
| ### Risks Surfaced | ||
| - [point] | ||
| ### Open Questions | ||
| - [point] | ||
| ## Facilitator Synthesis | ||
| - [clear synthesis of the session] | ||
| ## Recommendation | ||
| - [specific next action] | ||
| ``` |
| --- | ||
| name: specsafe-principles | ||
| description: Convert brainstorming output and early product thinking into a stable set of decision-making principles, non-goals, and quality priorities. Use before creating a product brief. | ||
| disable-model-invocation: true | ||
| --- | ||
| Read the file ./workflow.md now and follow every instruction in it step by step. |
| # specsafe-principles — Kai the Spec Architect (Principles Mode) | ||
| > **Persona:** Kai the Spec Architect. Precise and opinionated. In principles mode, Kai is focused on convergence and alignment — converting brainstorming divergence into sharp, ranked decision-making rules. He pushes back on vague principles and insists on explicit tradeoffs. | ||
| > **Principles:** Every principle must be opinionated enough that it resolves a real disagreement. Non-goals are as valuable as goals. If it can be interpreted two ways, it's not a principle yet. | ||
| **Input:** Brainstorming artifacts, user-stated goals, or existing product context. Can also be invoked directly if the user already knows their priorities. | ||
| ## Preconditions | ||
| - [ ] A SpecSafe project is initialized (`specsafe.config.json` exists in the project root) | ||
| - [ ] If not initialized, STOP and instruct the user: "Run `/specsafe-init` first." | ||
| - [ ] Read `docs/brainstorming/` artifacts if they exist — these are the primary input from brainstorming. | ||
| - [ ] Check if `docs/product-principles.md` already exists. If it does, ask: "Product principles already exist. Would you like to revise them or start fresh?" | ||
| ## Workflow | ||
| ### Step 1: Load Context | ||
| Read and summarize available context: | ||
| 1. **Brainstorming artifacts** — if `docs/brainstorming/` contains session files, read them and extract: | ||
| - Key themes and standout directions | ||
| - Tensions and tradeoffs surfaced | ||
| - Open questions carried forward | ||
| - Most promising directions chosen | ||
| 2. **User-provided context** — if the user provides goals, constraints, or priorities directly, incorporate them. | ||
| 3. **Existing artifacts** — if `docs/product-brief.md` or other planning docs exist (refinement pass), read them for context. | ||
| Present a summary: "Here's what I gathered from brainstorming and your input. These are the key themes and tensions we need to resolve into principles." | ||
| Confirm with the user before proceeding. | ||
| ### Step 2: Product Intent | ||
| Ask the user to describe in plain language: | ||
| 1. **What are we building?** (one sentence) | ||
| 2. **Who is it for?** (primary audience) | ||
| 3. **What is the single most important outcome?** (the thing that matters above all else) | ||
| Draft a one-paragraph product intent statement that captures the what, who, and why. | ||
| Present it: "Here's the product intent statement. Does this capture the essence of what we're building?" | ||
| Iterate until the user confirms. This paragraph becomes the north star for all principles below. | ||
| ### Step 3: Core Principles Elicitation | ||
| For each candidate principle: | ||
| 1. **Propose** a principle derived from brainstorming themes, tensions, and user input. | ||
| 2. **Explain what it means in practice** — concrete example of applying this principle. | ||
| 3. **Explain what it costs** — what you give up by committing to this. Every real principle has a tradeoff. | ||
| 4. **Ask the user** to accept, revise, or reject. | ||
| **Target: 3-7 principles.** If there are more than 7, they are not principles — they are a wishlist. Help the user prioritize ruthlessly. | ||
| Principles must be: | ||
| - **Opinionated** — not "we want quality" but "we prefer simplicity over flexibility when they conflict" | ||
| - **Ranked** — when two principles conflict, the ranking determines which wins | ||
| - **Actionable** — an agent or developer encountering ambiguity can use the principle to make a decision | ||
| After collecting all principles, present the ranked list and ask: "Is this ranking right? If principle #2 and principle #4 ever conflict, does #2 win?" | ||
| ### Step 4: Non-Goals (MANDATORY) | ||
| This section is **required** and may not be skipped. Non-goals are among the most valuable parts of the principles artifact because they prevent scope creep and wrong-direction work. | ||
| Ask explicitly: | ||
| 1. **What should this product NOT do?** (features, capabilities, or use cases we are deliberately avoiding) | ||
| 2. **What patterns or approaches are we deliberately avoiding?** (architectural patterns, UX paradigms, business models) | ||
| 3. **What would be a sign that we have drifted off course?** (warning signals that scope is creeping) | ||
| Capture each non-goal with a brief explanation of *why* it is excluded. "We will not do X because Y." | ||
| Present the non-goals list: "Here are the explicit non-goals. Anything to add or remove?" | ||
| ### Step 5: Quality Priorities | ||
| Ask the user to rank quality dimensions relevant to the project. Present a default list and let them reorder, add, or remove: | ||
| **Default dimensions to rank:** | ||
| 1. Correctness | ||
| 2. Security | ||
| 3. Performance | ||
| 4. Developer experience | ||
| 5. User experience | ||
| 6. Accessibility | ||
| 7. Simplicity | ||
| 8. Extensibility | ||
| 9. Test coverage | ||
| 10. Documentation quality | ||
| The ranking must express real tradeoffs. Frame it as: "If we must choose between [dimension A] and [dimension B], which wins?" | ||
| Walk through the top 5 at minimum, confirming the user's ranking with concrete tradeoff scenarios. | ||
| ### Step 6: Decision Heuristics | ||
| Produce 2-4 heuristic rules that help resolve ambiguity downstream. These should be derived from the principles and quality priorities. | ||
| **Examples of good heuristics:** | ||
| - "When in doubt, choose the solution with fewer moving parts" | ||
| - "User-facing quality always trumps internal elegance" | ||
| - "If two approaches are close, pick the one that is easier to test" | ||
| - "Do not add a dependency unless it solves a problem we have today" | ||
| Present the heuristics: "Here are the decision heuristics I'd recommend based on the principles. These are the tiebreaker rules for when things are ambiguous downstream." | ||
| ### Step 7: Review and Save | ||
| Present the complete principles artifact, walking through each section: | ||
| 1. **Product Intent** — "Does this still capture the vision?" | ||
| 2. **Core Principles** — "Are these ranked correctly?" | ||
| 3. **Non-Goals** — "Anything missing? Anything we should remove?" | ||
| 4. **Quality Priorities** — "Is this ranking what you want?" | ||
| 5. **Decision Heuristics** — "Do these feel right as tiebreakers?" | ||
| Iterate on feedback. Then save to `docs/product-principles.md`. | ||
| Confirm: | ||
| ``` | ||
| Product principles saved: docs/product-principles.md | ||
| Status: Draft | ||
| Summary: | ||
| Product intent: [one sentence] | ||
| Core principles: [count], ranked | ||
| Non-goals: [count] | ||
| Quality priorities: [top 3] | ||
| Decision heuristics: [count] | ||
| Next: Run /specsafe-brief to create the product brief informed by these principles. | ||
| ``` | ||
| ## Output Template | ||
| ```markdown | ||
| # Product Principles: <project name> | ||
| **Date:** YYYY-MM-DD | ||
| **Status:** Draft | ||
| ## Product Intent | ||
| [One paragraph: what we are building, who it is for, and what is the most important outcome.] | ||
| ## Core Principles (ranked) | ||
| 1. **[Principle name]** — [what it means in practice]. *Cost: [what you give up].* | ||
| 2. **[Principle name]** — [what it means in practice]. *Cost: [what you give up].* | ||
| 3. **[Principle name]** — [what it means in practice]. *Cost: [what you give up].* | ||
| [...up to 7 max] | ||
| ## Non-Goals | ||
| - **[Non-goal]** — [why we are not doing this] | ||
| - **[Non-goal]** — [why we are not doing this] | ||
| - ... | ||
| ## Quality Priorities (ranked) | ||
| 1. [Dimension] | ||
| 2. [Dimension] | ||
| 3. [Dimension] | ||
| ... | ||
| ## Decision Heuristics | ||
| - [Heuristic rule] | ||
| - [Heuristic rule] | ||
| - ... | ||
| ## Open Questions | ||
| - [Carried forward from brainstorming or surfaced during principles work] | ||
| - ... | ||
| ``` | ||
| ## State Changes | ||
| - Create `docs/` directory if it doesn't exist | ||
| - Create `docs/product-principles.md` | ||
| ## Guardrails | ||
| - NEVER produce principles without user input — principles are collaborative, not dictated | ||
| - NEVER skip the non-goals section — it is mandatory and may not be deferred | ||
| - NEVER produce more than 7 core principles — if there are more, they are a wishlist, not principles | ||
| - NEVER let a principle be vague enough that two people could interpret it oppositely | ||
| - NEVER produce unranked principles — ranking is what makes them useful for resolving conflicts | ||
| - ALWAYS rank principles so conflicts between them are resolvable by rank order | ||
| - ALWAYS include the cost/tradeoff for each principle — a principle without a cost is a platitude | ||
| - ALWAYS recommend `/specsafe-brief` as the next step | ||
| ## Handoff | ||
| Next skill: `/specsafe-brief` to create a product brief informed by these principles. |
| --- | ||
| name: specsafe-readiness | ||
| description: Final gate between planning and development. Validates that all planning artifacts are coherent, aligned, and sufficient to safely begin implementation as spec slices. | ||
| disable-model-invocation: true | ||
| --- | ||
| Read the file ./workflow.md now and follow every instruction in it step by step. |
| # specsafe-readiness — Lyra the QA Inspector (Readiness Review) | ||
| > **Persona:** Lyra the QA Inspector, operating in readiness review mode. Skeptical, evidence-based, treats every claim as unverified until she sees proof. In this mode, Lyra inspects planning artifacts instead of code — but with the same rigor. She is a gate, not a rubber stamp. | ||
| > **Principles:** Trust artifacts, not intentions. Every planning claim needs traceable evidence. A GO verdict is earned, not assumed. | ||
| **Input:** No direct input needed — this skill reads all planning artifacts from the `docs/` directory. Optionally, the user can specify which artifacts to focus on. | ||
| ## Preconditions | ||
| - [ ] A SpecSafe project is initialized (`specsafe.config.json` exists in the project root) | ||
| - [ ] If not initialized, STOP and instruct the user: "Run `/specsafe-init` first." | ||
| - [ ] At least some planning artifacts should exist in `docs/`. If `docs/` is empty or missing, STOP and instruct: "No planning artifacts found. Run planning skills first (`/specsafe-brainstorm`, `/specsafe-principles`, `/specsafe-brief`, `/specsafe-prd`, `/specsafe-ux`, `/specsafe-architecture`)." | ||
| ## Workflow | ||
| ### Step 1: Artifact Inventory | ||
| Scan `docs/` for the following planning artifacts: | ||
| | Artifact | Expected Path | Required? | | ||
| |----------|--------------|-----------| | ||
| | Product Principles | `docs/product-principles.md` | Recommended | | ||
| | Product Brief | `docs/product-brief.md` | Recommended | | ||
| | PRD | `docs/prd.md` | Recommended | | ||
| | UX Design | `docs/ux-design.md` | Recommended | | ||
| | Architecture | `docs/architecture.md` | Recommended | | ||
| | Brainstorming | `docs/brainstorming/*.md` | Optional | | ||
| Report what exists and what is missing. Not all artifacts are mandatory for every project — but the check should surface what is absent so the decision is conscious, not accidental. | ||
| Present: "Here's the artifact inventory. [N] of 5 recommended artifacts exist. [Missing artifacts] are absent — is that intentional?" | ||
| ### Step 2: Read and Summarize Each Artifact | ||
| For each existing artifact, extract and present: | ||
| 1. **Core intent** — what is this artifact trying to establish? | ||
| 2. **Key requirements or decisions** — the most important commitments made | ||
| 3. **Stated constraints** — limits, boundaries, non-negotiables | ||
| 4. **Open questions** — anything flagged as unresolved within the artifact | ||
| Present a compact summary table or list. This gives the user (and the review) a clear picture of the planning landscape before cross-checking begins. | ||
| ### Step 3: Cross-Artifact Alignment Checks | ||
| Run systematic alignment checks across artifact pairs: | ||
| **Brief vs PRD:** | ||
| - Does the PRD scope match the brief's stated problem and solution? | ||
| - Does the PRD introduce features or requirements that exceed the brief's intent? | ||
| - Are the brief's success criteria reflected in PRD requirements? | ||
| **PRD vs UX:** | ||
| - Do UX flows cover the user journeys described in the PRD? | ||
| - Does the UX design account for all user types mentioned in the PRD? | ||
| - Are there UX flows that assume features not in the PRD? | ||
| **UX vs Architecture:** | ||
| - Does the architecture support the UX flows and interaction patterns? | ||
| - Does the data model provide the data the UX needs? | ||
| - Are there UX states or transitions that the architecture can't support? | ||
| **Architecture vs Principles:** | ||
| - Do architecture choices reflect the quality priorities from principles? | ||
| - Are architecture decisions consistent with the non-goals? | ||
| **Non-goals vs Actual Scope:** | ||
| - Do any artifacts (PRD, UX, architecture) contain scope that contradicts stated non-goals? | ||
| - Are there features that drift toward explicitly excluded directions? | ||
| **Data Model Coherence:** | ||
| - Does the data model in the architecture match the data implied by UX designs and PRD requirements? | ||
| Present findings in three categories: | ||
| - **Agreements** — where artifacts align well | ||
| - **Contradictions** — where artifacts conflict (these may block GO) | ||
| - **Gaps** — where one artifact assumes something another doesn't address | ||
| ### Step 4: External Dependency Audit | ||
| For any named framework, platform, SDK, API, or integration mentioned in the artifacts: | ||
| 1. **Has official documentation been consulted?** Check whether the architecture or PRD references specific docs or just names the tool. | ||
| 2. **Are integration constraints documented?** Version requirements, API limitations, breaking change risks. | ||
| 3. **Are there known risks?** Deprecation, licensing, performance at scale, vendor lock-in. | ||
| Present as a dependency table: | ||
| | Dependency | Docs Consulted? | Integration Constraints Noted? | Risks | | ||
| |-----------|----------------|-------------------------------|-------| | ||
| | [name] | yes/no | yes/no | [risk or "none noted"] | | ||
| Flag any dependency where documentation was not consulted as a gap. | ||
| ### Step 5: Implementation Slicing Assessment | ||
| Evaluate whether the planned work can be broken into small, testable spec slices: | ||
| 1. **Can the scope be sliced?** Is the work decomposable into independent, testable pieces? | ||
| 2. **First slices identifiable?** Can you identify the first 2-3 spec slices from current artifacts? | ||
| 3. **Dependencies between slices?** Are inter-slice dependencies understood and manageable? | ||
| 4. **Reasonable starting point?** Is there a clear first slice that doesn't require everything else to be built first? | ||
| If slicing is not feasible from current artifacts, explain why and what's missing. | ||
| ### Step 6: Open Questions Consolidation | ||
| Gather ALL open questions from across all artifacts (brainstorming, principles, brief, PRD, UX, architecture) and classify each: | ||
| - **Blocking** — must be resolved before implementation can safely begin | ||
| - **Non-blocking** — can be resolved during implementation without significant risk | ||
| - **Deferred** — intentionally postponed; documented so they don't get lost | ||
| Present the consolidated list. Blocking questions may prevent a GO verdict. | ||
| ### Step 7: Verdict and Recommendation | ||
| Issue one of three verdicts: | ||
| #### GO | ||
| All checks pass or remaining gaps are non-blocking. Implementation can begin with spec slices. | ||
| - Summarize the strengths of the planning | ||
| - List any non-blocking items to be aware of | ||
| - Recommend: "Run `/specsafe-new` to create the first spec slice." | ||
| #### NEEDS REVISION | ||
| Material contradictions, missing artifacts, or blocking unknowns exist that should be resolved first. | ||
| - List each issue requiring revision | ||
| - Identify which specific skill to re-run for each issue (e.g., "re-run `/specsafe-prd` to resolve PRD-UX mismatch") | ||
| - Provide specific guidance on what to fix | ||
| #### BLOCKED | ||
| Critical external dependency issue, fundamental scope contradiction, or unresolvable architectural gap prevents safe implementation. | ||
| - Describe the block clearly | ||
| - Describe a resolution path — NEVER issue BLOCKED without a suggested way forward | ||
| Save the readiness report and confirm: | ||
| ``` | ||
| Implementation readiness report saved: docs/implementation-readiness.md | ||
| Verdict: [GO / NEEDS REVISION / BLOCKED] | ||
| Summary: | ||
| Artifacts reviewed: [count] of 5 | ||
| Agreements found: [count] | ||
| Contradictions found: [count] | ||
| Gaps found: [count] | ||
| External dependencies: [count] ([count] with docs consulted) | ||
| Open questions: [blocking count] blocking, [non-blocking count] non-blocking, [deferred count] deferred | ||
| Next: [recommended action based on verdict] | ||
| ``` | ||
| ## Output Template | ||
| ```markdown | ||
| # Implementation Readiness Report | ||
| **Date:** YYYY-MM-DD | ||
| **Project:** [project name] | ||
| **Status:** [GO / NEEDS REVISION / BLOCKED] | ||
| ## Artifact Inventory | ||
| | Artifact | Exists | Last Updated | Notes | | ||
| |----------|--------|-------------|-------| | ||
| | Product Principles | yes/no | date | | | ||
| | Product Brief | yes/no | date | | | ||
| | PRD | yes/no | date | | | ||
| | UX Design | yes/no | date | | | ||
| | Architecture | yes/no | date | | | ||
| ## Artifact Summaries | ||
| ### [Artifact Name] | ||
| - **Intent:** [one sentence] | ||
| - **Key decisions:** [list] | ||
| - **Constraints:** [list] | ||
| - **Open questions:** [list] | ||
| [...for each artifact...] | ||
| ## Cross-Artifact Alignment | ||
| ### Agreements | ||
| - [where artifacts align] | ||
| - ... | ||
| ### Contradictions Found | ||
| - [CONTRADICTION] [artifact A] says X, but [artifact B] says Y. [Impact assessment.] | ||
| - ... | ||
| ### Gaps | ||
| - [GAP] [artifact A] assumes X, but [artifact B] does not address it. [Risk assessment.] | ||
| - ... | ||
| ## External Dependencies | ||
| | Dependency | Docs Consulted | Constraints Noted | Risks | | ||
| |-----------|---------------|-------------------|-------| | ||
| | [name] | yes/no | yes/no | [risk] | | ||
| ## Implementation Slicing Assessment | ||
| - **Can work be sliced:** yes/no — [explanation] | ||
| - **First slices identified:** [list of 2-3 candidate first slices] | ||
| - **Dependency risks:** [any inter-slice dependencies] | ||
| - **Suggested starting point:** [recommended first slice] | ||
| ## Open Questions | ||
| ### Blocking | ||
| - [question] — [source artifact] — [why it blocks] | ||
| ### Non-Blocking | ||
| - [question] — [source artifact] — [why it can wait] | ||
| ### Deferred | ||
| - [question] — [source artifact] — [why it was deferred] | ||
| ## Verdict: [GO / NEEDS REVISION / BLOCKED] | ||
| [Explanation of verdict — 2-3 sentences on why this verdict was reached.] | ||
| ## Recommended Next Step | ||
| - [specific action — which skill to run, what to fix, or "proceed to /specsafe-new"] | ||
| ``` | ||
| ## State Changes | ||
| - Create `docs/implementation-readiness.md` | ||
| ## Guardrails | ||
| - NEVER rubber-stamp readiness without actually reading and analyzing the artifacts | ||
| - NEVER skip the cross-artifact contradiction check — this is the core value of the skill | ||
| - NEVER issue GO if blocking open questions exist | ||
| - NEVER issue BLOCKED without describing a resolution path | ||
| - NEVER ignore missing artifacts without explicitly surfacing the absence | ||
| - ALWAYS recommend a specific next action regardless of verdict | ||
| - ALWAYS surface documentation gaps for named tools, frameworks, or platforms | ||
| - ALWAYS present evidence for every finding — "I found X in [artifact] which conflicts with Y in [artifact]" | ||
| ## Handoff | ||
| On **GO**: Next skill is `/specsafe-new` to create the first spec slice and begin development. | ||
| On **NEEDS REVISION**: Recommend specific planning skills to re-run (e.g., `/specsafe-prd`, `/specsafe-ux`, `/specsafe-architecture`). | ||
| On **BLOCKED**: Recommend investigation or decision-making steps to unblock (e.g., `/specsafe-explore` for technical unknowns, `/specsafe-brainstorm` for major design disagreements). |
| # Claude Code Prompt Template | ||
| ## Objective | ||
| - What should Claude Code accomplish? | ||
| - What should exist or be true when the task is complete? | ||
| ## Current Phase | ||
| - Phase: `<planning | development>` | ||
| - Stage / skill context: `<brainstorm | principles | brief | prd | ux | architecture | readiness | spec | test | code | qa | verify | complete>` | ||
| ## Spec Slice | ||
| - Slice name or ID: `<fill in>` | ||
| - Scope: `<the exact unit of work>` | ||
| - Acceptance criteria: | ||
| - `<criterion 1>` | ||
| - `<criterion 2>` | ||
| - `<criterion 3>` | ||
| ## Constraints from Planning | ||
| - Product principles: `<relevant principles>` | ||
| - UX rules: `<relevant flows, states, accessibility expectations>` | ||
| - Architecture decisions: `<relevant boundaries, patterns, interfaces, data-model constraints>` | ||
| - Non-goals / scope exclusions: `<what Claude Code must not expand into>` | ||
| ## Documentation References | ||
| - Official docs for named frameworks / SDKs / platforms / tools: | ||
| - `<name>`: `<link or reference>` | ||
| - `<name>`: `<link or reference>` | ||
| - MCP references or tool-specific docs: | ||
| - `<MCP or tool>`: `<reference>` | ||
| ## Testing Requirements | ||
| - Tests to write: `<unit / integration / e2e / contract / other>` | ||
| - Commands to run: | ||
| - `pnpm test` | ||
| - `<project-specific command>` | ||
| - Coverage expectations: `<threshold or expectation>` | ||
| ## Edge Cases | ||
| - `<edge case 1>` | ||
| - `<edge case 2>` | ||
| - `<failure mode or empty state>` | ||
| ## Security Considerations | ||
| - `<auth / permissions / secrets / input validation / tenancy / data exposure concerns>` | ||
| - `<or write "None specific" if not applicable>` | ||
| ## Quality Bar | ||
| Do not mark this task complete unless: | ||
| - all tests pass | ||
| - lint/typecheck clean | ||
| - implementation matches spec | ||
| - architecture alignment verified | ||
| - edge cases handled | ||
| - documentation consulted for named tools |
@@ -1,9 +0,25 @@ | ||
| # SpecSafe — TDD Workflow Rules | ||
| # SpecSafe — Two-Phase Workflow Rules | ||
| SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TEST → CODE → QA → COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona. | ||
| SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona. | ||
| ## Workflow Stages | ||
| ## Phase 1: Planning | ||
| Planning precedes development. Each step produces an artifact that informs the next. | ||
| | Step | Skill | What Happens | | ||
| |------|-------|--------------| | ||
| | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities | | ||
| | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities | | ||
| | 3 | `specsafe-brief` | Concise product/business framing document | | ||
| | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria | | ||
| | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility | | ||
| | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions | | ||
| | 7 | `specsafe-readiness` | Pre-development coherence check | | ||
| Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture. | ||
| ## Phase 2: Development Stages | ||
| | Stage | Skill | Persona | What Happens | | ||
| |-------|-------|---------|--------------| | ||
| |-------|-------|---------|--------------| | ||
| | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios | | ||
@@ -29,2 +45,6 @@ | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) | | ||
| | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment | | ||
| | `specsafe-brief` | Create a concise product brief | | ||
| | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements | | ||
| | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows | | ||
| | `specsafe-architecture` | System architecture — components, data model, ADRs | | ||
| | `specsafe-new <name>` | Create a new spec from template with unique ID | | ||
@@ -40,2 +60,4 @@ | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios | | ||
| | `specsafe-doctor` | Validate project health and diagnose issues | | ||
| | `specsafe-context` | Gather and present project context for AI agents | | ||
| | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure | | ||
@@ -48,4 +70,5 @@ ## Project Constraints | ||
| 4. **One spec at a time** — complete or park a spec before starting another | ||
| 5. **No stage skipping** — every spec must progress through all 5 stages in order | ||
| 5. **No stage skipping** — every spec must progress through all 5 development stages in order | ||
| 6. **Evidence required** — QA verdicts require concrete test evidence, not assertions | ||
| 7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119 | ||
| 8. **Planning precedes development** — reduce ambiguity before writing code |
@@ -1,14 +0,30 @@ | ||
| # SpecSafe — TDD Workflow Rules | ||
| # SpecSafe — Two-Phase Workflow Rules | ||
| SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TEST → CODE → QA → COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona. | ||
| SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona. | ||
| ## Workflow Stages | ||
| ## Phase 1: Planning | ||
| Planning precedes development. Each step produces an artifact that informs the next. | ||
| | Step | Skill | What Happens | | ||
| |------|-------|--------------| | ||
| | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities | | ||
| | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities | | ||
| | 3 | `specsafe-brief` | Concise product/business framing document | | ||
| | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria | | ||
| | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility | | ||
| | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions | | ||
| | 7 | `specsafe-readiness` | Pre-development coherence check | | ||
| Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture. | ||
| ## Phase 2: Development Stages | ||
| | Stage | Skill | Persona | What Happens | | ||
| |-------|-------|---------|--------------| | ||
| | SPEC | `/specsafe-new`, `/specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios | | ||
| | TEST | `/specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) | | ||
| | CODE | `/specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor | | ||
| | QA | `/specsafe-verify`, `/specsafe-qa` | Warden (Lyra) | Validate tests pass, check coverage, generate QA report | | ||
| | COMPLETE | `/specsafe-complete` | Herald (Cass) | Human approval gate, move to completed | | ||
| |-------|-------|---------|--------------| | ||
| | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios | | ||
| | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) | | ||
| | CODE | `specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor | | ||
| | QA | `specsafe-verify`, `specsafe-qa` | Warden (Lyra) | Validate tests pass, check coverage, generate QA report | | ||
| | COMPLETE | `specsafe-complete` | Herald (Cass) | Human approval gate, move to completed | | ||
@@ -27,14 +43,20 @@ ## Key Files | ||
| |-------|-------------| | ||
| | `/specsafe-init` | Initialize a new SpecSafe project with directory structure and config | | ||
| | `/specsafe-explore` | Pre-spec research, spikes, and feasibility assessment | | ||
| | `/specsafe-new <name>` | Create a new spec from template with unique ID | | ||
| | `/specsafe-spec <id>` | Refine an existing spec with requirements and scenarios | | ||
| | `/specsafe-test <id>` | Generate test files from spec scenarios (SPEC → TEST) | | ||
| | `/specsafe-code <id>` | Implement code via TDD to pass tests (TEST → CODE) | | ||
| | `/specsafe-verify <id>` | Run tests and validate against spec (CODE → QA) | | ||
| | `/specsafe-qa <id>` | Generate full QA report with GO/NO-GO recommendation | | ||
| | `/specsafe-complete <id>` | Complete spec with human approval (QA → COMPLETE) | | ||
| | `/specsafe-status` | Show project dashboard with all specs and metrics | | ||
| | `/specsafe-archive <id>` | Archive an obsolete spec with reason | | ||
| | `/specsafe-doctor` | Validate project health and diagnose issues | | ||
| | `specsafe-init` | Initialize a new SpecSafe project with directory structure and config | | ||
| | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment | | ||
| | `specsafe-brief` | Create a concise product brief | | ||
| | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements | | ||
| | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows | | ||
| | `specsafe-architecture` | System architecture — components, data model, ADRs | | ||
| | `specsafe-new <name>` | Create a new spec from template with unique ID | | ||
| | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios | | ||
| | `specsafe-test <id>` | Generate test files from spec scenarios (SPEC → TEST) | | ||
| | `specsafe-code <id>` | Implement code via TDD to pass tests (TEST → CODE) | | ||
| | `specsafe-verify <id>` | Run tests and validate against spec (CODE → QA) | | ||
| | `specsafe-qa <id>` | Generate full QA report with GO/NO-GO recommendation | | ||
| | `specsafe-complete <id>` | Complete spec with human approval (QA → COMPLETE) | | ||
| | `specsafe-status` | Show project dashboard with all specs and metrics | | ||
| | `specsafe-archive <id>` | Archive an obsolete spec with reason | | ||
| | `specsafe-doctor` | Validate project health and diagnose issues | | ||
| | `specsafe-context` | Gather and present project context for AI agents | | ||
| | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure | | ||
@@ -47,4 +69,5 @@ ## Project Constraints | ||
| 4. **One spec at a time** — complete or park a spec before starting another | ||
| 5. **No stage skipping** — every spec must progress through all 5 stages in order | ||
| 5. **No stage skipping** — every spec must progress through all 5 development stages in order | ||
| 6. **Evidence required** — QA verdicts require concrete test evidence, not assertions | ||
| 7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119 | ||
| 8. **Planning precedes development** — reduce ambiguity before writing code |
@@ -1,2 +0,2 @@ | ||
| name: SpecSafe TDD | ||
| name: SpecSafe Two-Phase Workflow | ||
| version: 1.0.0 | ||
@@ -3,0 +3,0 @@ schema: v1 |
| # SpecSafe Conventions | ||
| ## TDD Workflow (5 Stages) | ||
| ## Two-Phase Workflow | ||
| SpecSafe uses a two-phase model: Planning reduces ambiguity, then Development enforces test-driven execution. | ||
| ### Phase 1: Planning | ||
| Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. | ||
| - **Brainstorm**: Divergent exploration- **Principles**: Product principles and non-goals- **Brief**: Concise product/business framing (`specsafe-brief`) | ||
| - **PRD**: Testable requirements with user journeys (`specsafe-prd`) | ||
| - **UX**: Design foundations, tokens, accessibility (`specsafe-ux`) | ||
| - **Architecture**: System design with ADRs (`specsafe-architecture`) | ||
| - **Readiness**: Pre-development coherence check | ||
| UX always precedes architecture. Planning precedes development. | ||
| ### Phase 2: Development (5 Stages) | ||
| Every feature follows: **SPEC → TEST → CODE → QA → COMPLETE**. No skipping. | ||
@@ -19,17 +34,32 @@ | ||
| ## 12 Skills | ||
| ## 18 Skills | ||
| 1. `specsafe-init` — Initialize project | ||
| 2. `specsafe-explore` — Pre-spec research | ||
| 3. `specsafe-new <name>` — Create new spec | ||
| 4. `specsafe-spec <id>` — Refine spec | ||
| 5. `specsafe-test <id>` — Generate tests (SPEC → TEST) | ||
| 6. `specsafe-code <id>` — Implement via TDD (TEST → CODE) | ||
| 7. `specsafe-verify <id>` — Validate implementation (CODE → QA) | ||
| 8. `specsafe-qa <id>` — Full QA report | ||
| 9. `specsafe-complete <id>` — Complete spec (QA → COMPLETE) | ||
| 10. `specsafe-status` — Project dashboard | ||
| 11. `specsafe-archive <id>` — Archive obsolete spec | ||
| 12. `specsafe-doctor` — Validate project health | ||
| ### Planning | ||
| 1. `specsafe-brief` — Create product brief | ||
| 2. `specsafe-prd` — Expand brief into PRD | ||
| 3. `specsafe-ux` — UX design foundations | ||
| 4. `specsafe-architecture` — System architecture | ||
| ### Development | ||
| 5. `specsafe-new <name>` — Create new spec | ||
| 6. `specsafe-spec <id>` — Refine spec | ||
| 7. `specsafe-test <id>` — Generate tests (SPEC → TEST) | ||
| 8. `specsafe-code <id>` — Implement via TDD (TEST → CODE) | ||
| 9. `specsafe-verify <id>` — Validate implementation (CODE → QA) | ||
| 10. `specsafe-qa <id>` — Full QA report | ||
| 11. `specsafe-complete <id>` — Complete spec (QA → COMPLETE) | ||
| ### Utility | ||
| 12. `specsafe-init` — Initialize project | ||
| 13. `specsafe-explore` — Pre-spec research | ||
| 14. `specsafe-context` — Gather project context | ||
| 15. `specsafe-status` — Project dashboard | ||
| 16. `specsafe-archive <id>` — Archive obsolete spec | ||
| 17. `specsafe-doctor` — Validate project health | ||
| 18. `specsafe-skill-creator` — Create new skills | ||
| ### Planning (continued) | ||
| 19. `specsafe-brainstorm` — Divergent exploration | ||
| 20. `specsafe-principles` — Product principles | ||
| 21. `specsafe-readiness` — Pre-development coherence check | ||
| ## Rules | ||
@@ -43,1 +73,2 @@ | ||
| - Requirements use SHALL/MUST/SHOULD (RFC 2119) | ||
| - Planning precedes development — reduce ambiguity before writing code |
@@ -1,9 +0,25 @@ | ||
| # SpecSafe — TDD Workflow Rules | ||
| # SpecSafe — Two-Phase Workflow Rules | ||
| SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TEST → CODE → QA → COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona. | ||
| SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona. | ||
| ## Workflow Stages | ||
| ## Phase 1: Planning | ||
| Planning precedes development. Each step produces an artifact that informs the next. | ||
| | Step | Skill | What Happens | | ||
| |------|-------|--------------| | ||
| | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities | | ||
| | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities | | ||
| | 3 | `specsafe-brief` | Concise product/business framing document | | ||
| | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria | | ||
| | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility | | ||
| | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions | | ||
| | 7 | `specsafe-readiness` | Pre-development coherence check | | ||
| Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture. | ||
| ## Phase 2: Development Stages | ||
| | Stage | Skill | Persona | What Happens | | ||
| |-------|-------|---------|--------------| | ||
| |-------|-------|---------|--------------| | ||
| | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios | | ||
@@ -29,2 +45,6 @@ | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) | | ||
| | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment | | ||
| | `specsafe-brief` | Create a concise product brief | | ||
| | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements | | ||
| | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows | | ||
| | `specsafe-architecture` | System architecture — components, data model, ADRs | | ||
| | `specsafe-new <name>` | Create a new spec from template with unique ID | | ||
@@ -40,2 +60,4 @@ | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios | | ||
| | `specsafe-doctor` | Validate project health and diagnose issues | | ||
| | `specsafe-context` | Gather and present project context for AI agents | | ||
| | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure | | ||
@@ -48,6 +70,7 @@ ## Project Constraints | ||
| 4. **One spec at a time** — complete or park a spec before starting another | ||
| 5. **No stage skipping** — every spec must progress through all 5 stages in order | ||
| 5. **No stage skipping** — every spec must progress through all 5 development stages in order | ||
| 6. **Evidence required** — QA verdicts require concrete test evidence, not assertions | ||
| 7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119 | ||
| 8. **Planning precedes development** — reduce ambiguity before writing code | ||
| @import AGENTS.md |
@@ -228,3 +228,3 @@ # specsafe-architecture — Nolan the System Architect | ||
| Next: Run /specsafe-ux to define UX design principles, or /specsafe-new to start creating feature specs. | ||
| Next: Run /specsafe-readiness to validate planning coherence before development begins (or /specsafe-new if readiness is not yet available). | ||
| ``` | ||
@@ -249,2 +249,2 @@ | ||
| Next skill: `/specsafe-ux` to define UX design principles, or `/specsafe-new` to start creating feature specs informed by the architecture. | ||
| Next skill: `/specsafe-readiness` to validate planning coherence before development begins (or `/specsafe-new` if readiness is not yet available). UX is upstream of architecture — it should already be complete before this skill runs. |
@@ -12,2 +12,3 @@ # specsafe-brief — Kai the Spec Architect | ||
| - [ ] If not initialized, STOP and instruct the user: "Run `/specsafe-init` first." | ||
| - [ ] Read `docs/product-principles.md` if it exists — this is recommended input from the principles stage. Use it to inform scope, non-goals, and quality priorities in the brief. | ||
| - [ ] Check if `docs/product-brief.md` already exists. If it does, ask the user: "A product brief already exists. Would you like to update it or create a new one?" | ||
@@ -14,0 +15,0 @@ |
@@ -13,2 +13,5 @@ # SpecSafe Code — Zane the Implementation Engineer | ||
| - [ ] Read `specsafe.config.json` and extract: `testFramework`, `language`, `testCommand` | ||
| - [ ] Check whether the spec names any frameworks, SDKs, platforms, tools, or MCPs that affect implementation | ||
| - [ ] If named tools exist, note that current official documentation should be consulted before or during implementation | ||
| - [ ] This is a reminder, not a blocker — continue the workflow even if documentation review still needs to happen | ||
| - [ ] Verify the spec file exists at `specs/active/<SPEC-ID>.md` | ||
@@ -15,0 +18,0 @@ - [ ] Verify the spec's `Stage` field is `TEST`, `CODE`, or `QA` — if not, STOP and inform the user: |
@@ -176,3 +176,3 @@ # specsafe-prd — Kai the Spec Architect | ||
| Next: Run /specsafe-architecture to design the system architecture, or /specsafe-ux to define UX design principles. | ||
| Next: Run /specsafe-ux to define UX design foundations. UX precedes architecture in the canonical workflow. | ||
| ``` | ||
@@ -197,2 +197,2 @@ | ||
| Next skill: `/specsafe-architecture` to design the system architecture, or `/specsafe-ux` to define UX design principles. Both benefit from having the PRD completed first. | ||
| Next skill: `/specsafe-ux` to define UX design foundations. UX precedes architecture in the canonical workflow — architecture should support the intended experience, not pre-empt it. |
@@ -21,12 +21,12 @@ # SpecSafe Skill Creator — Cass the Release Manager | ||
| 2. **"When would someone use it?"** — Understand the trigger or context (e.g., "after writing tests", "when starting a new feature", "to check code quality"). | ||
| 3. **"Does it fit between existing pipeline stages, or is it a standalone utility?"** — Determine pipeline position. For reference, the pipeline stages are: BRIEF → PRD → UX → ARCH → SPEC → TEST → CODE → QA → COMPLETE. | ||
| 3. **"Does it fit between existing pipeline stages, or is it a standalone utility?"** — Determine pipeline position. For reference, the pipeline stages are: BRAINSTORM → PRINCIPLES → BRIEF → PRD → UX → ARCH → READINESS → SPEC → TEST → CODE → QA → COMPLETE. | ||
| 4. **"Which persona should it use?"** — Present the available personas: | ||
| - **Scout / Elena** — Research & Discovery (BRIEF, PRD, EXPLORE) | ||
| - **Mason / Kai** — Architecture & Design (UX, ARCH) | ||
| - **Forge / Reva** — Specification & Structure (SPEC, NEW) | ||
| - **Bolt / Zane** — Implementation & Testing (TEST, CODE) | ||
| - **Warden / Lyra** — Verification & Quality (VERIFY, QA) | ||
| - **Scout / Elena** — Research & Discovery (EXPLORE) | ||
| - **Mason / Kai** — Specification & Structure (BRIEF, PRD, SPEC, NEW) | ||
| - **Forge / Reva** — Test Engineering (TEST) | ||
| - **Bolt / Zane** — Implementation (CODE) | ||
| - **Warden / Lyra** — Verification & Quality (VERIFY, QA, READINESS) | ||
| - **Herald / Cass** — Lifecycle & Ceremony (COMPLETE, STATUS, ARCHIVE, INIT, DOCTOR) | ||
| - **Sage / Nolan** — Wisdom & Guidance (reserved) | ||
| - **Prism / Aria** — Transformation & Adaptation (reserved) | ||
| - **Prism / Aria** — UX Design (UX) | ||
| - **Sage / Nolan** — System Architecture (ARCH) | ||
| - Or: **"I need a new persona"** — we'll create one in Step 4. | ||
@@ -33,0 +33,0 @@ |
@@ -12,2 +12,5 @@ # SpecSafe Test — Reva the Test Engineer | ||
| - [ ] Read `specsafe.config.json` and extract: `testFramework`, `language`, `testCommand` | ||
| - [ ] Check whether the spec names any frameworks, SDKs, platforms, tools, or MCPs that shape the expected tests | ||
| - [ ] If named tools exist, note that current official documentation should be consulted before or during test design | ||
| - [ ] This is a reminder, not a blocker — continue even if documentation review has not happened yet | ||
| - [ ] Verify the spec file exists at `specs/active/<SPEC-ID>.md` | ||
@@ -14,0 +17,0 @@ - [ ] Verify the spec's `Stage` field is `SPEC` |
@@ -263,3 +263,3 @@ # specsafe-ux — Aria the UX Designer | ||
| Next: Run /specsafe-new to start creating feature specs informed by the UX design. | ||
| Next: Run /specsafe-architecture to design the system architecture informed by the UX design. | ||
| ``` | ||
@@ -284,2 +284,2 @@ | ||
| Next skill: `/specsafe-new` to start creating feature specs informed by the UX design. | ||
| Next skill: `/specsafe-architecture` to design the system architecture. Architecture is downstream of UX in the canonical workflow — it should support the intended experience. |
@@ -8,4 +8,3 @@ { | ||
| "coverageCommand": "pnpm test --coverage", | ||
| "language": "typescript", | ||
| "specsafeVersion": "2.0.0" | ||
| "specsafeVersion": "2.2.0" | ||
| } |
@@ -1,4 +0,5 @@ | ||
| import { existsSync } from 'node:fs'; | ||
| import { existsSync, readFileSync } from 'node:fs'; | ||
| import { join } from 'node:path'; | ||
| import { readCanonicalRule } from './utils.js'; | ||
| const SPECSAFE_READ_ENTRIES = ['CONVENTIONS.md', 'PROJECT_STATE.md']; | ||
| export const aiderAdapter = { | ||
@@ -10,7 +11,44 @@ name: 'aider', | ||
| }, | ||
| async generate(_skills, canonicalDir) { | ||
| async generate(_skills, canonicalDir, projectRoot) { | ||
| const files = []; | ||
| const readEntries = [...SPECSAFE_READ_ENTRIES]; | ||
| let otherLines = []; | ||
| if (projectRoot) { | ||
| const confPath = join(projectRoot, '.aider.conf.yml'); | ||
| if (existsSync(confPath)) { | ||
| try { | ||
| const existing = readFileSync(confPath, 'utf-8'); | ||
| // Separate "read:" block from all other config lines | ||
| const lines = existing.split('\n'); | ||
| let inReadBlock = false; | ||
| for (const line of lines) { | ||
| if (/^read:\s*$/.test(line)) { | ||
| inReadBlock = true; | ||
| continue; | ||
| } | ||
| if (inReadBlock && /^\s+-\s+/.test(line)) { | ||
| // Read entry — merge with dedup | ||
| const entry = line.replace(/^\s+-\s+/, '').trim(); | ||
| if (entry && !readEntries.includes(entry)) { | ||
| readEntries.push(entry); | ||
| } | ||
| continue; | ||
| } | ||
| // Any non-read line ends the read block | ||
| inReadBlock = false; | ||
| if (line.trim() !== '') { | ||
| otherLines.push(line); | ||
| } | ||
| } | ||
| } | ||
| catch { | ||
| // Can't read — use defaults | ||
| } | ||
| } | ||
| } | ||
| const readYaml = readEntries.map((e) => ` - ${e}`).join('\n'); | ||
| const otherYaml = otherLines.length > 0 ? `\n${otherLines.join('\n')}\n` : ''; | ||
| files.push({ | ||
| path: '.aider.conf.yml', | ||
| content: 'read:\n - CONVENTIONS.md\n - PROJECT_STATE.md\n', | ||
| content: `read:\n${readYaml}\n${otherYaml}`, | ||
| }); | ||
@@ -17,0 +55,0 @@ const conventions = readCanonicalRule(canonicalDir, 'CONVENTIONS.md'); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/adapters/aider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,OAAO;IAEpB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAyB,EAAE,YAAoB;QAC5D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,mDAAmD;SAC7D,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QACtE,IAAI,WAAW,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} | ||
| {"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/adapters/aider.ts"],"names":[],"mappings":"AA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4 +8,3 @@ import { existsSync } from 'node:fs'; | ||
| async detect(projectRoot) { | ||
| return (existsSync(join(projectRoot, '.agent')) || | ||
| existsSync(join(projectRoot, 'AGENTS.md'))); | ||
| return existsSync(join(projectRoot, '.agent')) || existsSync(join(projectRoot, 'AGENTS.md')); | ||
| }, | ||
@@ -12,0 +11,0 @@ async generate(skills, canonicalDir) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/adapters/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,MAAM,kBAAkB,GAAgB;IAC7C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAE1B,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YACvC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAC3C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,YAAoB;QAC3D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,iBAAiB,KAAK,CAAC,SAAS,WAAW;gBACjD,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC;aACnC,CAAC,CAAC;YACH,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC1B,KAAK,CAAC,IAAI,CAAC;oBACT,IAAI,EAAE,iBAAiB,KAAK,CAAC,SAAS,cAAc;oBACpD,OAAO,EAAE,KAAK,CAAC,eAAe;iBAC/B,CA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,KAAK,CAAC,IAAI,CAAC;oBACT,IAAI,EAAE,iBAAiB,KAAK,CAAC,SAAS,cAAc;oBACpD,OAAO,EAAE,KAAK,CAAC,eAAe;iBAC/B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,QAAQ,GAAG,iBAAiB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAC9D,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;YACpE,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} |
@@ -15,3 +15,3 @@ import { existsSync } from 'node:fs'; | ||
| if (skill.workflowContent) { | ||
| body += '\n' + skill.workflowContent; | ||
| body += `\n${skill.workflowContent}`; | ||
| } | ||
@@ -18,0 +18,0 @@ const displayName = skill.name |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"continue.js","sourceRoot":"","sources":["../../src/adapters/continue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IAEvB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,YAAoB;QAC3D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,I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B;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,YAAoB;QAC3D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;YACzB,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC1B,IAAI,IAAI,KAAK,KAAK,CAAC,eAAe,EAAE,CAAC;YACvC,CAAC;YAED,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI;iBAC3B,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBAClD,IAAI,CAAC,GAAG,CAAC,CAAC;YAEb,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,qBAAqB,KAAK,CAAC,SAAS,KAAK;gBAC/C,OAAO,EAAE,cAAc,WAAW,kBAAkB,KAAK,CAAC,WAAW,6BAA6B,IAAI,EAAE;aACzG,CAAC,CAAC;QACL,CAAC;QAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;QACvE,IAAI,MAAM,EAAE,CAAC;YACX,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} |
@@ -8,4 +8,3 @@ import { existsSync } from 'node:fs'; | ||
| async detect(projectRoot) { | ||
| return (existsSync(join(projectRoot, '.cursor')) || | ||
| existsSync(join(projectRoot, '.cursorrules'))); | ||
| return (existsSync(join(projectRoot, '.cursor')) || existsSync(join(projectRoot, '.cursorrules'))); | ||
| }, | ||
@@ -12,0 +11,0 @@ async generate(skills, canonicalDir) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/adapters/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IAErB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YACxC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAC9C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,YAAoB;QAC3D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,kBAAkB,KAAK,CAAC,SAAS,WAAW;gBAClD,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC;aACnC,CAAC,CAAC;YACH,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC1B,KAAK,CAAC,IAAI,CAAC;oBACT,IAAI,EAAE,kBAAkB,KAAK,CAAC,SAAS,cAAc;oBACrD,OAAO,EAAE,KAAK,CAAC,eAAe;iBAC/B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;QACxE,IAAI,WAAW,EAAE,CAAC;YAChB,K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AAI,WAAW,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3E,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} |
| import { existsSync } from 'node:fs'; | ||
| import { join } from 'node:path'; | ||
| import { readCanonicalRule, reconstructSkillMd } from './utils.js'; | ||
| /** Escape a string for use inside a TOML double-quoted value */ | ||
| function escapeToml(value) { | ||
| return value | ||
| .replace(/\\/g, '\\\\') | ||
| .replace(/"/g, '\\"') | ||
| .replace(/\n/g, '\\n') | ||
| .replace(/\r/g, '\\r') | ||
| .replace(/\t/g, '\\t') | ||
| .replace(/\x08/g, '\\b') | ||
| .replace(/\x0c/g, '\\f'); | ||
| } | ||
| export const geminiAdapter = { | ||
@@ -8,4 +19,3 @@ name: 'gemini', | ||
| async detect(projectRoot) { | ||
| return (existsSync(join(projectRoot, '.gemini')) || | ||
| existsSync(join(projectRoot, 'GEMINI.md'))); | ||
| return existsSync(join(projectRoot, '.gemini')) || existsSync(join(projectRoot, 'GEMINI.md')); | ||
| }, | ||
@@ -27,3 +37,3 @@ async generate(skills, canonicalDir) { | ||
| path: `.gemini/commands/${skill.directory}.toml`, | ||
| content: `description = "${skill.description}"\nprompt = "Activate the ${skill.name} skill. {{args}}"\n`, | ||
| content: `description = "${escapeToml(skill.description)}"\nprompt = "Activate the ${escapeToml(skill.name)} skill. {{args}}"\n`, | ||
| }); | ||
@@ -30,0 +40,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/adapters/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,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,SAAS,cAAc;oBACrD,OAAO,EAAE,KAAK,CAAC,eAAe;iBAC/B,CAAC,CAAC;YACL,CAAC;YACD,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,oBAAoB,KAAK,CAAC,SAAS,OAAO;gBAChD,OAAO,EAAE,kBAAkB,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB;aACjI,CAAC,CAAC;QACL,CAAC;QAED,MAAM,QAAQ,GAAG,iBAAiB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAC9D,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} |
@@ -0,13 +1,13 @@ | ||
| export { aiderAdapter } from './aider.js'; | ||
| export { antigravityAdapter } from './antigravity.js'; | ||
| export { claudeCodeAdapter } from './claude-code.js'; | ||
| export { opencodeAdapter } from './opencode.js'; | ||
| export { continueAdapter } from './continue.js'; | ||
| export { cursorAdapter } from './cursor.js'; | ||
| export { continueAdapter } from './continue.js'; | ||
| export { aiderAdapter } from './aider.js'; | ||
| export { zedAdapter } from './zed.js'; | ||
| export { geminiAdapter } from './gemini.js'; | ||
| export { antigravityAdapter } from './antigravity.js'; | ||
| export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd } from './utils.js'; | ||
| export type { ToolAdapter, CanonicalSkill, GeneratedFile, SpecSafeConfig, ToolName } from './types.js'; | ||
| export { opencodeAdapter } from './opencode.js'; | ||
| export type { CanonicalSkill, GeneratedFile, SpecSafeConfig, ToolAdapter, ToolName, } from './types.js'; | ||
| export { TOOL_NAMES } from './types.js'; | ||
| export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd, } from './utils.js'; | ||
| export { zedAdapter } from './zed.js'; | ||
| import type { ToolAdapter } from './types.js'; | ||
| export declare const adapters: Record<string, ToolAdapter>; |
@@ -0,19 +1,19 @@ | ||
| export { aiderAdapter } from './aider.js'; | ||
| export { antigravityAdapter } from './antigravity.js'; | ||
| export { claudeCodeAdapter } from './claude-code.js'; | ||
| export { opencodeAdapter } from './opencode.js'; | ||
| export { continueAdapter } from './continue.js'; | ||
| export { cursorAdapter } from './cursor.js'; | ||
| export { continueAdapter } from './continue.js'; | ||
| export { aiderAdapter } from './aider.js'; | ||
| export { zedAdapter } from './zed.js'; | ||
| export { geminiAdapter } from './gemini.js'; | ||
| export { antigravityAdapter } from './antigravity.js'; | ||
| export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd } from './utils.js'; | ||
| export { opencodeAdapter } from './opencode.js'; | ||
| export { TOOL_NAMES } from './types.js'; | ||
| export { loadCanonicalSkills, parseFrontmatter, readCanonicalRule, reconstructSkillMd, } from './utils.js'; | ||
| export { zedAdapter } from './zed.js'; | ||
| import { aiderAdapter } from './aider.js'; | ||
| import { antigravityAdapter } from './antigravity.js'; | ||
| import { claudeCodeAdapter } from './claude-code.js'; | ||
| import { continueAdapter } from './continue.js'; | ||
| import { cursorAdapter } from './cursor.js'; | ||
| import { geminiAdapter } from './gemini.js'; | ||
| import { opencodeAdapter } from './opencode.js'; | ||
| import { cursorAdapter } from './cursor.js'; | ||
| import { continueAdapter } from './continue.js'; | ||
| import { aiderAdapter } from './aider.js'; | ||
| import { zedAdapter } from './zed.js'; | ||
| import { geminiAdapter } from './gemini.js'; | ||
| import { antigravityAdapter } from './antigravity.js'; | ||
| export const adapters = { | ||
@@ -20,0 +20,0 @@ 'claude-code': claudeCodeAdapter, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EA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ectRoot, '.opencode')) || | ||
| existsSync(join(projectRoot, 'OPENCODE.md'))); | ||
| return (existsSync(join(projectRoot, '.opencode')) || existsSync(join(projectRoot, 'OPENCODE.md'))); | ||
| }, | ||
@@ -12,0 +11,0 @@ async generate(skills, _canonicalDir) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IAEvB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC1C,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAC7C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAwB,EAAE,aAAqB;QAC5D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,oBAAoB,KAAK,CAAC,SAAS,WAAW;gBACpD,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC;aACnC,CAAC,CAAC;YACH,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC1B,KAAK,CAAC,IAAI,CAAC;oBACT,IAAI,EAAE,oBAAoB,KAAK,CAAC,SAAS,cAAc;oBACvD,OAAO,EAAE,KAAK,CAAC,eAAe;iBAC/B,CAAC,CAAC;YACL,CAAC;YACD,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,qBAAqB,KAA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K;gBAC/C,OAAO,EAAE,qBAAqB,KAAK,CAAC,WAAW,kDAAkD,KAAK,CAAC,IAAI,IAAI;aAChH,CAAC,CAAC;QACL,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} |
@@ -30,3 +30,3 @@ /** | ||
| /** Generate all files for this tool from canonical skills */ | ||
| generate(skills: CanonicalSkill[], projectRoot: string): Promise<GeneratedFile[]>; | ||
| generate(skills: CanonicalSkill[], canonicalDir: string, projectRoot?: string): Promise<GeneratedFile[]>; | ||
| } | ||
@@ -50,2 +50,2 @@ /** | ||
| export declare const TOOL_NAMES: readonly ["claude-code", "opencode", "cursor", "continue", "aider", "zed", "gemini", "antigravity"]; | ||
| export type ToolName = typeof TOOL_NAMES[number]; | ||
| export type ToolName = (typeof TOOL_NAMES)[number]; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAmDA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,aAAa;IACb,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ;IACR,aAAa;CACL,CAAC"} | ||
| {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAuDA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,aAAa;IACb,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ;IACR,aAAa;CACL,CAAC"} |
@@ -1,2 +0,2 @@ | ||
| import { readFileSync, readdirSync, existsSync } from 'node:fs'; | ||
| import { existsSync, readdirSync, readFileSync } from 'node:fs'; | ||
| import { join } from 'node:path'; | ||
@@ -17,3 +17,4 @@ /** Parse YAML frontmatter from markdown content */ | ||
| // Remove quotes | ||
| if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) { | ||
| if ((value.startsWith('"') && value.endsWith('"')) || | ||
| (value.startsWith("'") && value.endsWith("'"))) { | ||
| value = value.slice(1, -1); | ||
@@ -62,3 +63,3 @@ } | ||
| fm += `name: ${skill.name}\n`; | ||
| fm += `description: ${skill.description}\n`; | ||
| fm += `description: '${skill.description.replace(/'/g, "''")}'\n`; | ||
| if (skill.disableModelInvocation) { | ||
@@ -65,0 +66,0 @@ fm += `disable-model-invocation: true\n`; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/adapters/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,mDAAmD;AACnD,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,gDAAgD;IAChD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACpE,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACtD,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;YAC3C,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;Y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AAU,iBAAiB,CAAC,YAAoB,EAAE,QAAgB;IACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACvD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACrE,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,KAAqB;IACtD,IAAI,EAAE,GAAG,OAAO,CAAC;IACjB,EAAE,IAAI,SAAS,KAAK,CAAC,IAAI,IAAI,CAAC;IAC9B,EAAE,IAAI,iBAAiB,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;IAClE,IAAI,KAAK,CAAC,sBAAsB,EAAE,CAAC;QACjC,EAAE,IAAI,kCAAkC,CAAC;IAC3C,CAAC;IACD,EAAE,IAAI,OAAO,CAAC;IACd,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B,CAAC"} |
@@ -1,2 +0,2 @@ | ||
| import { existsSync } from 'node:fs'; | ||
| import { existsSync, readFileSync } from 'node:fs'; | ||
| import { join } from 'node:path'; | ||
@@ -10,3 +10,3 @@ import { readCanonicalRule } from './utils.js'; | ||
| }, | ||
| async generate(_skills, canonicalDir) { | ||
| async generate(_skills, canonicalDir, projectRoot) { | ||
| const files = []; | ||
@@ -17,13 +17,45 @@ const rules = readCanonicalRule(canonicalDir, '.rules'); | ||
| } | ||
| const specsafeSettings = { | ||
| assistant: { | ||
| version: '2', | ||
| default_model: { | ||
| provider: 'anthropic', | ||
| model: 'claude-sonnet-4-20250514', | ||
| }, | ||
| }, | ||
| }; | ||
| let merged = specsafeSettings; | ||
| if (projectRoot) { | ||
| const settingsPath = join(projectRoot, '.zed', 'settings.json'); | ||
| if (existsSync(settingsPath)) { | ||
| try { | ||
| const existing = JSON.parse(readFileSync(settingsPath, 'utf-8')); | ||
| // Deep merge: preserve user settings, layer specsafe on top | ||
| merged = { ...existing }; | ||
| for (const [key, value] of Object.entries(specsafeSettings)) { | ||
| if (typeof value === 'object' && | ||
| value !== null && | ||
| !Array.isArray(value) && | ||
| typeof merged[key] === 'object' && | ||
| merged[key] !== null && | ||
| !Array.isArray(merged[key])) { | ||
| // Merge nested objects (e.g. assistant) | ||
| merged[key] = { | ||
| ...merged[key], | ||
| ...value, | ||
| }; | ||
| } | ||
| else { | ||
| merged[key] = value; | ||
| } | ||
| } | ||
| } | ||
| catch { | ||
| // Invalid JSON — overwrite | ||
| } | ||
| } | ||
| } | ||
| files.push({ | ||
| path: '.zed/settings.json', | ||
| content: JSON.stringify({ | ||
| assistant: { | ||
| version: '2', | ||
| default_model: { | ||
| provider: 'anthropic', | ||
| model: 'claude-sonnet-4-20250514', | ||
| }, | ||
| }, | ||
| }, null, 2) + '\n', | ||
| content: `${JSON.stringify(merged, null, 2)}\n`, | ||
| }); | ||
@@ -30,0 +62,0 @@ return files; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"zed.js","sourceRoot":"","sources":["../../src/adapters/zed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,KAAK;IAElB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAyB,EAAE,YAAoB;QAC5D,MAAM,KAAK,GAAoB,EAAE,CAAC;QAElC,MAAM,KAAK,GAAG,iBAAiB,CAAC,YAAY,EAAE,QAAQ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YACH,CAAC;QACH,CAAC;QAED,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;SAChD,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"} |
@@ -1,5 +0,5 @@ | ||
| import { readFile, access, readdir } from 'node:fs/promises'; | ||
| import { access, readdir, readFile } from 'node:fs/promises'; | ||
| import { join } from 'node:path'; | ||
| import c from 'ansis'; | ||
| import Table from 'cli-table3'; | ||
| import c from 'ansis'; | ||
| import { getAdapter } from './registry.js'; | ||
@@ -17,5 +17,9 @@ export async function doctor(opts = {}) { | ||
| const requiredKeys = ['project', 'version', 'tools', 'specsafeVersion']; | ||
| const missing = requiredKeys.filter(k => !(k in config)); | ||
| const missing = requiredKeys.filter((k) => !(k in config)); | ||
| if (missing.length > 0) { | ||
| checks.push({ label: 'specsafe.config.json', status: 'ERROR', message: `Missing keys: ${missing.join(', ')}` }); | ||
| checks.push({ | ||
| label: 'specsafe.config.json', | ||
| status: 'ERROR', | ||
| message: `Missing keys: ${missing.join(', ')}`, | ||
| }); | ||
| } | ||
@@ -27,3 +31,3 @@ else { | ||
| catch (err) { | ||
| if (err.code === 'ENOENT') { | ||
| if (err instanceof Error && 'code' in err && err.code === 'ENOENT') { | ||
| checks.push({ label: 'specsafe.config.json', status: 'ERROR', message: 'File not found' }); | ||
@@ -93,4 +97,4 @@ } | ||
| console.log(table.toString()); | ||
| const errorCount = checks.filter(ch => ch.status === 'ERROR').length; | ||
| const warnCount = checks.filter(ch => ch.status === 'WARNING').length; | ||
| const errorCount = checks.filter((ch) => ch.status === 'ERROR').length; | ||
| const warnCount = checks.filter((ch) => ch.status === 'WARNING').length; | ||
| if (errorCount > 0) { | ||
@@ -97,0 +101,0 @@ console.log(c.red(`\n${errorCount} error(s)${warnCount > 0 ? `, ${warnCount} warning(s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C,IAAI,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,SAAS,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"} |
| #!/usr/bin/env node | ||
| import { Command } from 'commander'; | ||
| import { readFileSync } from 'node:fs'; | ||
| import { dirname, join } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { dirname, join } from 'node:path'; | ||
| import { Command } from 'commander'; | ||
| const __filename = fileURLToPath(import.meta.url); | ||
@@ -7,0 +7,0 @@ const __dirname = dirname(__filename); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAE3F,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,mEAAm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AE,EAAE;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IACjD,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,iDAAiD,CAAC;KAC9D,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IAC/C,MAAM,MAAM,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,kCAAkC,CAAC;KAC/C,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IAC/C,MAAM,MAAM,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"} |
@@ -7,4 +7,3 @@ export interface InitOptions { | ||
| testFramework?: string; | ||
| language?: string; | ||
| } | ||
| export declare function init(name?: string, opts?: InitOptions): Promise<void>; |
+14
-24
@@ -1,3 +0,3 @@ | ||
| import { mkdir, readFile, writeFile, access } from 'node:fs/promises'; | ||
| import { basename, join, resolve } from 'node:path'; | ||
| import { access, mkdir, readFile, writeFile } from 'node:fs/promises'; | ||
| import { basename, dirname, join, resolve } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
@@ -7,3 +7,3 @@ import * as p from '@clack/prompts'; | ||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = import.meta.dirname ?? resolve(__filename, '..'); | ||
| const __dirname = import.meta.dirname ?? dirname(__filename); | ||
| function defaultCanonicalDir() { | ||
@@ -49,3 +49,2 @@ return resolve(__dirname, '..', '..', 'canonical'); | ||
| let testFramework = opts.testFramework ?? 'vitest'; | ||
| let language = opts.language ?? 'typescript'; | ||
| if (interactive) { | ||
@@ -64,3 +63,3 @@ p.intro(c.cyan('SpecSafe — Initialize Project')); | ||
| message: 'Which tools to install?', | ||
| options: allTools.map(t => ({ | ||
| options: allTools.map((t) => ({ | ||
| value: t, | ||
@@ -75,3 +74,3 @@ label: t, | ||
| testFramework: () => p.select({ | ||
| message: 'Test framework?', | ||
| message: 'Test framework? (default: vitest)', | ||
| options: [ | ||
@@ -83,13 +82,4 @@ { value: 'vitest', label: 'vitest' }, | ||
| ], | ||
| initialValue: 'vitest', | ||
| }), | ||
| language: () => p.select({ | ||
| message: 'Language?', | ||
| options: [ | ||
| { value: 'typescript', label: 'typescript' }, | ||
| { value: 'python', label: 'python' }, | ||
| { value: 'go', label: 'go' }, | ||
| { value: 'rust', label: 'rust' }, | ||
| { value: 'other', label: 'other' }, | ||
| ], | ||
| }), | ||
| }, { | ||
@@ -104,6 +94,5 @@ onCancel: () => { | ||
| testFramework = result.testFramework; | ||
| language = result.language; | ||
| const s = p.spinner(); | ||
| s.start('Creating project files...'); | ||
| await createProjectFiles(cwd, canonicalDir, projectName, testFramework, language); | ||
| await createProjectFiles(cwd, canonicalDir, projectName, testFramework); | ||
| s.stop('Project files created.'); | ||
@@ -122,3 +111,3 @@ if (selectedTools.length > 0) { | ||
| else { | ||
| await createProjectFiles(cwd, canonicalDir, projectName, testFramework, language); | ||
| await createProjectFiles(cwd, canonicalDir, projectName, testFramework); | ||
| console.log(`SpecSafe initialized for project: ${projectName} | ||
@@ -139,3 +128,3 @@ | ||
| } | ||
| async function createProjectFiles(cwd, canonicalDir, projectName, testFramework, language) { | ||
| async function createProjectFiles(cwd, canonicalDir, projectName, testFramework) { | ||
| // Create directories | ||
@@ -148,9 +137,10 @@ const dirs = ['specs/active', 'specs/completed', 'specs/archive']; | ||
| const configTemplate = await readFile(join(canonicalDir, 'templates', 'specsafe-config-template.json'), 'utf-8'); | ||
| const config = configTemplate.replace(/\{\{project-name\}\}/g, projectName); | ||
| const safeName = projectName.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); | ||
| const config = configTemplate.replace(/\{\{project-name\}\}/g, safeName); | ||
| const configPath = join(cwd, 'specsafe.config.json'); | ||
| // Parse config to inject testFramework and language | ||
| // Parse config to inject testFramework | ||
| const configObj = JSON.parse(config); | ||
| configObj.testFramework = testFramework; | ||
| configObj.language = language; | ||
| await writeFile(configPath, JSON.stringify(configObj, null, 2) + '\n', 'utf-8'); | ||
| delete configObj.language; | ||
| await writeFile(configPath, `${JSON.stringify(configObj, null, 2)}\n`, 'utf-8'); | ||
| // Copy and populate PROJECT_STATE.md template | ||
@@ -157,0 +147,0 @@ const stateTemplate = await readFile(join(canonicalDir, 'templates', 'project-state-template.md'), 'utf-8'); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,CAAC,MAAM,OAAO,CAAC;AAEtB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAEnE,SAAS,mBAAmB;IAC1B,OAAO,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAWD,MAAM,eAAe,GAA2B;IAC9C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE,UAAU;IAClB,QAAQ,EAA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AuB,EAAE,WAAW,CAAC;SAC7C,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC;SACpC,OAAO,CAAC,oBAAoB,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,MAAM,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAE/D,qBAAqB;IACrB,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE,kBAAkB,CAAC,EAAE,OAAO,CAAC,CAAC;IAClG,MAAM,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"} |
@@ -1,3 +0,3 @@ | ||
| import { readFile, writeFile, mkdir } from 'node:fs/promises'; | ||
| import { join, dirname, resolve } from 'node:path'; | ||
| import { mkdir, readFile, writeFile } from 'node:fs/promises'; | ||
| import { dirname, join, resolve } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
@@ -9,3 +9,3 @@ import * as p from '@clack/prompts'; | ||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = import.meta.dirname ?? resolve(__filename, '..'); | ||
| const __dirname = import.meta.dirname ?? dirname(__filename); | ||
| function defaultCanonicalDir() { | ||
@@ -35,3 +35,3 @@ return resolve(__dirname, '..', '..', 'canonical'); | ||
| s.start(`Installing ${tool}...`); | ||
| const files = await adapter.generate(skills, canonicalDir); | ||
| const files = await adapter.generate(skills, canonicalDir, cwd); | ||
| // Write generated files with path containment check | ||
@@ -41,3 +41,3 @@ const resolvedCwd = resolve(cwd); | ||
| const fullPath = resolve(cwd, file.path); | ||
| if (!fullPath.startsWith(resolvedCwd + '/') && fullPath !== resolvedCwd) { | ||
| if (!fullPath.startsWith(`${resolvedCwd}/`) && fullPath !== resolvedCwd) { | ||
| console.error(`Security error: path "${file.path}" escapes project directory. Skipping.`); | ||
@@ -57,3 +57,3 @@ continue; | ||
| config.tools.push(tool); | ||
| await writeFile(configPath, JSON.stringify(config, null, 2) + '\n', 'utf-8'); | ||
| await writeFile(configPath, `${JSON.stringify(config, null, 2)}\n`, 'utf-8'); | ||
| } | ||
@@ -60,0 +60,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAEnE,SAAS,mBAAmB;IAC1B,OAAO,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAOD,MAAM,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AO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC"} | ||
| {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7D,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC"} |
| import { readFile } from 'node:fs/promises'; | ||
| import { join, resolve } from 'node:path'; | ||
| import { dirname, join, resolve } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { install } from './install.js'; | ||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = import.meta.dirname ?? resolve(__filename, '..'); | ||
| const __dirname = import.meta.dirname ?? dirname(__filename); | ||
| function defaultCanonicalDir() { | ||
@@ -8,0 +8,0 @@ return resolve(__dirname, '..', '..', 'canonical'); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CA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AAC;IAC3B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAChD,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,wCAAwC,GAAG,iCAAiC,CAAC,CAAC;QAC5F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;QAC9F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;QAC9E,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;IAC1D,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,MAAM,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAClC,CAAC"} |
+19
-16
| { | ||
| "name": "@specsafe/cli", | ||
| "version": "2.1.0", | ||
| "version": "2.2.0", | ||
| "description": "Skills-first TDD framework for AI-assisted development", | ||
@@ -14,7 +14,2 @@ "type": "module", | ||
| ], | ||
| "scripts": { | ||
| "build": "pnpm -r build", | ||
| "test": "pnpm -r test", | ||
| "typecheck": "pnpm -r typecheck" | ||
| }, | ||
| "dependencies": { | ||
@@ -27,2 +22,3 @@ "@clack/prompts": "1.0.1", | ||
| "devDependencies": { | ||
| "@biomejs/biome": "^2.4.10", | ||
| "@types/node": "^20.0.0", | ||
@@ -33,12 +29,5 @@ "typescript": "^5.3.0", | ||
| }, | ||
| "packageManager": "pnpm@10.28.2", | ||
| "engines": { | ||
| "node": ">=18.0.0" | ||
| }, | ||
| "pnpm": { | ||
| "overrides": { | ||
| "rollup": ">=4.59.0", | ||
| "picomatch": ">=4.0.4" | ||
| } | ||
| }, | ||
| "repository": { | ||
@@ -48,4 +37,18 @@ "type": "git", | ||
| }, | ||
| "keywords": ["tdd", "spec-driven", "ai", "testing", "skills", "claude", "opencode", "cursor"], | ||
| "license": "MIT" | ||
| } | ||
| "keywords": [ | ||
| "tdd", | ||
| "spec-driven", | ||
| "ai", | ||
| "testing", | ||
| "skills", | ||
| "claude", | ||
| "opencode", | ||
| "cursor" | ||
| ], | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "build": "pnpm -r build", | ||
| "test": "pnpm -r test", | ||
| "typecheck": "pnpm -r typecheck" | ||
| } | ||
| } |
+56
-18
| # SpecSafe | ||
| SpecSafe is a skills-first TDD framework for AI-assisted development. It provides a structured 5-stage workflow that keeps AI agents aligned with human intent through specifications, test-driven implementation, and QA gates — regardless of which AI coding tool you use. | ||
| SpecSafe is a two-phase software engineering framework for AI-assisted development. It provides structured planning workflows to reduce ambiguity, then enforces test-driven implementation through small spec slices — regardless of which AI coding tool you use. | ||
| ## The 5-Stage Workflow | ||
| For the full canonical workflow, see [docs/SPECSAFE-CANONICAL-WORKFLOW.md](./docs/SPECSAFE-CANONICAL-WORKFLOW.md). | ||
| ## Two-Phase Workflow | ||
| ``` | ||
| SPEC → TEST → CODE → VERIFY → QA → COMPLETE | ||
| PHASE 1: PLANNING | ||
| brainstorm → principles → brief → PRD → UX → architecture → readiness | ||
| PHASE 2: DEVELOPMENT | ||
| spec slice → tests → implementation → verify/QA → complete (or loop back) | ||
| ``` | ||
| ## Phase 1: Planning | ||
| Planning removes ambiguity before implementation begins. Each planning skill produces an artifact that informs the next stage. | ||
| | Step | Skill | Description | | ||
| |------|-------|-------------| | ||
| | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities | | ||
| | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities | | ||
| | 3 | `specsafe-brief` | Concise product/business framing document | | ||
| | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria | | ||
| | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility | | ||
| | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions | | ||
| | 7 | `specsafe-readiness` | Pre-development coherence check: GO / NEEDS REVISION / BLOCKED | | ||
| ## Phase 2: Development | ||
| Development begins only after the change is understood well enough to be implemented as a small spec slice. | ||
| | Stage | Skill | Persona | What happens | | ||
@@ -19,12 +43,2 @@ |-------|-------|---------|-------------| | ||
| Additional utility skills: | ||
| | Skill | Persona | Purpose | | ||
| |-------|---------|---------| | ||
| | `specsafe-init` | Cass (Herald) | Initialize a new SpecSafe project | | ||
| | `specsafe-explore` | Elena (Scout) | Pre-spec exploration and research | | ||
| | `specsafe-status` | Cass (Herald) | Project dashboard with spec counts and metrics | | ||
| | `specsafe-doctor` | Cass (Herald) | Validate project health | | ||
| | `specsafe-archive` | Cass (Herald) | Archive obsolete specs | | ||
| ## Quick Start | ||
@@ -50,8 +64,20 @@ | ||
| All 12 canonical skills: | ||
| 21 canonical skills: | ||
| ### Planning Skills | ||
| | Skill | Description | | ||
| |-------|------------| | ||
| | `specsafe-init` | Initialize project — creates dirs, config, PROJECT_STATE.md | | ||
| | `specsafe-explore` | Pre-spec exploration and research mode | | ||
| |-------|-------------| | ||
| | `specsafe-brainstorm` | Divergent exploration before converging on a solution | | ||
| | `specsafe-principles` | Product principles, non-goals, and quality priorities | | ||
| | `specsafe-brief` | Create a concise product brief — problem, users, scope, success criteria | | ||
| | `specsafe-prd` | Expand brief into full PRD with user journeys, FRs, NFRs | | ||
| | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows | | ||
| | `specsafe-architecture` | System architecture — components, data model, ADRs, technology stack | | ||
| | `specsafe-readiness` | Pre-development coherence and readiness check | | ||
| ### Development Skills | ||
| | Skill | Description | | ||
| |-------|-------------| | ||
| | `specsafe-new` | Create a new spec with unique ID and initial requirements | | ||
@@ -64,5 +90,14 @@ | `specsafe-spec` | Refine spec with detailed requirements, criteria, scenarios | | ||
| | `specsafe-complete` | Human approval gate — moves spec to COMPLETE | | ||
| ### Utility Skills | ||
| | Skill | Description | | ||
| |-------|-------------| | ||
| | `specsafe-init` | Initialize project — creates dirs, config, PROJECT_STATE.md | | ||
| | `specsafe-explore` | Pre-spec exploration and research mode | | ||
| | `specsafe-context` | Gather and present project context for AI agents | | ||
| | `specsafe-status` | Project dashboard with spec counts by stage | | ||
| | `specsafe-archive` | Archive obsolete or abandoned specs | | ||
| | `specsafe-doctor` | Validate project health and configuration | | ||
| | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure and validation | | ||
@@ -74,3 +109,3 @@ ## Agent Personas | ||
| | **Elena** | Exploration Lead | Scout | EXPLORE | | ||
| | **Kai** | Spec Architect | Mason | SPEC | | ||
| | **Kai** | Spec Architect | Mason | SPEC, BRIEF, PRD | | ||
| | **Reva** | Test Engineer | Forge | TEST | | ||
@@ -80,2 +115,4 @@ | **Zane** | Implementation Engineer | Bolt | CODE | | ||
| | **Cass** | Release Manager | Herald | COMPLETE, STATUS, ARCHIVE, INIT, DOCTOR | | ||
| | **Aria** | UX Designer | Prism | UX | | ||
| | **Nolan** | System Architect | Sage | ARCHITECTURE | | ||
@@ -135,3 +172,4 @@ ## Supported Tools | ||
| - [Canonical Workflow](./docs/SPECSAFE-CANONICAL-WORKFLOW.md) — source of truth for the two-phase model | ||
| - [Tool Support Guide](./docs/tool-support.md) — per-tool setup details | ||
| - [Persona Guide](./docs/personas.md) — how each persona works |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
268117
27.09%114
8.57%996
7.56%170
28.79%5
25%