diff --git a/.claude/skills/sift-backlog/SKILL.md b/.claude/skills/sift-backlog/SKILL.md new file mode 100644 index 0000000..2432f1e --- /dev/null +++ b/.claude/skills/sift-backlog/SKILL.md @@ -0,0 +1,195 @@ +--- +name: sift-backlog +description: Triage and organize backlog tasks into actionable plans. Use when asked to review the backlog, prioritize tasks, create plans from backlog items, or move tasks from backlog to open status. Handles the full workflow of listing backlog tasks, grouping related tasks into plans, setting priorities and dependencies, activating plans, and changing task status from backlog to open. +--- + +# Sift Backlog + +Triage backlog tasks: prioritize, group into plans, set dependencies, and activate. + +## Overview + +1. List backlog tasks (`sf task backlog`) +2. Clarify and enrich each task (titles, descriptions) +3. Identify groupings and create draft plans +4. Add tasks to plans and set dependencies +5. Activate plans +6. Set task status to open + +## Workflow + +### Step 1: List Backlog Tasks + +```bash +sf task backlog +``` + +### Step 2: Clarify and Enrich Tasks + +Backlog tasks often have only a brief title with no description. Before organizing, ensure each task is well-defined. + +**For each task, evaluate:** + +- Is the title clear and actionable? +- Is there a description? Check with `sf task describe --show` +- Is the scope unambiguous? + +**If the title is unclear**, update it: + +```bash +sf update --title "Clear, actionable title" +``` + +**Add a description** with context, scope, and acceptance criteria: + +```bash +sf task describe --content "Description with: +- What needs to be done +- Why it matters +- Acceptance criteria +- Any relevant context" +``` + +**Use your best judgment** to interpret tasks and make reasonable decisions about scope, grouping, and priority. You have context about the codebase, project patterns, and typical development practices—leverage this knowledge rather than deferring to the user for routine decisions. + +**Only ask the user for clarity when absolutely necessary:** + +- The task is fundamentally ambiguous (multiple mutually exclusive interpretations) +- Critical business logic or user-facing behavior that could go wrong in meaningful ways +- External dependencies or integrations you cannot verify + +**Do NOT ask about:** + +- Implementation details you can reasonably infer +- Priority or grouping decisions—use your judgment +- Standard development practices (testing, code style, etc.) +- Tasks where a reasonable interpretation exists + +### Step 3: Create Draft Plans + +Group related tasks into plans using your best judgment. Plans start as drafts (tasks won't be dispatched until activated). + +**Grouping guidance:** + +- Group tasks that share a common theme, feature area, or goal +- Consider technical dependencies when grouping (tasks that touch the same files/modules) +- Separate unrelated work into distinct plans for parallel execution +- Don't over-group—if tasks are truly independent, separate plans enable better parallelism +- Don't under-group—related tasks benefit from shared context and coordinated execution + +```bash +sf plan create --title "Plan Name" +``` + +**Example:** + +```bash +sf plan create --title "Authentication Improvements" +# Output: Created plan el-abc123 +``` + +### Step 4: Add Tasks to Plans + +```bash +sf plan add-task +``` + +**Example:** + +```bash +sf plan add-task el-abc123 el-task1 +sf plan add-task el-abc123 el-task2 +``` + +### Step 5: Set Dependencies Between Tasks + +Use `blocks` dependency when one task must complete before another can start. + +```bash +sf dependency add --type blocks +``` + +**Semantics:** The first ID is blocked BY the second ID. The blocker must complete first. + +**Example:** Task 2 can't start until Task 1 completes: + +```bash +sf dependency add el-task2 el-task1 --type blocks +``` + +### Step 6: Update Priorities + +Set priorities based on your assessment of impact, urgency, and dependencies. Use your judgment—you don't need user confirmation for routine prioritization. + +**Priority guidance:** + +- **Critical (1):** Blocking issues, security vulnerabilities, production bugs +- **High (2):** Important features with deadlines, significant user impact +- **Medium (3):** Standard feature work, most tasks default here +- **Low (4):** Nice-to-haves, minor improvements, tech debt +- **Minimal (5):** Backlog cleanup, documentation, exploratory work + +```bash +sf update --priority <1-5> +``` + +| Value | Level | +| ----- | -------- | +| 1 | Critical | +| 2 | High | +| 3 | Medium | +| 4 | Low | +| 5 | Minimal | + +### Step 7: Activate Plans + +Once tasks are organized with dependencies set, activate plans to enable dispatch. + +```bash +sf plan activate +``` + +### Step 8: Set Task Status to Open + +Move tasks from backlog to open so they become ready for work. + +```bash +sf update --status open +``` + +## Other Actions + +**Close obsolete tasks:** + +```bash +sf task close --reason "Won't do: " +``` + +**Defer tasks:** + +```bash +sf task defer --until +``` + +**View existing plans:** + +```bash +sf plan list +``` + +**View tasks in a plan:** + +```bash +sf plan tasks +``` + +## Tips + +- **Use your best judgment** for grouping, prioritization, and task interpretation—don't defer routine decisions to the user +- **Only escalate to the user** when ambiguity is fundamental and could lead to wasted work (mutually exclusive interpretations, critical business decisions) +- Make reasonable inferences about implementation details, scope, and priority based on codebase context +- Create plans before setting dependencies to avoid dispatch race conditions +- Always activate plans after dependencies are set +- Focus on oldest backlog items first (sorted by creation date) +- Every task should have a clear title and description before activation +- When uncertain about a minor detail, make a reasonable choice and document it in the task description—workers can ask if needed diff --git a/.fusion/archive.db b/.fusion/archive.db new file mode 100644 index 0000000..4d0f4d7 Binary files /dev/null and b/.fusion/archive.db differ diff --git a/.fusion/archive.db-shm b/.fusion/archive.db-shm new file mode 100644 index 0000000..a10e4e3 Binary files /dev/null and b/.fusion/archive.db-shm differ diff --git a/.fusion/archive.db-wal b/.fusion/archive.db-wal new file mode 100644 index 0000000..91c3645 Binary files /dev/null and b/.fusion/archive.db-wal differ diff --git a/.fusion/config.json b/.fusion/config.json new file mode 100644 index 0000000..4cfe44f --- /dev/null +++ b/.fusion/config.json @@ -0,0 +1,127 @@ +{ + "nextId": 1, + "settings": { + "globalPause": false, + "enginePaused": false, + "maxConcurrent": 2, + "maxTriageConcurrent": 2, + "globalMaxConcurrent": 4, + "maxWorktrees": 4, + "pollIntervalMs": 15000, + "heartbeatMultiplier": 1, + "groupOverlappingFiles": true, + "overlapIgnorePaths": [], + "autoMerge": true, + "mergeStrategy": "direct", + "requirePrApproval": false, + "pushAfterMerge": false, + "pushRemote": "origin", + "unavailableNodePolicy": "block", + "recycleWorktrees": false, + "worktreeNaming": "random", + "taskPrefix": "FN", + "includeTaskIdInCommit": true, + "commitAuthorEnabled": true, + "commitAuthorName": "Fusion", + "commitAuthorEmail": "noreply@runfusion.ai", + "modelPresets": [], + "autoSelectModelPreset": false, + "completionDocumentationMode": "off", + "defaultPresetBySize": {}, + "autoResolveConflicts": true, + "smartConflictResolution": true, + "mergerAutostashMaxAgeHours": 24, + "worktreeRebaseBeforeMerge": true, + "worktreeRebaseRemote": "", + "worktreeRebaseLocalBase": true, + "mergeConflictStrategy": "smart-prefer-main", + "workflowStepTimeoutMs": 360000, + "strictScopeEnforcement": false, + "buildRetryCount": 0, + "verificationFixRetries": 3, + "buildTimeoutMs": 300000, + "requirePlanApproval": false, + "specStalenessEnabled": false, + "specStalenessMaxAgeMs": 21600000, + "aiSessionTtlMs": 604800000, + "aiSessionCleanupIntervalMs": 3600000, + "autoUnpauseEnabled": true, + "autoUnpauseBaseDelayMs": 300000, + "autoUnpauseMaxDelayMs": 3600000, + "maxStuckKills": 6, + "preserveProgressOnStuckRequeue": true, + "maxPostReviewFixes": 1, + "maxSpawnedAgentsPerParent": 5, + "maxSpawnedAgentsGlobal": 20, + "maintenanceIntervalMs": 300000, + "autoArchiveDoneTasksEnabled": true, + "autoArchiveDoneAfterMs": 172800000, + "archiveAgentLogMode": "compact", + "autoUpdatePrStatus": false, + "githubCommentOnDone": false, + "githubTrackingEnabledByDefault": false, + "githubAuthMode": "gh-cli", + "autoBackupEnabled": false, + "autoBackupSchedule": "0 2 * * *", + "autoBackupRetention": 7, + "autoBackupDir": ".fusion/backups", + "memoryBackupEnabled": false, + "memoryBackupSchedule": "0 3 * * *", + "memoryBackupRetention": 14, + "memoryBackupDir": ".fusion/backups/memory", + "memoryBackupScope": "all", + "autoSummarizeTitles": false, + "useAiMergeCommitSummary": true, + "insightExtractionEnabled": false, + "insightExtractionSchedule": "0 2 * * *", + "insightExtractionMinIntervalMs": 86400000, + "taskEvaluationEnabled": false, + "taskEvaluationSchedule": "0 5 * * *", + "taskEvaluationFollowUpPolicy": "off", + "memoryEnabled": true, + "memoryBackendType": "qmd", + "memoryAutoSummarizeEnabled": false, + "memoryAutoSummarizeThresholdChars": 50000, + "memoryAutoSummarizeSchedule": "0 3 * * *", + "memoryDreamsEnabled": false, + "memoryDreamsSchedule": "0 4 * * *", + "runStepsInNewSessions": false, + "maxParallelSteps": 2, + "missionStaleThresholdMs": 600000, + "missionMaxTaskRetries": 3, + "missionHealthCheckIntervalMs": 300000, + "reflectionEnabled": false, + "reflectionIntervalMs": 3600000, + "reflectionAfterTask": true, + "reviewHandoffPolicy": "disabled", + "showQuickChatFAB": false, + "researchSettings": { + "enabled": true, + "enabledSources": { + "webSearch": true, + "pageFetch": true, + "github": false, + "localDocs": true, + "llmSynthesis": true + }, + "limits": { + "maxConcurrentRuns": 3, + "maxSourcesPerRun": 20, + "maxDurationMs": 300000, + "requestTimeoutMs": 30000 + } + }, + "evalSettings": { + "enabled": false, + "intervalMs": 86400000, + "followUpPolicy": "suggest-only", + "retentionDays": 30 + }, + "researchEnabled": true, + "researchMaxConcurrentRuns": 3, + "researchDefaultTimeout": 300000, + "researchMaxSourcesPerRun": 20, + "researchMaxSynthesisRounds": 2, + "globalPauseReason": "manual" + } +} \ No newline at end of file diff --git a/.fusion/fusion.db b/.fusion/fusion.db new file mode 100644 index 0000000..eb9169e Binary files /dev/null and b/.fusion/fusion.db differ diff --git a/.fusion/fusion.db-shm b/.fusion/fusion.db-shm new file mode 100644 index 0000000..245291c Binary files /dev/null and b/.fusion/fusion.db-shm differ diff --git a/.fusion/fusion.db-wal b/.fusion/fusion.db-wal new file mode 100644 index 0000000..b59be02 Binary files /dev/null and b/.fusion/fusion.db-wal differ diff --git a/.fusion/memory/2026-05-11.md b/.fusion/memory/2026-05-11.md new file mode 100644 index 0000000..12aaa41 --- /dev/null +++ b/.fusion/memory/2026-05-11.md @@ -0,0 +1,3 @@ +# Daily Memory 2026-05-11 + + diff --git a/.fusion/memory/DREAMS.md b/.fusion/memory/DREAMS.md new file mode 100644 index 0000000..1e1f4f5 --- /dev/null +++ b/.fusion/memory/DREAMS.md @@ -0,0 +1,3 @@ +# Memory Dreams + + diff --git a/.fusion/memory/MEMORY.md b/.fusion/memory/MEMORY.md new file mode 100644 index 0000000..3407ce8 --- /dev/null +++ b/.fusion/memory/MEMORY.md @@ -0,0 +1,19 @@ +# Project Memory + + + +## Architecture + + + +## Conventions + + + +## Pitfalls + + + +## Context + + diff --git a/.gitignore b/.gitignore index d000eae..62e51dd 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ frontend/dist/ # Pi internal .pi-lens/ .pi/ +/.stoneforge/.worktrees/ diff --git a/.opencode/commands/opsx-apply.md b/.opencode/commands/opsx-apply.md new file mode 100644 index 0000000..16d2ef3 --- /dev/null +++ b/.opencode/commands/opsx-apply.md @@ -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: " and how to override (e.g., `/opsx-apply `). + +2. **Check status to understand the schema** + ```bash + openspec status --change "" --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 "" --json + ``` + + This returns: + - `contextFiles`: artifact ID -> array of concrete 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 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: (schema: ) + +Working on task 3/7: +[...implementation happening...] +✓ Task complete + +Working on task 4/7: +[...implementation happening...] +✓ Task complete +``` + +**Output On Completion** + +``` +## Implementation Complete + +**Change:** +**Schema:** +**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:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.