@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
@@ -0,0 +1,7 @@
1
+ export declare function validateProjectName(name: string): {
2
+ valid: boolean;
3
+ error?: string;
4
+ };
5
+ export declare function sanitizeFilename(input: string): string;
6
+ export declare function validateOutputDir(dir: string): boolean;
7
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAYpF;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOtD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGtD"}
@@ -0,0 +1,29 @@
1
+ const PROJECT_NAME_REGEX = /^[a-z0-9][a-z0-9-]{1,63}$/;
2
+ const DOUBLE_HYPHEN = /--/;
3
+ export function validateProjectName(name) {
4
+ if (!name)
5
+ return { valid: false, error: "Project name is required" };
6
+ if (!PROJECT_NAME_REGEX.test(name)) {
7
+ return {
8
+ valid: false,
9
+ error: "Project name must be 2-64 chars, lowercase alphanumeric + hyphens, start with letter/number",
10
+ };
11
+ }
12
+ if (DOUBLE_HYPHEN.test(name)) {
13
+ return { valid: false, error: "Project name cannot contain consecutive hyphens" };
14
+ }
15
+ return { valid: true };
16
+ }
17
+ export function sanitizeFilename(input) {
18
+ return input
19
+ .toLowerCase()
20
+ .replace(/[^a-z0-9-_]/g, "-")
21
+ .replace(/-+/g, "-")
22
+ .replace(/^-|-$/g, "")
23
+ .slice(0, 128);
24
+ }
25
+ export function validateOutputDir(dir) {
26
+ const allowed = ["scouts", "specs", "prompts", "retros", "tracks", "artifacts"];
27
+ return allowed.includes(dir);
28
+ }
29
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AACvD,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACtE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,6FAA6F;SACrG,CAAC;IACJ,CAAC;IACD,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iDAAiD,EAAE,CAAC;IACpF,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAChF,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,54 @@
1
+ export interface PluginLogger {
2
+ info(message: string, ...args: unknown[]): void;
3
+ warn(message: string, ...args: unknown[]): void;
4
+ error(message: string, ...args: unknown[]): void;
5
+ debug(message: string, ...args: unknown[]): void;
6
+ }
7
+ export interface PluginRuntime {
8
+ state: {
9
+ resolveStateDir(pluginId: string): string;
10
+ };
11
+ }
12
+ export interface CommandContext {
13
+ args?: string;
14
+ }
15
+ export interface CommandRegistration {
16
+ name: string;
17
+ description: string;
18
+ handler: (ctx: CommandContext) => {
19
+ text: string;
20
+ } | Promise<{
21
+ text: string;
22
+ }>;
23
+ }
24
+ export interface ToolResult {
25
+ content: Array<{
26
+ type: string;
27
+ text: string;
28
+ }>;
29
+ }
30
+ export interface ToolRegistration {
31
+ name: string;
32
+ description: string;
33
+ parameters: unknown;
34
+ execute: (id: string, params: Record<string, unknown>) => Promise<ToolResult>;
35
+ }
36
+ export interface PluginAPI {
37
+ registerCommand(cmd: CommandRegistration): void;
38
+ registerTool(tool: ToolRegistration): void;
39
+ runtime: PluginRuntime;
40
+ logger: PluginLogger;
41
+ }
42
+ export interface HookEvent {
43
+ type: string;
44
+ action?: string;
45
+ messages: string[];
46
+ context?: Record<string, unknown>;
47
+ }
48
+ export type HookHandler = (event: HookEvent) => Promise<void> | void;
49
+ export declare function registerPluginHooksFromDir(_api: PluginAPI, _dir: string): void;
50
+ export declare function createMockPluginAPI(stateDir: string): PluginAPI & {
51
+ _commands: Map<string, CommandRegistration>;
52
+ _tools: Map<string, ToolRegistration>;
53
+ };
54
+ //# sourceMappingURL=openclaw-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openclaw-types.d.ts","sourceRoot":"","sources":["../../../tests/__mocks__/openclaw-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QACL,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3C,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChF;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,SAAS;IACxB,eAAe,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAChD,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAErE,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,MAAM,GACX,IAAI,CAAG;AAEV,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG;IACjE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5C,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CACvC,CA2BA"}
@@ -0,0 +1,29 @@
1
+ export function registerPluginHooksFromDir(_api, _dir) { }
2
+ export function createMockPluginAPI(stateDir) {
3
+ const commands = new Map();
4
+ const tools = new Map();
5
+ return {
6
+ _commands: commands,
7
+ _tools: tools,
8
+ registerCommand(cmd) {
9
+ commands.set(cmd.name, cmd);
10
+ },
11
+ registerTool(tool) {
12
+ tools.set(tool.name, tool);
13
+ },
14
+ runtime: {
15
+ state: {
16
+ resolveStateDir(_pluginId) {
17
+ return stateDir;
18
+ },
19
+ },
20
+ },
21
+ logger: {
22
+ info() { },
23
+ warn() { },
24
+ error() { },
25
+ debug() { },
26
+ },
27
+ };
28
+ }
29
+ //# sourceMappingURL=openclaw-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openclaw-types.js","sourceRoot":"","sources":["../../../tests/__mocks__/openclaw-types.ts"],"names":[],"mappings":"AAkDA,MAAM,UAAU,0BAA0B,CACxC,IAAe,EACf,IAAY,IACL,CAAC;AAEV,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAIlD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA+B,CAAC;IACxD,MAAM,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAElD,OAAO;QACL,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,KAAK;QACb,eAAe,CAAC,GAAwB;YACtC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC;QACD,YAAY,CAAC,IAAsB;YACjC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,eAAe,CAAC,SAAiB;oBAC/B,OAAO,QAAQ,CAAC;gBAClB,CAAC;aACF;SACF;QACD,MAAM,EAAE;YACN,IAAI,KAAI,CAAC;YACT,IAAI,KAAI,CAAC;YACT,KAAK,KAAI,CAAC;YACV,KAAK,KAAI,CAAC;SACX;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: dojo-tool-monitor
3
+ description: Monitors orchestration tool calls (dojo_save_artifact, dojo_update_state) for activity logging and PROJECT.md updates.
4
+ metadata:
5
+ openclaw:
6
+ events: ["after_tool_call"]
7
+ ---
@@ -0,0 +1,41 @@
1
+ import type { HookHandler } from "../../tests/__mocks__/openclaw-types.js";
2
+ import { stateManager } from "../../src/state/manager.js";
3
+ import { writeTextFile } from "../../src/utils/file-ops.js";
4
+ import { promises as fs } from "fs";
5
+
6
+ const MONITORED_TOOLS = ["dojo_save_artifact", "dojo_update_state", "dojo_get_context"];
7
+
8
+ const handler: HookHandler = async (event) => {
9
+ if (event.type !== "agent") return;
10
+
11
+ const toolName = event.context?.toolName as string | undefined;
12
+ if (!toolName || !MONITORED_TOOLS.includes(toolName)) return;
13
+
14
+ if (toolName === "dojo_update_state") {
15
+ const params = event.context?.toolParams as Record<string, unknown> | undefined;
16
+ const newPhase = params?.phase as string | undefined;
17
+ if (newPhase) {
18
+ await updateProjectMd(newPhase);
19
+ }
20
+ }
21
+ };
22
+
23
+ async function updateProjectMd(toPhase: string): Promise<void> {
24
+ const global = await stateManager.getGlobalState();
25
+ if (!global.activeProjectId) return;
26
+
27
+ const basePath = stateManager.getBasePath();
28
+ const projectMdPath = `${basePath}/projects/${global.activeProjectId}/PROJECT.md`;
29
+
30
+ try {
31
+ let content = await fs.readFile(projectMdPath, "utf-8");
32
+ content = content.replace(/\*\*Phase:\*\* .+/, `**Phase:** ${toPhase}`);
33
+ const logEntry = `- ${new Date().toISOString().split("T")[0]} — Phase changed to ${toPhase}\n`;
34
+ content = content.replace(/(## Activity Log\n\n)/, `$1${logEntry}`);
35
+ await writeTextFile(projectMdPath, content);
36
+ } catch {
37
+ // PROJECT.md may not exist yet — not critical
38
+ }
39
+ }
40
+
41
+ export default handler;
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: dojo-cleanup
3
+ description: Clears the pendingAction from project state after the agent turn completes.
4
+ metadata:
5
+ openclaw:
6
+ events: ["agent_end"]
7
+ ---
@@ -0,0 +1,18 @@
1
+ import type { HookHandler } from "../../tests/__mocks__/openclaw-types.js";
2
+ import { stateManager } from "../../src/state/manager.js";
3
+
4
+ const handler: HookHandler = async (event) => {
5
+ if (event.type !== "agent") return;
6
+
7
+ const global = await stateManager.getGlobalState();
8
+ if (!global.activeProjectId) return;
9
+
10
+ const state = await stateManager.getProjectState(global.activeProjectId);
11
+ if (state?.pendingAction) {
12
+ await stateManager.updateProjectState(global.activeProjectId, {
13
+ pendingAction: null,
14
+ });
15
+ }
16
+ };
17
+
18
+ export default handler;
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: dojo-context-injection
3
+ description: Injects Dojo Genesis project context into the agent system prompt when a pending skill action exists.
4
+ metadata:
5
+ openclaw:
6
+ events: ["before_agent_start"]
7
+ ---
@@ -0,0 +1,133 @@
1
+ import type { HookHandler } from "../../tests/__mocks__/openclaw-types.js";
2
+ import { stateManager } from "../../src/state/manager.js";
3
+
4
+ const SKILL_INSTRUCTIONS: Record<string, string> = {
5
+ // Pipeline
6
+ "strategic-scout":
7
+ "Run the strategic-scout skill (see skills/strategic-scout/SKILL.md). Explore the tension from multiple perspectives, then synthesize a direction.",
8
+ "release-specification":
9
+ "Run the release-specification skill (see skills/release-specification/SKILL.md). Write a production-ready specification for this feature/release.",
10
+ "parallel-tracks":
11
+ "Run the parallel-tracks skill (see skills/parallel-tracks/SKILL.md). Decompose the specification into independent parallel implementation tracks.",
12
+ "implementation-prompt":
13
+ "Run the implementation-prompt skill (see skills/implementation-prompt/SKILL.md). Generate structured implementation prompts for each track.",
14
+ "retrospective":
15
+ "Run the retrospective skill (see skills/retrospective/SKILL.md). Reflect on what went well, what was hard, and what to improve.",
16
+
17
+ // Workflow
18
+ "iterative-scouting":
19
+ "Run the iterative-scouting skill (see skills/iterative-scouting/SKILL.md). Iterate through scouting cycles with feedback-driven reframes.",
20
+ "strategic-to-tactical-workflow":
21
+ "Run the strategic-to-tactical-workflow skill (see skills/strategic-to-tactical-workflow/SKILL.md). Execute the full scout → spec → commission workflow.",
22
+ "pre-implementation-checklist":
23
+ "Run the pre-implementation-checklist skill (see skills/pre-implementation-checklist/SKILL.md). Verify specifications are ready before commissioning.",
24
+ "context-ingestion":
25
+ "Run the context-ingestion skill (see skills/context-ingestion/SKILL.md). Create actionable plans grounded in the uploaded files.",
26
+ "frontend-from-backend":
27
+ "Run the frontend-from-backend skill (see skills/frontend-from-backend/SKILL.md). Write frontend specifications grounded in backend architecture.",
28
+ "spec-constellation-to-prompt-suite":
29
+ "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.",
30
+ "planning-with-files":
31
+ "Run the planning-with-files skill (see skills/planning-with-files/SKILL.md). Route file-based planning to the right specialized mode.",
32
+
33
+ // Research
34
+ "research-modes":
35
+ "Run the research-modes skill (see skills/research-modes/SKILL.md). Conduct deep or wide research using structured approaches.",
36
+ "research-synthesis":
37
+ "Run the research-synthesis skill (see skills/research-synthesis/SKILL.md). Synthesize multiple research sources into actionable insights.",
38
+ "project-exploration":
39
+ "Run the project-exploration skill (see skills/project-exploration/SKILL.md). Explore a new project to assess collaboration potential.",
40
+ "era-architecture":
41
+ "Run the era-architecture skill (see skills/era-architecture/SKILL.md). Architect multi-release eras with shared vocabulary and constraints.",
42
+ "repo-context-sync":
43
+ "Run the repo-context-sync skill (see skills/repo-context-sync/SKILL.md). Sync and extract context from a repository.",
44
+ "documentation-audit":
45
+ "Run the documentation-audit skill (see skills/documentation-audit/SKILL.md). Audit documentation for drift and accuracy.",
46
+ "health-audit":
47
+ "Run the health-audit skill (see skills/health-audit/SKILL.md). Conduct a comprehensive repository health check.",
48
+
49
+ // Forge
50
+ "skill-creation":
51
+ "Run the skill-creation skill (see skills/skill-creation/SKILL.md). Create a new reusable skill with proper structure.",
52
+ "skill-maintenance":
53
+ "Run the skill-maintenance skill (see skills/skill-maintenance/SKILL.md). Maintain and improve existing skills.",
54
+ "skill-audit-upgrade":
55
+ "Run the skill-audit-upgrade skill (see skills/skill-audit-upgrade/SKILL.md). Audit all skills and upgrade to quality standards.",
56
+ "process-extraction":
57
+ "Run the process-extraction skill (see skills/process-extraction/SKILL.md). Transform a completed workflow into a reusable skill.",
58
+
59
+ // Garden
60
+ "memory-garden":
61
+ "Run the memory-garden skill (see skills/memory-garden/SKILL.md). Write structured memory entries for context management.",
62
+ "seed-extraction":
63
+ "Run the seed-extraction skill (see skills/seed-extraction/SKILL.md). Extract reusable patterns from this experience.",
64
+ "seed-library":
65
+ "Run the seed-library skill (see skills/seed-library/SKILL.md). Access and apply the Dojo Seed Patches as thinking modules.",
66
+ "compression-ritual":
67
+ "Run the compression-ritual skill (see skills/compression-ritual/SKILL.md). Distill conversation history into potent memory artifacts.",
68
+ "seed-to-skill-converter":
69
+ "Run the seed-to-skill-converter skill (see skills/seed-to-skill-converter/SKILL.md). Elevate a proven seed into a full skill.",
70
+
71
+ // Orchestration
72
+ "handoff-protocol":
73
+ "Run the handoff-protocol skill (see skills/handoff-protocol/SKILL.md). Prepare a clean handoff package for another agent.",
74
+ "decision-propagation":
75
+ "Run the decision-propagation skill (see skills/decision-propagation/SKILL.md). Record and propagate a decision across all dependent documents.",
76
+ "workspace-navigation":
77
+ "Run the workspace-navigation skill (see skills/workspace-navigation/SKILL.md). Navigate and organize the shared workspace.",
78
+ "agent-teaching":
79
+ "Run the agent-teaching skill (see skills/agent-teaching/SKILL.md). Teach a peer through shared practice.",
80
+
81
+ // System
82
+ "semantic-clusters":
83
+ "Run the semantic-clusters skill (see skills/semantic-clusters/SKILL.md). Map system capabilities using action-verb clusters.",
84
+ "repo-status":
85
+ "Run the repo-status skill (see skills/repo-status/SKILL.md). Generate a comprehensive repo status document.",
86
+ "status-template":
87
+ "Run the status-template skill (see skills/status-template/SKILL.md). Write status using the 10-section template.",
88
+ "status-writing":
89
+ "Run the status-writing skill (see skills/status-writing/SKILL.md). Write and update a STATUS.md file.",
90
+
91
+ // Tools
92
+ "patient-learning-protocol":
93
+ "Run the patient-learning-protocol skill (see skills/patient-learning-protocol/SKILL.md). Learn at the pace of understanding.",
94
+ "file-management":
95
+ "Run the file-management skill (see skills/file-management/SKILL.md). Organize files and directories with flexible principles.",
96
+ "product-positioning":
97
+ "Run the product-positioning skill (see skills/product-positioning/SKILL.md). Reframe a binary product decision into a positioning opportunity.",
98
+ "multi-surface-strategy":
99
+ "Run the multi-surface-strategy skill (see skills/multi-surface-strategy/SKILL.md). Design a coherent multi-surface product strategy.",
100
+ };
101
+
102
+ const handler: HookHandler = async (event) => {
103
+ if (event.type !== "agent" || event.action !== "start") return;
104
+
105
+ const global = await stateManager.getGlobalState();
106
+ if (!global.activeProjectId) return;
107
+
108
+ const state = await stateManager.getProjectState(global.activeProjectId);
109
+ if (!state?.pendingAction) return;
110
+
111
+ const { skill, args } = state.pendingAction;
112
+ const instructions = SKILL_INSTRUCTIONS[skill] || `Run the ${skill} skill.`;
113
+
114
+ const contextBlock = [
115
+ `[DOJO GENESIS PROJECT CONTEXT]`,
116
+ `Project: ${state.projectId}`,
117
+ `Phase: ${state.phase}`,
118
+ `Pending skill: ${skill}`,
119
+ `User request: ${args}`,
120
+ ``,
121
+ `Active tracks: ${state.tracks.length > 0 ? state.tracks.map((t) => `${t.id} (${t.status})`).join(", ") : "none"}`,
122
+ `Recent decisions: ${state.decisions.slice(-3).map((d) => d.topic).join(", ") || "none"}`,
123
+ `Last skill: ${state.lastSkill || "none"}`,
124
+ ``,
125
+ `INSTRUCTIONS: ${instructions}`,
126
+ `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.`,
127
+ `[/DOJO GENESIS PROJECT CONTEXT]`,
128
+ ].join("\n");
129
+
130
+ event.messages.push(contextBlock);
131
+ };
132
+
133
+ export default handler;
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "dojo-genesis-plugin",
3
+ "configSchema": {
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "projectsDir": {
8
+ "type": "string",
9
+ "default": "dojo-genesis-plugin"
10
+ }
11
+ }
12
+ },
13
+ "uiHints": {
14
+ "projectsDir": {
15
+ "label": "Projects Directory",
16
+ "placeholder": "dojo-genesis-plugin"
17
+ }
18
+ }
19
+ }
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@trespies-source/dojo-genesis-plugin",
3
+ "version": "1.0.0",
4
+ "description": "Specification-driven development orchestration for OpenClaw",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist/",
13
+ "skills/",
14
+ "hooks/",
15
+ "openclaw.plugin.json",
16
+ "LICENSE",
17
+ "README.md",
18
+ "CHANGELOG.md"
19
+ ],
20
+ "openclaw": {
21
+ "extensions": "index.ts"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "test": "vitest run",
26
+ "test:watch": "vitest",
27
+ "test:coverage": "vitest run --coverage",
28
+ "typecheck": "tsc --noEmit"
29
+ },
30
+ "keywords": [
31
+ "openclaw",
32
+ "plugin",
33
+ "dojo-genesis",
34
+ "orchestration",
35
+ "specification",
36
+ "development",
37
+ "skills",
38
+ "clawhub"
39
+ ],
40
+ "author": "Tres Pies Design <cruz@trespiesdesign.com>",
41
+ "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/TresPies-source/openclaw-dojo-genesis-plugin"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/TresPies-source/openclaw-dojo-genesis-plugin/issues"
48
+ },
49
+ "homepage": "https://github.com/TresPies-source/openclaw-dojo-genesis-plugin#readme",
50
+ "peerDependencies": {
51
+ "openclaw": "*"
52
+ },
53
+ "dependencies": {
54
+ "@sinclair/typebox": "^0.32.0"
55
+ },
56
+ "devDependencies": {
57
+ "typescript": "^5.4.0",
58
+ "vitest": "^1.6.0",
59
+ "@vitest/coverage-v8": "^1.6.0"
60
+ }
61
+ }