steroids-cli 0.12.7 → 0.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/llm-content.d.ts +1 -1
- package/dist/commands/llm-content.d.ts.map +1 -1
- package/dist/commands/llm-content.js +66 -12
- package/dist/commands/llm-content.js.map +1 -1
- package/dist/commands/project-reset.d.ts +3 -0
- package/dist/commands/project-reset.d.ts.map +1 -0
- package/dist/commands/project-reset.js +151 -0
- package/dist/commands/project-reset.js.map +1 -0
- package/dist/commands/tasks-deps.d.ts +10 -0
- package/dist/commands/tasks-deps.d.ts.map +1 -0
- package/dist/commands/tasks-deps.js +179 -0
- package/dist/commands/tasks-deps.js.map +1 -0
- package/dist/commands/tasks.d.ts.map +1 -1
- package/dist/commands/tasks.js +57 -3
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/web.d.ts.map +1 -1
- package/dist/commands/web.js +12 -1
- package/dist/commands/web.js.map +1 -1
- package/dist/database/queries.d.ts +55 -0
- package/dist/database/queries.d.ts.map +1 -1
- package/dist/database/queries.js +172 -9
- package/dist/database/queries.js.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/task-selector.d.ts.map +1 -1
- package/dist/orchestrator/task-selector.js +11 -7
- package/dist/orchestrator/task-selector.js.map +1 -1
- package/dist/workspace/git-lifecycle.d.ts.map +1 -1
- package/dist/workspace/git-lifecycle.js +18 -0
- package/dist/workspace/git-lifecycle.js.map +1 -1
- package/migrations/027_add_task_dependencies.sql +13 -0
- package/migrations/manifest.json +9 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LLM_INSTRUCTIONS = "# STEROIDS LLM QUICK REFERENCE\n\n## WHAT IS STEROIDS\nSteroids=automated task orchestration system.\nIt manages tasks and invokes LLM agents (coders/reviewers) to execute them.\nThe system spawns separate LLM processes for coding and reviewing.\nDeterministic daemon \u2014 never makes decisions, just follows the state machine.\n\n## DATABASE ACCESS RULES (CRITICAL)\n- Never touch '.steroids/steroids.db' directly \u2014 no raw SQL, no sqlite3.\n- Use 'steroids llm' first to understand how to inspect or manipulate the system.\n- Read/write operations must go through the steroids CLI only.\n\n## TASK SIZING (CRITICAL)\n\nTasks should be PR-sized chunks of work \u2014 not individual classes or functions,\nbut whole testable pieces of functionality. Think \"what would make a good pull request?\"\n\nGOOD task sizing:\n- \"Implement user authentication endpoint with tests\"\n- \"Add section dependency graph visualization\"\n- \"Build CSV export for task reports\"\n\nBAD task sizing (too granular):\n- \"Create UserService class\"\n- \"Add validateEmail helper function\"\n- \"Write test for login method\"\n\nBAD task sizing (too large):\n- \"Build the entire frontend\"\n- \"Implement all API endpoints\"\n\nEach task should produce a reviewable, testable unit of work that can be\nmerged independently. The reviewer needs enough context to verify correctness,\nand the coder needs enough scope to make meaningful progress.\n\n## TASK STATE MACHINE\n\n### All 8 Statuses\n\n| Marker | Status | Terminal? | Runner picks it? | Description |\n|--------|-------------|-----------|-------------------|------------------------------------------------|\n| [ ] | pending | No | YES \u2192 coder | Not started, waiting for coder |\n| [-] | in_progress | No | YES \u2192 coder | Coder is actively working |\n| [o] | review | No | YES \u2192 reviewer | Coder finished, waiting for reviewer |\n| [x] | completed | YES | No | Reviewer approved, code pushed |\n| [!] | disputed | YES | No | Coder/reviewer disagreement, code pushed |\n| [F] | failed | YES | No | Exceeded 15 rejections, needs human |\n| [S] | skipped | YES | No | Fully external \u2014 nothing to code |\n| [s] | partial | YES | No | Some coded, rest needs external setup |\n\nCRITICAL: skipped [S] and partial [s] are TERMINAL states. The runner will NEVER\npick them up for coding. Once a task is marked partial/skipped, it is DONE from the\nrunner's perspective. If coding is still needed, reset to pending manually.\n\n### State Transitions\n\npending [ ] \u2192 in_progress [-] \u2192 review [o] \u2192 completed [x] (approved)\n \u2193 rejected \u2192 back to in_progress [-]\n \u2193 disputed \u2192 disputed [!] (code pushed, move on)\n if 15 rejections \u2192 failed [F] (full stop)\nHuman can mark at any time \u2192 skipped [S] or partial [s] (terminal)\n\n### Coordinator Intervention\nAt rejection thresholds [2, 5, 9], a coordinator LLM is invoked to analyze the\nrejection pattern and provide guidance to both coder and reviewer. This breaks\ncoder/reviewer deadlocks without human intervention.\n\n## TASK SELECTION ALGORITHM\n\nRunner selects tasks in strict priority order:\n\n Priority 1: review [o] \u2014 complete reviews before starting new work\n Priority 2: in_progress [-] \u2014 resume incomplete work\n Priority 3: pending [ ] \u2014 start new work\n\nWithin each priority, ordered by: section position (lower=first), then created_at (older=first).\n\n### Filters Applied Before Selection\n1. Terminal statuses excluded: completed, disputed, failed, skipped, partial\n2. Tasks in skipped sections excluded (unless runner focused on specific section)\n3. Tasks in sections with UNMET DEPENDENCIES excluded (see below)\n4. Tasks locked by another runner excluded\n\nIf no selectable task exists \u2192 runner goes idle.\n\n## SECTION DEPENDENCIES\n\nSections can declare dependencies on other sections:\n steroids sections depends-on <A> <B> \u2192 Section A depends on Section B\n\nEffect: ALL tasks in section B must be completed before ANY task in section A\ncan be picked by the runner. \"Completed\" means status=completed (not just\nskipped/partial \u2014 those count as incomplete for dependency purposes).\n\nDependency checks:\n- Cycle detection prevents circular dependencies\n- Runner evaluates dependencies at task selection time\n- Use `steroids sections graph` to visualize the dependency tree\n\nCommands:\n steroids sections depends-on <id> <dep-id> # add dependency\n steroids sections no-depends-on <id> <dep-id> # remove dependency\n steroids sections list --deps # show deps inline\n steroids sections graph # ASCII dependency tree\n steroids sections graph --mermaid # Mermaid syntax\n steroids sections graph --json # JSON output\n\n## ARCHITECTURE\n- Tasks stored in .steroids/steroids.db (SQLite, per project)\n- Runner daemon executes the loop (one per project)\n- Coder LLM: implements task, commits, submits for review\n- Reviewer LLM: verifies implementation, approves or rejects\n- Coordinator LLM: breaks deadlocks at rejection thresholds [2, 5, 9]\n- Build verification: orchestrator re-runs build+tests after coder submits\n- If build/tests fail \u2192 auto-reject back to in_progress (coder fixes)\n\n## MULTI-PROJECT\n- Multiple projects can have runners simultaneously\n- Each runner bound to ONE project only\n- Global registry at ~/.steroids/steroids.db tracks all projects\n- NEVER modify files outside current project\n\n## KEY COMMANDS\n\n### View Tasks\nsteroids tasks stats # task counts by status\nsteroids tasks # pending tasks (current project)\nsteroids tasks --status active # in_progress+review (current project)\nsteroids tasks --status active --global # active across ALL projects\nsteroids tasks --status all # all tasks\nsteroids tasks audit <id> # view task spec, history, rejection notes\n\n### Add Tasks\nsteroids tasks add \"Title\" --section <id> --source <spec-file>\nsteroids tasks add \"Title\" --section <id> --source spec.md --file src/foo.ts --line 42\nsteroids tasks feedback \"Advisory note\"\n\nOptions:\n --section <id> Section to add the task to (required unless --feedback)\n --source <file> Specification markdown file (required unless --feedback)\n --file <path> Anchor task to a specific file in the codebase\n File must be committed in git (not dirty/untracked)\n Auto-captures: commit SHA of last change + content hash\n Coder/reviewer prompts will reference this exact location\n --line <number> Line number in the anchored file (requires --file)\n --feedback Add to skipped \"Needs User Input\" section for human review\n Skips --section and --source requirements\n\nBEST PRACTICE: When generating tasks from documentation or specs, commit the\ndocumentation first, then fill in ALL values including optional ones:\n --source pointing to the committed spec file\n --file pointing to the relevant source file in the codebase\n --line pointing to the exact line where work applies\nThis gives the coder/reviewer maximum context and traceability.\n\n### Manage Tasks\nsteroids tasks update <id> --status <s> --actor model --model <m>\n statuses: pending, in_progress, review, completed, skipped, partial\nsteroids tasks update <id> --source <file> # fix/change spec file\nsteroids tasks update <id> --title \"New title\" # rename task\nsteroids tasks update <id> --section <id> # move to different section\nsteroids tasks update <id> --file <path> --line <n> # change file anchor\nsteroids tasks approve <id> --model <m> [--notes \"msg\"] # mark completed\nsteroids tasks reject <id> --model <m> --notes \"feedback\" # back to pending\nsteroids tasks skip <id> --notes \"reason\" # external setup, skip it\nsteroids tasks skip <id> --partial --notes \"reason\" # coded some, rest external\n\n### Sections\nsteroids sections list # list sections\nsteroids sections list --deps # list with dependencies shown\nsteroids sections skip <id> # exclude from runner\nsteroids sections unskip <id> # include in runner\nsteroids sections priority <id> <val> # set priority (0-100 or high/medium/low)\nsteroids sections depends-on <A> <B> # A depends on B (B must complete first)\nsteroids sections no-depends-on <A> <B> # remove dependency\nsteroids sections graph # show dependency graph\n\n### Runners (daemon that executes tasks)\nsteroids runners list # all runners (all projects)\nsteroids runners start --detach # start background daemon\nsteroids runners start --section \"X\" # focus on specific section\nsteroids runners stop --all # stop all\nsteroids runners status # current state\nsteroids runners logs <pid> # view daemon output\nsteroids runners wakeup # poll intake + restart stale runners\n\nNOTE: Stopping a runner is temporary \u2014 the wakeup cron will respawn it.\nTo permanently stop a runner, DISABLE the project first:\n steroids projects disable # then steroids runners stop --all\n\n### Projects\nsteroids projects list # all registered projects\n\n### Web Dashboard\nsteroids web # clone (first run) and launch dashboard\nsteroids web update # pull latest + reinstall deps\nsteroids web stop # stop running dashboard\nsteroids web status # check if dashboard is running\nsteroids web config # manage web dashboard configuration\n\n## BUG INTAKE\n\nExternal bug intake is config-driven and currently supports the GitHub Issues\nconnector. If `intake.connectors.sentry.enabled=true`, registry construction\nfails fast because the Sentry runtime connector is not implemented here.\n\nKey concepts:\n- Connector: pulls normalized reports from an external source into Steroids\n- Intake report: stored record keyed by source + external_id\n- Approval gate: GitHub issue flow that approves or rejects intake reports\n- Intake hooks: `intake.received`, `intake.triaged`, `intake.pr_created`\n- Intake pipeline tasks: `Triage intake report ...`, `Reproduce intake report ...`,\n `Fix intake report ...`\n\nUseful commands:\n steroids config show intake # inspect merged intake config\n steroids config schema intake # JSON Schema for intake settings\n steroids config validate # validate connector config\n steroids hooks list --event intake.received # inspect intake automation hooks\n steroids runners wakeup # poll due connectors + sync gate issues\n steroids web # view intake reports in dashboard\n\nIntake report statuses:\n open -> triaged -> in_progress -> resolved\n \\-> ignored\n\n## COMMON OPERATIONS\n\n### Start automation\nsteroids runners start --detach # daemon picks tasks and invokes coders/reviewers\n\n### Check what's happening\nsteroids tasks --status active --global # see all active work\nsteroids runners list # see all running daemons\n\n### Unblock stuck task in review\nsteroids tasks approve <id> --model human # approve manually\nsteroids tasks reject <id> --model human --notes \"reason\" # reject manually\n\n### Restart failed task\nsteroids tasks update <id> --status pending --reset-rejections # reset to pending with fresh count\n\n### Fix incorrectly marked partial/skipped tasks\nsteroids tasks update <id> --status pending --actor human:cli\n# Use when: a task was marked partial/skipped but still needs coding\n\n### Skip external setup task\nsteroids tasks skip <id> --notes \"spec says SKIP, needs Cloud SQL setup\"\n# Use when: spec says SKIP/MANUAL, requires cloud console, account creation, etc.\n# --partial: use if you coded some parts but rest needs human action\n\n## PROJECT SETUP\n\nSECTIONS = Features or Functional Areas\n - Each section represents ONE cohesive piece of functionality\n - Sections should be independent enough to be worked on in isolation\n - Sections have priorities and can depend on other sections\n\nTASKS = PR-Sized Implementation Units\n - Each task produces a reviewable, testable unit of work\n - Tasks must have a specification file explaining exactly what to build\n - Tasks are ordered within sections \u2014 earlier tasks may set up later ones\n\nSPECIFICATIONS = Markdown files describing what to build\n - Include: purpose, requirements, examples, acceptance criteria\n - Reference existing code patterns the implementation should follow\n - Create a specs/ directory with markdown files\n\nINITIALIZING A PROJECT:\n 1. steroids init -y # non-interactive, accept defaults\n 2. Create specs/ with your specifications\n 3. steroids sections add \"Phase 1: Feature Name\"\n 4. steroids tasks add \"Task title\" --section <id> --source specs/spec.md\n 5. steroids loop\n\n## DATABASE MIGRATIONS (IMPORTANT)\n\nEach project has its own SQLite database (.steroids/steroids.db). When Steroids is\nupdated with schema changes, older project databases need migration.\n\nMigrations run AUTOMATICALLY on any command that opens the database. However, if a\nproject hasn't been used for a while and the schema has drifted significantly,\nauto-migration may fail.\n\n### Before Adding Tasks to an Existing Project\nAlways verify the database is healthy first:\n steroids health # checks DB, runs auto-migration\n\nIf you see \"Database schema is out of date\" errors:\n STEROIDS_AUTO_MIGRATE=1 steroids health # force migration + health check\n\n### How Migrations Work\n- Migration files live in migrations/ (SQL with UP/DOWN sections)\n- Applied automatically when the database is opened\n- A backup is created before each migration (.steroids/backups/)\n- Safe to run multiple times (idempotent)\n- If migration fails: fix the issue, then re-run any steroids command\n\n### For LLM Agents\nALWAYS run `steroids health` before adding the first task to a project you haven't\ntouched recently. This ensures the schema is current and prevents cryptic SQL errors\nduring task creation or runner execution.\n\n## IMPORTANT NOTES\n- Task spec is in source file (see tasks audit output)\n- Max 15 rejections before task fails; coordinator intervenes at [2, 5, 9]\n- Runner auto-restarts via cron (steroids runners cron install)\n- Each project isolated: own database, own runner\n- Section dependencies block entire sections, not individual tasks\n- Build+test verification happens automatically after coder submits\n- Always run build AND tests before submitting for review\n- Never modify code outside the task scope\n- If stuck, create a dispute rather than guessing\n";
|
|
1
|
+
export declare const LLM_INSTRUCTIONS = "# STEROIDS LLM QUICK REFERENCE\n\n## WHAT IS STEROIDS\nSteroids=automated task orchestration system.\nIt manages tasks and invokes LLM agents (coders/reviewers) to execute them.\nThe system spawns separate LLM processes for coding and reviewing.\nDeterministic daemon \u2014 never makes decisions, just follows the state machine.\n\n## DATABASE ACCESS RULES (CRITICAL)\n- Never touch '.steroids/steroids.db' directly \u2014 no raw SQL, no sqlite3.\n- Use 'steroids llm' first to understand how to inspect or manipulate the system.\n- Read/write operations must go through the steroids CLI only.\n- NEVER commit '.steroids/' to git \u2014 add it to .gitignore. Tracking it breaks\n runner workspace isolation and causes data loss.\n\n## TASK SIZING (CRITICAL)\n\nTasks should be PR-sized chunks of work \u2014 not individual classes or functions,\nbut whole testable pieces of functionality. Think \"what would make a good pull request?\"\n\nGOOD task sizing:\n- \"Implement user authentication endpoint with tests\"\n- \"Add section dependency graph visualization\"\n- \"Build CSV export for task reports\"\n\nBAD task sizing (too granular):\n- \"Create UserService class\"\n- \"Add validateEmail helper function\"\n- \"Write test for login method\"\n\nBAD task sizing (too large):\n- \"Build the entire frontend\"\n- \"Implement all API endpoints\"\n\nEach task should produce a reviewable, testable unit of work that can be\nmerged independently. The reviewer needs enough context to verify correctness,\nand the coder needs enough scope to make meaningful progress.\n\n## TASK STATE MACHINE\n\n### All 10 Statuses\n\n| Marker | Status | Terminal? | Runner picks it? | Description |\n|--------|------------------|-----------|-------------------|------------------------------------------------|\n| [ ] | pending | No | YES \u2192 coder | Not started, waiting for coder |\n| [-] | in_progress | No | YES \u2192 coder | Coder is actively working |\n| [o] | review | No | YES \u2192 reviewer | Coder finished, waiting for reviewer |\n| [x] | completed | YES | No | Reviewer approved, code pushed |\n| [!] | disputed | YES | No | Coder/reviewer disagreement, code pushed |\n| [F] | failed | YES | No | Exceeded 15 rejections, needs human |\n| [S] | skipped | YES | No | Fully external \u2014 nothing to code |\n| [s] | partial | YES | No | Some coded, rest needs external setup |\n| [B] | blocked_error | YES | No | Infrastructure error (e.g. .steroids in git) |\n| [C] | blocked_conflict | YES | No | Merge conflict, needs human resolution |\n\nCRITICAL: skipped [S] and partial [s] are TERMINAL states. The runner will NEVER\npick them up for coding. Once a task is marked partial/skipped, it is DONE from the\nrunner's perspective. If coding is still needed, reset to pending manually.\n\n### State Transitions\n\npending [ ] \u2192 in_progress [-] \u2192 review [o] \u2192 completed [x] (approved)\n \u2193 rejected \u2192 back to in_progress [-]\n \u2193 disputed \u2192 disputed [!] (code pushed, move on)\n if 15 rejections \u2192 failed [F] (full stop)\nHuman can mark at any time \u2192 skipped [S] or partial [s] (terminal)\n\n### Coordinator Intervention\nAt rejection thresholds [2, 5, 9], a coordinator LLM is invoked to analyze the\nrejection pattern and provide guidance to both coder and reviewer. This breaks\ncoder/reviewer deadlocks without human intervention.\n\n## TASK SELECTION ALGORITHM\n\nRunner selects tasks in strict priority order:\n\n Priority 1: review [o] \u2014 complete reviews before starting new work\n Priority 2: in_progress [-] \u2014 resume incomplete work\n Priority 3: pending [ ] \u2014 start new work\n\nWithin each priority, ordered by: section position (lower=first), then created_at (older=first).\n\n### Filters Applied Before Selection\n1. Terminal statuses excluded: completed, disputed, failed, skipped, partial\n2. Tasks in skipped sections excluded (unless runner focused on specific section)\n3. Tasks in sections with UNMET DEPENDENCIES excluded (see below)\n4. Tasks locked by another runner excluded\n\nIf no selectable task exists \u2192 runner goes idle.\n\n## SECTION DEPENDENCIES\n\nSections can declare dependencies on other sections:\n steroids sections depends-on <A> <B> \u2192 Section A depends on Section B\n\nEffect: ALL tasks in section B must be completed before ANY task in section A\ncan be picked by the runner. \"Completed\" means status=completed (not just\nskipped/partial \u2014 those count as incomplete for dependency purposes).\n\nDependency checks:\n- Cycle detection prevents circular dependencies\n- Runner evaluates dependencies at task selection time\n- Use `steroids sections graph` to visualize the dependency tree\n\nCommands:\n steroids sections depends-on <id> <dep-id> # add dependency\n steroids sections no-depends-on <id> <dep-id> # remove dependency\n steroids sections list --deps # show deps inline\n steroids sections graph # ASCII dependency tree\n steroids sections graph --mermaid # Mermaid syntax\n steroids sections graph --json # JSON output\n\n## TASK DEPENDENCIES\n\nTasks can declare dependencies on other tasks within or across sections:\n steroids tasks depends-on <A> <B> # Task A depends on Task B\n\nEffect: Task B must reach a terminal status (completed, disputed, skipped, partial)\nbefore the runner will pick up Task A. Unlike section dependencies which block entire\nsections, task dependencies provide fine-grained ordering within sections.\n\nCommands:\n steroids tasks depends-on <A> <B> # add dependency\n steroids tasks no-depends-on <A> <B> # remove dependency\n steroids tasks audit <id> # shows dependencies in output\n\n## ARCHITECTURE\n- Tasks stored in .steroids/steroids.db (SQLite, per project)\n- Runner daemon executes the loop (one per project)\n- Coder LLM: implements task, commits, submits for review\n- Reviewer LLM: verifies implementation, approves or rejects\n- Coordinator LLM: breaks deadlocks at rejection thresholds [2, 5, 9]\n- Build verification: orchestrator re-runs build+tests after coder submits\n- If build/tests fail \u2192 auto-reject back to in_progress (coder fixes)\n\n## MULTI-PROJECT\n- Multiple projects can have runners simultaneously\n- Each runner bound to ONE project only\n- Global registry at ~/.steroids/steroids.db tracks all projects\n- NEVER modify files outside current project\n\n## KEY COMMANDS\n\n### View Tasks\nsteroids tasks stats # task counts by status\nsteroids tasks # pending tasks (current project)\nsteroids tasks --status active # in_progress+review (current project)\nsteroids tasks --status active --global # active across ALL projects\nsteroids tasks --status all # all tasks\nsteroids tasks audit <id> # view task spec, history, rejection notes\n\n### Add Tasks\nsteroids tasks add \"Title\" --section <id> --source <spec-file>\nsteroids tasks add \"Title\" --section <id> --source spec.md --file src/foo.ts --line 42\nsteroids tasks feedback \"Advisory note\"\n\nOptions:\n --section <id> Section to add the task to (required unless --feedback)\n --source <file> Specification markdown file (required unless --feedback)\n --file <path> Anchor task to a specific file in the codebase\n File must be committed in git (not dirty/untracked)\n Auto-captures: commit SHA of last change + content hash\n Coder/reviewer prompts will reference this exact location\n --line <number> Line number in the anchored file (requires --file)\n --description <text> Free-text description (max 4000 chars) for coder/reviewer context\n --depends-on <id> Task ID that must complete before this task can start\n --feedback Add to skipped \"Needs User Input\" section for human review\n Skips --section and --source requirements\n\nBEST PRACTICE: When generating tasks from documentation or specs, commit the\ndocumentation first, then fill in ALL values including optional ones:\n --source pointing to the committed spec file\n --file pointing to the relevant source file in the codebase\n --line pointing to the exact line where work applies\nThis gives the coder/reviewer maximum context and traceability.\n\n### Manage Tasks\nsteroids tasks update <id> --status <s> --actor model --model <m>\n statuses: pending, in_progress, review, completed, skipped, partial\nsteroids tasks update <id> --source <file> # fix/change spec file\nsteroids tasks update <id> --title \"New title\" # rename task\nsteroids tasks update <id> --section <id> # move to different section\nsteroids tasks update <id> --file <path> --line <n> # change file anchor\nsteroids tasks approve <id> --model <m> [--notes \"msg\"] # mark completed\nsteroids tasks reject <id> --model <m> --notes \"feedback\" # back to pending\nsteroids tasks skip <id> --notes \"reason\" # external setup, skip it\nsteroids tasks skip <id> --partial --notes \"reason\" # coded some, rest external\n\n### Sections\nsteroids sections list # list sections\nsteroids sections list --deps # list with dependencies shown\nsteroids sections skip <id> # exclude from runner\nsteroids sections unskip <id> # include in runner\nsteroids sections priority <id> <val> # set priority (0-100 or high/medium/low)\nsteroids sections depends-on <A> <B> # A depends on B (B must complete first)\nsteroids sections no-depends-on <A> <B> # remove dependency\nsteroids sections graph # show dependency graph\n\n### Runners (daemon that executes tasks)\nsteroids runners list # all runners (all projects)\nsteroids runners start --detach # start background daemon\nsteroids runners start --section \"X\" # focus on specific section\nsteroids runners stop --all # stop all\nsteroids runners status # current state\nsteroids runners logs <pid> # view daemon output\nsteroids runners wakeup # poll intake + restart stale runners\n\nNOTE: Stopping a runner is temporary \u2014 the wakeup cron will respawn it.\nTo permanently stop a runner, DISABLE the project first:\n steroids projects disable # then steroids runners stop --all\n\n### Projects\nsteroids projects list # all registered projects\n\n### Web Dashboard\nsteroids web # clone (first run) and launch dashboard\nsteroids web update # pull latest + reinstall deps\nsteroids web stop # stop running dashboard\nsteroids web status # check if dashboard is running\nsteroids web config # manage web dashboard configuration\n\n## BUG INTAKE\n\nExternal bug intake is config-driven and currently supports the GitHub Issues\nconnector. If `intake.connectors.sentry.enabled=true`, registry construction\nfails fast because the Sentry runtime connector is not implemented here.\n\nKey concepts:\n- Connector: pulls normalized reports from an external source into Steroids\n- Intake report: stored record keyed by source + external_id\n- Approval gate: GitHub issue flow that approves or rejects intake reports\n- Intake hooks: `intake.received`, `intake.triaged`, `intake.pr_created`\n- Intake pipeline tasks: `Triage intake report ...`, `Reproduce intake report ...`,\n `Fix intake report ...`\n\nUseful commands:\n steroids config show intake # inspect merged intake config\n steroids config schema intake # JSON Schema for intake settings\n steroids config validate # validate connector config\n steroids hooks list --event intake.received # inspect intake automation hooks\n steroids runners wakeup # poll due connectors + sync gate issues\n steroids web # view intake reports in dashboard\n\nIntake report statuses:\n open -> triaged -> in_progress -> resolved\n \\-> ignored\n\n## COMMON OPERATIONS\n\n### Start automation\nsteroids runners start --detach # daemon picks tasks and invokes coders/reviewers\n\n### Check what's happening\nsteroids tasks --status active --global # see all active work\nsteroids runners list # see all running daemons\n\n### Unblock stuck task in review\nsteroids tasks approve <id> --model human # approve manually\nsteroids tasks reject <id> --model human --notes \"reason\" # reject manually\n\n### Restart failed task\nsteroids tasks update <id> --status pending --reset-rejections # reset to pending with fresh count\n\n### Fix incorrectly marked partial/skipped tasks\nsteroids tasks update <id> --status pending --actor human:cli\n# Use when: a task was marked partial/skipped but still needs coding\n\n### Reset project (start over with clean tasks)\nsteroids reset-project -y # reset all tasks to pending, clear all history\n # keeps tasks, sections, and dependencies intact\n\n### Skip external setup task\nsteroids tasks skip <id> --notes \"spec says SKIP, needs Cloud SQL setup\"\n# Use when: spec says SKIP/MANUAL, requires cloud console, account creation, etc.\n# --partial: use if you coded some parts but rest needs human action\n\n## PROJECT SETUP\n\nSECTIONS = Features or Functional Areas\n - Each section represents ONE cohesive piece of functionality\n - Sections should be independent enough to be worked on in isolation\n - Sections have priorities and can depend on other sections\n\nTASKS = PR-Sized Implementation Units\n - Each task produces a reviewable, testable unit of work\n - Tasks must have a specification file explaining exactly what to build\n - Tasks are ordered within sections \u2014 earlier tasks may set up later ones\n\nSPECIFICATIONS = Markdown files describing what to build\n - Include: purpose, requirements, examples, acceptance criteria\n - Reference existing code patterns the implementation should follow\n - Create a specs/ directory with markdown files\n\nINITIALIZING A PROJECT:\n 1. steroids init -y # non-interactive, accept defaults\n 2. Create specs/ with your specifications\n 3. steroids sections add \"Phase 1: Feature Name\"\n 4. steroids tasks add \"Task title\" --section <id> --source specs/spec.md\n 5. steroids loop\n\n## DATABASE MIGRATIONS (IMPORTANT)\n\nEach project has its own SQLite database (.steroids/steroids.db). When Steroids is\nupdated with schema changes, older project databases need migration.\n\nMigrations run AUTOMATICALLY on any command that opens the database. However, if a\nproject hasn't been used for a while and the schema has drifted significantly,\nauto-migration may fail.\n\n### Before Adding Tasks to an Existing Project\nAlways verify the database is healthy first:\n steroids health # checks DB, runs auto-migration\n\nIf you see \"Database schema is out of date\" errors:\n STEROIDS_AUTO_MIGRATE=1 steroids health # force migration + health check\n\n### How Migrations Work\n- Migration files live in migrations/ (SQL with UP/DOWN sections)\n- Applied automatically when the database is opened\n- A backup is created before each migration (.steroids/backups/)\n- Safe to run multiple times (idempotent)\n- If migration fails: fix the issue, then re-run any steroids command\n\n### For LLM Agents\nALWAYS run `steroids health` before adding the first task to a project you haven't\ntouched recently. This ensures the schema is current and prevents cryptic SQL errors\nduring task creation or runner execution.\n\n## TASK AUTHORING BEST PRACTICES\n\n### Specification Files\n- Write focused markdown specs in specs/ directory\n- Include: purpose, requirements, acceptance criteria, code patterns to follow\n- Commit spec files before creating tasks that reference them\n\n### File Anchoring\nAnchor tasks to specific source files so the coder knows where to work:\n steroids tasks add \"Fix auth\" --section <id> --source specs/auth.md --file src/auth.ts --line 42\nSteroids captures commit SHA + content hash at creation time for drift detection.\n\n### Content Hashing for Precision\nInclude content hashes in description to help agents locate exact code:\n 1. Hash the target code: sha256sum <<< \"function processPayment()\"\n 2. Reference in description: --description \"Modify processPayment() [sha256:a1b2c3] to add retry\"\n 3. Agent verifies it found the right code by comparing hashes\n\n### Description Field\nUse --description (-d) for context beyond the spec file:\n- Which functions/classes to modify and their content hashes\n- Integration notes (\"output consumed by task X\")\n- Constraints (\"must not change public API surface\")\nMax 4000 characters.\n\n### Task Ordering\nWhen tasks in the same section must run in sequence:\n steroids tasks depends-on <later-task> <earlier-task>\nExample: \"Set up Prisma\" depends on \"Initialize monorepo\"\n\n## IMPORTANT NOTES\n- Task spec is in source file (see tasks audit output)\n- Max 15 rejections before task fails; coordinator intervenes at [2, 5, 9]\n- Runner auto-restarts via cron (steroids runners cron install)\n- Each project isolated: own database, own runner\n- Section dependencies block entire sections, not individual tasks\n- Build+test verification happens automatically after coder submits\n- Always run build AND tests before submitting for review\n- Never modify code outside the task scope\n- If stuck, create a dispute rather than guessing\n";
|
|
2
2
|
//# sourceMappingURL=llm-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-content.d.ts","sourceRoot":"","sources":["../../src/commands/llm-content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"llm-content.d.ts","sourceRoot":"","sources":["../../src/commands/llm-content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,86jBAgX5B,CAAC"}
|
|
@@ -13,6 +13,8 @@ Deterministic daemon — never makes decisions, just follows the state machine.
|
|
|
13
13
|
- Never touch '.steroids/steroids.db' directly — no raw SQL, no sqlite3.
|
|
14
14
|
- Use 'steroids llm' first to understand how to inspect or manipulate the system.
|
|
15
15
|
- Read/write operations must go through the steroids CLI only.
|
|
16
|
+
- NEVER commit '.steroids/' to git — add it to .gitignore. Tracking it breaks
|
|
17
|
+
runner workspace isolation and causes data loss.
|
|
16
18
|
|
|
17
19
|
## TASK SIZING (CRITICAL)
|
|
18
20
|
|
|
@@ -39,18 +41,20 @@ and the coder needs enough scope to make meaningful progress.
|
|
|
39
41
|
|
|
40
42
|
## TASK STATE MACHINE
|
|
41
43
|
|
|
42
|
-
### All
|
|
43
|
-
|
|
44
|
-
| Marker | Status
|
|
45
|
-
|
|
46
|
-
| [ ] | pending
|
|
47
|
-
| [-] | in_progress
|
|
48
|
-
| [o] | review
|
|
49
|
-
| [x] | completed
|
|
50
|
-
| [!] | disputed
|
|
51
|
-
| [F] | failed
|
|
52
|
-
| [S] | skipped
|
|
53
|
-
| [s] | partial
|
|
44
|
+
### All 10 Statuses
|
|
45
|
+
|
|
46
|
+
| Marker | Status | Terminal? | Runner picks it? | Description |
|
|
47
|
+
|--------|------------------|-----------|-------------------|------------------------------------------------|
|
|
48
|
+
| [ ] | pending | No | YES → coder | Not started, waiting for coder |
|
|
49
|
+
| [-] | in_progress | No | YES → coder | Coder is actively working |
|
|
50
|
+
| [o] | review | No | YES → reviewer | Coder finished, waiting for reviewer |
|
|
51
|
+
| [x] | completed | YES | No | Reviewer approved, code pushed |
|
|
52
|
+
| [!] | disputed | YES | No | Coder/reviewer disagreement, code pushed |
|
|
53
|
+
| [F] | failed | YES | No | Exceeded 15 rejections, needs human |
|
|
54
|
+
| [S] | skipped | YES | No | Fully external — nothing to code |
|
|
55
|
+
| [s] | partial | YES | No | Some coded, rest needs external setup |
|
|
56
|
+
| [B] | blocked_error | YES | No | Infrastructure error (e.g. .steroids in git) |
|
|
57
|
+
| [C] | blocked_conflict | YES | No | Merge conflict, needs human resolution |
|
|
54
58
|
|
|
55
59
|
CRITICAL: skipped [S] and partial [s] are TERMINAL states. The runner will NEVER
|
|
56
60
|
pick them up for coding. Once a task is marked partial/skipped, it is DONE from the
|
|
@@ -109,6 +113,20 @@ Commands:
|
|
|
109
113
|
steroids sections graph --mermaid # Mermaid syntax
|
|
110
114
|
steroids sections graph --json # JSON output
|
|
111
115
|
|
|
116
|
+
## TASK DEPENDENCIES
|
|
117
|
+
|
|
118
|
+
Tasks can declare dependencies on other tasks within or across sections:
|
|
119
|
+
steroids tasks depends-on <A> <B> # Task A depends on Task B
|
|
120
|
+
|
|
121
|
+
Effect: Task B must reach a terminal status (completed, disputed, skipped, partial)
|
|
122
|
+
before the runner will pick up Task A. Unlike section dependencies which block entire
|
|
123
|
+
sections, task dependencies provide fine-grained ordering within sections.
|
|
124
|
+
|
|
125
|
+
Commands:
|
|
126
|
+
steroids tasks depends-on <A> <B> # add dependency
|
|
127
|
+
steroids tasks no-depends-on <A> <B> # remove dependency
|
|
128
|
+
steroids tasks audit <id> # shows dependencies in output
|
|
129
|
+
|
|
112
130
|
## ARCHITECTURE
|
|
113
131
|
- Tasks stored in .steroids/steroids.db (SQLite, per project)
|
|
114
132
|
- Runner daemon executes the loop (one per project)
|
|
@@ -147,6 +165,8 @@ Options:
|
|
|
147
165
|
Auto-captures: commit SHA of last change + content hash
|
|
148
166
|
Coder/reviewer prompts will reference this exact location
|
|
149
167
|
--line <number> Line number in the anchored file (requires --file)
|
|
168
|
+
--description <text> Free-text description (max 4000 chars) for coder/reviewer context
|
|
169
|
+
--depends-on <id> Task ID that must complete before this task can start
|
|
150
170
|
--feedback Add to skipped "Needs User Input" section for human review
|
|
151
171
|
Skips --section and --source requirements
|
|
152
172
|
|
|
@@ -248,6 +268,10 @@ steroids tasks update <id> --status pending --reset-rejections # reset to pendi
|
|
|
248
268
|
steroids tasks update <id> --status pending --actor human:cli
|
|
249
269
|
# Use when: a task was marked partial/skipped but still needs coding
|
|
250
270
|
|
|
271
|
+
### Reset project (start over with clean tasks)
|
|
272
|
+
steroids reset-project -y # reset all tasks to pending, clear all history
|
|
273
|
+
# keeps tasks, sections, and dependencies intact
|
|
274
|
+
|
|
251
275
|
### Skip external setup task
|
|
252
276
|
steroids tasks skip <id> --notes "spec says SKIP, needs Cloud SQL setup"
|
|
253
277
|
# Use when: spec says SKIP/MANUAL, requires cloud console, account creation, etc.
|
|
@@ -305,6 +329,36 @@ ALWAYS run \`steroids health\` before adding the first task to a project you hav
|
|
|
305
329
|
touched recently. This ensures the schema is current and prevents cryptic SQL errors
|
|
306
330
|
during task creation or runner execution.
|
|
307
331
|
|
|
332
|
+
## TASK AUTHORING BEST PRACTICES
|
|
333
|
+
|
|
334
|
+
### Specification Files
|
|
335
|
+
- Write focused markdown specs in specs/ directory
|
|
336
|
+
- Include: purpose, requirements, acceptance criteria, code patterns to follow
|
|
337
|
+
- Commit spec files before creating tasks that reference them
|
|
338
|
+
|
|
339
|
+
### File Anchoring
|
|
340
|
+
Anchor tasks to specific source files so the coder knows where to work:
|
|
341
|
+
steroids tasks add "Fix auth" --section <id> --source specs/auth.md --file src/auth.ts --line 42
|
|
342
|
+
Steroids captures commit SHA + content hash at creation time for drift detection.
|
|
343
|
+
|
|
344
|
+
### Content Hashing for Precision
|
|
345
|
+
Include content hashes in description to help agents locate exact code:
|
|
346
|
+
1. Hash the target code: sha256sum <<< "function processPayment()"
|
|
347
|
+
2. Reference in description: --description "Modify processPayment() [sha256:a1b2c3] to add retry"
|
|
348
|
+
3. Agent verifies it found the right code by comparing hashes
|
|
349
|
+
|
|
350
|
+
### Description Field
|
|
351
|
+
Use --description (-d) for context beyond the spec file:
|
|
352
|
+
- Which functions/classes to modify and their content hashes
|
|
353
|
+
- Integration notes ("output consumed by task X")
|
|
354
|
+
- Constraints ("must not change public API surface")
|
|
355
|
+
Max 4000 characters.
|
|
356
|
+
|
|
357
|
+
### Task Ordering
|
|
358
|
+
When tasks in the same section must run in sequence:
|
|
359
|
+
steroids tasks depends-on <later-task> <earlier-task>
|
|
360
|
+
Example: "Set up Prisma" depends on "Initialize monorepo"
|
|
361
|
+
|
|
308
362
|
## IMPORTANT NOTES
|
|
309
363
|
- Task spec is in source file (see tasks audit output)
|
|
310
364
|
- Max 15 rejections before task fails; coordinator intervenes at [2, 5, 9]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-content.js","sourceRoot":"","sources":["../../src/commands/llm-content.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"llm-content.js","sourceRoot":"","sources":["../../src/commands/llm-content.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgX/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-reset.d.ts","sourceRoot":"","sources":["../../src/commands/project-reset.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA0IpF"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resetProject = resetProject;
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
|
+
const node_readline_1 = require("node:readline");
|
|
6
|
+
const connection_js_1 = require("../database/connection.js");
|
|
7
|
+
const global_db_connection_js_1 = require("../runners/global-db-connection.js");
|
|
8
|
+
const output_js_1 = require("../cli/output.js");
|
|
9
|
+
const daemon_js_1 = require("../runners/daemon.js");
|
|
10
|
+
const lock_js_1 = require("../runners/lock.js");
|
|
11
|
+
async function resetProject(args, flags) {
|
|
12
|
+
const out = (0, output_js_1.createOutput)({ command: 'reset-project', flags });
|
|
13
|
+
const { values } = (0, node_util_1.parseArgs)({
|
|
14
|
+
args,
|
|
15
|
+
options: {
|
|
16
|
+
help: { type: 'boolean', short: 'h', default: false },
|
|
17
|
+
yes: { type: 'boolean', short: 'y', default: false },
|
|
18
|
+
},
|
|
19
|
+
allowPositionals: false,
|
|
20
|
+
});
|
|
21
|
+
if (values.help || flags.help) {
|
|
22
|
+
out.log(`
|
|
23
|
+
steroids reset-project - Reset project to clean state
|
|
24
|
+
|
|
25
|
+
USAGE:
|
|
26
|
+
steroids reset-project [options]
|
|
27
|
+
|
|
28
|
+
OPTIONS:
|
|
29
|
+
-y, --yes Skip confirmation prompt
|
|
30
|
+
-h, --help Show help
|
|
31
|
+
|
|
32
|
+
DESCRIPTION:
|
|
33
|
+
Resets all tasks back to pending and clears all execution history
|
|
34
|
+
(invocations, audit trail, disputes, locks, feedback, incidents).
|
|
35
|
+
Preserves task/section/dependency structure.
|
|
36
|
+
|
|
37
|
+
Stops all active runners for this project before resetting.
|
|
38
|
+
`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const projectPath = process.cwd();
|
|
42
|
+
// Preview what will be reset
|
|
43
|
+
const preview = (0, connection_js_1.withDatabase)(projectPath, (db) => {
|
|
44
|
+
const taskCount = db.prepare(`SELECT COUNT(*) as c FROM tasks`).get().c;
|
|
45
|
+
const invocationCount = db.prepare(`SELECT COUNT(*) as c FROM task_invocations`).get().c;
|
|
46
|
+
const auditCount = db.prepare(`SELECT COUNT(*) as c FROM audit`).get().c;
|
|
47
|
+
const disputeCount = db.prepare(`SELECT COUNT(*) as c FROM disputes`).get().c;
|
|
48
|
+
const feedbackCount = db.prepare(`SELECT COUNT(*) as c FROM task_feedback`).get().c;
|
|
49
|
+
const incidentCount = db.prepare(`SELECT COUNT(*) as c FROM incidents`).get().c;
|
|
50
|
+
return { taskCount, invocationCount, auditCount, disputeCount, feedbackCount, incidentCount };
|
|
51
|
+
});
|
|
52
|
+
if (!preview) {
|
|
53
|
+
out.log('No database found for this project. Run "steroids init" first.');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (preview.taskCount === 0) {
|
|
57
|
+
out.log('No tasks found in this project. Nothing to reset.');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// Confirmation
|
|
61
|
+
if (!values.yes) {
|
|
62
|
+
out.log(`This will reset the project at: ${projectPath}\n`);
|
|
63
|
+
out.log(` ${preview.taskCount} task(s) → status=pending, counters zeroed`);
|
|
64
|
+
out.log(` ${preview.invocationCount} invocation record(s) → deleted`);
|
|
65
|
+
out.log(` ${preview.auditCount} audit record(s) → deleted`);
|
|
66
|
+
out.log(` ${preview.disputeCount} dispute(s) → deleted`);
|
|
67
|
+
out.log(` ${preview.feedbackCount} feedback record(s) → deleted`);
|
|
68
|
+
out.log(` ${preview.incidentCount} incident(s) → deleted`);
|
|
69
|
+
out.log(`\nTask/section/dependency structure will be preserved.`);
|
|
70
|
+
const confirmed = await promptConfirm('Proceed with reset? [y/N] ');
|
|
71
|
+
if (!confirmed) {
|
|
72
|
+
out.log('Reset cancelled.');
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Stop all runners for this project
|
|
77
|
+
const runners = (0, daemon_js_1.listRunners)().filter((r) => r.project_path === projectPath);
|
|
78
|
+
let stopped = 0;
|
|
79
|
+
for (const runner of runners) {
|
|
80
|
+
if (runner.pid && (0, lock_js_1.isProcessAlive)(runner.pid)) {
|
|
81
|
+
try {
|
|
82
|
+
process.kill(runner.pid, 'SIGTERM');
|
|
83
|
+
stopped++;
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
// Process already dead
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
(0, daemon_js_1.unregisterRunner)(runner.id);
|
|
90
|
+
}
|
|
91
|
+
if (stopped > 0) {
|
|
92
|
+
out.log(`Stopped ${stopped} runner(s) for this project.`);
|
|
93
|
+
// Wait for runners to exit before resetting DB
|
|
94
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
95
|
+
}
|
|
96
|
+
// Clean parallel sessions/workstreams from global DB
|
|
97
|
+
try {
|
|
98
|
+
const globalConn = (0, global_db_connection_js_1.openGlobalDatabase)();
|
|
99
|
+
globalConn.db.prepare(`UPDATE parallel_sessions SET status = 'failed' WHERE project_path = ? AND status = 'running'`).run(projectPath);
|
|
100
|
+
globalConn.db.prepare(`UPDATE workstreams SET status = 'failed' WHERE session_id IN (SELECT id FROM parallel_sessions WHERE project_path = ?)`).run(projectPath);
|
|
101
|
+
globalConn.close();
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
// Global DB cleanup is best-effort
|
|
105
|
+
}
|
|
106
|
+
// Perform the reset in a single transaction
|
|
107
|
+
(0, connection_js_1.withDatabase)(projectPath, (db) => {
|
|
108
|
+
db.transaction(() => {
|
|
109
|
+
// Clear execution history
|
|
110
|
+
db.prepare(`DELETE FROM task_invocations`).run();
|
|
111
|
+
db.prepare(`DELETE FROM audit`).run();
|
|
112
|
+
db.prepare(`DELETE FROM disputes`).run();
|
|
113
|
+
db.prepare(`DELETE FROM task_feedback`).run();
|
|
114
|
+
db.prepare(`DELETE FROM incidents`).run();
|
|
115
|
+
db.prepare(`DELETE FROM task_locks`).run();
|
|
116
|
+
db.prepare(`DELETE FROM section_locks`).run();
|
|
117
|
+
db.prepare(`DELETE FROM merge_locks`).run();
|
|
118
|
+
db.prepare(`DELETE FROM merge_progress`).run();
|
|
119
|
+
// Reset all tasks to pending
|
|
120
|
+
db.prepare(`UPDATE tasks SET
|
|
121
|
+
status = 'pending',
|
|
122
|
+
rejection_count = 0,
|
|
123
|
+
failure_count = 0,
|
|
124
|
+
merge_failure_count = 0,
|
|
125
|
+
conflict_count = 0,
|
|
126
|
+
start_commit_sha = NULL,
|
|
127
|
+
blocked_reason = NULL,
|
|
128
|
+
updated_at = datetime('now')
|
|
129
|
+
`).run();
|
|
130
|
+
})();
|
|
131
|
+
});
|
|
132
|
+
out.log(`\nProject reset complete:`);
|
|
133
|
+
out.log(` ${preview.taskCount} task(s) reset to pending`);
|
|
134
|
+
const cleared = preview.invocationCount + preview.auditCount + preview.disputeCount +
|
|
135
|
+
preview.feedbackCount + preview.incidentCount;
|
|
136
|
+
out.log(` ${cleared} history record(s) cleared`);
|
|
137
|
+
}
|
|
138
|
+
function promptConfirm(question) {
|
|
139
|
+
const rl = (0, node_readline_1.createInterface)({
|
|
140
|
+
input: process.stdin,
|
|
141
|
+
output: process.stdout,
|
|
142
|
+
});
|
|
143
|
+
return new Promise((resolve) => {
|
|
144
|
+
rl.question(question, (answer) => {
|
|
145
|
+
rl.close();
|
|
146
|
+
const a = answer.trim().toLowerCase();
|
|
147
|
+
resolve(a === 'y' || a === 'yes');
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=project-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-reset.js","sourceRoot":"","sources":["../../src/commands/project-reset.ts"],"names":[],"mappings":";;AASA,oCA0IC;AAnJD,yCAAsC;AACtC,iDAAgD;AAChD,6DAAyD;AACzD,gFAAwE;AACxE,gDAAgD;AAEhD,oDAAqE;AACrE,gDAAoD;AAE7C,KAAK,UAAU,YAAY,CAAC,IAAc,EAAE,KAA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C,QAAgB;IACrC,MAAM,EAAE,GAAG,IAAA,+BAAe,EAAC;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YAC/B,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACtC,OAAO,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GlobalFlags } from '../cli/flags.js';
|
|
2
|
+
import { getTaskDependencies } from '../database/queries.js';
|
|
3
|
+
export declare function addTaskDependencyCmd(args: string[], flags: GlobalFlags): Promise<void>;
|
|
4
|
+
export declare function removeTaskDependencyCmd(args: string[], flags: GlobalFlags): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Display task dependencies in audit/show output.
|
|
7
|
+
* Returns the dependencies array for JSON inclusion.
|
|
8
|
+
*/
|
|
9
|
+
export declare function displayTaskDependencies(db: any, taskId: string, flags: GlobalFlags): ReturnType<typeof getTaskDependencies>;
|
|
10
|
+
//# sourceMappingURL=tasks-deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks-deps.d.ts","sourceRoot":"","sources":["../../src/commands/tasks-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAOnD,OAAO,EAKL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAmBhC,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwE5F;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwE/F;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,GAAG,EACP,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,WAAW,GACjB,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAcxC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addTaskDependencyCmd = addTaskDependencyCmd;
|
|
4
|
+
exports.removeTaskDependencyCmd = removeTaskDependencyCmd;
|
|
5
|
+
exports.displayTaskDependencies = displayTaskDependencies;
|
|
6
|
+
/**
|
|
7
|
+
* Task dependency CLI commands: depends-on, no-depends-on
|
|
8
|
+
*/
|
|
9
|
+
const node_util_1 = require("node:util");
|
|
10
|
+
const connection_js_1 = require("../database/connection.js");
|
|
11
|
+
const queries_js_1 = require("../database/queries.js");
|
|
12
|
+
const output_js_1 = require("../cli/output.js");
|
|
13
|
+
const errors_js_1 = require("../cli/errors.js");
|
|
14
|
+
/**
|
|
15
|
+
* Resolve a task by ID prefix or title. Returns the task or exits with error.
|
|
16
|
+
*/
|
|
17
|
+
function resolveTask(db, identifier, out) {
|
|
18
|
+
let task = (0, queries_js_1.getTask)(db, identifier);
|
|
19
|
+
if (!task) {
|
|
20
|
+
task = (0, queries_js_1.getTaskByTitle)(db, identifier);
|
|
21
|
+
}
|
|
22
|
+
if (!task) {
|
|
23
|
+
out.error(errors_js_1.ErrorCode.TASK_NOT_FOUND, `Task not found: ${identifier}`, { identifier });
|
|
24
|
+
process.exit((0, errors_js_1.getExitCode)(errors_js_1.ErrorCode.TASK_NOT_FOUND));
|
|
25
|
+
}
|
|
26
|
+
return task;
|
|
27
|
+
}
|
|
28
|
+
async function addTaskDependencyCmd(args, flags) {
|
|
29
|
+
const out = (0, output_js_1.createOutput)({ command: 'tasks', subcommand: 'depends-on', flags });
|
|
30
|
+
const { positionals } = (0, node_util_1.parseArgs)({
|
|
31
|
+
args,
|
|
32
|
+
options: {},
|
|
33
|
+
allowPositionals: true,
|
|
34
|
+
});
|
|
35
|
+
if (flags.help) {
|
|
36
|
+
out.log(`
|
|
37
|
+
steroids tasks depends-on <task-id> <depends-on-task-id> - Add task dependency
|
|
38
|
+
|
|
39
|
+
USAGE:
|
|
40
|
+
steroids tasks depends-on <task-id> <depends-on-task-id>
|
|
41
|
+
|
|
42
|
+
ARGUMENTS:
|
|
43
|
+
task-id The task that depends on another
|
|
44
|
+
depends-on-task-id The task that must complete first
|
|
45
|
+
|
|
46
|
+
GLOBAL OPTIONS:
|
|
47
|
+
-j, --json Output as JSON
|
|
48
|
+
-h, --help Show help
|
|
49
|
+
|
|
50
|
+
EXAMPLES:
|
|
51
|
+
steroids tasks depends-on abc123 def456
|
|
52
|
+
`);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (positionals.length < 2) {
|
|
56
|
+
out.error(errors_js_1.ErrorCode.INVALID_ARGUMENTS, 'Both task IDs required', {
|
|
57
|
+
usage: 'steroids tasks depends-on <task-id> <depends-on-task-id>',
|
|
58
|
+
});
|
|
59
|
+
process.exit((0, errors_js_1.getExitCode)(errors_js_1.ErrorCode.INVALID_ARGUMENTS));
|
|
60
|
+
}
|
|
61
|
+
const [taskIdInput, dependsOnIdInput] = positionals;
|
|
62
|
+
if (flags.dryRun) {
|
|
63
|
+
out.log(`Would add dependency: ${taskIdInput} depends on ${dependsOnIdInput}`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const projectPath = process.cwd();
|
|
67
|
+
/* REFACTOR_MANUAL */ (0, connection_js_1.withDatabase)(projectPath, (db) => {
|
|
68
|
+
const task = resolveTask(db, taskIdInput, out);
|
|
69
|
+
const depTask = resolveTask(db, dependsOnIdInput, out);
|
|
70
|
+
try {
|
|
71
|
+
const dependency = (0, queries_js_1.addTaskDependency)(db, task.id, depTask.id);
|
|
72
|
+
if (flags.json) {
|
|
73
|
+
out.success({
|
|
74
|
+
dependency: {
|
|
75
|
+
task_id: dependency.task_id,
|
|
76
|
+
depends_on_task_id: dependency.depends_on_task_id,
|
|
77
|
+
task_title: task.title,
|
|
78
|
+
depends_on_title: depTask.title,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
out.log(`Dependency added: "${task.title}" depends on "${depTask.title}"`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
out.error(errors_js_1.ErrorCode.INVALID_ARGUMENTS, error.message, {
|
|
88
|
+
taskId: task.id,
|
|
89
|
+
dependsOnTaskId: depTask.id,
|
|
90
|
+
});
|
|
91
|
+
process.exit((0, errors_js_1.getExitCode)(errors_js_1.ErrorCode.INVALID_ARGUMENTS));
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
async function removeTaskDependencyCmd(args, flags) {
|
|
96
|
+
const out = (0, output_js_1.createOutput)({ command: 'tasks', subcommand: 'no-depends-on', flags });
|
|
97
|
+
const { positionals } = (0, node_util_1.parseArgs)({
|
|
98
|
+
args,
|
|
99
|
+
options: {},
|
|
100
|
+
allowPositionals: true,
|
|
101
|
+
});
|
|
102
|
+
if (flags.help) {
|
|
103
|
+
out.log(`
|
|
104
|
+
steroids tasks no-depends-on <task-id> <depends-on-task-id> - Remove task dependency
|
|
105
|
+
|
|
106
|
+
USAGE:
|
|
107
|
+
steroids tasks no-depends-on <task-id> <depends-on-task-id>
|
|
108
|
+
|
|
109
|
+
ARGUMENTS:
|
|
110
|
+
task-id The dependent task
|
|
111
|
+
depends-on-task-id The dependency to remove
|
|
112
|
+
|
|
113
|
+
GLOBAL OPTIONS:
|
|
114
|
+
-j, --json Output as JSON
|
|
115
|
+
-h, --help Show help
|
|
116
|
+
|
|
117
|
+
EXAMPLES:
|
|
118
|
+
steroids tasks no-depends-on abc123 def456
|
|
119
|
+
`);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (positionals.length < 2) {
|
|
123
|
+
out.error(errors_js_1.ErrorCode.INVALID_ARGUMENTS, 'Both task IDs required', {
|
|
124
|
+
usage: 'steroids tasks no-depends-on <task-id> <depends-on-task-id>',
|
|
125
|
+
});
|
|
126
|
+
process.exit((0, errors_js_1.getExitCode)(errors_js_1.ErrorCode.INVALID_ARGUMENTS));
|
|
127
|
+
}
|
|
128
|
+
const [taskIdInput, dependsOnIdInput] = positionals;
|
|
129
|
+
if (flags.dryRun) {
|
|
130
|
+
out.log(`Would remove dependency: ${taskIdInput} no longer depends on ${dependsOnIdInput}`);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const projectPath = process.cwd();
|
|
134
|
+
/* REFACTOR_MANUAL */ (0, connection_js_1.withDatabase)(projectPath, (db) => {
|
|
135
|
+
const task = resolveTask(db, taskIdInput, out);
|
|
136
|
+
const depTask = resolveTask(db, dependsOnIdInput, out);
|
|
137
|
+
try {
|
|
138
|
+
(0, queries_js_1.removeTaskDependency)(db, task.id, depTask.id);
|
|
139
|
+
if (flags.json) {
|
|
140
|
+
out.success({
|
|
141
|
+
removed: {
|
|
142
|
+
task_id: task.id,
|
|
143
|
+
depends_on_task_id: depTask.id,
|
|
144
|
+
task_title: task.title,
|
|
145
|
+
depends_on_title: depTask.title,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
out.log(`Dependency removed: "${task.title}" no longer depends on "${depTask.title}"`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
out.error(errors_js_1.ErrorCode.INVALID_ARGUMENTS, error.message, {
|
|
155
|
+
taskId: task.id,
|
|
156
|
+
dependsOnTaskId: depTask.id,
|
|
157
|
+
});
|
|
158
|
+
process.exit((0, errors_js_1.getExitCode)(errors_js_1.ErrorCode.INVALID_ARGUMENTS));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Display task dependencies in audit/show output.
|
|
164
|
+
* Returns the dependencies array for JSON inclusion.
|
|
165
|
+
*/
|
|
166
|
+
function displayTaskDependencies(db, taskId, flags) {
|
|
167
|
+
const deps = (0, queries_js_1.getTaskDependencies)(db, taskId);
|
|
168
|
+
if (deps.length > 0 && !flags.json) {
|
|
169
|
+
console.log('');
|
|
170
|
+
console.log('DEPENDENCIES (must complete first):');
|
|
171
|
+
for (const dep of deps) {
|
|
172
|
+
const marker = queries_js_1.STATUS_MARKERS[dep.status] ?? '?';
|
|
173
|
+
const shortId = dep.id.substring(0, 8);
|
|
174
|
+
console.log(` ${marker} ${shortId} ${dep.title} (${dep.status})`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return deps;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=tasks-deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks-deps.js","sourceRoot":"","sources":["../../src/commands/tasks-deps.ts"],"names":[],"mappings":";;AAiCA,oDAwEC;AAED,0DAwEC;AAMD,0DAkBC;AA1MD;;GAEG;AAEH,yCAAsC;AACtC,6DAAyD;AACzD,uDAOgC;AAChC,gDAAgD;AAChD,gDAA0D;AAE1D;;GAEG;AACH,SAAS,WAAW,CAAC,EAAO,EAAE,UAAkB,EAAE,GAAoC;IACpF,IAAI,IAAI,GAAG,IAAA,oBAAO,EAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACnC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,IAAA,2BAAc,EAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC;IACD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,GAAG,CAAC,KAAK,C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AAC,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,IAAI,OAAO,KAAK,GAAG,CAAC,KAAK,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/commands/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/commands/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAyJnD,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA4EpF"}
|