Initial commit: raceplanner project scaffold

This commit is contained in:
Denis Urs Rudolph
2026-04-03 20:43:01 +02:00
commit fbfa367c16
25 changed files with 1795 additions and 0 deletions
Vendored
BIN
View File
Binary file not shown.
+149
View File
@@ -0,0 +1,149 @@
---
description: Implement tasks from an OpenSpec change (Experimental)
---
Implement tasks from an OpenSpec change.
**Input**: Optionally specify a change name (e.g., `/opsx-apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
2. **Check status to understand the schema**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
3. **Get apply instructions**
```bash
openspec instructions apply --change "<name>" --json
```
This returns:
- Context file paths (varies by schema)
- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
**Handle states:**
- If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx-continue`
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation
4. **Read context files**
Read the files listed in `contextFiles` from the apply instructions output.
The files depend on the schema being used:
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output
5. **Show current progress**
Display:
- Schema being used
- Progress: "N/M tasks complete"
- Remaining tasks overview
- Dynamic instruction from CLI
6. **Implement tasks (loop until done or blocked)**
For each pending task:
- Show which task is being worked on
- Make the code changes required
- Keep changes minimal and focused
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
- Continue to next task
**Pause if:**
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- Error or blocker encountered → report and wait for guidance
- User interrupts
7. **On completion or pause, show status**
Display:
- Tasks completed this session
- Overall progress: "N/M tasks complete"
- If all done: suggest archive
- If paused: explain why and wait for guidance
**Output During Implementation**
```
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
```
**Output On Completion**
```
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! You can archive this change with `/opsx-archive`.
```
**Output On Pause (Issue Encountered)**
```
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
```
**Guardrails**
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- Use contextFiles from CLI output, don't assume specific file names
**Fluid Workflow Integration**
This skill supports the "actions on a change" model:
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
+154
View File
@@ -0,0 +1,154 @@
---
description: Archive a completed change in the experimental workflow
---
Archive a completed change in the experimental workflow.
**Input**: Optionally specify a change name after `/opsx-archive` (e.g., `/opsx-archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **If no change name provided, prompt for selection**
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
Show only active changes (not already archived).
Include the schema used for each change if available.
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Check artifact completion status**
Run `openspec status --change "<name>" --json` to check artifact completion.
Parse the JSON to understand:
- `schemaName`: The workflow being used
- `artifacts`: List of artifacts with their status (`done` or other)
**If any artifacts are not `done`:**
- Display warning listing incomplete artifacts
- Prompt user for confirmation to continue
- Proceed if user confirms
3. **Check task completion status**
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
**If incomplete tasks found:**
- Display warning showing count of incomplete tasks
- Prompt user for confirmation to continue
- Proceed if user confirms
**If no tasks file exists:** Proceed without task-related warning.
4. **Assess delta spec sync state**
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting
**Prompt options:**
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
5. **Perform the archive**
Create the archive directory if it doesn't exist:
```bash
mkdir -p openspec/changes/archive
```
Generate target name using current date: `YYYY-MM-DD-<change-name>`
**Check if target already exists:**
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move the change directory to archive
```bash
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
```
6. **Display summary**
Show archive completion summary including:
- Change name
- Schema that was used
- Archive location
- Spec sync status (synced / sync skipped / no delta specs)
- Note about any warnings (incomplete artifacts/tasks)
**Output On Success**
```
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs
All artifacts complete. All tasks complete.
```
**Output On Success (No Delta Specs)**
```
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** No delta specs
All artifacts complete. All tasks complete.
```
**Output On Success With Warnings**
```
## Archive Complete (with warnings)
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** Sync skipped (user chose to skip)
**Warnings:**
- Archived with 2 incomplete artifacts
- Archived with 3 incomplete tasks
- Delta spec sync was skipped (user chose to skip)
Review the archive if this was not intentional.
```
**Output On Error (Archive Exists)**
```
## Archive Failed
**Change:** <change-name>
**Target:** openspec/changes/archive/YYYY-MM-DD-<name>/
Target archive directory already exists.
**Options:**
1. Rename the existing archive
2. Delete the existing archive if it's a duplicate
3. Wait until a different date to archive
```
**Guardrails**
- Always prompt for change selection if not provided
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, use the Skill tool to invoke `openspec-sync-specs` (agent-driven)
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
+170
View File
@@ -0,0 +1,170 @@
---
description: Enter explore mode - think through ideas, investigate problems, clarify requirements
---
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
**Input**: The argument after `/opsx-explore` is whatever the user wants to think about. Could be:
- A vague idea: "real-time collaboration"
- A specific problem: "the auth system is getting unwieldy"
- A change name: "add-dark-mode" (to explore in context of that change)
- A comparison: "postgres vs sqlite for this"
- Nothing (just enter explore mode)
---
## The Stance
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
- **Adaptive** - Follow interesting threads, pivot when new information emerges
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
---
## What You Might Do
Depending on what the user brings, you might:
**Explore the problem space**
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
**Investigate the codebase**
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
**Compare options**
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
**Visualize**
```
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
├─────────────────────────────────────────┤
│ │
│ ┌────────┐ ┌────────┐ │
│ │ State │────────▶│ State │ │
│ │ A │ │ B │ │
│ └────────┘ └────────┘ │
│ │
│ System diagrams, state machines, │
│ data flows, architecture sketches, │
│ dependency graphs, comparison tables │
│ │
└─────────────────────────────────────────┘
```
**Surface risks and unknowns**
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
---
## OpenSpec Awareness
You have full context of the OpenSpec system. Use it naturally, don't force it.
### Check for context
At the start, quickly check what exists:
```bash
openspec list --json
```
This tells you:
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
If the user mentioned a specific change name, read its artifacts for context.
### When no change exists
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create a proposal?"
- Or keep exploring - no pressure to formalize
### When a change exists
If the user mentions a change or you detect one is relevant:
1. **Read existing artifacts for context**
- `openspec/changes/<name>/proposal.md`
- `openspec/changes/<name>/design.md`
- `openspec/changes/<name>/tasks.md`
- etc.
2. **Reference them naturally in conversation**
- "Your design mentions using Redis, but we just realized SQLite fits better..."
- "The proposal scopes this to premium users, but we're now thinking everyone..."
3. **Offer to capture when decisions are made**
| Insight Type | Where to Capture |
|--------------|------------------|
| New requirement discovered | `specs/<capability>/spec.md` |
| Requirement changed | `specs/<capability>/spec.md` |
| Design decision made | `design.md` |
| Scope changed | `proposal.md` |
| New work identified | `tasks.md` |
| Assumption invalidated | Relevant artifact |
Example offers:
- "That's a design decision. Capture it in design.md?"
- "This is a new requirement. Add it to specs?"
- "This changes scope. Update the proposal?"
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
---
## What You Don't Have To Do
- Follow a script
- Ask the same questions every time
- Produce a specific artifact
- Reach a conclusion
- Stay on topic if a tangent is valuable
- Be brief (this is thinking time)
---
## Ending Discovery
There's no required ending. Discovery might:
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
- **Result in artifact updates**: "Updated design.md with these decisions"
- **Just provide clarity**: User has what they need, moves on
- **Continue later**: "We can pick this up anytime"
When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
---
## Guardrails
- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
- **Don't fake understanding** - If something is unclear, dig deeper
- **Don't rush** - Discovery is thinking time, not task time
- **Don't force structure** - Let patterns emerge naturally
- **Don't auto-capture** - Offer to save insights, don't just do it
- **Do visualize** - A good diagram is worth many paragraphs
- **Do explore the codebase** - Ground discussions in reality
- **Do question assumptions** - Including the user's and your own
+103
View File
@@ -0,0 +1,103 @@
---
description: Propose a new change - create it and generate all artifacts in one step
---
Propose a new change - create the change and generate all artifacts in one step.
I'll create a change with artifacts:
- proposal.md (what & why)
- design.md (how)
- tasks.md (implementation steps)
When ready to implement, run /opsx-apply
---
**Input**: The argument after `/opsx-propose` is the change name (kebab-case), OR a description of what the user wants to build.
**Steps**
1. **If no input provided, ask what they want to build**
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
2. **Create the change directory**
```bash
openspec new change "<name>"
```
This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
3. **Get the artifact build order**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts with their status and dependencies
4. **Create artifacts in sequence until apply-ready**
Use the **TodoWrite tool** to track progress through the artifacts.
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. **For each artifact that is `ready` (dependencies satisfied)**:
- Get instructions:
```bash
openspec 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 for this artifact type
- `outputPath`: Where to write the artifact
- `dependencies`: Completed artifacts to read for context
- 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 `openspec status --change "<name>" --json`
- Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
- 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
5. **Show final status**
```bash
openspec status --change "<name>"
```
**Output**
After completing all artifacts, summarize:
- Change name and location
- List of artifacts created with brief descriptions
- What's ready: "All artifacts created! Ready for implementation."
- Prompt: "Run `/opsx-apply` to start implementing."
**Artifact Creation Guidelines**
- Follow the `instruction` field from `openspec instructions` for each artifact type
- The schema defines what each artifact should contain - follow it
- 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
**Guardrails**
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
- 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, ask if user wants to continue it or create a new one
- Verify each artifact file exists after writing before proceeding to next
@@ -0,0 +1,156 @@
---
name: openspec-apply-change
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.2.0"
---
Implement tasks from an OpenSpec change.
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
2. **Check status to understand the schema**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
3. **Get apply instructions**
```bash
openspec instructions apply --change "<name>" --json
```
This returns:
- Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
**Handle states:**
- If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation
4. **Read context files**
Read the files listed in `contextFiles` from the apply instructions output.
The files depend on the schema being used:
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output
5. **Show current progress**
Display:
- Schema being used
- Progress: "N/M tasks complete"
- Remaining tasks overview
- Dynamic instruction from CLI
6. **Implement tasks (loop until done or blocked)**
For each pending task:
- Show which task is being worked on
- Make the code changes required
- Keep changes minimal and focused
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
- Continue to next task
**Pause if:**
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- Error or blocker encountered → report and wait for guidance
- User interrupts
7. **On completion or pause, show status**
Display:
- Tasks completed this session
- Overall progress: "N/M tasks complete"
- If all done: suggest archive
- If paused: explain why and wait for guidance
**Output During Implementation**
```
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
```
**Output On Completion**
```
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! Ready to archive this change.
```
**Output On Pause (Issue Encountered)**
```
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
```
**Guardrails**
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- Use contextFiles from CLI output, don't assume specific file names
**Fluid Workflow Integration**
This skill supports the "actions on a change" model:
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -0,0 +1,114 @@
---
name: openspec-archive-change
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.2.0"
---
Archive a completed change in the experimental workflow.
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **If no change name provided, prompt for selection**
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
Show only active changes (not already archived).
Include the schema used for each change if available.
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Check artifact completion status**
Run `openspec status --change "<name>" --json` to check artifact completion.
Parse the JSON to understand:
- `schemaName`: The workflow being used
- `artifacts`: List of artifacts with their status (`done` or other)
**If any artifacts are not `done`:**
- Display warning listing incomplete artifacts
- Use **AskUserQuestion tool** to confirm user wants to proceed
- Proceed if user confirms
3. **Check task completion status**
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
**If incomplete tasks found:**
- Display warning showing count of incomplete tasks
- Use **AskUserQuestion tool** to confirm user wants to proceed
- Proceed if user confirms
**If no tasks file exists:** Proceed without task-related warning.
4. **Assess delta spec sync state**
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting
**Prompt options:**
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
5. **Perform the archive**
Create the archive directory if it doesn't exist:
```bash
mkdir -p openspec/changes/archive
```
Generate target name using current date: `YYYY-MM-DD-<change-name>`
**Check if target already exists:**
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move the change directory to archive
```bash
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
```
6. **Display summary**
Show archive completion summary including:
- Change name
- Schema that was used
- Archive location
- Whether specs were synced (if applicable)
- Note about any warnings (incomplete artifacts/tasks)
**Output On Success**
```
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
All artifacts complete. All tasks complete.
```
**Guardrails**
- Always prompt for change selection if not provided
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, use openspec-sync-specs approach (agent-driven)
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
+288
View File
@@ -0,0 +1,288 @@
---
name: openspec-explore
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.2.0"
---
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
---
## The Stance
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
- **Adaptive** - Follow interesting threads, pivot when new information emerges
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
---
## What You Might Do
Depending on what the user brings, you might:
**Explore the problem space**
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
**Investigate the codebase**
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
**Compare options**
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
**Visualize**
```
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
├─────────────────────────────────────────┤
│ │
│ ┌────────┐ ┌────────┐ │
│ │ State │────────▶│ State │ │
│ │ A │ │ B │ │
│ └────────┘ └────────┘ │
│ │
│ System diagrams, state machines, │
│ data flows, architecture sketches, │
│ dependency graphs, comparison tables │
│ │
└─────────────────────────────────────────┘
```
**Surface risks and unknowns**
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
---
## OpenSpec Awareness
You have full context of the OpenSpec system. Use it naturally, don't force it.
### Check for context
At the start, quickly check what exists:
```bash
openspec list --json
```
This tells you:
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
### When no change exists
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create a proposal?"
- Or keep exploring - no pressure to formalize
### When a change exists
If the user mentions a change or you detect one is relevant:
1. **Read existing artifacts for context**
- `openspec/changes/<name>/proposal.md`
- `openspec/changes/<name>/design.md`
- `openspec/changes/<name>/tasks.md`
- etc.
2. **Reference them naturally in conversation**
- "Your design mentions using Redis, but we just realized SQLite fits better..."
- "The proposal scopes this to premium users, but we're now thinking everyone..."
3. **Offer to capture when decisions are made**
| Insight Type | Where to Capture |
|--------------|------------------|
| New requirement discovered | `specs/<capability>/spec.md` |
| Requirement changed | `specs/<capability>/spec.md` |
| Design decision made | `design.md` |
| Scope changed | `proposal.md` |
| New work identified | `tasks.md` |
| Assumption invalidated | Relevant artifact |
Example offers:
- "That's a design decision. Capture it in design.md?"
- "This is a new requirement. Add it to specs?"
- "This changes scope. Update the proposal?"
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
---
## What You Don't Have To Do
- Follow a script
- Ask the same questions every time
- Produce a specific artifact
- Reach a conclusion
- Stay on topic if a tangent is valuable
- Be brief (this is thinking time)
---
## Handling Different Entry Points
**User brings a vague idea:**
```
User: I'm thinking about adding real-time collaboration
You: Real-time collab is a big space. Let me think about this...
COLLABORATION SPECTRUM
════════════════════════════════════════════
Awareness Coordination Sync
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│Presence│ │Cursors │ │ CRDT │
│ "3 │ │ Multi │ │Conflict│
│online" │ │ select │ │ free │
└────────┘ └────────┘ └────────┘
│ │ │
trivial moderate complex
Where's your head at?
```
**User brings a specific problem:**
```
User: The auth system is a mess
You: [reads codebase]
┌─────────────────────────────────────────────┐
│ CURRENT AUTH FLOW │
└─────────────────────────────────────────────┘
┌─────────────┼─────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Google │ │ GitHub │ │ Email │
│ OAuth │ │ OAuth │ │ Magic │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└─────────────┼─────────────┘
┌───────────┐
│ Session │
└─────┬─────┘
┌───────────┐
│ Perms │
└───────────┘
I see three tangles. Which one's burning?
```
**User is stuck mid-implementation:**
```
User: /opsx-explore add-auth-system
The OAuth integration is more complex than expected
You: [reads change artifacts]
You're on task 4: "Implement OAuth flow"
Let me trace what's involved...
[draws diagram, explores options, suggests paths]
Want to update the design to reflect this?
Or add a spike task to investigate?
```
**User wants to compare options:**
```
User: Should we use Postgres or SQLite?
You: Generic answer is boring. What's the context?
User: A CLI tool that tracks local dev environments
You: That changes everything.
┌─────────────────────────────────────────────────┐
│ CLI TOOL DATA STORAGE │
└─────────────────────────────────────────────────┘
Key constraints:
• No daemon running
• Must work offline
• Single user
SQLite Postgres
Deployment embedded ✓ needs server ✗
Offline yes ✓ no ✗
Single file yes ✓ no ✗
SQLite. Not even close.
Unless... is there a sync component?
```
---
## Ending Discovery
There's no required ending. Discovery might:
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
- **Result in artifact updates**: "Updated design.md with these decisions"
- **Just provide clarity**: User has what they need, moves on
- **Continue later**: "We can pick this up anytime"
When it feels like things are crystallizing, you might summarize:
```
## What We Figured Out
**The problem**: [crystallized understanding]
**The approach**: [if one emerged]
**Open questions**: [if any remain]
**Next steps** (if ready):
- Create a change proposal
- Keep exploring: just keep talking
```
But this summary is optional. Sometimes the thinking IS the value.
---
## Guardrails
- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
- **Don't fake understanding** - If something is unclear, dig deeper
- **Don't rush** - Discovery is thinking time, not task time
- **Don't force structure** - Let patterns emerge naturally
- **Don't auto-capture** - Offer to save insights, don't just do it
- **Do visualize** - A good diagram is worth many paragraphs
- **Do explore the codebase** - Ground discussions in reality
- **Do question assumptions** - Including the user's and your own
+110
View File
@@ -0,0 +1,110 @@
---
name: openspec-propose
description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.2.0"
---
Propose a new change - create the change and generate all artifacts in one step.
I'll create a change with artifacts:
- proposal.md (what & why)
- design.md (how)
- tasks.md (implementation steps)
When ready to implement, run /opsx-apply
---
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
**Steps**
1. **If no clear input provided, ask what they want to build**
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
2. **Create the change directory**
```bash
openspec new change "<name>"
```
This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
3. **Get the artifact build order**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts with their status and dependencies
4. **Create artifacts in sequence until apply-ready**
Use the **TodoWrite tool** to track progress through the artifacts.
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. **For each artifact that is `ready` (dependencies satisfied)**:
- Get instructions:
```bash
openspec 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 for this artifact type
- `outputPath`: Where to write the artifact
- `dependencies`: Completed artifacts to read for context
- 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 `openspec status --change "<name>" --json`
- Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
- 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
5. **Show final status**
```bash
openspec status --change "<name>"
```
**Output**
After completing all artifacts, summarize:
- Change name and location
- List of artifacts created with brief descriptions
- What's ready: "All artifacts created! Ready for implementation."
- Prompt: "Run `/opsx-apply` or ask me to implement to start working on the tasks."
**Artifact Creation Guidelines**
- Follow the `instruction` field from `openspec instructions` for each artifact type
- The schema defines what each artifact should contain - follow it
- 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
**Guardrails**
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
- 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, ask if user wants to continue it or create a new one
- Verify each artifact file exists after writing before proceeding to next
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-04-03
@@ -0,0 +1,115 @@
## Context
This is a new race planning application built from scratch. The system needs to support two primary user types: organizers who create and manage events, and participants who register for and attend events. The application requires user authentication, event management, registration workflows, payment tracking, and communication features.
## Goals / Non-Goals
**Goals:**
- Build a full-stack web application with clear separation of concerns
- Implement secure user authentication with role-based access
- Create intuitive event management for organizers
- Enable seamless participant registration workflow
- Provide real-time dashboard metrics
- Support payment tracking (initially manual recording, extensible to online payments)
**Non-Goals:**
- Real-time chat or messaging between users
- Complex payment processing integration (Phase 1 is manual tracking only)
- Mobile native apps (web-responsive only)
- Social media integrations
- Advanced analytics or reporting (basic metrics only)
## Decisions
### Architecture: Full-stack with REST API
**Decision**: Use a client-server architecture with a REST API backend and SPA frontend.
**Rationale**: This provides clear separation of concerns, enables independent development of frontend and backend, and supports future mobile app development if needed.
**Alternatives considered**:
- Server-side rendered (SSR) application - Rejected: Less interactive UI, harder to build dashboard features
- GraphQL API - Rejected: Adds complexity, REST is sufficient for current requirements
### Tech Stack: .NET Backend + Next.js Frontend (Bun Runtime)
**Decision**:
- **Backend**: .NET (C# with ASP.NET Core Web API)
- **Frontend**: Next.js with TypeScript, running on Bun runtime (instead of Node.js)
**Rationale**:
- **.NET Backend**: Robust framework with excellent performance, built-in dependency injection, Entity Framework Core for PostgreSQL integration, and strong typing with C#
- **Next.js on Bun**: Bun provides faster startup times and better performance than Node.js, while Next.js offers excellent React framework with SSR/SSG capabilities
- Full-stack TypeScript experience (C# on backend, TypeScript on frontend)
- Clear separation allows independent scaling and deployment
**Alternatives considered**:
- Python/Django - Rejected: Less suitable for real-time dashboard updates
- Node.js backend - Rejected: Prefer .NET's strong typing and enterprise features
- Node.js runtime for frontend - Rejected: Bun offers better performance for Next.js
### Database: PostgreSQL
**Decision**: Use PostgreSQL as the primary database with normalized schema.
**Rationale**: ACID compliance for financial data (payments), mature ecosystem, good ORM support.
**Alternatives considered**:
- MongoDB - Rejected: Less suitable for relational data (users, events, registrations)
- SQLite - Rejected: Won't scale to multiple concurrent organizers
### Authentication: JWT with httpOnly cookies
**Decision**: Use JWT tokens stored in httpOnly cookies for session management.
**Rationale**: Stateless authentication, secure against XSS, supports role-based claims.
**Alternatives considered**:
- Session-based auth - Rejected: Requires server-side session store, adds complexity
- OAuth only - Rejected: Still need local auth for initial version
### Payment Tracking: Manual + Extensible
**Decision**: Start with manual payment recording, design for future integration.
**Rationale**: Faster MVP, payment processing can be added later without schema changes.
## Risks / Trade-offs
**Risk**: Payment data security without integrated processor
**Mitigation**: Encrypt sensitive fields, audit logs, plan for processor integration in Phase 2
**Risk**: Dashboard performance with many events/registrations
**Mitigation**: Implement pagination, consider caching layer for metrics, database indexing
**Risk**: Email delivery reliability
**Mitigation**: Use transactional email service (SendGrid/Mailgun), implement retry logic
**Trade-off**: Manual payment recording requires organizer trust
**Acceptance**: Documented limitation for MVP, roadmap includes automated processing
## Migration Plan
Not applicable - this is a new application with no existing data to migrate.
Deployment strategy:
1. Deploy database schema
2. Deploy backend API
3. Deploy frontend application
4. Configure DNS and SSL
5. Create initial admin user
## Open Questions (Resolved)
**Decision Log:**
1. **Email verification before allowing registration?**
- **Decision**: Not needed for MVP
- **Rationale**: Keep signup friction minimal for initial launch; can add later if needed
2. **Event categories/tags for filtering?**
- **Decision**: Yes, implement event categories/tags
- **Rationale**: Improves event discoverability and participant experience
3. **Can participants edit registrations after submission?**
- **Decision**: Yes, support registration cancellation
- **Rationale**: Users need flexibility to manage their commitments
4. **File uploads (event images, participant documents)?**
- **Decision**: Not needed for MVP
- **Rationale**: Keep initial scope focused; can add as separate feature later
@@ -0,0 +1,34 @@
## Why
We need a dedicated race planning application to help race organizers and participants coordinate event logistics, track registrations, manage schedules, and communicate important information. Currently, organizers rely on fragmented tools (spreadsheets, email chains, social media) which leads to confusion and missed details.
## What Changes
- Create a new web application for race planning and management
- Implement user authentication and role-based access (organizers vs participants)
- Build event creation and management system with scheduling
- Add registration workflow with payment tracking
- Create communication tools (announcements, notifications)
- Build dashboard for tracking key metrics and participant data
## Capabilities
### New Capabilities
- `user-auth`: User authentication and authorization system with role-based access control
- `event-management`: Create, edit, and manage race events with schedules and details
- `event-categorization`: Categorize events with tags and categories for filtering
- `registration-system`: Participant registration workflow with form submission, editing, and cancellation
- `payment-tracking`: Track registration payments and payment status
- `announcements`: Event announcements and communication system
- `dashboard`: Dashboard for organizers to view metrics and manage events
### Modified Capabilities
<!-- No existing specs to modify -->
## Impact
- New web application codebase
- Database schema for users, events, registrations
- API endpoints for all CRUD operations
- Frontend UI components for all features
- Integration with payment processor (future consideration)
Binary file not shown.
@@ -0,0 +1,39 @@
## ADDED Requirements
### Requirement: Event announcements
The system SHALL allow organizers to post announcements for their events.
#### Scenario: Create announcement
- **WHEN** organizer creates announcement with title and content
- **THEN** system saves announcement with timestamp
- **AND** associates with specific event
#### Scenario: Announcement visibility
- **WHEN** participant views event page
- **THEN** system displays all published announcements
- **AND** sorts by newest first
### Requirement: Announcement notifications
The system SHALL notify registered participants of new announcements.
#### Scenario: New announcement notification
- **WHEN** organizer publishes announcement
- **THEN** system sends notification to all registered participants
- **AND** includes announcement title and link
#### Scenario: Mark as read
- **WHEN** participant views announcement
- **THEN** system marks notification as read
### Requirement: Announcement management
The system SHALL allow organizers to edit and delete announcements.
#### Scenario: Edit announcement
- **WHEN** organizer edits existing announcement
- **THEN** system updates content
- **AND** shows edit timestamp
#### Scenario: Delete announcement
- **WHEN** organizer deletes announcement
- **THEN** system removes from event
- **AND** does not notify participants of deletion
@@ -0,0 +1,38 @@
## ADDED Requirements
### Requirement: Organizer dashboard
The system SHALL provide organizers with a dashboard showing event metrics.
#### Scenario: View event statistics
- **WHEN** organizer accesses dashboard
- **THEN** system displays total events, registrations, and revenue
- **AND** shows upcoming events list
#### Scenario: View registration trends
- **WHEN** organizer views dashboard
- **THEN** system displays registration counts over time
- **AND** highlights events nearing capacity
### Requirement: Participant dashboard
The system SHALL provide participants with a dashboard of their registrations.
#### Scenario: View my registrations
- **WHEN** participant accesses dashboard
- **THEN** system displays all their registrations
- **AND** shows status for each
#### Scenario: Upcoming events
- **WHEN** participant views dashboard
- **THEN** system displays registered upcoming events
- **AND** sorts by event date
### Requirement: Quick actions
The system SHALL provide quick access to common actions from the dashboard.
#### Scenario: Organizer quick actions
- **WHEN** organizer views dashboard
- **THEN** system provides links to create event, view reports, and send announcements
#### Scenario: Participant quick actions
- **WHEN** participant views dashboard
- **THEN** system provides links to browse events and view registration history
@@ -0,0 +1,63 @@
## ADDED Requirements
### Requirement: Event categories
The system SHALL allow organizers to assign categories to events.
#### Scenario: Assign category on event creation
- **WHEN** organizer creates event with category
- **THEN** system stores category with event
- **AND** displays category on event details
#### Scenario: Assign category to existing event
- **WHEN** organizer edits event to add category
- **THEN** system updates event with category
#### Scenario: Clear category
- **WHEN** organizer removes category from event
- **THEN** system removes category from event record
### Requirement: Event tags
The system SHALL allow organizers to add multiple tags to events.
#### Scenario: Add tags on event creation
- **WHEN** organizer creates event with multiple tags
- **THEN** system stores all tags with event
- **AND** displays tags on event details
#### Scenario: Modify tags
- **WHEN** organizer edits event tags
- **THEN** system updates tags to new set
### Requirement: Category filtering
The system SHALL allow users to filter events by category.
#### Scenario: Filter by single category
- **WHEN** user filters events by specific category
- **THEN** system returns only events with that category
#### Scenario: Filter with no results
- **WHEN** user filters to category with no events
- **THEN** system returns empty list
- **AND** displays message "No events found"
### Requirement: Tag filtering
The system SHALL allow users to filter events by tags.
#### Scenario: Filter by tag
- **WHEN** user selects tag to filter
- **THEN** system returns events with that tag
#### Scenario: Multi-tag filter
- **WHEN** user selects multiple tags
- **THEN** system returns events matching ANY selected tag
### Requirement: Category management
The system SHALL provide predefined categories for organizers to choose from.
#### Scenario: List available categories
- **WHEN** organizer views category options
- **THEN** system displays predefined list (e.g., Running, Cycling, Triathlon, Trail, Road)
#### Scenario: Category selection
- **WHEN** organizer assigns category to event
- **THEN** system validates against available categories
@@ -0,0 +1,39 @@
## ADDED Requirements
### Requirement: Event creation
The system SHALL allow organizers to create new race events with required details.
#### Scenario: Create event with all details
- **WHEN** organizer provides event name, date, location, and description
- **THEN** system creates event with unique identifier
- **AND** sets event status to "draft"
#### Scenario: Missing required fields
- **WHEN** organizer attempts to create event without name
- **THEN** system returns validation error
- **AND** does not create event
### Requirement: Event editing
The system SHALL allow organizers to modify existing event details.
#### Scenario: Update event date
- **WHEN** organizer changes event date
- **THEN** system updates event date
- **AND** notifies registered participants of change
#### Scenario: Publish event
- **WHEN** organizer publishes draft event
- **THEN** system changes status to "published"
- **AND** makes event visible to participants
### Requirement: Event listing
The system SHALL display events with filtering and sorting options.
#### Scenario: List upcoming events
- **WHEN** user requests upcoming events
- **THEN** system returns events with future dates
- **AND** sorts by date ascending
#### Scenario: Filter by organizer
- **WHEN** user filters events by specific organizer
- **THEN** system returns only events created by that organizer
@@ -0,0 +1,38 @@
## ADDED Requirements
### Requirement: Payment recording
The system SHALL record payment details for event registrations.
#### Scenario: Record cash payment
- **WHEN** organizer records cash payment for registration
- **THEN** system stores payment amount, date, and method
- **AND** updates registration payment status
#### Scenario: Record online payment
- **WHEN** system receives payment confirmation from payment processor
- **THEN** system records transaction ID, amount, and timestamp
- **AND** marks registration as paid
### Requirement: Payment status tracking
The system SHALL track payment status for each registration.
#### Scenario: Unpaid registration
- **WHEN** registration has no recorded payment
- **THEN** system displays status "unpaid"
#### Scenario: Partial payment
- **WHEN** registration has payment less than required amount
- **THEN** system displays status "partial"
- **AND** shows remaining balance
#### Scenario: Fully paid
- **WHEN** registration payment equals or exceeds required amount
- **THEN** system displays status "paid"
### Requirement: Payment reporting
The system SHALL generate payment reports for organizers.
#### Scenario: Event payment summary
- **WHEN** organizer requests payment report for event
- **THEN** system displays total collected, pending, and outstanding amounts
- **AND** lists all registrations with payment status
@@ -0,0 +1,42 @@
## ADDED Requirements
### Requirement: Event registration
The system SHALL allow participants to register for published events.
#### Scenario: Successful registration
- **WHEN** participant submits registration for published event
- **THEN** system creates registration with "pending" status
- **AND** reserves participant spot
#### Scenario: Registration closed
- **WHEN** participant attempts to register for full event
- **THEN** system returns error "Event is full"
#### Scenario: Duplicate registration
- **WHEN** participant attempts to register twice for same event
- **THEN** system returns error "Already registered"
### Requirement: Registration form
The system SHALL collect required participant information during registration.
#### Scenario: Collect participant details
- **WHEN** participant registers for event
- **THEN** system collects name, email, emergency contact, and category
- **AND** stores with registration record
#### Scenario: Missing required fields
- **WHEN** participant submits incomplete form
- **THEN** system displays validation errors
- **AND** prevents submission
### Requirement: Registration status
The system SHALL track and display registration status.
#### Scenario: View registration status
- **WHEN** participant views their registrations
- **THEN** system displays status (pending, confirmed, cancelled, completed)
#### Scenario: Cancel registration
- **WHEN** participant cancels their registration
- **THEN** system updates status to "cancelled"
- **AND** releases reserved spot
@@ -0,0 +1,37 @@
## ADDED Requirements
### Requirement: User registration
The system SHALL allow new users to create accounts with email and password.
#### Scenario: Successful registration
- **WHEN** user provides valid email, password, and confirms password
- **THEN** system creates a new user account
- **AND** system sends email verification
#### Scenario: Duplicate email
- **WHEN** user attempts to register with an existing email
- **THEN** system returns error "Email already registered"
### Requirement: User login
The system SHALL authenticate users with email and password credentials.
#### Scenario: Successful login
- **WHEN** user provides correct email and password
- **THEN** system creates authenticated session
- **AND** redirects to dashboard
#### Scenario: Invalid credentials
- **WHEN** user provides incorrect password
- **THEN** system returns error "Invalid credentials"
- **AND** does not create session
### Requirement: Role-based access control
The system SHALL support organizer and participant roles with different permissions.
#### Scenario: Organizer access
- **WHEN** user with organizer role accesses event management
- **THEN** system allows full event CRUD operations
#### Scenario: Participant access
- **WHEN** user with participant role accesses event management
- **THEN** system restricts to read-only and registration only
@@ -0,0 +1,84 @@
## 1. Project Setup
- [ ] 1.1 Initialize project structure with backend and frontend directories
- [ ] 1.2 Setup .NET backend (ASP.NET Core Web API with C#)
- [ ] 1.3 Setup Next.js frontend with TypeScript using Bun runtime
- [ ] 1.4 Configure ESLint and Prettier for frontend
- [ ] 1.5 Setup Entity Framework Core with PostgreSQL
- [ ] 1.6 Create initial database schema migration (EF Core)
## 2. Database Schema
- [ ] 2.1 Create users table with roles
- [ ] 2.2 Create events table with organizer foreign key
- [ ] 2.3 Create registrations table with event and user foreign keys
- [ ] 2.4 Create payments table with registration foreign key
- [ ] 2.5 Create announcements table with event foreign key
- [ ] 2.6 Add database indexes for common queries
## 3. User Authentication (user-auth)
- [ ] 3.1 Implement user registration endpoint
- [ ] 3.2 Implement user login endpoint with JWT
- [ ] 3.3 Create authentication middleware
- [ ] 3.4 Implement role-based access control middleware
- [ ] 3.5 Create registration form component
- [ ] 3.6 Create login form component
- [ ] 3.7 Implement logout functionality
## 4. Event Management (event-management)
- [ ] 4.1 Implement create event endpoint
- [ ] 4.2 Implement update event endpoint
- [ ] 4.3 Implement list events endpoint with filtering
- [ ] 4.4 Implement get event details endpoint
- [ ] 4.5 Create event creation form component
- [ ] 4.6 Create event editing form component
- [ ] 4.7 Create event list view with filters
- [ ] 4.8 Create event detail view
## 5. Registration System (registration-system)
- [ ] 5.1 Implement registration endpoint
- [ ] 5.2 Implement registration status update endpoint
- [ ] 5.3 Implement cancel registration endpoint
- [ ] 5.4 Create registration form component
- [ ] 5.5 Create my registrations list component
- [ ] 5.6 Implement registration status display
## 6. Payment Tracking (payment-tracking)
- [ ] 6.1 Implement record payment endpoint
- [ ] 6.2 Implement payment status endpoint
- [ ] 6.3 Implement payment report endpoint
- [ ] 6.4 Create payment recording form component
- [ ] 6.5 Create payment status display component
- [ ] 6.6 Create payment report view
## 7. Announcements (announcements)
- [ ] 7.1 Implement create announcement endpoint
- [ ] 7.2 Implement edit announcement endpoint
- [ ] 7.3 Implement delete announcement endpoint
- [ ] 7.4 Implement list announcements endpoint
- [ ] 7.5 Create announcement creation form
- [ ] 7.6 Create announcement list component
- [ ] 7.7 Implement notification system
## 8. Dashboard (dashboard)
- [ ] 8.1 Implement organizer metrics endpoint
- [ ] 8.2 Implement participant registrations endpoint
- [ ] 8.3 Create organizer dashboard component
- [ ] 8.4 Create participant dashboard component
- [ ] 8.5 Add quick action buttons
## 9. Integration and Polish
- [ ] 9.1 Connect frontend to all backend endpoints
- [ ] 9.2 Add error handling and loading states
- [ ] 9.3 Implement responsive design
- [ ] 9.4 Add form validation feedback
- [ ] 9.5 Setup email service for notifications
- [ ] 9.6 Add basic unit tests for critical paths
- [ ] 9.7 Create deployment configuration
+20
View File
@@ -0,0 +1,20 @@
schema: spec-driven
# Project context (optional)
# This is shown to AI when creating artifacts.
# Add your tech stack, conventions, style guides, domain knowledge, etc.
# Example:
# context: |
# Tech stack: TypeScript, React, Node.js
# We use conventional commits
# Domain: e-commerce platform
# Per-artifact rules (optional)
# Add custom rules for specific artifacts.
# Example:
# rules:
# proposal:
# - Keep proposals under 500 words
# - Always include a "Non-goals" section
# tasks:
# - Break tasks into chunks of max 2 hours