chore: bootstrap data plane engineering
Verify Data Plane / gateway (push) Successful in 1m57s

This commit is contained in:
sechmachine
2026-07-29 03:34:05 +07:00
parent 4c60c8fb7d
commit 6c630a1398
16 changed files with 1138 additions and 1 deletions
@@ -0,0 +1,160 @@
---
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.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.0"
---
Implement tasks from an OpenSpec change.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**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")
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
- 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:
- `contextFiles`: artifact ID -> array of concrete 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 every file path listed under `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,118 @@
---
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.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.0"
---
Archive a completed change in the experimental workflow.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**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
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
- `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**
Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta 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 an `archive` directory under `planningHome.changesDir` if it doesn't exist:
```bash
mkdir -p "<planningHome.changesDir>/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 `changeRoot` to the archive directory
```bash
mv "<changeRoot>" "<planningHome.changesDir>/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:** the archive path derived from `planningHome.changesDir`/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
+290
View File
@@ -0,0 +1,290 @@
---
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.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.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.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
---
## 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. **Resolve and read existing artifacts for context**
- Run `openspec status --change "<name>" --json`.
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
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
+114
View File
@@ -0,0 +1,114 @@
---
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.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.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
---
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**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 in the planning home resolved by the CLI 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
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
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
- `resolvedOutputPath`: Resolved path or pattern 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 and write it to `resolvedOutputPath`
- 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
+148
View File
@@ -0,0 +1,148 @@
---
name: openspec-sync-specs
description: Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.0"
---
Sync delta specs from a change to main specs.
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**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 changes that have delta specs (under `specs/` directory).
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Resolve change context**
Run:
```bash
openspec status --change "<name>" --json
```
3. **Find delta specs**
Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the list of delta spec files.
Each delta spec file contains sections like:
- `## ADDED Requirements` - New requirements to add
- `## MODIFIED Requirements` - Changes to existing requirements
- `## REMOVED Requirements` - Requirements to remove
- `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
If no delta specs found, inform user and stop.
4. **For each delta spec, apply changes to main specs**
For each repo-local capability delta spec path returned by the CLI:
a. **Read the delta spec** to understand the intended changes
b. **Read the main spec** at `openspec/specs/<capability>/spec.md` (may not exist yet)
c. **Apply changes intelligently**:
**ADDED Requirements:**
- If requirement doesn't exist in main spec → add it
- If requirement already exists → update it to match (treat as implicit MODIFIED)
**MODIFIED Requirements:**
- Find the requirement in main spec
- Apply the changes - this can be:
- Adding new scenarios (don't need to copy existing ones)
- Modifying existing scenarios
- Changing the requirement description
- Preserve scenarios/content not mentioned in the delta
**REMOVED Requirements:**
- Remove the entire requirement block from main spec
**RENAMED Requirements:**
- Find the FROM requirement, rename to TO
d. **Create new main spec** if capability doesn't exist yet:
- Create `openspec/specs/<capability>/spec.md`
- Add Purpose section (can be brief, mark as TBD)
- Add Requirements section with the ADDED requirements
5. **Show summary**
After applying all changes, summarize:
- Which capabilities were updated
- What changes were made (requirements added/modified/removed/renamed)
**Delta Spec Format Reference**
```markdown
## ADDED Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
#### Scenario: New scenario to add
- **WHEN** user does A
- **THEN** system does B
## REMOVED Requirements
### Requirement: Deprecated Feature
## RENAMED Requirements
- FROM: `### Requirement: Old Name`
- TO: `### Requirement: New Name`
```
**Key Principle: Intelligent Merging**
Unlike programmatic merging, you can apply **partial updates**:
- To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
- The delta represents *intent*, not a wholesale replacement
- Use your judgment to merge changes sensibly
**Output On Success**
```
## Specs Synced: <change-name>
Updated main specs:
**<capability-1>**:
- Added requirement: "New Feature"
- Modified requirement: "Existing Feature" (added 1 scenario)
**<capability-2>**:
- Created new spec file
- Added requirement: "Another Feature"
Main specs are now updated. The change remains active - archive when implementation is complete.
```
**Guardrails**
- Read both delta and main specs before making changes
- Preserve existing content not mentioned in delta
- If something is unclear, ask for clarification
- Show what you're changing as you go
- The operation should be idempotent - running twice should give same result
+32
View File
@@ -0,0 +1,32 @@
name: Verify Data Plane
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: data-plane-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
gateway:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: "1.26.5"
cache: true
cache-dependency-path: go.mod
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.13"
- name: Verify Go and OpenSpec baseline
run: make OPENSPEC='bunx --bun @fission-ai/openspec@1.5.0' verify
- name: Verify clean checkout
run: git diff --exit-code
+7
View File
@@ -62,3 +62,10 @@ fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
# macOS and IDE-local state
.DS_Store
.idea/
# Go verification output
coverage.out
*.test
+70
View File
@@ -0,0 +1,70 @@
# VerseVDI Data Plane repository guidance
This repository is the GPLv3 implementation boundary for the separately
deployed VerseVDI gateway, Apollo adapter, later Rust streaming core, and
native clients. It is private in Gitea during engineering. Privacy does not
change the repository's GPL boundary.
## Authority and scope
- The closed Connection Server owns authentication, authorization,
PostgreSQL, assignments, broker sessions, product licensing, gateway
placement, grants, and durable audit.
- The Protocol repository is the sole wire-contract authority. Pin an exact
immutable Protocol release; never add a sibling-checkout `replace` or a
local wire fork.
- This repository owns provider compatibility, packet translation, gateway
forwarding, and later client-side streaming code. It receives only
session-scoped authority over versioned authenticated network contracts.
- Never copy proprietary Connection Server or private Planning Hub content
into this repository.
- Apollo, Moonlight, and other reference trees are evidence, not dependencies
or scaffolding. Use only the reviewed commits in the Planning Hub lock and
record provenance before copying or deriving any implementation.
## Phase 3C hard boundaries
- The gateway is a separately deployed pure-Go process. No cgo or hidden
native sidecar.
- All Verse client streaming traffic crosses the authenticated gateway. Never
expose or route a client to Apollo/provider DNS, IP, ports, certificates, or
credentials.
- Relay encoded media without decode, encode, transcode, render, or codec
conversion.
- Keep transport, framing, media profile, source-rate control, and client
decode capabilities separate. Apollo/GameStream is one qualified provider
profile, not the permanent Verse contract.
- Validate provider identity and negotiated protection. No insecure retry or
silent capability fallback.
- Bound every parser, queue, fragment, stream, datagram, timer, goroutine,
allocation, and metric label.
- A failed Apollo feasibility spike is a terminal `NO-GO`; preserve evidence
and reopen the architecture decision rather than implementing around it.
## Source and verification rules
- The Go module is
`git.sechmachine.io.vn/sechmachine/VerseVDI-Data-Plane` and uses Go 1.26.5.
- Run `make verify` after changing the Go or OpenSpec baseline.
- Use test-first implementation for non-trivial behavior. Fuzz every external
parser and run race/resource checks required by the approved task.
- Do not hand-edit generated Protocol bindings. Advance the Protocol pin only
after its immutable release and fixture hash are recorded.
- OpenSpec changes must map exact Planning Hub requirement IDs and include
failure scenarios. Archive only after canonical specs and evidence match.
- Verification is evidence-invalidated, not time-based: focused checks after
a change, one affected suite per milestone, and one complete gate after code
freeze. Reuse evidence while source, locks, configuration, environment, and
artifact digest remain identical.
## Git, CI, and publication safety
- `origin/main-agentic` is the private Gitea engineering authority.
- Preserve user-owned dirty work. Do not reset, discard, force-push, merge,
publish, or change remotes/branch protection without explicit authorization.
- Commit cohesive verified increments with concise Conventional Commit
subjects.
- Keep credentials, packet payloads, private captures, host addresses, and
Planning Hub evidence out of Git and CI logs.
- Public repository creation, release tags, packages, signing, and
Corresponding Source publication are separate promotion actions.
+40
View File
@@ -0,0 +1,40 @@
# Contributing
VerseVDI Data Plane engineering currently occurs in the private Gitea
repository. Contributions must preserve the GPL/proprietary process boundary
and the gateway-only product architecture.
## Before changing source
1. Read `AGENTS.md` and the active OpenSpec change.
2. Confirm the requirement belongs to this repository.
3. Record the exact upstream commit, license, file, and derivation method
before using any Apollo/Moonlight/reference material.
4. Add no proprietary Connection Server or private Planning Hub content.
5. Add no dependency until its present need, license, maintenance, security,
and pure-Go boundary are documented.
## Verification
Run:
```bash
make verify
git diff --check
```
For implementation changes, also run the focused, race, fuzz, integration, and
lab checks named by the active OpenSpec task. Do not repeat an unchanged full
suite or live matrix merely because time passed; record the evidence and rerun
only when an input or affected behavior changes.
## Commits and review
- Use concise Conventional Commit subjects.
- Keep Protocol, gateway, provider, operations, and native-client changes in
reviewable increments.
- Never commit credentials, raw media/input, unredacted captures, private
infrastructure addresses, or proprietary source.
- Do not push, merge, publish, or create a release without explicit authority.
Report security issues through the private process in `SECURITY.md`.
+24
View File
@@ -0,0 +1,24 @@
.PHONY: format-check module-verify build vet test openspec verify
GO ?= go
OPENSPEC ?= openspec
format-check:
@test -z "$$(gofmt -l $$(find gateway -type f -name '*.go' -print))"
module-verify:
$(GO) mod verify
build:
$(GO) build ./...
vet:
$(GO) vet ./...
test:
$(GO) test ./... -count=1
openspec:
$(OPENSPEC) validate --all --strict --no-interactive
verify: format-check module-verify build vet test openspec
+52 -1
View File
@@ -1,2 +1,53 @@
# VerseVDI-Data-Plane
# VerseVDI Data Plane
This private-Gitea repository is the GPLv3 implementation boundary for the
separately deployed VerseVDI data plane. Phase 3C will add the pure-Go gateway
and Apollo adapter here; later phases add the Rust streaming core and native
clients. The proprietary Connection Server remains a separate process and
repository.
## Current status
The repository is prepared for **Phase 3C-A preflight and Apollo
feasibility**. It does not yet contain a production gateway or a qualified
Apollo path. A failed feasibility decision blocks Phase 3C-B; it does not
authorize direct client-to-Apollo routing, cgo, a native sidecar, or
decode/transcode behavior.
The existing Xcode project is retained for the later native-client phase. It
is not Phase 3C gateway evidence and must not be used to move provider or
Connection Server authority into a client.
## Repository boundaries
- `gateway/` owns the separately deployed pure-Go gateway and provider
adapters.
- `core/` and `clients/` are reserved for later approved Rust/native-client
work.
- `integration/`, `packaging/`, and `docs/` may be added only by their
corresponding approved OpenSpec tasks.
- The repository never owns PostgreSQL, commercial licensing, durable user or
assignment authority, or general Connection Server administration.
- The Verse client never receives or connects to an Apollo/provider endpoint.
- The Protocol repository is the sole wire-contract authority; consumers pin
an immutable release without a filesystem `replace`.
## Verification
The baseline uses Go 1.26.5 and OpenSpec 1.5.0:
```bash
make verify
```
The command checks formatting, module integrity, compilation, vet, tests, and
strict OpenSpec validation. Verification is change-driven: rerun affected
checks after a change and the complete repository gate once after a candidate
is frozen. Do not run time-based verification loops.
## Licensing and publication
The repository currently uses the GNU GPL version 3 engineering baseline and
is private in Gitea. Public distribution, final SPDX/legal review, release
artifacts, and Corresponding Source promotion evidence require separate
authorization. See `LICENSE`, `THIRD_PARTY_NOTICES.md`, and `CONTRIBUTING.md`.
+35
View File
@@ -0,0 +1,35 @@
# Security policy
The Data Plane is not yet a supported production product. Phase 3C security
work is performed in the private Gitea repository.
## Reporting
Report suspected vulnerabilities through a confidential issue or direct
private message to the repository owner. Do not include credentials, session
grants, private host addresses, packet payloads, media, input, or unredacted
captures in an ordinary issue.
Include:
- affected commit and artifact digest;
- exact reproduction conditions;
- expected and observed trust boundary;
- redacted logs or capture hashes; and
- whether the issue exposes a direct provider route, bypasses admission,
weakens identity/protection, or causes unbounded resource use.
Do not publish a vulnerability or proof of concept until the owner has
coordinated remediation and disclosure.
## Non-negotiable security properties
- mTLS and session-scoped grants protect Server-to-gateway authority.
- One-time admission is bound to purpose, audience, device, session, sequence,
gateway, and expiry.
- The client receives no provider endpoint or credential.
- Provider identity/protection failures do not fall back insecurely.
- External inputs are bounded before allocation.
- Authority loss releases input and stops new admission.
- Logs, metrics, traces, manifests, and support artifacts contain no secret,
provider route, media, input, or high-cardinality session label.
+19
View File
@@ -0,0 +1,19 @@
# Third-party notices
No third-party gateway, provider, protocol, or streaming implementation is
incorporated at this bootstrap revision. The existing Apple Xcode project was
generated by the platform tool and remains reserved for a later native-client
phase.
Apollo, Moonlight, and related repositories are external research references
only. Before any source is copied, adapted, linked, embedded, or used to create
fixtures, update this file and the Phase 3C provenance record with:
- upstream repository and exact commit;
- source and destination paths;
- license and retained notices;
- whether the work is copied, derived, or independently implemented; and
- modifications made by VerseVDI.
The VerseVDI Protocol is maintained in a separate repository and must be
consumed only through an exact immutable release.
+3
View File
@@ -0,0 +1,3 @@
// Package gateway contains the separately deployed VerseVDI data-plane
// gateway. It must not own Connection Server business or database authority.
package gateway
+3
View File
@@ -0,0 +1,3 @@
module git.sechmachine.io.vn/sechmachine/VerseVDI-Data-Plane
go 1.26.5
+23
View File
@@ -0,0 +1,23 @@
schema: spec-driven
context: |
VerseVDI Data Plane is the private-Gitea GPLv3 boundary for the separately
deployed pure-Go gateway and Apollo adapter. The closed Connection Server
owns durable business, database, authorization, placement, and grant
authority. The Protocol repository owns every wire contract.
Phase 3C forbids direct client-to-provider routing, cgo/native sidecars,
decode/transcode/render, insecure identity/protection fallback, unbounded
external-input handling, and proprietary source in this repository.
The Go toolchain is 1.26.5. Consumers pin an immutable Protocol release
without a filesystem replace.
rules:
proposal:
- Map exact Planning Hub requirement IDs and repository ownership.
- State provenance, GPL boundary, non-goals, and hard stop conditions.
design:
- Keep transport, framing, media, source-control, and client-decode domains separate.
- Define bounds, failure behavior, authority loss, and redaction before success behavior.
tasks:
- Put the Apollo feasibility go/no-go before production gateway implementation.
- Name focused checks, evidence invalidation inputs, and the single final verification gate.