agentleFS
PsychQuantPsychQuant/che-ical-mcp/.agents/skills/spectra-propose/SKILL.md

spectra-propose

Skill44 starsChanged 8 months agoMITView on GitHub

Create a change proposal with all required artifacts

6 other projects use a version of this, 5 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use spectra-commit, spectra-analyze and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • BananaBay69Skill

    spectra-commit

    Commit files related to a specific Spectra change

    Also in 6 projects that use this

  • harrychuangSkill

    spectra-analyze

    Analyze artifact consistency for a change

    Also in 5 projects that use this

  • harrychuangSkill

    spectra-drift

    Detect drift between a Spectra change and the current codebase state

    Also in 5 projects that use this

  • +1 more from harrychuang

The file

Show its rules and text

We split this skill into the rules it gives an agent

42 rules. 28 are common, 2 are distinctive, and 12 are very specific to this project.

  • 28

    Common

    Most of the 6 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Create a complete Spectra change proposal — from requirement to validated artifacts — in a single workflow.

    line 12
  2. Common:

    If no argument is provided, the workflow will extract requirements from conversation context or ask.

    line 20
  3. Very specific:

    Check if the conversation context mentions a plan file path (plan mode system messages include the path like <name>.md)

    line 31
  4. Common:

    If found, check if the file exists at ``

    line 32
  5. Common:

    If a plan file is found, use the AskUserQuestion tool to ask:

    line 33
  6. Common:

    If conversation context has no relevant discussion, mention this when presenting the choice

    line 36
  7. Common:

    If the user picks the plan file → read it and extract:

    line 37
  8. Common:

    If the user picks conversation context → fall through to (c)

    line 42
  9. Common:

    If context is insufficient, use the AskUserQuestion tool to ask what they want to build

    line 45
  10. Common:

    IMPORTANT: Do NOT proceed without understanding what the user wants to build.

    line 49
  11. Common:

    Before creating the change, check if any existing specs overlap:

    line 65
  12. Very specific:

    Use the Glob tool to list all files matching openspec/specs/*/spec.md

    line 66
  13. Common:

    If related specs are found, display them as an informational summary

    line 70
  14. Common:

    If related specs are found, display them but do NOT stop or ask for confirmation — continue to the next step

    line 73
  15. Common:

    If no related specs are found, silently proceed without mentioning the scan

    line 74
  16. Common:

    If a change with that name already exists, suggest continuing the existing change instead of creating a new one.

    line 82
  17. Distinctive:

    Write the proposal file using the template from instructions, with the following format based on change type:

    line 92
  18. Common:

    Read any completed dependency files for context

    line 210
  19. Very specific:

    Create the artifact file using template as the structure

    line 211
  20. Very specific:

    After creating each artifact, re-run spectra status --change "<name>" --json

    line 216
  21. Very specific:

    Check if every artifact ID in applyRequires has status: "done"

    line 217
  22. Very specific:

    Stop when all applyRequires artifacts are done

    line 218
  23. Common:

    Use AskUserQuestion tool to clarify

    line 221
  24. Common:

    After creating all artifacts, scan them manually.

    line 226
  25. Common:

    Do tasks cover all design decisions, and nothing outside proposal scope?

    line 241
  26. Common:

    If no Critical/Warning findings → show "Artifacts look consistent ✓" and proceed

    line 272
  27. Very specific:

    If Critical/Warning findings exist: a.

    line 273
  28. Common:

    After 2 attempts, if findings remain:

    line 278
  29. Common:

    If validation fails, fix errors and re-validate.

    line 288
  30. Distinctive:

    Use AskUserQuestion tool to ask what to do next.

    line 297
  31. Very specific:

    If AskUserQuestion tool is not available, execute spectra park "<name>" and inform the user to run $spectra-apply <change-name> when ready.

    line 301
  32. Very specific:

    Follow the instruction field from spectra instructions for each artifact type

    line 307
  33. Common:

    Read dependency artifacts for context before creating new ones

    line 308
  34. Very specific:

    Use template as the structure for your output file - fill in its sections

    line 309
  35. Very specific:

    Do NOT copy <context>, <rules>, <project_context> blocks into the artifact

    line 311
  36. Very specific:

    Create all artifacts needed for implementation.

    line 317
  37. Common:

    Always read dependency artifacts before creating a new one

    line 318
  38. Common:

    If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum

    line 319
  39. Common:

    If a change with that name already exists, suggest continuing that change instead

    line 320
  40. Common:

    Verify each artifact file exists after writing before proceeding to next

    line 321
  41. Common:

    NEVER: write application code or implement features during this workflow

    line 322
  42. Common:

    If AskUserQuestion tool is not available, ask the same questions as plain text and wait for the user's response

    line 326

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create a complete Spectra change proposal — from requirement to validated artifacts — in a single workflow.

Input: The argument after $spectra-propose is the requirement description. Examples:

  • $spectra-propose add dark mode
  • $spectra-propose fix the login page crash
  • $spectra-propose improve search performance

If no argument is provided, the workflow will extract requirements from conversation context or ask.

Prerequisites: This skill requires the spectra CLI. If any spectra command fails with "command not found" or similar, report the error and STOP.

Steps

  1. Determine the requirement source

    a. Argument provided (e.g., "add dark mode") → use it as the requirement description, skip to deriving the change name below.

    b. Plan file available:

    • Check if the conversation context mentions a plan file path (plan mode system messages include the path like <name>.md)
    • If found, check if the file exists at ``
    • If a plan file is found, use the AskUserQuestion tool to ask:
      • Option 1: Use the plan file
      • Option 2: Use conversation context
    • If conversation context has no relevant discussion, mention this when presenting the choice
    • If the user picks the plan file → read it and extract:
      • plan_title (H1 heading) → use as requirement description
      • plan_context (Context section) → use as proposal Why/Motivation content
      • plan_stages (numbered implementation stages) → use for artifact creation
      • plan_files (all file paths mentioned) → use for Impact section
    • If the user picks conversation context → fall through to (c)

    c. Conversation context → attempt to extract requirements from conversation history

    • If context is insufficient, use the AskUserQuestion tool to ask what they want to build

    From the resolved description, derive a kebab-case change name (e.g., "add dark mode" → add-dark-mode).

    IMPORTANT: Do NOT proceed without understanding what the user wants to build.

  2. Classify the change type

    Based on the requirement, classify the change into one of three types:

    TypeWhen to use
    FeatureNew functionality, new capabilities
    Bug FixFixing existing behavior, resolving errors
    RefactorArchitecture improvements, performance optimization, UI adjustments

    This determines the proposal template format in step 5.

  3. Scan existing specs for relevance

    Before creating the change, check if any existing specs overlap:

    1. Use the Glob tool to list all files matching openspec/specs/*/spec.md
    2. Extract directory names as the spec identifier list
    3. Compare against the user's description to identify related specs (max 5 candidates)
    4. For each candidate (max 3), read the first 10 lines to retrieve the Purpose section
    5. If related specs are found, display them as an informational summary

    IMPORTANT:

    • If related specs are found, display them but do NOT stop or ask for confirmation — continue to the next step
    • If no related specs are found, silently proceed without mentioning the scan
  4. Create the change directory

    spectra new change "<name>" --agent codex

    If a change with that name already exists, suggest continuing the existing change instead of creating a new one.

  5. Write the proposal

    Get instructions:

    spectra instructions proposal --change "<name>" --json

    Write the proposal file using the template from instructions, with the following format based on change type:

    Feature

    ## Why
    
    <!-- Why this functionality is needed -->
    
    ## What Changes
    
    <!-- What will be different -->
    
    ## Non-Goals (optional)
    
    <!-- Scope exclusions and rejected approaches. Required when design.md is skipped. -->
    
    ## Capabilities
    
    ### New Capabilities
    
    - `<capability-name>`: <brief description>
    
    ### Modified Capabilities
    
    (none)
    
    ## Impact
    
    - Affected specs: <new or modified capabilities>
    - Affected code: <list of affected files>

    Bug Fix

    ## Problem
    
    <!-- Current broken behavior -->
    
    ## Root Cause
    
    <!-- Why it happens -->
    
    ## Proposed Solution
    
    <!-- How to fix -->
    
    ## Non-Goals (optional)
    
    <!-- Scope exclusions and rejected approaches. Required when design.md is skipped. -->
    
    ## Success Criteria
    
    <!-- Expected behavior after fix, verifiable conditions -->
    
    ## Impact
    
    - Affected code: <list of affected files>

    Refactor / Enhancement

    ## Summary
    
    <!-- One sentence description -->
    
    ## Motivation
    
    <!-- Why this is needed -->
    
    ## Proposed Solution
    
    <!-- How to do it -->
    
    ## Non-Goals (optional)
    
    <!-- Scope exclusions and rejected approaches. Required when design.md is skipped. -->
    
    ## Alternatives Considered (optional)
    
    <!-- Other approaches considered and why not -->
    
    ## Impact
    
    - Affected specs: <affected capabilities>
    - Affected code: <list of affected files>
  6. Get the artifact build order

    spectra status --change "<name>" --json

    Parse the JSON to get:

    • applyRequires: array of artifact IDs needed before implementation
    • artifacts: list of all artifacts with their status and dependencies
  7. Create remaining artifacts in sequence

    Loop through artifacts in dependency order (skip proposal since it's already done):

    a. For each artifact that is ready (dependencies satisfied):

    • Check if the artifact is optional: If the artifact is NOT in the dependency chain of any applyRequires artifact (i.e., removing it would not block reaching apply), it is optional. Get its instructions and read the instruction field. If the instruction contains conditional criteria (e.g., "create only if any apply"), evaluate whether any criteria apply to this change based on the proposal content. If none apply, skip the artifact and show: "⊘ Skipped <artifact-id> (not needed for this change)". Then continue to the next artifact.
    • Get instructions:
      spectra instructions <artifact-id> --change "<name>" --json
    • The instructions JSON includes:
      • context: Project background (constraints for you - do NOT include in output)
      • rules: Artifact-specific rules (constraints for you - do NOT include in output)
      • template: The structure to use for your output file
      • instruction: Schema-specific guidance
      • outputPath: Where to write the artifact
      • dependencies: Completed artifacts to read for context
      • locale: The language to write the artifact in (e.g., "Japanese (日本語)"). If present, you MUST write the artifact content in this language. Exception: spec files (specs/*/.md) MUST always be written in English regardless of locale, because they use normative language (SHALL/MUST).
    • Read any completed dependency files for context
    • Create the artifact file using template as the structure
    • Apply context and rules as constraints - but do NOT copy them into the file
    • Show brief progress: "✓ Created <artifact-id>"

    b. Continue until all applyRequires artifacts are complete

    • After creating each artifact, re-run spectra status --change "<name>" --json
    • Check if every artifact ID in applyRequires has status: "done"
    • Stop when all applyRequires artifacts are done

    c. If an artifact requires user input (unclear context):

    • Use AskUserQuestion tool to clarify
    • Then continue with creation
  8. Inline Self-Review (before CLI analysis)

    After creating all artifacts, scan them manually. Fix issues inline, then proceed to the CLI analyzer.

    Check 1: No Placeholders

    These patterns are artifact failures — fix each one before proceeding:

    • "TBD", "TODO", "FIXME", "implement later", "details to follow"
    • Vague instructions: "Add appropriate error handling", "Handle edge cases", "Write tests for the above"
    • Delegation by reference: "Similar to Task N" without repeating specifics
    • Steps describing WHAT without HOW: "Implement the authentication flow" (what flow? what steps?)
    • Empty template sections left unfilled
    • Weasel quantities: "some", "various", "several" when a specific number or list is needed

    Check 2: Internal Consistency

    • Does every capability in the proposal have a corresponding spec?
    • Does the design reference only capabilities from the proposal?
    • Do tasks cover all design decisions, and nothing outside proposal scope?
    • Are file paths consistent across proposal Impact, design, and tasks?

    Check 3: Scope Check

    • More than 15 pending tasks → consider decomposing into multiple changes
    • Any single task would take more than 1 hour → split it
    • Touches more than 3 unrelated subsystems → consider splitting

    Check 4: Ambiguity Check

    • Are success/failure conditions testable and specific?
    • Are boundary conditions defined (empty input, max limits, error cases)?
    • Could "the system" refer to multiple components? Be explicit.

Rationalization Table

What You're ThinkingWhat You Should Do
"The requirements are clear enough, no need for discuss"Fine if true — but check you're not skipping because you're lazy
"This artifact isn't needed for this change"Check applyRequires — if it's in the dependency chain, create it
"The spec doesn't need scenarios, the requirement is obvious"Obvious to you now. Write scenarios for the implementer who doesn't have your context
"I'll keep the design brief, code will be self-explanatory"Design exists so implementers don't reverse-engineer intent. Be specific
"This is a small change, skip the scope check"Small changes touching 5 subsystems aren't small. Check
"The placeholder is fine for now, I'll fill it in later"There is no "later" — implementation is next. Fill it in now

  1. Analyze-Fix Loop (max 2 iterations)
    1. Run spectra analyze <change-name> --json
    2. Filter findings to Critical and Warning only (ignore Suggestion)
    3. If no Critical/Warning findings → show "Artifacts look consistent ✓" and proceed
    4. If Critical/Warning findings exist: a. Show: "Found N issue(s), fixing... (attempt M/2)" b. Fix each finding in the affected artifact c. Re-run spectra analyze <change-name> --json d. Repeat up to 2 total iterations
    5. After 2 attempts, if findings remain:
      • Show remaining findings as a summary
      • Proceed normally (do NOT block)
  2. Validation

    spectra validate "<name>"

    If validation fails, fix errors and re-validate.

  3. Show final status and end workflow

    Show summary:

    • Change name and location
    • List of artifacts created
    • Validation result

    Use AskUserQuestion tool to ask what to do next. This ensures the workflow stops even when auto-accept is enabled. Provide exactly these options:

    • First option (will be auto-selected): "Park" — Execute spectra park "<name>" to park the change, then inform the user they can run $spectra-apply <change-name> when ready (which will auto-unpark).
    • Second option: "Apply" — Invoke $spectra-apply <change-name> to start implementation.

    If AskUserQuestion tool is not available, execute spectra park "<name>" and inform the user to run $spectra-apply <change-name> when ready. Then STOP — do not continue.

    After the user responds, if they chose "Park", execute spectra park "<name>" and the workflow is OVER. If they chose "Apply", invoke $spectra-apply <change-name> to begin implementation.

Artifact Creation Guidelines

  • Follow the instruction field from spectra instructions for each artifact type
  • Read dependency artifacts for context before creating new ones
  • Use template as the structure for your output file - fill in its sections
  • IMPORTANT: context and rules are constraints for YOU, not content for the file
    • Do NOT copy <context>, <rules>, <project_context> blocks into the artifact
    • These guide what you write, but should never appear in the output
  • Parallel task markers ([P]): When creating the tasks artifact, first read .spectra.yaml. If parallel_tasks: true is set, add [P] markers to tasks that can be executed in parallel. Format: - [ ] [P] Task description. A task qualifies for [P] if it targets different files from other pending tasks AND has no dependency on incomplete tasks in the same group. When parallel_tasks is not enabled, do NOT add [P] markers.

Guardrails

  • Create all artifacts needed for implementation. Optional artifacts (those not in the applyRequires dependency chain) may be skipped if their inclusion criteria don't apply.
  • Always read dependency artifacts before creating a new one
  • If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
  • If a change with that name already exists, suggest continuing that change instead
  • Verify each artifact file exists after writing before proceeding to next
  • NEVER write application code or implement features during this workflow
  • NEVER skip the artifact workflow to write code directly
  • NEVER reinterpret requirements by ignoring the proposal file
  • NEVER invoke $spectra-apply — this workflow ends after artifact creation. The user decides when to start implementation
  • If AskUserQuestion tool is not available, ask the same questions as plain text and wait for the user's response

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.