devloom 1.0.0 → 1.1.0

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.
Files changed (140) hide show
  1. package/.ai/core.dsl +44 -0
  2. package/.ai/skills.dsl +39 -0
  3. package/.ai/verify.dsl +97 -0
  4. package/.ai/workflow.dsl +81 -0
  5. package/.opencode/themes/devloom-night-owl.json +103 -0
  6. package/GUIDE.md +547 -114
  7. package/README.md +557 -109
  8. package/SECURITY.md +93 -0
  9. package/agents/devloom-developer-flash.md +27 -0
  10. package/agents/devloom-developer-senior.md +28 -0
  11. package/agents/devloom-developer.md +18 -56
  12. package/agents/devloom-documenter-flash.md +24 -0
  13. package/agents/devloom-documenter.md +14 -57
  14. package/agents/devloom-orchestrator.md +232 -356
  15. package/agents/devloom-planner-flash.md +30 -0
  16. package/agents/devloom-planner-senior.md +31 -0
  17. package/agents/devloom-planner.md +32 -0
  18. package/agents/devloom-qa-flash.md +28 -0
  19. package/agents/devloom-qa.md +18 -84
  20. package/agents/devloom-security-senior.md +31 -0
  21. package/agents/devloom-security.md +30 -0
  22. package/agents/devloom-verifier.md +29 -0
  23. package/agents/devloom-vision.md +109 -0
  24. package/agents/devloom-visual-critic.md +98 -0
  25. package/agents/devloom-visual-director.md +80 -0
  26. package/commands/devloom-agents.md +49 -0
  27. package/commands/devloom-auto.md +11 -0
  28. package/commands/devloom-context.md +82 -0
  29. package/commands/devloom-deepseek.md +11 -0
  30. package/commands/devloom-free.md +11 -0
  31. package/commands/devloom-go-economy.md +11 -0
  32. package/commands/devloom-go-flash.md +11 -0
  33. package/commands/devloom-go.md +11 -0
  34. package/commands/devloom-init.md +28 -50
  35. package/commands/devloom-loop-status.md +25 -0
  36. package/commands/devloom-loop.md +36 -0
  37. package/commands/devloom-mimo.md +11 -0
  38. package/commands/devloom-plan.md +13 -0
  39. package/commands/devloom-refresh.md +22 -0
  40. package/commands/devloom-resume.md +30 -49
  41. package/commands/devloom-save.md +69 -0
  42. package/commands/devloom-status.md +9 -18
  43. package/commands/devloom.md +99 -67
  44. package/dist/agents.d.ts +30 -0
  45. package/dist/agents.d.ts.map +1 -0
  46. package/dist/agents.js +139 -0
  47. package/dist/agents.js.map +1 -0
  48. package/dist/bootstrap.d.ts +56 -0
  49. package/dist/bootstrap.d.ts.map +1 -0
  50. package/dist/bootstrap.js +116 -0
  51. package/dist/bootstrap.js.map +1 -0
  52. package/dist/constraints.d.ts +5 -0
  53. package/dist/constraints.d.ts.map +1 -0
  54. package/dist/constraints.js +45 -0
  55. package/dist/constraints.js.map +1 -0
  56. package/dist/context.d.ts +42 -0
  57. package/dist/context.d.ts.map +1 -0
  58. package/dist/context.js +636 -0
  59. package/dist/context.js.map +1 -0
  60. package/dist/guard.d.ts +19 -0
  61. package/dist/guard.d.ts.map +1 -0
  62. package/dist/guard.js +418 -0
  63. package/dist/guard.js.map +1 -0
  64. package/dist/loop.d.ts +64 -0
  65. package/dist/loop.d.ts.map +1 -0
  66. package/dist/loop.js +164 -0
  67. package/dist/loop.js.map +1 -0
  68. package/dist/plugin.d.ts.map +1 -1
  69. package/dist/plugin.js +101 -1
  70. package/dist/plugin.js.map +1 -1
  71. package/dist/tui-agents.d.ts +61 -0
  72. package/dist/tui-agents.d.ts.map +1 -0
  73. package/dist/tui-agents.js +89 -0
  74. package/dist/tui-agents.js.map +1 -0
  75. package/dist/tui.d.ts +6 -0
  76. package/dist/tui.d.ts.map +1 -0
  77. package/dist/tui.js +92 -0
  78. package/dist/tui.js.map +1 -0
  79. package/dist/worktree.d.ts +46 -0
  80. package/dist/worktree.d.ts.map +1 -0
  81. package/dist/worktree.js +272 -0
  82. package/dist/worktree.js.map +1 -0
  83. package/package.json +46 -6
  84. package/patterns/changelog-drafter.md +38 -0
  85. package/patterns/ci-sweeper.md +40 -0
  86. package/patterns/daily-triage.md +37 -0
  87. package/patterns/dependency-sweeper.md +40 -0
  88. package/patterns/design-audit.md +63 -0
  89. package/patterns/issue-triage.md +37 -0
  90. package/patterns/post-merge-cleanup.md +34 -0
  91. package/patterns/pr-babysitter.md +37 -0
  92. package/patterns/registry.yaml +52 -0
  93. package/postinstall.mjs +259 -63
  94. package/project/README.md +29 -0
  95. package/protocol/agent-contracts.md +27 -0
  96. package/protocol/artifact-system.md +53 -0
  97. package/protocol/model-routing.md +185 -0
  98. package/protocol/orchestrator-core.md +43 -0
  99. package/protocol/project-system.md +45 -0
  100. package/protocol/rules.md +18 -0
  101. package/protocol/verification-policy.md +48 -0
  102. package/scripts/loop-run.mjs +205 -0
  103. package/scripts/model-capabilities.mjs +169 -0
  104. package/scripts/plugin-cache.mjs +269 -0
  105. package/scripts/profile.mjs +691 -0
  106. package/scripts/visual-benchmark.mjs +149 -0
  107. package/scripts/worktree.mjs +445 -0
  108. package/skills/build/development.md +33 -0
  109. package/skills/build/live-docs.md +38 -0
  110. package/skills/build/simplify.md +50 -0
  111. package/skills/build/vision-analysis.md +98 -0
  112. package/skills/design/app-design.md +31 -0
  113. package/skills/design/design-grounding.md +30 -0
  114. package/skills/design/design-system.md +27 -0
  115. package/skills/design/game-design.md +35 -0
  116. package/skills/design/motion-design.md +34 -0
  117. package/skills/design/visual-direction.md +32 -0
  118. package/skills/design/web-design.md +33 -0
  119. package/skills/loop/changelog-drafter.md +32 -0
  120. package/skills/loop/ci-sweeper.md +24 -0
  121. package/skills/loop/constraints.md +21 -0
  122. package/skills/loop/dependency-sweeper.md +24 -0
  123. package/skills/loop/design-audit.md +67 -0
  124. package/skills/loop/issue-triage.md +27 -0
  125. package/skills/loop/post-merge-cleanup.md +24 -0
  126. package/skills/loop/pr-babysitter.md +26 -0
  127. package/skills/loop/triage.md +25 -0
  128. package/skills/loop/verifier.md +20 -0
  129. package/skills/meta/skill-discovery.md +23 -0
  130. package/skills/plan/planning.md +27 -0
  131. package/skills/plan/verification-planning.md +40 -0
  132. package/skills/review/security-review.md +63 -0
  133. package/skills/ship/documentation.md +11 -0
  134. package/skills/verify/app-verification.md +19 -0
  135. package/skills/verify/quality-assurance.md +17 -0
  136. package/skills/verify/visual-critique.md +30 -0
  137. package/skills/verify/visual-quality-gate.md +29 -0
  138. package/skills/verify/visual-regression.md +25 -0
  139. package/agents/devloom-analyst.md +0 -83
  140. package/agents/devloom-architect.md +0 -88
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: "DevLoom Agents: list all available agents and their current models"
3
+ agent: devloom-orchestrator
4
+ model: opencode-go/deepseek-v4-flash
5
+ subtask: false
6
+ ---
7
+
8
+ # DevLoom Agents
9
+
10
+ List all DevLoom agents, their roles, and current model assignments.
11
+
12
+ ```bash
13
+ PROFILE_MJS="$(node -e 'const fs=require("fs"),p=require("path");console.log(p.join(p.dirname(fs.realpathSync(process.argv[1])),"profile.mjs"))' "$0" 2>/dev/null)"
14
+ [ -f "$PROFILE_MJS" ] || PROFILE_MJS="$HOME/.config/opencode/devloom-scripts/profile.mjs"
15
+ [ -f "$PROFILE_MJS" ] || PROFILE_MJS="$HOME/.config/opencode/commands/profile.mjs"
16
+ [ -f "$PROFILE_MJS" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }
17
+ node "$PROFILE_MJS" current 2>&1
18
+ ```
19
+
20
+ ## Agent Reference
21
+
22
+ | Agent | Role | Description |
23
+ |-------|------|-------------|
24
+ | devloom-orchestrator | Strategic coordinator | Plans, dispatches specialists, reconciles results |
25
+ | devloom-planner | Architecture | Requirements, specs, technical plans |
26
+ | devloom-developer | Implementation | Code, features, defect fixes |
27
+ | devloom-qa | Verification | Tests, lint, code review, regression |
28
+ | devloom-verifier | Runtime checks | Routes, forms, a11y, API contracts |
29
+ | devloom-security | Security | CRUD endpoint security, data exposure |
30
+ | devloom-documenter | Documentation | README, docs, state persistence |
31
+ | devloom-vision | Visual analysis | Image/screenshot analysis |
32
+ | devloom-visual-director | Design direction | Classifies visual domain, writes DESIGN_FILE brief (read-only) |
33
+ | devloom-visual-critic | Visual review | Scores screenshots against the design contract (read-only) |
34
+
35
+ ## Usage
36
+
37
+ - `@devloom-planner` — ask for architecture or specs
38
+ - `@devloom-developer` — ask to implement or fix code
39
+ - `@devloom-qa` — ask for review or testing
40
+ - `@devloom-verifier` — ask for runtime verification
41
+ - `@devloom-security` — ask for security audit
42
+ - `@devloom-documenter` — ask for documentation
43
+ - `@devloom-vision` — attach image for analysis
44
+ - `@devloom-visual-director` — ask for UI visual direction / a design brief
45
+ - `@devloom-visual-critic` — ask for an independent screenshot critique
46
+
47
+ Switch profiles: `/devloom-go`, `/devloom-go-economy`, `/devloom-free`, `/devloom-mimo`
48
+
49
+ After switching profiles, restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar. If the sidebar does not reflect the current DevLoom code, run `/devloom-refresh`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom Auto: detect and apply the best profile"
3
+ ---
4
+
5
+ # DevLoom Auto
6
+
7
+ Detect available models and apply the best profile automatically.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set auto 2>&1; node "$PM" current 2>&1`
10
+
11
+ DevLoom profile set automatically. Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,82 @@
1
+ ---
2
+ description: "DevLoom Context: show, clear, or regenerate auto-detected project patterns"
3
+ agent: devloom-orchestrator
4
+ subtask: false
5
+ ---
6
+
7
+ # DevLoom Context
8
+
9
+ Context is **auto-generated** by the plugin from your codebase (package.json, file structure, existing code). Agents load it automatically before generating code. No command needed — it just works.
10
+
11
+ This command is for manual override only:
12
+
13
+ ```
14
+ /devloom-context --show # display current context files
15
+ /devloom-context --regenerate # force regenerate from codebase (overwrites)
16
+ /devloom-context --clear # remove all context files
17
+ ```
18
+
19
+ ```bash
20
+ ACTION="${ARGUMENTS:---show}"
21
+ DIR=".opencode/devloom/context"
22
+
23
+ case "$ACTION" in
24
+ --show)
25
+ if [ ! -d "$DIR" ]; then
26
+ echo "No context directory. Context auto-generates when the plugin loads."
27
+ exit 0
28
+ fi
29
+ for f in "$DIR"/project.md "$DIR"/conventions.md "$DIR"/security.md "$DIR"/examples.md; do
30
+ if [ -f "$f" ]; then
31
+ echo "=== $(basename "$f") ==="
32
+ cat "$f"
33
+ echo ""
34
+ fi
35
+ done
36
+ ;;
37
+ --regenerate)
38
+ mkdir -p "$DIR"
39
+ node -e "
40
+ const fs = require('fs');
41
+ const path = require('path');
42
+ const dir = '.opencode/devloom/context';
43
+ fs.mkdirSync(dir, { recursive: true });
44
+ const now = new Date().toISOString();
45
+ let pkg = {};
46
+ try { pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); } catch {}
47
+ const deps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
48
+ const has = (f) => fs.existsSync(f);
49
+ const lang = has('tsconfig.json') ? 'TypeScript' : has('go.mod') ? 'Go' : has('pyproject.toml') ? 'Python' : has('Cargo.toml') ? 'Rust' : pkg.name ? 'JavaScript' : 'Unknown';
50
+ const fw = deps.next ? 'Next.js' : deps.react ? 'React' : deps.vue ? 'Vue' : deps.fastify ? 'Fastify' : deps.express ? 'Express' : deps.hono ? 'Hono' : 'Unknown';
51
+ const orm = deps.drizzle ? 'Drizzle' : deps.prisma || has('prisma/schema.prisma') ? 'Prisma' : deps.typeorm ? 'TypeORM' : deps.mongoose ? 'Mongoose' : 'Unknown';
52
+ const val = deps.zod ? 'Zod' : deps.yup ? 'Yup' : deps.joi ? 'Joi' : 'Unknown';
53
+ const test = deps.jest || has('jest.config.mjs') ? 'Jest' : deps.vitest ? 'Vitest' : 'Unknown';
54
+ const linter = deps.eslint ? 'ESLint' : deps.biome ? 'Biome' : 'Unknown';
55
+ const pm = has('bun.lock') ? 'bun' : has('pnpm-lock.yaml') ? 'pnpm' : has('yarn.lock') ? 'yarn' : has('package-lock.json') ? 'npm' : 'Unknown';
56
+ const libs = Object.keys(deps).filter(k => ['next-auth','jsonwebtoken','bcryptjs','argon2','stripe','twilio','sendgrid','nodemailer','ioredis','openai','winston','pino','dotenv','lodash','date-fns','dayjs','zod','drizzle-orm'].includes(k));
57
+
58
+ fs.writeFileSync(dir + '/project.md', '# Project Patterns\n> Auto-generated: ' + now + '\n> MVI: keep under 200 lines. Edit manually to override.\n\n## Tech Stack\n- Language: ' + lang + '\n- Framework: ' + fw + '\n- ORM: ' + orm + '\n- Validation: ' + val + '\n- Testing: ' + test + '\n- Linter: ' + linter + '\n- Package manager: ' + pm + '\n\n## Architecture\n- Follow existing project structure\n- SOLID + Clean Architecture\n- Dependency inversion\n- Surgical changes: smallest correct diff\n\n## Key Libraries\n' + (libs.length ? libs.map(l => '- ' + l).join('\n') : '- (none detected)') + '\n');
59
+
60
+ fs.writeFileSync(dir + '/conventions.md', '# Coding Conventions\n> Auto-generated: ' + now + '\n> MVI: keep under 200 lines.\n\n## Naming\n- Files: kebab-case\n- Components: PascalCase\n- Functions: camelCase\n- Constants: UPPER_SNAKE_CASE\n\n## Code Standards\n' + (lang === 'TypeScript' ? '- TypeScript strict mode\n- No any types\n- Explicit return types on public APIs\n' : '') + '- Prefer early returns\n- No magic numbers\n- Co-locate tests next to source\n- One component/module per file\n');
61
+
62
+ fs.writeFileSync(dir + '/security.md', '# Security Requirements\n> Auto-generated: ' + now + '\n> MVI: keep under 200 lines.\n\n## Detected Patterns\n' + (deps.zod ? '- Input validation with Zod\n' : '') + (deps.bcryptjs || deps.argon2 ? '- Password hashing\n' : '') + (deps.jsonwebtoken ? '- JWT auth\n' : deps['next-auth'] ? '- NextAuth\n' : '') + (deps.helmet ? '- Helmet headers\n' : '') + (deps.cors ? '- CORS configured\n' : '') + '\n## Universal Rules\n- Never trust user input\n- Parameterized queries only\n- Secrets in environment variables\n- .env in .gitignore\n- Auth checks on every protected route\n');
63
+
64
+ fs.writeFileSync(dir + '/examples.md', '# Code Examples\n> Auto-generated: ' + now + '\n> MVI: keep examples under 80 lines.\n\n## API Endpoint Pattern\n\`\`\`typescript\n// Follow your framework convention. Validate input, handle errors.\n\`\`\`\n\n## Component Pattern\n\`\`\`typescript\n// Follow your framework component convention.\n\`\`\`\n');
65
+
66
+ console.log('Context regenerated in ' + dir);
67
+ "
68
+ ;;
69
+ --clear)
70
+ rm -rf "$DIR"
71
+ echo "Context cleared. Will auto-generate on next plugin load."
72
+ ;;
73
+ *)
74
+ echo "Usage: /devloom-context [--show|--regenerate|--clear]"
75
+ echo "Context auto-generates from your codebase — no command needed."
76
+ ;;
77
+ esac
78
+ ```
79
+
80
+ OUT:
81
+ - context shown, regenerated, or cleared
82
+ - agents always auto-load context — this command is optional override only
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom DeepSeek: switch all agents to DeepSeek V4 Pro/Flash"
3
+ ---
4
+
5
+ # DevLoom DeepSeek
6
+
7
+ Switch all DevLoom agents to DeepSeek V4 models: Pro for reasoning agents, Flash for verifiers and recovery.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set deepseek 2>&1; node "$PM" current 2>&1`
10
+
11
+ DevLoom switched to DeepSeek V4 models. Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom Free: switch to free models only"
3
+ ---
4
+
5
+ # DevLoom Free
6
+
7
+ Switch DevLoom to the free profile. Uses only available free models.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set free 2>&1; node "$PM" current 2>&1`
10
+
11
+ DevLoom switched to free models. Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom Go Economy: switch to cheaper OpenCode Go models"
3
+ ---
4
+
5
+ # DevLoom Go Economy
6
+
7
+ Switch DevLoom to the OpenCode Go economy profile. Uses cheaper Go models.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set go-economy 2>&1; node "$PM" current 2>&1`
10
+
11
+ DevLoom switched to OpenCode Go economy. Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom Go Flash: use DeepSeek V4 Flash for all agents"
3
+ ---
4
+
5
+ # DevLoom Go Flash
6
+
7
+ Switch all agents to the cheapest DeepSeek V4 Flash model.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set go-flash 2>&1; node "$PM" current 2>&1`
10
+
11
+ DevLoom switched to DeepSeek V4 Flash for all agents. Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom Go: switch to OpenCode Go premium models"
3
+ ---
4
+
5
+ # DevLoom Go
6
+
7
+ Switch DevLoom to the OpenCode Go premium profile. Uses the highest quality Go models.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set go 2>&1; node "$PM" current 2>&1`
10
+
11
+ DevLoom switched to OpenCode Go premium. Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -1,60 +1,38 @@
1
1
  ---
2
- description: "DevLoom Init: start fresh execution, clearing any prior state"
2
+ description: "DevLoom Init: reset state and bootstrap project workspace"
3
3
  agent: devloom-orchestrator
4
4
  subtask: false
5
5
  ---
6
6
 
7
- # Force Fresh Start
7
+ # Init
8
8
 
9
9
  ```bash
10
- # Create .opencode/devloom directory if not exists
11
- mkdir -p .opencode/devloom
12
-
13
- # Load project config — local config.json overrides global agent models
14
- # ALL models MUST use opencode/ API prefix (e.g. opencode/deepseek-v4-flash-free)
15
- if [ -f ".opencode/devloom/config.json" ]; then
16
- echo "📋 Applying local model config..."
17
- node -e "
18
- const c = JSON.parse(require('fs').readFileSync('.opencode/devloom/config.json','utf8'));
19
- const m = c.models || {};
20
- for (const [agent, model] of Object.entries(m)) {
21
- let finalModel = model.trim();
22
- if (!finalModel.startsWith('opencode/') && !finalModel.startsWith('opencode-go/')) {
23
- finalModel = 'opencode/' + finalModel;
24
- console.log(' ⚠️ Added opencode/ prefix to ' + agent + ': ' + model + ' -> ' + finalModel);
25
- }
26
- const f = require('os').homedir() + '/.config/opencode/agents/devloom-' + agent + '.md';
27
- try {
28
- const fs = require('fs');
29
- let content = fs.readFileSync(f, 'utf8');
30
- content = content.replace(/^model:.*/m, 'model: ' + finalModel);
31
- fs.writeFileSync(f, content);
32
- console.log(' ' + agent + ' -> ' + finalModel);
33
- } catch(e) { console.error(' Failed ' + agent + ': ' + e.message); }
34
- }
35
- "
36
- fi
37
-
38
- # Remove any existing state to force fresh start
39
- rm -f .opencode/devloom/state.json
40
- rm -f .opencode/devloom/errors.md
41
-
42
- # Clear requirement/plan files if they exist
43
- rm -f .opencode/devloom/requirements.md
44
- rm -f .opencode/devloom/plan.md
45
-
46
- echo "🔄 Clearing prior state - starting fresh"
10
+ export INIT_PROFILE="${ARGUMENTS:-auto}"
11
+
12
+ mkdir -p .opencode/devloom/project/{stories,tasks,bugs,decisions,reports}
13
+ rm -f .opencode/devloom/state.json .opencode/devloom/errors.md .opencode/devloom/requirements.md .opencode/devloom/plan.md
14
+
15
+ node -e "
16
+ const fs = require('fs');
17
+ const p = '.opencode/devloom/project';
18
+ const profile = process.env.INIT_PROFILE || 'auto';
19
+ fs.writeFileSync(p + '/README.md', '# DevLoom Project Workspace\nAll artifacts in this workspace must be written in English.\nAI-only state files use minified JSON to reduce token usage.\nUse local tracker by default. Use GitHub Project only with explicit user authorization.\nEvery new /devloom prompt is appended as the last task in project/tasks/TODO.md before execution continues.\n');
20
+ fs.writeFileSync(p + '/config.json', JSON.stringify({ profile: profile, v: 1, lang: 'en', tracker: 'local', gh: { enabled: false, owner: '', repo: '', project: '' }, rules: { flow: ['analysis','documentation','implementation','verification','regression','done'], tests: 'required', regression: 'required', queue: 'single', docs: 'official', delegation: 'required', skills: 'required', memory: 'load', save: 'always', promptTask: 'append-last' } }));
21
+ fs.writeFileSync(p + '/board.json', JSON.stringify({ v: 1, tracker: 'local', active: '', cols: { backlog: [], ready: [], doing: [], review: [], blocked: [], done: [] }, updatedAt: '' }));
22
+ fs.writeFileSync(p + '/state.json', JSON.stringify({ v: 1, phase: 'idle', prompt: '', ticket: '', next: 'analysis', updatedAt: '', notes: [] }));
23
+ fs.writeFileSync(p + '/tasks/TODO.md', '# DevLoom Prompt Tasks\nEvery /devloom prompt is appended here as the last todo before execution routing.\n');
24
+ "
25
+
26
+ PROFILE_MJS="$(node -e 'const fs=require("fs"),p=require("path");console.log(p.join(p.dirname(fs.realpathSync(process.argv[1])),"profile.mjs"))' "$0" 2>/dev/null)"
27
+ [ -f "$PROFILE_MJS" ] || PROFILE_MJS="$HOME/.config/opencode/devloom-scripts/profile.mjs"
28
+ [ -f "$PROFILE_MJS" ] || PROFILE_MJS="$HOME/.config/opencode/commands/profile.mjs"
29
+ [ -f "$PROFILE_MJS" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }
30
+ node "$PROFILE_MJS" set "$INIT_PROFILE" 2>&1
31
+ touch .opencode/devloom/project/stories/.keep .opencode/devloom/project/tasks/.keep .opencode/devloom/project/bugs/.keep .opencode/devloom/project/decisions/.keep .opencode/devloom/project/reports/.keep
47
32
  ```
48
33
 
49
- # Fresh DevLoom Orchestration
50
-
51
- $ARGUMENTS
52
-
53
- IMPORTANT: Run full workflow from PHASE 0.
34
+ # Run
54
35
 
55
- 1. Run PHASE 0 — detect models, ask user preference, update agent files
56
- 2. Invoke @devloom-analyst to create requirements
57
- 3. Invoke @devloom-architect to create plan
58
- 4. Loop through every task: developer → QA → (fix if needed) → mark [x]
59
- 5. Invoke @devloom-documenter and run final quality gate
60
- 6. Output DEVLOOM_DONE only when all tasks are [x] and build passes
36
+ LOAD: `.opencode/devloom/project/config.json|board.json|state.json`
37
+ FLOW: Triage>MinimalChain>Verify>Regr>Done
38
+ RULES: EnglishOnly|SingleActive|PersistAll|TDDReq|RegrReq
@@ -0,0 +1,25 @@
1
+ # DevLoom Loop Status Command
2
+ > /devloom-loop-status
3
+
4
+ ## Usage
5
+ - `/devloom-loop-status` — Show loop health, recent runs, budget status
6
+
7
+ ## Output
8
+ - Active pattern and cadence
9
+ - Last run timestamp and outcome
10
+ - Next scheduled run
11
+ - Budget: spent/limit, remaining, reset time
12
+ - Run count and success rate
13
+ - Paused status with reason if applicable
14
+ - Last 5 run log entries summary
15
+
16
+ ## Example output
17
+ ```
18
+ Loop: daily-triage (L1)
19
+ Cadence: 0 6 * * *
20
+ Status: active
21
+ Last run: 2026-07-08T06:00:00Z (success)
22
+ Budget: 50000/500000 (450000 remaining, resets at midnight)
23
+ Run count: 12 (100% success)
24
+ Last 5: all success
25
+ ```
@@ -0,0 +1,36 @@
1
+ # DevLoom Loop Command
2
+ > /devloom-loop start [pattern]|stop|status [--cadence <cron>] [--level L1|L2|L3] [--mode audit|fix] [--url <urls>]
3
+
4
+ ## Usage
5
+ - `/devloom-loop start` — Start default loop (daily-triage, cadence "0 6 * * *", level L1)
6
+ - `/devloom-loop start ci-sweeper` — Start ci-sweeper (default cadence "0 6 * * *", level L1)
7
+ - `/devloom-loop start ci-sweeper --cadence "*/10 * * * *" --level L2` — Start with explicit config
8
+ - `/devloom-loop start pr-babysitter --cadence "*/15 * * * *" --level L2`
9
+ - `/devloom-loop start design-audit --mode audit --url "https://example.com"` — Run full audit (UI + functional: broken actions, missing actions, dead-ends, API issues), L1 report-only
10
+ - `/devloom-loop start design-audit --mode audit --url "https://site.com/page1,https://site.com/page2"` — Audit multiple pages
11
+ - `/devloom-loop start design-audit --mode fix` — Run fix loop (L2, worktree+verifier, run-until-done) — fixes both UI + functional issues, loops until all verified
12
+ - `/devloom-loop stop` — Pause all loop patterns
13
+ - `/devloom-loop status` — Show loop health, run history, budget
14
+
15
+ ## What it does
16
+ 1. Reads/creates loop-config.json with the specified pattern, cadence, level
17
+ 2. Sets up budget.json with default daily limit 500K tokens
18
+ 3. Logs the command to run-log.json
19
+ 4. Outputs the cron/systemd timer command for the cadence
20
+
21
+ ## Cron setup
22
+ To schedule the loop, add to crontab:
23
+ ```
24
+ # DevLoom loop: daily-triage at 6 AM daily (pattern defaults to daily-triage)
25
+ 0 6 * * * cd /path/to/repo && node scripts/loop-run.mjs --pattern daily-triage --cadence "0 6 * * *" --level L1 >> .opencode/devloom/loop/cron.log 2>&1
26
+ ```
27
+
28
+ Simplified form (defaults to daily-triage, "0 0 * * *", L1):
29
+ ```
30
+ 0 0 * * * cd /path/to/repo && node scripts/loop-run.mjs >> .opencode/devloom/loop/cron.log 2>&1
31
+ ```
32
+
33
+ ## Output
34
+ - Loop started/stopped confirmation
35
+ - Cron command to schedule
36
+ - Budget status
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "DevLoom MiMo: switch all agents to MiMo V2.6 Flash (multimodal all-role stack)"
3
+ ---
4
+
5
+ # DevLoom MiMo
6
+
7
+ Switch every DevLoom agent — including vision, visual-director, and visual-critic — to the first available MiMo V2.6 Flash model. Candidate chain (no hardcoded provider): `mimo/mimo-v2.6-flash` → `xiaomi/mimo-v2.6-flash` → `opencode-go/mimo-v2.6-flash`, resolved against `opencode models`. Tier overrides are locked for this profile.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" set mimo 2>&1; node "$PM" current 2>&1`
10
+
11
+ If no MiMo V2.6 Flash candidate is available the profile is NOT activated and the attempted candidates are printed — no unrelated substitution. On success: profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "DevLoom Plan: show current profile and resolved models"
3
+ ---
4
+
5
+ # DevLoom Plan
6
+
7
+ Show the current DevLoom profile, resolved models, overrides, and any fallbacks.
8
+
9
+ !`PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" current 2>&1; echo ""; echo "--- Validation ---"; node "$PM" validate 2>&1 || echo "Some models may be unavailable. Run /devloom-auto to re-detect."`
10
+
11
+ Current profile shown above.
12
+
13
+ Profile applied — restart opencode (or continue with `opencode --continue`) to see the updated profile and agents in the sidebar.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: "DevLoom Refresh: reinstall global assets and refresh the OpenCode plugin cache"
3
+ ---
4
+
5
+ # DevLoom Refresh
6
+
7
+ Re-syncs DevLoom's installed agents/commands/skills and refreshes the OpenCode
8
+ plugin cache so the current profile and all DevLoom agents show correctly in the
9
+ OpenCode sidebar. The refresh **rebuilds dist/ from source first** (`npm run
10
+ build`, best-effort), so the cache always receives freshly compiled plugin code —
11
+ never a stale build.
12
+
13
+ Run this after updating DevLoom (`npm install -g devloom`) or whenever the
14
+ sidebar does not reflect the profile you switched to.
15
+
16
+ !`DEVLOOM_ROOT="$(npm root -g 2>/dev/null)/devloom"; if [ ! -d "$DEVLOOM_ROOT" ]; then echo "DevLoom global package not found. Install it first: npm install -g devloom"; exit 1; fi; node "$DEVLOOM_ROOT/postinstall.mjs" 2>&1; PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/devloom-scripts/profile.mjs"; [ -f "$PM" ] || PM="$HOME/.config/opencode/commands/profile.mjs"; [ -f "$PM" ] || { echo "profile.mjs not found - reinstall DevLoom"; exit 1; }; node "$PM" apply 2>&1`
17
+
18
+ DevLoom assets are re-synced and the OpenCode plugin cache now contains the
19
+ current plugin code (the config hook that surfaces the profile and agents).
20
+
21
+ Restart opencode (or continue with `opencode --continue`) to see the updated
22
+ profile and agents in the sidebar.
@@ -1,58 +1,39 @@
1
1
  ---
2
- description: "Resume DevLoom from last execution point"
2
+ description: "Resume DevLoom from saved state"
3
3
  agent: devloom-orchestrator
4
4
  subtask: false
5
5
  ---
6
6
 
7
- # Initialize & Dashboard Setup
7
+ # Resume
8
8
 
9
9
  ```bash
10
- # Load project config — local config.json overrides global agent models
11
- # ALL models MUST use opencode/ API prefix (e.g. opencode/deepseek-v4-flash-free)
12
- if [ -f ".opencode/devloom/config.json" ]; then
13
- echo "📋 Applying local model config..."
14
- node -e "
15
- const c = JSON.parse(require('fs').readFileSync('.opencode/devloom/config.json','utf8'));
16
- const m = c.models || {};
17
- for (const [agent, model] of Object.entries(m)) {
18
- let finalModel = model.trim();
19
- if (!finalModel.startsWith('opencode/') && !finalModel.startsWith('opencode-go/')) {
20
- finalModel = 'opencode/' + finalModel;
21
- console.log(' ⚠️ Added opencode/ prefix to ' + agent + ': ' + model + ' -> ' + finalModel);
22
- }
23
- const f = require('os').homedir() + '/.config/opencode/agents/devloom-' + agent + '.md';
24
- try {
25
- const fs = require('fs');
26
- let content = fs.readFileSync(f, 'utf8');
27
- content = content.replace(/^model:.*/m, 'model: ' + finalModel);
28
- fs.writeFileSync(f, content);
29
- console.log(' ' + agent + ' -> ' + finalModel);
30
- } catch(e) { console.error(' Failed ' + agent + ': ' + e.message); }
31
- }
32
- "
33
- fi
34
-
35
- # Check state file
36
- STATE_FILE=".opencode/devloom/state.json"
37
-
38
- if [ -f "$STATE_FILE" ]; then
39
- PHASE=$(grep -o '"phase":"[^"]*"' "$STATE_FILE" | cut -d'"' -f4)
40
- echo "Resuming from $PHASE"
41
- else
42
- echo "No execution state found. Use /devloom [prompt] to start new execution."
43
- exit 1
44
- fi
10
+ mkdir -p .opencode/devloom/project/{stories,tasks,bugs,decisions,reports}
11
+ test -f .opencode/devloom/state.json || { echo "No execution state found."; exit 1; }
12
+ test -f .opencode/devloom/project/board.json || { echo "Project board missing. Run /devloom-init first."; exit 1; }
13
+ node -e "
14
+ const fs = require('fs');
15
+ const p = '.opencode/devloom/project';
16
+ const readJson = (f, fb) => {
17
+ try { return JSON.parse(fs.readFileSync(f, 'utf8')); } catch { return fb; }
18
+ };
19
+ const cfg = readJson(p + '/config.json', {});
20
+ const board = readJson(p + '/board.json', {});
21
+ const state = readJson(p + '/state.json', {});
22
+ const now = new Date().toISOString();
23
+ fs.writeFileSync(p + '/README.md', '# DevLoom Project Workspace\\nAll artifacts in this workspace must be written in English.\\nAI-only state files use minified JSON to reduce token usage.\\n');
24
+ fs.writeFileSync(p + '/config.json', JSON.stringify({ v: 1, lang: 'en', tracker: cfg.tracker === 'github' ? 'github' : 'local', gh: { enabled: !!cfg.gh?.enabled, owner: cfg.gh?.owner || '', repo: cfg.gh?.repo || '', project: cfg.gh?.project || '' }, rules: { flow: ['analysis','documentation','implementation','verification','regression','done'], tests: 'required', regression: 'required', queue: 'single', docs: 'official', delegation: 'required', skills: 'required', memory: 'load', save: 'always', promptTask: 'append-last' } }));
25
+ fs.writeFileSync(p + '/board.json', JSON.stringify({ v: 1, tracker: cfg.tracker === 'github' ? 'github' : 'local', active: board.active || '', cols: { backlog: Array.isArray(board.cols?.backlog) ? board.cols.backlog : [], ready: Array.isArray(board.cols?.ready) ? board.cols.ready : [], doing: Array.isArray(board.cols?.doing) ? board.cols.doing.slice(0, 1) : (board.active ? [board.active] : []), review: Array.isArray(board.cols?.review) ? board.cols.review : [], blocked: Array.isArray(board.cols?.blocked) ? board.cols.blocked : [], done: Array.isArray(board.cols?.done) ? board.cols.done : [] }, updatedAt: now }));
26
+ fs.writeFileSync(p + '/state.json', JSON.stringify({ v: 1, phase: typeof state.phase === 'string' ? state.phase : 'idle', prompt: typeof state.prompt === 'string' ? state.prompt : '', ticket: typeof state.ticket === 'string' ? state.ticket : (board.active || ''), next: typeof state.next === 'string' ? state.next : 'analysis', updatedAt: now, notes: Array.isArray(state.notes) ? state.notes : [] }));
27
+ "
45
28
  ```
46
29
 
47
- # Resume DevLoom Orchestration
48
-
49
- RESUME MODE ACTIVE: Execute PRE-PHASE 0 resume detection.
50
-
51
- 1. Check for existing `.opencode/devloom/state.json`
52
- 2. If found: Load phase, completedPhases, tasks.completed, requirements, plan
53
- 3. Skip all completed phases
54
- 4. Jump to next pending phase
55
- 5. Resume execution from that point with existing models and configuration
56
- 6. Do NOT run PHASE 0 (model selection) during resume
57
-
58
- Execute all remaining tasks until complete, then PHASE 3 delivery and quality gate.
30
+ LOAD: `.opencode/devloom/state.json|.opencode/devloom/project/board.json|.opencode/devloom/project/state.json`
31
+ MODE: Resume
32
+ RULES:
33
+ - skip completed phases
34
+ - keep existing config/models
35
+ - normalize legacy project files before resume
36
+ - reload memory and relevant skills before continuing work
37
+ - continue from the saved ticket/todo/plan state
38
+ - if state.phase == "queued": dequeue the next item from board.cols.backlog into board.cols.doing, set phase to the item's saved phase, and resume
39
+ - continue active/pending ticket first (if no queued items)
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: "DevLoom: persist current project state and pause"
3
+ agent: devloom-orchestrator
4
+ subtask: false
5
+ ---
6
+
7
+ # Save
8
+
9
+ ```bash
10
+ mkdir -p .opencode/devloom/project/{stories,tasks,bugs,decisions,reports}
11
+
12
+ node -e "
13
+ const fs = require('fs');
14
+ const p = '.opencode/devloom/project';
15
+ const readJson = (f, fb) => {
16
+ try { return JSON.parse(fs.readFileSync(f, 'utf8')); } catch { return fb; }
17
+ };
18
+ const cfg = readJson(p + '/config.json', {});
19
+ const board = readJson(p + '/board.json', {});
20
+ const state = readJson(p + '/state.json', {});
21
+ const now = new Date().toISOString();
22
+ const next = {
23
+ v: 1,
24
+ phase: state.phase || 'paused',
25
+ prompt: state.prompt || '',
26
+ ticket: state.ticket || board.active || '',
27
+ next: 'user-command',
28
+ updatedAt: now,
29
+ notes: Array.isArray(state.notes) ? state.notes : []
30
+ };
31
+ const normalizedCfg = {
32
+ v: 1,
33
+ lang: 'en',
34
+ tracker: cfg.tracker === 'github' ? 'github' : 'local',
35
+ gh: {
36
+ enabled: !!cfg.gh?.enabled,
37
+ owner: cfg.gh?.owner || '',
38
+ repo: cfg.gh?.repo || '',
39
+ project: cfg.gh?.project || ''
40
+ },
41
+ rules: { flow: ['analysis','documentation','implementation','verification','regression','done'], tests: 'required', regression: 'required', queue: 'single', docs: 'official', delegation: 'required', skills: 'required', memory: 'load', save: 'always', promptTask: 'append-last' }
42
+ };
43
+ fs.writeFileSync(p + '/config.json', JSON.stringify(normalizedCfg));
44
+ fs.writeFileSync(p + '/board.json', JSON.stringify({
45
+ v: 1,
46
+ tracker: normalizedCfg.tracker,
47
+ active: board.active || next.ticket || '',
48
+ cols: {
49
+ backlog: Array.isArray(board.cols?.backlog) ? board.cols.backlog : [],
50
+ ready: Array.isArray(board.cols?.ready) ? board.cols.ready : [],
51
+ doing: Array.isArray(board.cols?.doing) ? board.cols.doing.slice(0, 1) : (board.active ? [board.active] : []),
52
+ review: Array.isArray(board.cols?.review) ? board.cols.review : [],
53
+ blocked: Array.isArray(board.cols?.blocked) ? board.cols.blocked : [],
54
+ done: Array.isArray(board.cols?.done) ? board.cols.done : []
55
+ },
56
+ updatedAt: now
57
+ }));
58
+ fs.writeFileSync(p + '/state.json', JSON.stringify(next));
59
+ fs.writeFileSync(p + '/README.md', '# DevLoom Project Workspace\\nAll artifacts in this workspace must be written in English.\\nAI-only state files use minified JSON to reduce token usage.\\n');
60
+ "
61
+ ```
62
+
63
+ MODE: Pause
64
+ LOAD: `.opencode/devloom/project/config.json|board.json|state.json`
65
+ OUT:
66
+ - state persisted
67
+ - ticket/todo/plan context preserved for the next prompt
68
+ - next=user-command
69
+ - resume with `/devloom-resume` or new `/devloom ...` prompt
@@ -1,23 +1,14 @@
1
1
  ---
2
- description: "DevLoom: show the current weaving progress — tasks done, in progress, and any errors"
2
+ description: "DevLoom: show progress, active ticket, and phase"
3
3
  agent: devloom-orchestrator
4
4
  subtask: false
5
5
  ---
6
6
 
7
- # Setup
8
-
9
- ```bash
10
- mkdir -p .opencode/devloom
11
- ```
12
-
13
- # Status Report
14
-
15
- Read `.opencode/devloom/plan.md` and `.opencode/devloom/errors.md` (if they exist) and report:
16
-
17
- 1. **Progress**: total tasks, completed ([x]), pending ([ ]), completion percentage
18
- 2. **Current task**: the first unchecked task in `.opencode/devloom/plan.md` (if any)
19
- 3. **Errors**: any failed or skipped tasks listed in `.opencode/devloom/errors.md`
20
- 4. **Phase**: which phase the weave is in (Planning / Weaving / Documenting / Done)
21
-
22
- Format the output as a clean status report. If `.opencode/devloom/plan.md` does not exist,
23
- report that no weaving session has been started yet.
7
+ LOAD: `.opencode/devloom/plan.md|.opencode/devloom/errors.md|.opencode/devloom/project/board.json|.opencode/devloom/project/state.json`
8
+ REPORT:
9
+ - progress: total|done|pending|pct
10
+ - active: current ticket (in doing)
11
+ - queued: count of items in backlog (waiting behind active work)
12
+ - blocked: blocked tickets
13
+ - errors: failed/skipped work
14
+ - phase: analysis|documentation|implementation|verification|regression|queued|done