@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,129 @@
1
+ #!/usr/bin/env python3.11
2
+ """
3
+ apply_seed.py - Load and explain how to apply a seed
4
+ Usage: python3.11 apply_seed.py <seed_id>
5
+ Example: python3.11 apply_seed.py 04_agent_connect
6
+ """
7
+
8
+ import sys
9
+ import json
10
+ from pathlib import Path
11
+ from datetime import datetime
12
+
13
+ SEEDS_DIR = Path(__file__).parent.parent / "seeds"
14
+ USAGE_FILE = Path.home() / ".seed-usage.json"
15
+
16
+ def load_usage_state():
17
+ """Load usage state from JSON file"""
18
+ if not USAGE_FILE.exists():
19
+ return {
20
+ "seeds": {},
21
+ "session_seeds": {}
22
+ }
23
+
24
+ with open(USAGE_FILE) as f:
25
+ return json.load(f)
26
+
27
+ def save_usage_state(state):
28
+ """Save usage state to JSON file"""
29
+ with open(USAGE_FILE, 'w') as f:
30
+ json.dump(state, f, indent=2)
31
+
32
+ def track_seed_usage(seed_id, session_id=None):
33
+ """Track seed usage"""
34
+ state = load_usage_state()
35
+
36
+ if seed_id not in state["seeds"]:
37
+ state["seeds"][seed_id] = {
38
+ "usage_count": 0,
39
+ "last_used": None,
40
+ "sessions": []
41
+ }
42
+
43
+ state["seeds"][seed_id]["usage_count"] += 1
44
+ state["seeds"][seed_id]["last_used"] = datetime.now().isoformat()
45
+
46
+ if session_id:
47
+ if session_id not in state["seeds"][seed_id]["sessions"]:
48
+ state["seeds"][seed_id]["sessions"].append(session_id)
49
+
50
+ if session_id not in state["session_seeds"]:
51
+ state["session_seeds"][session_id] = []
52
+
53
+ if seed_id not in state["session_seeds"][session_id]:
54
+ state["session_seeds"][session_id].append(seed_id)
55
+
56
+ save_usage_state(state)
57
+
58
+ def apply_seed(seed_id, session_id=None):
59
+ """Load and display seed content"""
60
+ seed_file = SEEDS_DIR / f"{seed_id}.md"
61
+
62
+ if not seed_file.exists():
63
+ print(f"❌ Seed not found: {seed_id}")
64
+ print(f" Expected at: {seed_file}")
65
+ print("\nAvailable seeds:")
66
+ for f in sorted(SEEDS_DIR.glob("*.md")):
67
+ print(f" - {f.stem}")
68
+ sys.exit(1)
69
+
70
+ # Track usage
71
+ track_seed_usage(seed_id, session_id)
72
+
73
+ # Load content
74
+ content = seed_file.read_text()
75
+
76
+ # Generate application guide
77
+ guide = f"""
78
+ # Applying Seed: {seed_id}
79
+
80
+ ---
81
+
82
+ {content}
83
+
84
+ ---
85
+
86
+ ## Application Checklist
87
+
88
+ Review the "Checks" section in the seed above and validate each one.
89
+
90
+ ## Next Steps
91
+
92
+ 1. **Review the pattern** - Understand the core pattern and why it matters
93
+ 2. **Check the trigger** - Confirm this seed is relevant to your current task
94
+ 3. **Apply the pattern** - Follow the "Dojo Application" section
95
+ 4. **Validate with checks** - Ensure all checks pass
96
+ 5. **Note what it refuses** - Avoid the anti-patterns
97
+
98
+ ## Track Effectiveness
99
+
100
+ After applying this seed, rate its effectiveness:
101
+ ```bash
102
+ python3.11 track_usage.py {seed_id} <session_id> <helpful|not_helpful>
103
+ ```
104
+
105
+ """
106
+
107
+ return guide
108
+
109
+ def main():
110
+ if len(sys.argv) < 2:
111
+ print("Usage: python3.11 apply_seed.py <seed_id> [session_id]")
112
+ print("Example: python3.11 apply_seed.py 04_agent_connect session_123")
113
+ sys.exit(1)
114
+
115
+ seed_id = sys.argv[1]
116
+ session_id = sys.argv[2] if len(sys.argv) > 2 else None
117
+
118
+ print(f"📖 Loading seed: {seed_id}")
119
+
120
+ guide = apply_seed(seed_id, session_id)
121
+ print(guide)
122
+
123
+ # Save to file
124
+ output_file = Path.home() / f"seed-{seed_id}-applied.md"
125
+ output_file.write_text(guide)
126
+ print(f"\n✅ Application guide saved to: {output_file}")
127
+
128
+ if __name__ == "__main__":
129
+ main()
@@ -0,0 +1,183 @@
1
+ #!/usr/bin/env python3.11
2
+ """
3
+ suggest_seeds.py - Suggest relevant seeds based on task context
4
+ Usage: python3.11 suggest_seeds.py <keywords...>
5
+ Example: python3.11 suggest_seeds.py multi-agent architecture coordination
6
+ """
7
+
8
+ import sys
9
+ import json
10
+ from pathlib import Path
11
+ from datetime import datetime
12
+
13
+ SEEDS_DIR = Path(__file__).parent.parent / "seeds"
14
+
15
+ # Seed trigger keywords (extracted from seed definitions)
16
+ SEED_TRIGGERS = {
17
+ "01_three_tiered_governance": [
18
+ "governance", "capabilities", "complexity", "multi-agent", "coordination",
19
+ "policy", "standards", "rules", "framework"
20
+ ],
21
+ "02_harness_trace": [
22
+ "debugging", "trace", "transparency", "performance", "evaluation",
23
+ "logging", "monitoring", "inspect"
24
+ ],
25
+ "03_context_iceberg": [
26
+ "token", "cost", "context", "window", "limit", "budget", "pruning",
27
+ "memory", "overhead"
28
+ ],
29
+ "04_agent_connect": [
30
+ "multi-agent", "routing", "coordination", "specialized", "handoff",
31
+ "permission", "swarm", "orchestration"
32
+ ],
33
+ "05_go_live_bundles": [
34
+ "export", "sharing", "reuse", "artifact", "package", "bundle",
35
+ "repeatability", "trust"
36
+ ],
37
+ "06_cost_guard": [
38
+ "cost", "budget", "estimation", "planning", "infrastructure",
39
+ "investment", "pricing"
40
+ ],
41
+ "07_safety_switch": [
42
+ "fallback", "conservative", "alert", "drift", "failure", "recovery",
43
+ "validation", "error"
44
+ ],
45
+ "08_implicit_perspective_extraction": [
46
+ "perspective", "constraint", "metaphor", "scope", "extraction",
47
+ "implicit", "natural"
48
+ ],
49
+ "09_mode_based_complexity_gating": [
50
+ "mode", "complexity", "routing", "simple", "query", "reasoning",
51
+ "adaptive"
52
+ ],
53
+ "10_shared_infrastructure": [
54
+ "infrastructure", "reuse", "duplication", "foundation", "shared",
55
+ "common", "service"
56
+ ],
57
+ "11_voice_before_structure": [
58
+ "voice", "philosophy", "design-language", "manifest", "description",
59
+ "readme", "ecosystem", "identity", "grounding", "plugin"
60
+ ],
61
+ "12_pointer_directories": [
62
+ "empty", "missing", "pointer", "provenance", "registry", "audit",
63
+ "gap", "coverage", "directory", "reference"
64
+ ],
65
+ "13_granular_visibility": [
66
+ "progress", "tracking", "visibility", "todo", "granular", "steering",
67
+ "transparency", "trust", "delegation", "status"
68
+ ]
69
+ }
70
+
71
+ def load_seed_metadata(seed_file):
72
+ """Load metadata from seed file"""
73
+ content = seed_file.read_text()
74
+
75
+ # Extract frontmatter
76
+ if content.startswith('---'):
77
+ parts = content.split('---', 2)
78
+ if len(parts) >= 3:
79
+ frontmatter = parts[1].strip()
80
+ metadata = {}
81
+ for line in frontmatter.split('\n'):
82
+ if ':' in line:
83
+ key, value = line.split(':', 1)
84
+ metadata[key.strip()] = value.strip()
85
+ return metadata
86
+
87
+ return {}
88
+
89
+ def calculate_relevance(keywords, seed_id):
90
+ """Calculate relevance score for a seed based on keywords"""
91
+ triggers = SEED_TRIGGERS.get(seed_id, [])
92
+ keywords_lower = [k.lower() for k in keywords]
93
+
94
+ score = 0
95
+ for keyword in keywords_lower:
96
+ for trigger in triggers:
97
+ if keyword in trigger or trigger in keyword:
98
+ score += 1
99
+
100
+ return score
101
+
102
+ def suggest_seeds(keywords, top_n=3):
103
+ """Suggest top N relevant seeds based on keywords"""
104
+ suggestions = []
105
+
106
+ for seed_id, triggers in SEED_TRIGGERS.items():
107
+ score = calculate_relevance(keywords, seed_id)
108
+ if score > 0:
109
+ seed_file = SEEDS_DIR / f"{seed_id}.md"
110
+ if seed_file.exists():
111
+ metadata = load_seed_metadata(seed_file)
112
+ suggestions.append({
113
+ 'seed_id': seed_id,
114
+ 'name': metadata.get('name', seed_id),
115
+ 'score': score,
116
+ 'file': str(seed_file)
117
+ })
118
+
119
+ # Sort by score descending
120
+ suggestions.sort(key=lambda x: x['score'], reverse=True)
121
+
122
+ return suggestions[:top_n]
123
+
124
+ def generate_markdown_output(keywords, suggestions):
125
+ """Generate markdown output"""
126
+ md = f"""# Seed Suggestions
127
+
128
+ **Keywords:** {', '.join(keywords)}
129
+ **Generated:** {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
130
+
131
+ """
132
+
133
+ if suggestions:
134
+ md += "## Recommended Seeds\n\n"
135
+ for i, suggestion in enumerate(suggestions, 1):
136
+ md += f"### {i}. {suggestion['name']} (Seed {suggestion['seed_id'][:2]})\n\n"
137
+ md += f"- **Relevance Score:** {suggestion['score']}\n"
138
+ md += f"- **File:** `{suggestion['file']}`\n\n"
139
+
140
+ # Read first few lines of seed for preview
141
+ seed_file = Path(suggestion['file'])
142
+ if seed_file.exists():
143
+ content = seed_file.read_text()
144
+ # Find "What It Is" section
145
+ if "## What It Is" in content:
146
+ what_it_is = content.split("## What It Is")[1].split("##")[0].strip()
147
+ md += f"**What It Is:** {what_it_is[:200]}...\n\n"
148
+
149
+ md += "\n## How to Apply\n\n"
150
+ md += "To apply a seed, run:\n"
151
+ md += "```bash\n"
152
+ md += "python3.11 apply_seed.py <seed_id>\n"
153
+ md += "```\n"
154
+ else:
155
+ md += "No relevant seeds found for these keywords.\n\n"
156
+ md += "**Available seeds:**\n"
157
+ for seed_id in SEED_TRIGGERS.keys():
158
+ md += f"- {seed_id}\n"
159
+
160
+ return md
161
+
162
+ def main():
163
+ if len(sys.argv) < 2:
164
+ print("Usage: python3.11 suggest_seeds.py <keywords...>")
165
+ print("Example: python3.11 suggest_seeds.py multi-agent architecture coordination")
166
+ sys.exit(1)
167
+
168
+ keywords = sys.argv[1:]
169
+
170
+ print(f"🔍 Suggesting seeds for: {', '.join(keywords)}")
171
+
172
+ suggestions = suggest_seeds(keywords)
173
+ output = generate_markdown_output(keywords, suggestions)
174
+
175
+ print(output)
176
+
177
+ # Save to file
178
+ output_file = Path.home() / "seed-suggestions.md"
179
+ output_file.write_text(output)
180
+ print(f"\n✅ Suggestions saved to: {output_file}")
181
+
182
+ if __name__ == "__main__":
183
+ main()
@@ -0,0 +1,90 @@
1
+ ---
2
+ seed_id: 01
3
+ name: Three-Tiered Governance
4
+ version: 1.0
5
+ created: 2026-01-12
6
+ source: Dataiku Research
7
+ status: active
8
+ ---
9
+
10
+ # Three-Tiered Governance
11
+
12
+ ## What It Is
13
+
14
+ A governance framework that operates at three distinct but connected layers: Strategic, Tactical, and Operational.
15
+
16
+ ## Why It Matters
17
+
18
+ Single-layer governance either slows teams to a crawl or misses critical context. Two layers leave gaps in accountability while four add drag without extra clarity.
19
+
20
+ ## The Pattern
21
+
22
+ ### Strategic (Tier 1)
23
+ - Define risk appetite
24
+ - Decide which use cases move forward
25
+ - Ensure alignment with global regulations
26
+ - Set organizational policy
27
+
28
+ ### Tactical (Tier 2)
29
+ - Translate rules into repeatable standards
30
+ - Allocate resources
31
+ - Track portfolio health
32
+ - Create project templates
33
+
34
+ ### Operational (Tier 3)
35
+ - Give engineers local instruments to ship safely
36
+ - Version control, tests, traces, monitoring
37
+ - Day-to-day execution tools
38
+ - Real-time feedback loops
39
+
40
+ ## Revisit Trigger
41
+
42
+ When adding new Dojo capabilities, governance complexity, or multi-agent coordination.
43
+
44
+ ## Dojo Application
45
+
46
+ ### Strategic Layer
47
+ - **Dojo Principles:** No autopilot, no gamification, artifact-first
48
+ - **Brand Promises:** Beginner's mind, self-definition, understanding is love
49
+ - **Risk Appetite:** What Dojo refuses to do
50
+
51
+ ### Tactical Layer
52
+ - **DojoPacket Schema:** Standardized export format
53
+ - **Seed Modules:** Reusable thinking patterns
54
+ - **Mode Routing:** Mirror/Scout/Gardener/Implementation
55
+ - **Harness Trace Format:** Nested spans + events
56
+
57
+ ### Operational Layer
58
+ - **Versioning:** Track seed versions, DojoPacket versions
59
+ - **Tests:** Validate perspective extraction, mode selection
60
+ - **Trace Logs:** Record every decision
61
+ - **Read-Before-Decide Loops:** Context-aware decision making
62
+
63
+ ## What It Refuses
64
+
65
+ Single-layer governance that tries to watch everything from one altitude.
66
+
67
+ ## Usage Examples
68
+
69
+ ### Example 1: Adding New Agent
70
+ **Strategic:** Does this agent align with "no autopilot" principle?
71
+ **Tactical:** What's the routing logic? What's the API contract?
72
+ **Operational:** How do we test it? How do we trace its decisions?
73
+
74
+ ### Example 2: New Feature Request
75
+ **Strategic:** Does this fit our risk appetite?
76
+ **Tactical:** What seed modules apply? What's the DojoPacket schema change?
77
+ **Operational:** What tests do we need? What monitoring?
78
+
79
+ ## Checks
80
+
81
+ - [ ] Strategic principles are clearly defined and documented
82
+ - [ ] Tactical standards are repeatable and versioned
83
+ - [ ] Operational instruments are available to builders
84
+ - [ ] All three tiers are connected (not siloed)
85
+ - [ ] Governance accelerates delivery (not slows it)
86
+
87
+ ## Related Seeds
88
+
89
+ - **Seed 10 (Shared Infrastructure):** Operational tier benefits from shared services
90
+ - **Meta-Seed (Governance Multiplies Velocity):** Strategic clarity accelerates delivery
@@ -0,0 +1,135 @@
1
+ ---
2
+ seed_id: 02
3
+ name: Harness Trace
4
+ version: 1.0
5
+ created: 2026-01-12
6
+ source: Dataiku Research
7
+ status: active
8
+ ---
9
+
10
+ # Harness Trace (Nested Spans + Events)
11
+
12
+ ## What It Is
13
+
14
+ A complete tracing system that records the entire trace of what an agent does, even through multiple layers of calling LLMs, as a nested JSON object.
15
+
16
+ ## Why It Matters
17
+
18
+ "Traceability breaks at every hop" when decision chains multiply. You can't evaluate what you don't understand. Transparency builds trust.
19
+
20
+ ## The Pattern
21
+
22
+ ### Spans
23
+ - Have start/end time
24
+ - Have children spans (nesting)
25
+ - Have name, inputs, outputs
26
+ - Have attributes (metadata)
27
+
28
+ ### Events
29
+ - Points in time with timestamp
30
+ - Have name, inputs, outputs
31
+ - Have attributes (metadata)
32
+
33
+ ### Nesting
34
+ Represents the lifeline of the query as it goes through various systems.
35
+
36
+ ### Three Views
37
+ - **Tree:** Structure and hierarchy
38
+ - **Timeline:** Performance and duration
39
+ - **Explorer:** Detailed analysis
40
+
41
+ ## Revisit Trigger
42
+
43
+ When debugging unexpected behavior, evaluating performance, or building trust through transparency.
44
+
45
+ ## Dojo Application
46
+
47
+ ```json
48
+ {
49
+ "trace_id": "dojo_session_12345",
50
+ "spans": [
51
+ {
52
+ "span_id": "perspective_capture",
53
+ "name": "Perspective Capture",
54
+ "start_time": "2026-01-29T10:00:00Z",
55
+ "end_time": "2026-01-29T10:00:05Z",
56
+ "inputs": {"user_query": "How should we architect..."},
57
+ "outputs": {"perspectives": ["P1", "P2", "P3"]},
58
+ "metadata": {"perspective_count": 3}
59
+ },
60
+ {
61
+ "span_id": "mode_selection",
62
+ "name": "Mode Selection",
63
+ "start_time": "2026-01-29T10:00:05Z",
64
+ "end_time": "2026-01-29T10:00:07Z",
65
+ "inputs": {"perspectives": ["P1", "P2", "P3"]},
66
+ "outputs": {"mode": "Scout"},
67
+ "metadata": {"reasoning": "Complex query requires route exploration"}
68
+ },
69
+ {
70
+ "span_id": "scout_execution",
71
+ "name": "Scout Mode Execution",
72
+ "start_time": "2026-01-29T10:00:07Z",
73
+ "end_time": "2026-01-29T10:00:30Z",
74
+ "children": [
75
+ {
76
+ "span_id": "route_1_analysis",
77
+ "name": "Route 1: Centralized Architecture",
78
+ "inputs": {},
79
+ "outputs": {"tradeoffs": "..."}
80
+ },
81
+ {
82
+ "span_id": "route_2_analysis",
83
+ "name": "Route 2: Distributed Architecture",
84
+ "inputs": {},
85
+ "outputs": {"tradeoffs": "..."}
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "span_id": "artifact_generation",
91
+ "name": "Artifact Generation",
92
+ "start_time": "2026-01-29T10:00:30Z",
93
+ "end_time": "2026-01-29T10:00:35Z",
94
+ "outputs": {"artifact": "architecture_comparison.md"}
95
+ }
96
+ ],
97
+ "usage_metadata": {
98
+ "total_tokens": 4523,
99
+ "estimated_cost": 0.0234
100
+ }
101
+ }
102
+ ```
103
+
104
+ ## What It Refuses
105
+
106
+ Opaque decision-making where users can't see how Dojo arrived at recommendations.
107
+
108
+ ## Usage Examples
109
+
110
+ ### Example 1: Debugging Mode Selection
111
+ **Problem:** Why did Dojo choose Scout instead of Mirror?
112
+ **Solution:** Check `mode_selection` span in trace, read `metadata.reasoning`
113
+
114
+ ### Example 2: Performance Optimization
115
+ **Problem:** Session feels slow
116
+ **Solution:** View Timeline, identify longest spans, optimize bottlenecks
117
+
118
+ ### Example 3: Trust Building
119
+ **Problem:** User doesn't understand recommendation
120
+ **Solution:** Share Tree view, show decision path from query to artifact
121
+
122
+ ## Checks
123
+
124
+ - [ ] Every significant decision is logged as a span
125
+ - [ ] Spans have start/end times for performance analysis
126
+ - [ ] Nesting represents actual decision hierarchy
127
+ - [ ] Metadata includes reasoning for key decisions
128
+ - [ ] Trace is exportable and inspectable
129
+ - [ ] Users can view trace in Tree, Timeline, and Explorer views
130
+
131
+ ## Related Seeds
132
+
133
+ - **Seed 01 (Three-Tiered Governance):** Tactical tier defines trace format
134
+ - **Seed 05 (Go-Live Bundles):** Traces are part of DojoPacket exports
135
+ - **Meta-Seed (Governance Multiplies Velocity):** Traces build trust, accelerate delivery
@@ -0,0 +1,120 @@
1
+ ---
2
+ seed_id: 03
3
+ name: Context Iceberg
4
+ version: 1.0
5
+ created: 2026-01-12
6
+ source: Dataiku Research
7
+ status: active
8
+ ---
9
+
10
+ # Context Iceberg (6x Token Multiplier)
11
+
12
+ ## What It Is
13
+
14
+ The hidden cost structure where production responses use 6x more tokens than demo responses due to conversation history, validation, error handling, and trace logging.
15
+
16
+ ## Why It Matters
17
+
18
+ "Context re-feed is the big tax." Juggling multiple projects requires constant restatement of "what matters right now." Naive token budgeting assumes demo = production costs, leading to 5x cost overruns.
19
+
20
+ ## The Pattern
21
+
22
+ ### Demo Usage
23
+ - **Input:** 50 tokens (clean query)
24
+ - **Output:** 150 tokens (simple response)
25
+ - **Total:** 200 tokens
26
+
27
+ ### Production Usage
28
+ - **Conversation History:** 400 tokens
29
+ - **User Profiles:** 100 tokens
30
+ - **System State:** 200 tokens
31
+ - **Validation:** 100 tokens
32
+ - **Error Handling:** 200 tokens
33
+ - **Trace Logging:** 200 tokens
34
+ - **Total:** 1,200 tokens (6x multiplier)
35
+
36
+ ### Cost Model Error
37
+ If you budget for demo usage, you'll be 5x off in production.
38
+
39
+ ## Revisit Trigger
40
+
41
+ When token usage spikes, costs exceed budget, or context window approaches limit.
42
+
43
+ ## Dojo Application
44
+
45
+ ### Hierarchical Context Loading
46
+
47
+ **Tier 1 (Always On):**
48
+ - Core system prompt
49
+ - Dojo principles
50
+ - Current user query
51
+
52
+ **Tier 2 (On Demand):**
53
+ - Active seed patches
54
+ - Relevant project memory
55
+ - Current session context
56
+
57
+ **Tier 3 (When Referenced):**
58
+ - Full text of specific files
59
+ - Previous session logs
60
+ - Detailed documentation
61
+
62
+ **Tier 4 (Pruned Aggressively):**
63
+ - General conversation history
64
+ - Less relevant details
65
+ - Archived context
66
+
67
+ ### Context Pruning Triggers
68
+
69
+ - **80% capacity:** Prune Tier 4 (general history)
70
+ - **90% capacity:** Prune Tier 3 (referenced files)
71
+ - **95% capacity:** Alert user, suggest export and new session
72
+
73
+ ### Shared Context Bus
74
+
75
+ Central store for:
76
+ - Project spines (core project info)
77
+ - Seed modules (reusable patterns)
78
+ - Contracts (API schemas, DojoPacket format)
79
+
80
+ ### Implicit Perspective Extraction
81
+
82
+ Treat constraints and metaphors as perspectives to reduce overhead:
83
+ - "no autopilot" → perspective about autonomy
84
+ - "artifact-first" → perspective about output format
85
+
86
+ ## What It Refuses
87
+
88
+ Naive token budgeting that assumes demo = production costs.
89
+
90
+ ## Usage Examples
91
+
92
+ ### Example 1: Simple Query
93
+ **Query:** "What's the DojoPacket schema?"
94
+ **Context:** Tier 1 + Tier 2 (schema from Shared Context Bus)
95
+ **Tokens:** ~500 (minimal overhead)
96
+
97
+ ### Example 2: Complex Query
98
+ **Query:** "How should we architect the multi-agent system?"
99
+ **Context:** Tier 1 + Tier 2 + Tier 3 (seed modules, project docs, previous architecture discussions)
100
+ **Tokens:** ~2,000 (full context)
101
+
102
+ ### Example 3: Context Approaching Limit
103
+ **Scenario:** 90% capacity reached
104
+ **Action:** Prune Tier 3, alert user
105
+ **Message:** "Context window at 90%. Consider exporting this session and starting fresh."
106
+
107
+ ## Checks
108
+
109
+ - [ ] Hierarchical context tiers are defined
110
+ - [ ] Pruning triggers are implemented
111
+ - [ ] Shared Context Bus exists for reusable artifacts
112
+ - [ ] Token usage is monitored per session
113
+ - [ ] Users are alerted before hitting limits
114
+ - [ ] Budget accounts for 6x multiplier (not demo costs)
115
+
116
+ ## Related Seeds
117
+
118
+ - **Seed 06 (Cost Guard):** Budget for the full iceberg, not just API bills
119
+ - **Seed 07 (Safety Switch):** Context drift triggers fallback mode
120
+ - **Seed 09 (Mode-Based Complexity Gating):** Match context loading to complexity