@trespies-source/dojo-genesis-plugin 1.0.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 (209) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/LICENSE +21 -0
  3. package/README.md +204 -0
  4. package/dist/hooks/after-tool-call/handler.d.ts +4 -0
  5. package/dist/hooks/after-tool-call/handler.d.ts.map +1 -0
  6. package/dist/hooks/after-tool-call/handler.js +37 -0
  7. package/dist/hooks/after-tool-call/handler.js.map +1 -0
  8. package/dist/hooks/agent-end/handler.d.ts +4 -0
  9. package/dist/hooks/agent-end/handler.d.ts.map +1 -0
  10. package/dist/hooks/agent-end/handler.js +16 -0
  11. package/dist/hooks/agent-end/handler.js.map +1 -0
  12. package/dist/hooks/before-agent-start/handler.d.ts +4 -0
  13. package/dist/hooks/before-agent-start/handler.d.ts.map +1 -0
  14. package/dist/hooks/before-agent-start/handler.js +81 -0
  15. package/dist/hooks/before-agent-start/handler.js.map +1 -0
  16. package/dist/index.d.ts +18 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +35 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/src/commands/archive.d.ts +4 -0
  21. package/dist/src/commands/archive.d.ts.map +1 -0
  22. package/dist/src/commands/archive.js +20 -0
  23. package/dist/src/commands/archive.js.map +1 -0
  24. package/dist/src/commands/init.d.ts +4 -0
  25. package/dist/src/commands/init.d.ts.map +1 -0
  26. package/dist/src/commands/init.js +57 -0
  27. package/dist/src/commands/init.js.map +1 -0
  28. package/dist/src/commands/list.d.ts +4 -0
  29. package/dist/src/commands/list.d.ts.map +1 -0
  30. package/dist/src/commands/list.js +9 -0
  31. package/dist/src/commands/list.js.map +1 -0
  32. package/dist/src/commands/router.d.ts +3 -0
  33. package/dist/src/commands/router.d.ts.map +1 -0
  34. package/dist/src/commands/router.js +83 -0
  35. package/dist/src/commands/router.js.map +1 -0
  36. package/dist/src/commands/skill-invoke.d.ts +4 -0
  37. package/dist/src/commands/skill-invoke.d.ts.map +1 -0
  38. package/dist/src/commands/skill-invoke.js +26 -0
  39. package/dist/src/commands/skill-invoke.js.map +1 -0
  40. package/dist/src/commands/status.d.ts +4 -0
  41. package/dist/src/commands/status.d.ts.map +1 -0
  42. package/dist/src/commands/status.js +42 -0
  43. package/dist/src/commands/status.js.map +1 -0
  44. package/dist/src/commands/switch.d.ts +4 -0
  45. package/dist/src/commands/switch.d.ts.map +1 -0
  46. package/dist/src/commands/switch.js +20 -0
  47. package/dist/src/commands/switch.js.map +1 -0
  48. package/dist/src/orchestration/tool-registry.d.ts +18 -0
  49. package/dist/src/orchestration/tool-registry.d.ts.map +1 -0
  50. package/dist/src/orchestration/tool-registry.js +153 -0
  51. package/dist/src/orchestration/tool-registry.js.map +1 -0
  52. package/dist/src/skills/catalog.d.ts +9 -0
  53. package/dist/src/skills/catalog.d.ts.map +1 -0
  54. package/dist/src/skills/catalog.js +251 -0
  55. package/dist/src/skills/catalog.js.map +1 -0
  56. package/dist/src/state/manager.d.ts +19 -0
  57. package/dist/src/state/manager.d.ts.map +1 -0
  58. package/dist/src/state/manager.js +114 -0
  59. package/dist/src/state/manager.js.map +1 -0
  60. package/dist/src/state/migrations.d.ts +3 -0
  61. package/dist/src/state/migrations.d.ts.map +1 -0
  62. package/dist/src/state/migrations.js +8 -0
  63. package/dist/src/state/migrations.js.map +1 -0
  64. package/dist/src/state/types.d.ts +62 -0
  65. package/dist/src/state/types.d.ts.map +1 -0
  66. package/dist/src/state/types.js +2 -0
  67. package/dist/src/state/types.js.map +1 -0
  68. package/dist/src/ui/chat-formatter.d.ts +11 -0
  69. package/dist/src/ui/chat-formatter.d.ts.map +1 -0
  70. package/dist/src/ui/chat-formatter.js +39 -0
  71. package/dist/src/ui/chat-formatter.js.map +1 -0
  72. package/dist/src/utils/file-ops.d.ts +6 -0
  73. package/dist/src/utils/file-ops.d.ts.map +1 -0
  74. package/dist/src/utils/file-ops.js +38 -0
  75. package/dist/src/utils/file-ops.js.map +1 -0
  76. package/dist/src/utils/markdown.d.ts +2 -0
  77. package/dist/src/utils/markdown.d.ts.map +1 -0
  78. package/dist/src/utils/markdown.js +11 -0
  79. package/dist/src/utils/markdown.js.map +1 -0
  80. package/dist/src/utils/validation.d.ts +7 -0
  81. package/dist/src/utils/validation.d.ts.map +1 -0
  82. package/dist/src/utils/validation.js +29 -0
  83. package/dist/src/utils/validation.js.map +1 -0
  84. package/dist/tests/__mocks__/openclaw-types.d.ts +54 -0
  85. package/dist/tests/__mocks__/openclaw-types.d.ts.map +1 -0
  86. package/dist/tests/__mocks__/openclaw-types.js +29 -0
  87. package/dist/tests/__mocks__/openclaw-types.js.map +1 -0
  88. package/hooks/after-tool-call/HOOK.md +7 -0
  89. package/hooks/after-tool-call/handler.ts +41 -0
  90. package/hooks/agent-end/HOOK.md +7 -0
  91. package/hooks/agent-end/handler.ts +18 -0
  92. package/hooks/before-agent-start/HOOK.md +7 -0
  93. package/hooks/before-agent-start/handler.ts +133 -0
  94. package/openclaw.plugin.json +19 -0
  95. package/package.json +61 -0
  96. package/skills/agent-teaching/SKILL.md +583 -0
  97. package/skills/agent-teaching/claw.json +12 -0
  98. package/skills/compression-ritual/SKILL.md +136 -0
  99. package/skills/compression-ritual/claw.json +12 -0
  100. package/skills/context-ingestion/SKILL.md +109 -0
  101. package/skills/context-ingestion/claw.json +12 -0
  102. package/skills/decision-propagation/SKILL.md +130 -0
  103. package/skills/decision-propagation/claw.json +12 -0
  104. package/skills/documentation-audit/SKILL.md +146 -0
  105. package/skills/documentation-audit/claw.json +12 -0
  106. package/skills/era-architecture/SKILL.md +166 -0
  107. package/skills/era-architecture/claw.json +12 -0
  108. package/skills/file-management/SKILL.md +127 -0
  109. package/skills/file-management/claw.json +12 -0
  110. package/skills/frontend-from-backend/SKILL.md +127 -0
  111. package/skills/frontend-from-backend/claw.json +12 -0
  112. package/skills/handoff-protocol/SKILL.md +168 -0
  113. package/skills/handoff-protocol/claw.json +12 -0
  114. package/skills/health-audit/SKILL.md +123 -0
  115. package/skills/health-audit/claw.json +12 -0
  116. package/skills/implementation-prompt/SKILL.md +361 -0
  117. package/skills/implementation-prompt/claw.json +12 -0
  118. package/skills/iterative-scouting/SKILL.md +106 -0
  119. package/skills/iterative-scouting/claw.json +12 -0
  120. package/skills/memory-garden/SKILL.md +470 -0
  121. package/skills/memory-garden/claw.json +12 -0
  122. package/skills/multi-surface-strategy/SKILL.md +288 -0
  123. package/skills/multi-surface-strategy/claw.json +12 -0
  124. package/skills/parallel-tracks/SKILL.md +152 -0
  125. package/skills/parallel-tracks/claw.json +12 -0
  126. package/skills/patient-learning-protocol/SKILL.md +438 -0
  127. package/skills/patient-learning-protocol/claw.json +12 -0
  128. package/skills/planning-with-files/SKILL.md +139 -0
  129. package/skills/planning-with-files/claw.json +12 -0
  130. package/skills/pre-implementation-checklist/SKILL.md +156 -0
  131. package/skills/pre-implementation-checklist/claw.json +12 -0
  132. package/skills/process-extraction/SKILL.md +148 -0
  133. package/skills/process-extraction/claw.json +12 -0
  134. package/skills/process-extraction/references/process_example_template.md +40 -0
  135. package/skills/product-positioning/SKILL.md +293 -0
  136. package/skills/product-positioning/claw.json +12 -0
  137. package/skills/project-exploration/SKILL.md +168 -0
  138. package/skills/project-exploration/claw.json +12 -0
  139. package/skills/release-specification/SKILL.md +645 -0
  140. package/skills/release-specification/claw.json +12 -0
  141. package/skills/repo-context-sync/SKILL.md +362 -0
  142. package/skills/repo-context-sync/claw.json +12 -0
  143. package/skills/repo-context-sync/references/file_hierarchy_patterns.md +186 -0
  144. package/skills/repo-context-sync/references/zenflow_repo_patterns.md +328 -0
  145. package/skills/repo-context-sync/scripts/context_mapper.py +251 -0
  146. package/skills/repo-context-sync/scripts/diff_tracker.py +187 -0
  147. package/skills/repo-context-sync/scripts/smart_clone.sh +52 -0
  148. package/skills/repo-context-sync/templates/context_summary.md +58 -0
  149. package/skills/repo-status/SKILL.md +240 -0
  150. package/skills/repo-status/claw.json +12 -0
  151. package/skills/repo-status/references/semantic-clusters.md +159 -0
  152. package/skills/repo-status/references/status-template.md +214 -0
  153. package/skills/research-modes/SKILL.md +515 -0
  154. package/skills/research-modes/claw.json +12 -0
  155. package/skills/research-synthesis/SKILL.md +110 -0
  156. package/skills/research-synthesis/claw.json +12 -0
  157. package/skills/retrospective/SKILL.md +152 -0
  158. package/skills/retrospective/claw.json +12 -0
  159. package/skills/seed-extraction/SKILL.md +419 -0
  160. package/skills/seed-extraction/claw.json +12 -0
  161. package/skills/seed-library/SKILL.md +424 -0
  162. package/skills/seed-library/claw.json +12 -0
  163. package/skills/seed-library/references/seed_catalog.md +171 -0
  164. package/skills/seed-library/scripts/apply_seed.py +129 -0
  165. package/skills/seed-library/scripts/suggest_seeds.py +183 -0
  166. package/skills/seed-library/seeds/01_three_tiered_governance.md +90 -0
  167. package/skills/seed-library/seeds/02_harness_trace.md +135 -0
  168. package/skills/seed-library/seeds/03_context_iceberg.md +120 -0
  169. package/skills/seed-library/seeds/04_agent_connect.md +106 -0
  170. package/skills/seed-library/seeds/05_go_live_bundles.md +40 -0
  171. package/skills/seed-library/seeds/06_cost_guard.md +40 -0
  172. package/skills/seed-library/seeds/07_safety_switch.md +41 -0
  173. package/skills/seed-library/seeds/08_implicit_perspective_extraction.md +41 -0
  174. package/skills/seed-library/seeds/09_mode_based_complexity_gating.md +46 -0
  175. package/skills/seed-library/seeds/10_shared_infrastructure.md +75 -0
  176. package/skills/seed-library/seeds/11_voice_before_structure.md +74 -0
  177. package/skills/seed-library/seeds/12_pointer_directories.md +81 -0
  178. package/skills/seed-library/seeds/13_granular_visibility.md +82 -0
  179. package/skills/seed-library/seeds/meta_governance_multiplies_velocity.md +43 -0
  180. package/skills/seed-to-skill-converter/SKILL.md +113 -0
  181. package/skills/seed-to-skill-converter/claw.json +12 -0
  182. package/skills/semantic-clusters/SKILL.md +246 -0
  183. package/skills/semantic-clusters/claw.json +12 -0
  184. package/skills/semantic-clusters/references/verb-catalog.md +267 -0
  185. package/skills/skill-audit-upgrade/SKILL.md +427 -0
  186. package/skills/skill-audit-upgrade/claw.json +12 -0
  187. package/skills/skill-creation/LICENSE.txt +202 -0
  188. package/skills/skill-creation/SKILL.md +252 -0
  189. package/skills/skill-creation/claw.json +12 -0
  190. package/skills/skill-creation/references/output-patterns.md +82 -0
  191. package/skills/skill-creation/references/progressive-disclosure-patterns.md +79 -0
  192. package/skills/skill-creation/references/workflows.md +28 -0
  193. package/skills/skill-creation/scripts/init_skill.py +305 -0
  194. package/skills/skill-creation/scripts/quick_validate.py +134 -0
  195. package/skills/skill-maintenance/SKILL.md +413 -0
  196. package/skills/skill-maintenance/claw.json +12 -0
  197. package/skills/spec-constellation-to-prompt-suite/SKILL.md +174 -0
  198. package/skills/spec-constellation-to-prompt-suite/claw.json +12 -0
  199. package/skills/status-template/SKILL.md +211 -0
  200. package/skills/status-template/claw.json +12 -0
  201. package/skills/status-template/references/complete-template.md +191 -0
  202. package/skills/status-writing/SKILL.md +161 -0
  203. package/skills/status-writing/claw.json +12 -0
  204. package/skills/strategic-scout/SKILL.md +163 -0
  205. package/skills/strategic-scout/claw.json +12 -0
  206. package/skills/strategic-to-tactical-workflow/SKILL.md +391 -0
  207. package/skills/strategic-to-tactical-workflow/claw.json +12 -0
  208. package/skills/workspace-navigation/SKILL.md +622 -0
  209. package/skills/workspace-navigation/claw.json +12 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-02-12
9
+
10
+ ### Added
11
+
12
+ - `/dojo init <name>` — create a new project with persistent state
13
+ - `/dojo status` — view active project phase, tracks, and recent activity
14
+ - `/dojo list` — list all projects with status indicators
15
+ - `/dojo switch <name>` — switch active project context
16
+ - `/dojo archive <name>` — archive a completed project
17
+ - `/dojo scout <tension>` — run a strategic scout to explore options before committing
18
+ - `/dojo spec <feature>` — write a release specification grounded in project context
19
+ - `/dojo tracks` — decompose a spec into parallel implementation tracks
20
+ - `/dojo commission` — generate implementation prompts from specs
21
+ - `/dojo retro` — run a structured retrospective and harvest learnings
22
+ - `/dojo run <skill>` — invoke any of 40 bundled skills by name
23
+ - `/dojo skills [category]` — browse available skills by category
24
+ - `dojo_get_context` tool — returns active project state for agent use
25
+ - `dojo_save_artifact` tool — saves markdown artifacts to project directory
26
+ - `dojo_update_state` tool — updates project phase, tracks, or decisions
27
+ - `before_agent_start` hook — injects project context and skill instructions into system prompt
28
+ - File-based state management at `~/.openclaw/dojo-genesis-plugin/`
29
+ - 40 bundled behavioral skills across 8 categories (pipeline, workflow, research, forge, garden, orchestration, system, tools)
30
+ - Dual-mode operation: skills work standalone and inside project orchestration
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dojo Genesis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # Dojo Genesis Plugin for OpenClaw
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@trespies-source/dojo-genesis-plugin.svg)](https://www.npmjs.com/package/@trespies-source/dojo-genesis-plugin)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![OpenClaw Compatible](https://img.shields.io/badge/OpenClaw-2026.1.0+-blue.svg)](https://openclaw.dev)
6
+
7
+ Specification-driven development orchestration for OpenClaw — turn any channel into a development command center.
8
+
9
+ ## What It Does
10
+
11
+ Dojo Genesis transforms OpenClaw into a specification-driven development orchestrator. It treats projects as first-class entities with explicit phases, parallel tracks, decision logs, and artifact management. The plugin bundles 40 behavioral skills across 8 categories, enabling strategic scouting, release specification, parallel track decomposition, implementation commissioning, and structured retrospectives. It works seamlessly on every OpenClaw channel — WhatsApp, Telegram, Slack, Discord, WebChat — bringing development discipline to wherever your team communicates.
12
+
13
+ ## Quick Start
14
+
15
+ Install the plugin via OpenClaw CLI:
16
+
17
+ ```bash
18
+ openclaw plugins install @trespies-source/dojo-genesis-plugin
19
+ ```
20
+
21
+ Add to your `~/.openclaw/openclaw.json`:
22
+
23
+ ```json
24
+ {
25
+ "plugins": {
26
+ "entries": {
27
+ "dojo-genesis-plugin": {
28
+ "enabled": true
29
+ }
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ Restart the gateway:
36
+
37
+ ```bash
38
+ openclaw restart
39
+ ```
40
+
41
+ ## Commands
42
+
43
+ | Command | Description |
44
+ |---------|-------------|
45
+ | `/dojo init <name>` | Create a new project |
46
+ | `/dojo status` | View active project state |
47
+ | `/dojo list` | List all projects |
48
+ | `/dojo switch <name>` | Switch active project |
49
+ | `/dojo archive <name>` | Archive a completed project |
50
+ | `/dojo scout <tension>` | Run a strategic scout |
51
+ | `/dojo spec <feature>` | Write a release specification |
52
+ | `/dojo tracks` | Decompose spec into parallel tracks |
53
+ | `/dojo commission` | Generate implementation prompts |
54
+ | `/dojo retro` | Run a structured retrospective |
55
+ | `/dojo run <skill>` | Invoke any bundled skill |
56
+ | `/dojo skills [category]` | Browse skills by category |
57
+
58
+ ## Skills by Category
59
+
60
+ ### Pipeline
61
+
62
+ Core development workflow skills (also available as shorthand commands):
63
+
64
+ - `strategic-scout` — Explore strategic tensions and scout multiple routes
65
+ - `release-specification` — Write a production-ready release specification
66
+ - `parallel-tracks` — Decompose specs into independent parallel tracks
67
+ - `implementation-prompt` — Generate structured implementation prompts
68
+ - `retrospective` — Reflect on what went well, what was hard, what to improve
69
+
70
+ ### Workflow
71
+
72
+ Process integration and execution skills:
73
+
74
+ - `iterative-scouting` — Iterate scout cycles with reframes
75
+ - `strategic-to-tactical-workflow` — Full scout → spec → commission pipeline
76
+ - `pre-implementation-checklist` — Verify specs are ready before commissioning
77
+ - `context-ingestion` — Create plans grounded in uploaded files
78
+ - `frontend-from-backend` — Write frontend specs from backend architecture
79
+ - `spec-constellation-to-prompt-suite` — Convert multiple specs into coordinated prompts
80
+ - `planning-with-files` — Route file-based planning to specialized modes
81
+
82
+ ### Research
83
+
84
+ Investigation and analysis skills:
85
+
86
+ - `research-modes` — Deep and wide research with structured approaches
87
+ - `research-synthesis` — Synthesize multiple sources into actionable insights
88
+ - `project-exploration` — Explore new projects to assess collaboration potential
89
+ - `era-architecture` — Architect multi-release eras with shared vocabulary
90
+ - `repo-context-sync` — Sync and extract context from repositories
91
+ - `documentation-audit` — Audit documentation for drift and accuracy
92
+ - `health-audit` — Comprehensive repository health check
93
+
94
+ ### Forge
95
+
96
+ Skill creation and maintenance:
97
+
98
+ - `skill-creation` — Create new reusable skills
99
+ - `skill-maintenance` — Maintain skill health through systematic review
100
+ - `skill-audit-upgrade` — Audit and upgrade skills to quality standards
101
+ - `process-extraction` — Transform workflows into reusable skills
102
+
103
+ ### Garden
104
+
105
+ Knowledge cultivation and memory management:
106
+
107
+ - `memory-garden` — Write structured memory entries for context management
108
+ - `seed-extraction` — Extract reusable patterns from experiences
109
+ - `seed-library` — Access and apply Dojo Seed Patches
110
+ - `compression-ritual` — Distill conversation history into memory artifacts
111
+ - `seed-to-skill-converter` — Elevate proven seeds into full skills
112
+
113
+ ### Orchestration
114
+
115
+ Multi-agent coordination:
116
+
117
+ - `handoff-protocol` — Hand off work between agents cleanly
118
+ - `decision-propagation` — Propagate decisions across document ecosystem
119
+ - `workspace-navigation` — Navigate shared agent workspaces
120
+ - `agent-teaching` — Teach peers through shared practice
121
+
122
+ ### System
123
+
124
+ Repository health and documentation:
125
+
126
+ - `semantic-clusters` — Map system capabilities with action-verb clusters
127
+ - `repo-status` — Generate comprehensive repo status documents
128
+ - `status-template` — Write status docs using 10-section template
129
+ - `status-writing` — Write and update STATUS.md files
130
+
131
+ ### Tools
132
+
133
+ Specialized utilities:
134
+
135
+ - `patient-learning-protocol` — Learn at the pace of understanding
136
+ - `file-management` — Organize files and directories flexibly
137
+ - `product-positioning` — Reframe binary product decisions
138
+ - `multi-surface-strategy` — Design coherent multi-surface strategies
139
+
140
+ ## Orchestration Tools
141
+
142
+ Dojo Genesis provides three agent tools for project state management:
143
+
144
+ - `dojo_get_context` — Returns the active project's current state, including phase, tracks, decisions, and artifact paths
145
+ - `dojo_save_artifact` — Saves outputs (specs, prompts, retro notes) to the project's directory structure
146
+ - `dojo_update_state` — Updates the project's phase, track status, or decision log
147
+
148
+ These tools enable agents to maintain continuity across conversations and channels.
149
+
150
+ ## Configuration
151
+
152
+ The plugin stores project state in `~/.openclaw/dojo-genesis-plugin/` by default. You can customize this location:
153
+
154
+ ```json
155
+ {
156
+ "plugins": {
157
+ "entries": {
158
+ "dojo-genesis-plugin": {
159
+ "enabled": true,
160
+ "config": {
161
+ "projectsDir": "custom-projects-directory"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ Project directories contain:
170
+
171
+ - `project.json` — Current phase, tracks, decisions
172
+ - `specs/` — Release specifications
173
+ - `prompts/` — Implementation prompts
174
+ - `retros/` — Retrospective artifacts
175
+
176
+ ## Development
177
+
178
+ Clone and build from source:
179
+
180
+ ```bash
181
+ git clone https://github.com/TresPies-source/openclaw-dojo-genesis-plugin
182
+ cd openclaw-dojo-genesis-plugin
183
+ npm install
184
+ npm test
185
+ npm run build
186
+ ```
187
+
188
+ Run tests with coverage:
189
+
190
+ ```bash
191
+ npm run test:coverage
192
+ ```
193
+
194
+ Typecheck without building:
195
+
196
+ ```bash
197
+ npm run typecheck
198
+ ```
199
+
200
+ ## License
201
+
202
+ MIT License — see [LICENSE](LICENSE) for details.
203
+
204
+ For version history and release notes, see [CHANGELOG.md](CHANGELOG.md).
@@ -0,0 +1,4 @@
1
+ import type { HookHandler } from "../../tests/__mocks__/openclaw-types.js";
2
+ declare const handler: HookHandler;
3
+ export default handler;
4
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../hooks/after-tool-call/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAO3E,QAAA,MAAM,OAAO,EAAE,WAad,CAAC;AAoBF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { stateManager } from "../../src/state/manager.js";
2
+ import { writeTextFile } from "../../src/utils/file-ops.js";
3
+ import { promises as fs } from "fs";
4
+ const MONITORED_TOOLS = ["dojo_save_artifact", "dojo_update_state", "dojo_get_context"];
5
+ const handler = async (event) => {
6
+ if (event.type !== "agent")
7
+ return;
8
+ const toolName = event.context?.toolName;
9
+ if (!toolName || !MONITORED_TOOLS.includes(toolName))
10
+ return;
11
+ if (toolName === "dojo_update_state") {
12
+ const params = event.context?.toolParams;
13
+ const newPhase = params?.phase;
14
+ if (newPhase) {
15
+ await updateProjectMd(newPhase);
16
+ }
17
+ }
18
+ };
19
+ async function updateProjectMd(toPhase) {
20
+ const global = await stateManager.getGlobalState();
21
+ if (!global.activeProjectId)
22
+ return;
23
+ const basePath = stateManager.getBasePath();
24
+ const projectMdPath = `${basePath}/projects/${global.activeProjectId}/PROJECT.md`;
25
+ try {
26
+ let content = await fs.readFile(projectMdPath, "utf-8");
27
+ content = content.replace(/\*\*Phase:\*\* .+/, `**Phase:** ${toPhase}`);
28
+ const logEntry = `- ${new Date().toISOString().split("T")[0]} — Phase changed to ${toPhase}\n`;
29
+ content = content.replace(/(## Activity Log\n\n)/, `$1${logEntry}`);
30
+ await writeTextFile(projectMdPath, content);
31
+ }
32
+ catch {
33
+ // PROJECT.md may not exist yet — not critical
34
+ }
35
+ }
36
+ export default handler;
37
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../hooks/after-tool-call/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,eAAe,GAAG,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;AAExF,MAAM,OAAO,GAAgB,KAAK,EAAE,KAAK,EAAE,EAAE;IAC3C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO;IAEnC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,QAA8B,CAAC;IAC/D,IAAI,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO;IAE7D,IAAI,QAAQ,KAAK,mBAAmB,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,UAAiD,CAAC;QAChF,MAAM,QAAQ,GAAG,MAAM,EAAE,KAA2B,CAAC;QACrD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAEF,KAAK,UAAU,eAAe,CAAC,OAAe;IAC5C,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,cAAc,EAAE,CAAC;IACnD,IAAI,CAAC,MAAM,CAAC,eAAe;QAAE,OAAO;IAEpC,MAAM,QAAQ,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;IAC5C,MAAM,aAAa,GAAG,GAAG,QAAQ,aAAa,MAAM,CAAC,eAAe,aAAa,CAAC;IAElF,IAAI,CAAC;QACH,IAAI,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QACxD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,cAAc,OAAO,EAAE,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,uBAAuB,OAAO,IAAI,CAAC;QAC/F,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,uBAAuB,EAAE,KAAK,QAAQ,EAAE,CAAC,CAAC;QACpE,MAAM,aAAa,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,8CAA8C;IAChD,CAAC;AACH,CAAC;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { HookHandler } from "../../tests/__mocks__/openclaw-types.js";
2
+ declare const handler: HookHandler;
3
+ export default handler;
4
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../hooks/agent-end/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAG3E,QAAA,MAAM,OAAO,EAAE,WAYd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { stateManager } from "../../src/state/manager.js";
2
+ const handler = async (event) => {
3
+ if (event.type !== "agent")
4
+ return;
5
+ const global = await stateManager.getGlobalState();
6
+ if (!global.activeProjectId)
7
+ return;
8
+ const state = await stateManager.getProjectState(global.activeProjectId);
9
+ if (state?.pendingAction) {
10
+ await stateManager.updateProjectState(global.activeProjectId, {
11
+ pendingAction: null,
12
+ });
13
+ }
14
+ };
15
+ export default handler;
16
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../hooks/agent-end/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,OAAO,GAAgB,KAAK,EAAE,KAAK,EAAE,EAAE;IAC3C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO;IAEnC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,cAAc,EAAE,CAAC;IACnD,IAAI,CAAC,MAAM,CAAC,eAAe;QAAE,OAAO;IAEpC,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzE,IAAI,KAAK,EAAE,aAAa,EAAE,CAAC;QACzB,MAAM,YAAY,CAAC,kBAAkB,CAAC,MAAM,CAAC,eAAe,EAAE;YAC5D,aAAa,EAAE,IAAI;SACpB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { HookHandler } from "../../tests/__mocks__/openclaw-types.js";
2
+ declare const handler: HookHandler;
3
+ export default handler;
4
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../hooks/before-agent-start/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAqG3E,QAAA,MAAM,OAAO,EAAE,WA6Bd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { stateManager } from "../../src/state/manager.js";
2
+ const SKILL_INSTRUCTIONS = {
3
+ // Pipeline
4
+ "strategic-scout": "Run the strategic-scout skill (see skills/strategic-scout/SKILL.md). Explore the tension from multiple perspectives, then synthesize a direction.",
5
+ "release-specification": "Run the release-specification skill (see skills/release-specification/SKILL.md). Write a production-ready specification for this feature/release.",
6
+ "parallel-tracks": "Run the parallel-tracks skill (see skills/parallel-tracks/SKILL.md). Decompose the specification into independent parallel implementation tracks.",
7
+ "implementation-prompt": "Run the implementation-prompt skill (see skills/implementation-prompt/SKILL.md). Generate structured implementation prompts for each track.",
8
+ "retrospective": "Run the retrospective skill (see skills/retrospective/SKILL.md). Reflect on what went well, what was hard, and what to improve.",
9
+ // Workflow
10
+ "iterative-scouting": "Run the iterative-scouting skill (see skills/iterative-scouting/SKILL.md). Iterate through scouting cycles with feedback-driven reframes.",
11
+ "strategic-to-tactical-workflow": "Run the strategic-to-tactical-workflow skill (see skills/strategic-to-tactical-workflow/SKILL.md). Execute the full scout → spec → commission workflow.",
12
+ "pre-implementation-checklist": "Run the pre-implementation-checklist skill (see skills/pre-implementation-checklist/SKILL.md). Verify specifications are ready before commissioning.",
13
+ "context-ingestion": "Run the context-ingestion skill (see skills/context-ingestion/SKILL.md). Create actionable plans grounded in the uploaded files.",
14
+ "frontend-from-backend": "Run the frontend-from-backend skill (see skills/frontend-from-backend/SKILL.md). Write frontend specifications grounded in backend architecture.",
15
+ "spec-constellation-to-prompt-suite": "Run the spec-constellation-to-prompt-suite skill (see skills/spec-constellation-to-prompt-suite/SKILL.md). Convert multiple specs into coordinated parallel-track prompts.",
16
+ "planning-with-files": "Run the planning-with-files skill (see skills/planning-with-files/SKILL.md). Route file-based planning to the right specialized mode.",
17
+ // Research
18
+ "research-modes": "Run the research-modes skill (see skills/research-modes/SKILL.md). Conduct deep or wide research using structured approaches.",
19
+ "research-synthesis": "Run the research-synthesis skill (see skills/research-synthesis/SKILL.md). Synthesize multiple research sources into actionable insights.",
20
+ "project-exploration": "Run the project-exploration skill (see skills/project-exploration/SKILL.md). Explore a new project to assess collaboration potential.",
21
+ "era-architecture": "Run the era-architecture skill (see skills/era-architecture/SKILL.md). Architect multi-release eras with shared vocabulary and constraints.",
22
+ "repo-context-sync": "Run the repo-context-sync skill (see skills/repo-context-sync/SKILL.md). Sync and extract context from a repository.",
23
+ "documentation-audit": "Run the documentation-audit skill (see skills/documentation-audit/SKILL.md). Audit documentation for drift and accuracy.",
24
+ "health-audit": "Run the health-audit skill (see skills/health-audit/SKILL.md). Conduct a comprehensive repository health check.",
25
+ // Forge
26
+ "skill-creation": "Run the skill-creation skill (see skills/skill-creation/SKILL.md). Create a new reusable skill with proper structure.",
27
+ "skill-maintenance": "Run the skill-maintenance skill (see skills/skill-maintenance/SKILL.md). Maintain and improve existing skills.",
28
+ "skill-audit-upgrade": "Run the skill-audit-upgrade skill (see skills/skill-audit-upgrade/SKILL.md). Audit all skills and upgrade to quality standards.",
29
+ "process-extraction": "Run the process-extraction skill (see skills/process-extraction/SKILL.md). Transform a completed workflow into a reusable skill.",
30
+ // Garden
31
+ "memory-garden": "Run the memory-garden skill (see skills/memory-garden/SKILL.md). Write structured memory entries for context management.",
32
+ "seed-extraction": "Run the seed-extraction skill (see skills/seed-extraction/SKILL.md). Extract reusable patterns from this experience.",
33
+ "seed-library": "Run the seed-library skill (see skills/seed-library/SKILL.md). Access and apply the Dojo Seed Patches as thinking modules.",
34
+ "compression-ritual": "Run the compression-ritual skill (see skills/compression-ritual/SKILL.md). Distill conversation history into potent memory artifacts.",
35
+ "seed-to-skill-converter": "Run the seed-to-skill-converter skill (see skills/seed-to-skill-converter/SKILL.md). Elevate a proven seed into a full skill.",
36
+ // Orchestration
37
+ "handoff-protocol": "Run the handoff-protocol skill (see skills/handoff-protocol/SKILL.md). Prepare a clean handoff package for another agent.",
38
+ "decision-propagation": "Run the decision-propagation skill (see skills/decision-propagation/SKILL.md). Record and propagate a decision across all dependent documents.",
39
+ "workspace-navigation": "Run the workspace-navigation skill (see skills/workspace-navigation/SKILL.md). Navigate and organize the shared workspace.",
40
+ "agent-teaching": "Run the agent-teaching skill (see skills/agent-teaching/SKILL.md). Teach a peer through shared practice.",
41
+ // System
42
+ "semantic-clusters": "Run the semantic-clusters skill (see skills/semantic-clusters/SKILL.md). Map system capabilities using action-verb clusters.",
43
+ "repo-status": "Run the repo-status skill (see skills/repo-status/SKILL.md). Generate a comprehensive repo status document.",
44
+ "status-template": "Run the status-template skill (see skills/status-template/SKILL.md). Write status using the 10-section template.",
45
+ "status-writing": "Run the status-writing skill (see skills/status-writing/SKILL.md). Write and update a STATUS.md file.",
46
+ // Tools
47
+ "patient-learning-protocol": "Run the patient-learning-protocol skill (see skills/patient-learning-protocol/SKILL.md). Learn at the pace of understanding.",
48
+ "file-management": "Run the file-management skill (see skills/file-management/SKILL.md). Organize files and directories with flexible principles.",
49
+ "product-positioning": "Run the product-positioning skill (see skills/product-positioning/SKILL.md). Reframe a binary product decision into a positioning opportunity.",
50
+ "multi-surface-strategy": "Run the multi-surface-strategy skill (see skills/multi-surface-strategy/SKILL.md). Design a coherent multi-surface product strategy.",
51
+ };
52
+ const handler = async (event) => {
53
+ if (event.type !== "agent" || event.action !== "start")
54
+ return;
55
+ const global = await stateManager.getGlobalState();
56
+ if (!global.activeProjectId)
57
+ return;
58
+ const state = await stateManager.getProjectState(global.activeProjectId);
59
+ if (!state?.pendingAction)
60
+ return;
61
+ const { skill, args } = state.pendingAction;
62
+ const instructions = SKILL_INSTRUCTIONS[skill] || `Run the ${skill} skill.`;
63
+ const contextBlock = [
64
+ `[DOJO GENESIS PROJECT CONTEXT]`,
65
+ `Project: ${state.projectId}`,
66
+ `Phase: ${state.phase}`,
67
+ `Pending skill: ${skill}`,
68
+ `User request: ${args}`,
69
+ ``,
70
+ `Active tracks: ${state.tracks.length > 0 ? state.tracks.map((t) => `${t.id} (${t.status})`).join(", ") : "none"}`,
71
+ `Recent decisions: ${state.decisions.slice(-3).map((d) => d.topic).join(", ") || "none"}`,
72
+ `Last skill: ${state.lastSkill || "none"}`,
73
+ ``,
74
+ `INSTRUCTIONS: ${instructions}`,
75
+ `Start by calling dojo_get_context for full project state. When done, save output with dojo_save_artifact and update state with dojo_update_state.`,
76
+ `[/DOJO GENESIS PROJECT CONTEXT]`,
77
+ ].join("\n");
78
+ event.messages.push(contextBlock);
79
+ };
80
+ export default handler;
81
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../hooks/before-agent-start/handler.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,18 @@
1
+ import type { PluginAPI } from "./tests/__mocks__/openclaw-types.js";
2
+ declare const _default: {
3
+ id: string;
4
+ name: string;
5
+ configSchema: {
6
+ type: "object";
7
+ properties: {
8
+ projectsDir: {
9
+ type: "string";
10
+ default: string;
11
+ description: string;
12
+ };
13
+ };
14
+ };
15
+ register(api: PluginAPI): void;
16
+ };
17
+ export default _default;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;;;;;;;;;;;;;;kBAuBrD,SAAS;;AAfzB,wBA8BE"}
package/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ import { registerPluginHooksFromDir } from "./tests/__mocks__/openclaw-types.js";
2
+ import { registerDojoCommands } from "./src/commands/router.js";
3
+ import { registerOrchestrationTools } from "./src/orchestration/tool-registry.js";
4
+ import { initStateManager } from "./src/state/manager.js";
5
+ import { homedir } from "os";
6
+ import { join } from "path";
7
+ export default {
8
+ id: "dojo-genesis-plugin",
9
+ name: "Dojo Genesis",
10
+ configSchema: {
11
+ type: "object",
12
+ properties: {
13
+ projectsDir: {
14
+ type: "string",
15
+ default: "dojo-genesis-plugin",
16
+ description: "State directory name under OpenClaw config",
17
+ },
18
+ },
19
+ },
20
+ register(api) {
21
+ let stateDir;
22
+ try {
23
+ stateDir = api.runtime.state.resolveStateDir("dojo-genesis-plugin");
24
+ }
25
+ catch {
26
+ stateDir = join(homedir(), ".openclaw");
27
+ }
28
+ initStateManager(stateDir);
29
+ registerDojoCommands(api);
30
+ registerOrchestrationTools(api);
31
+ registerPluginHooksFromDir(api, "./hooks");
32
+ api.logger.info("Dojo Genesis plugin initialized");
33
+ },
34
+ };
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,eAAe;IACb,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,cAAc;IAEpB,YAAY,EAAE;QACZ,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,OAAO,EAAE,qBAAqB;gBAC9B,WAAW,EAAE,4CAA4C;aAC1D;SACF;KACF;IAED,QAAQ,CAAC,GAAc;QACrB,IAAI,QAAgB,CAAC;QACrB,IAAI,CAAC;YACH,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACtE,CAAC;QAAC,MAAM,CAAC;YACP,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;QAC1C,CAAC;QAED,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC3B,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC1B,0BAA0B,CAAC,GAAG,CAAC,CAAC;QAChC,0BAA0B,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE3C,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function handleArchive(args: string[]): Promise<{
2
+ text: string;
3
+ }>;
4
+ //# sourceMappingURL=archive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../src/commands/archive.ts"],"names":[],"mappings":"AAEA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAsB7E"}
@@ -0,0 +1,20 @@
1
+ import { stateManager } from "../state/manager.js";
2
+ export async function handleArchive(args) {
3
+ const name = args[0];
4
+ if (!name) {
5
+ return { text: "Project name is required. Usage: `/dojo archive <name>`" };
6
+ }
7
+ const global = await stateManager.getGlobalState();
8
+ const meta = global.projects.find((p) => p.id === name);
9
+ if (!meta) {
10
+ return { text: `Project \`${name}\` not found.` };
11
+ }
12
+ if (meta.archived) {
13
+ return { text: `Project \`${name}\` is already archived.` };
14
+ }
15
+ await stateManager.archiveProject(name);
16
+ return {
17
+ text: `**Project archived:** \`${name}\`\n\nThe project files remain on disk. It will no longer appear in \`/dojo list\` (use \`--all\` to see archived projects).`,
18
+ };
19
+ }
20
+ //# sourceMappingURL=archive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../src/commands/archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAc;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACrB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,IAAI,EAAE,yDAAyD,EAAE,CAAC;IAC7E,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,cAAc,EAAE,CAAC;IACnD,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;IAExD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,IAAI,EAAE,aAAa,IAAI,eAAe,EAAE,CAAC;IACpD,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,OAAO,EAAE,IAAI,EAAE,aAAa,IAAI,yBAAyB,EAAE,CAAC;IAC9D,CAAC;IAED,MAAM,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAExC,OAAO;QACL,IAAI,EAAE,2BAA2B,IAAI,8HAA8H;KACpK,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function handleInit(args: string[]): Promise<{
2
+ text: string;
3
+ }>;
4
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAMA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6D1E"}
@@ -0,0 +1,57 @@
1
+ import { stateManager } from "../state/manager.js";
2
+ import { validateProjectName } from "../utils/validation.js";
3
+ import { writeTextFile, writeJsonFile, ensureDir } from "../utils/file-ops.js";
4
+ import { generateProjectMd } from "../utils/markdown.js";
5
+ export async function handleInit(args) {
6
+ const name = args[0];
7
+ const validation = validateProjectName(name);
8
+ if (!validation.valid) {
9
+ return { text: `Invalid project name: ${validation.error}` };
10
+ }
11
+ const global = await stateManager.getGlobalState();
12
+ if (global.projects.some((p) => p.id === name && !p.archived)) {
13
+ return { text: `Project \`${name}\` already exists. Use \`/dojo switch ${name}\` to activate it.` };
14
+ }
15
+ const descIdx = args.indexOf("--desc");
16
+ const description = descIdx >= 0 ? args.slice(descIdx + 1).join(" ").replace(/^"|"$/g, "") : "";
17
+ const now = new Date().toISOString();
18
+ const date = now.split("T")[0];
19
+ const meta = {
20
+ id: name,
21
+ name,
22
+ description,
23
+ phase: "initialized",
24
+ createdAt: now,
25
+ lastAccessedAt: now,
26
+ archived: false,
27
+ };
28
+ const state = {
29
+ projectId: name,
30
+ phase: "initialized",
31
+ tracks: [],
32
+ decisions: [],
33
+ specs: [],
34
+ artifacts: [],
35
+ currentTrack: null,
36
+ lastSkill: "",
37
+ pendingAction: null,
38
+ activityLog: [{ timestamp: now, action: "command:init", summary: "Project created" }],
39
+ lastUpdated: now,
40
+ };
41
+ const projectDir = `${stateManager.getBasePath()}/projects/${name}`;
42
+ await ensureDir(projectDir);
43
+ await ensureDir(`${projectDir}/scouts`);
44
+ await ensureDir(`${projectDir}/specs`);
45
+ await ensureDir(`${projectDir}/prompts`);
46
+ await ensureDir(`${projectDir}/retros`);
47
+ await ensureDir(`${projectDir}/tracks`);
48
+ await ensureDir(`${projectDir}/artifacts`);
49
+ await writeTextFile(`${projectDir}/PROJECT.md`, generateProjectMd(name, description, date));
50
+ await writeTextFile(`${projectDir}/decisions.md`, `# Decision Log: ${name}\n\n---\n\n`);
51
+ await writeJsonFile(`${projectDir}/state.json`, state);
52
+ await stateManager.addProject(meta);
53
+ return {
54
+ text: `**Project created:** \`${name}\`\n\n**Phase:** initialized\n**Active:** yes\n\nNext: Run \`/dojo scout <tension>\` to start scouting.`,
55
+ };
56
+ }
57
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAc;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,UAAU,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,yBAAyB,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;IAC/D,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,cAAc,EAAE,CAAC;IACnD,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9D,OAAO,EAAE,IAAI,EAAE,aAAa,IAAI,yCAAyC,IAAI,oBAAoB,EAAE,CAAC;IACtG,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE9E,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B,MAAM,IAAI,GAAoB;QAC5B,EAAE,EAAE,IAAI;QACR,IAAI;QACJ,WAAW;QACX,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,KAAK;KAChB,CAAC;IAEF,MAAM,KAAK,GAAiB;QAC1B,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,EAAE;QACb,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;QACrF,WAAW,EAAE,GAAG;KACjB,CAAC;IAEF,MAAM,UAAU,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,aAAa,IAAI,EAAE,CAAC;IACpE,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC;IAC5B,MAAM,SAAS,CAAC,GAAG,UAAU,SAAS,CAAC,CAAC;IACxC,MAAM,SAAS,CAAC,GAAG,UAAU,QAAQ,CAAC,CAAC;IACvC,MAAM,SAAS,CAAC,GAAG,UAAU,UAAU,CAAC,CAAC;IACzC,MAAM,SAAS,CAAC,GAAG,UAAU,SAAS,CAAC,CAAC;IACxC,MAAM,SAAS,CAAC,GAAG,UAAU,SAAS,CAAC,CAAC;IACxC,MAAM,SAAS,CAAC,GAAG,UAAU,YAAY,CAAC,CAAC;IAE3C,MAAM,aAAa,CAAC,GAAG,UAAU,aAAa,EAAE,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5F,MAAM,aAAa,CAAC,GAAG,UAAU,eAAe,EAAE,mBAAmB,IAAI,aAAa,CAAC,CAAC;IACxF,MAAM,aAAa,CAAC,GAAG,UAAU,aAAa,EAAE,KAAK,CAAC,CAAC;IAEvD,MAAM,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAEpC,OAAO;QACL,IAAI,EAAE,0BAA0B,IAAI,yGAAyG;KAC9I,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function handleList(args: string[]): Promise<{
2
+ text: string;
3
+ }>;
4
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/list.ts"],"names":[],"mappings":"AAGA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAO1E"}
@@ -0,0 +1,9 @@
1
+ import { stateManager } from "../state/manager.js";
2
+ import { formatProjectList } from "../ui/chat-formatter.js";
3
+ export async function handleList(args) {
4
+ const showArchived = args.includes("--all");
5
+ const global = await stateManager.getGlobalState();
6
+ const table = formatProjectList(global.projects, showArchived, global.activeProjectId);
7
+ return { text: table };
8
+ }
9
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAc;IAC7C,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,cAAc,EAAE,CAAC;IAEnD,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;IAEvF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACzB,CAAC"}