@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.
- package/CHANGELOG.md +30 -0
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/dist/hooks/after-tool-call/handler.d.ts +4 -0
- package/dist/hooks/after-tool-call/handler.d.ts.map +1 -0
- package/dist/hooks/after-tool-call/handler.js +37 -0
- package/dist/hooks/after-tool-call/handler.js.map +1 -0
- package/dist/hooks/agent-end/handler.d.ts +4 -0
- package/dist/hooks/agent-end/handler.d.ts.map +1 -0
- package/dist/hooks/agent-end/handler.js +16 -0
- package/dist/hooks/agent-end/handler.js.map +1 -0
- package/dist/hooks/before-agent-start/handler.d.ts +4 -0
- package/dist/hooks/before-agent-start/handler.d.ts.map +1 -0
- package/dist/hooks/before-agent-start/handler.js +81 -0
- package/dist/hooks/before-agent-start/handler.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/src/commands/archive.d.ts +4 -0
- package/dist/src/commands/archive.d.ts.map +1 -0
- package/dist/src/commands/archive.js +20 -0
- package/dist/src/commands/archive.js.map +1 -0
- package/dist/src/commands/init.d.ts +4 -0
- package/dist/src/commands/init.d.ts.map +1 -0
- package/dist/src/commands/init.js +57 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/list.d.ts +4 -0
- package/dist/src/commands/list.d.ts.map +1 -0
- package/dist/src/commands/list.js +9 -0
- package/dist/src/commands/list.js.map +1 -0
- package/dist/src/commands/router.d.ts +3 -0
- package/dist/src/commands/router.d.ts.map +1 -0
- package/dist/src/commands/router.js +83 -0
- package/dist/src/commands/router.js.map +1 -0
- package/dist/src/commands/skill-invoke.d.ts +4 -0
- package/dist/src/commands/skill-invoke.d.ts.map +1 -0
- package/dist/src/commands/skill-invoke.js +26 -0
- package/dist/src/commands/skill-invoke.js.map +1 -0
- package/dist/src/commands/status.d.ts +4 -0
- package/dist/src/commands/status.d.ts.map +1 -0
- package/dist/src/commands/status.js +42 -0
- package/dist/src/commands/status.js.map +1 -0
- package/dist/src/commands/switch.d.ts +4 -0
- package/dist/src/commands/switch.d.ts.map +1 -0
- package/dist/src/commands/switch.js +20 -0
- package/dist/src/commands/switch.js.map +1 -0
- package/dist/src/orchestration/tool-registry.d.ts +18 -0
- package/dist/src/orchestration/tool-registry.d.ts.map +1 -0
- package/dist/src/orchestration/tool-registry.js +153 -0
- package/dist/src/orchestration/tool-registry.js.map +1 -0
- package/dist/src/skills/catalog.d.ts +9 -0
- package/dist/src/skills/catalog.d.ts.map +1 -0
- package/dist/src/skills/catalog.js +251 -0
- package/dist/src/skills/catalog.js.map +1 -0
- package/dist/src/state/manager.d.ts +19 -0
- package/dist/src/state/manager.d.ts.map +1 -0
- package/dist/src/state/manager.js +114 -0
- package/dist/src/state/manager.js.map +1 -0
- package/dist/src/state/migrations.d.ts +3 -0
- package/dist/src/state/migrations.d.ts.map +1 -0
- package/dist/src/state/migrations.js +8 -0
- package/dist/src/state/migrations.js.map +1 -0
- package/dist/src/state/types.d.ts +62 -0
- package/dist/src/state/types.d.ts.map +1 -0
- package/dist/src/state/types.js +2 -0
- package/dist/src/state/types.js.map +1 -0
- package/dist/src/ui/chat-formatter.d.ts +11 -0
- package/dist/src/ui/chat-formatter.d.ts.map +1 -0
- package/dist/src/ui/chat-formatter.js +39 -0
- package/dist/src/ui/chat-formatter.js.map +1 -0
- package/dist/src/utils/file-ops.d.ts +6 -0
- package/dist/src/utils/file-ops.d.ts.map +1 -0
- package/dist/src/utils/file-ops.js +38 -0
- package/dist/src/utils/file-ops.js.map +1 -0
- package/dist/src/utils/markdown.d.ts +2 -0
- package/dist/src/utils/markdown.d.ts.map +1 -0
- package/dist/src/utils/markdown.js +11 -0
- package/dist/src/utils/markdown.js.map +1 -0
- package/dist/src/utils/validation.d.ts +7 -0
- package/dist/src/utils/validation.d.ts.map +1 -0
- package/dist/src/utils/validation.js +29 -0
- package/dist/src/utils/validation.js.map +1 -0
- package/dist/tests/__mocks__/openclaw-types.d.ts +54 -0
- package/dist/tests/__mocks__/openclaw-types.d.ts.map +1 -0
- package/dist/tests/__mocks__/openclaw-types.js +29 -0
- package/dist/tests/__mocks__/openclaw-types.js.map +1 -0
- package/hooks/after-tool-call/HOOK.md +7 -0
- package/hooks/after-tool-call/handler.ts +41 -0
- package/hooks/agent-end/HOOK.md +7 -0
- package/hooks/agent-end/handler.ts +18 -0
- package/hooks/before-agent-start/HOOK.md +7 -0
- package/hooks/before-agent-start/handler.ts +133 -0
- package/openclaw.plugin.json +19 -0
- package/package.json +61 -0
- package/skills/agent-teaching/SKILL.md +583 -0
- package/skills/agent-teaching/claw.json +12 -0
- package/skills/compression-ritual/SKILL.md +136 -0
- package/skills/compression-ritual/claw.json +12 -0
- package/skills/context-ingestion/SKILL.md +109 -0
- package/skills/context-ingestion/claw.json +12 -0
- package/skills/decision-propagation/SKILL.md +130 -0
- package/skills/decision-propagation/claw.json +12 -0
- package/skills/documentation-audit/SKILL.md +146 -0
- package/skills/documentation-audit/claw.json +12 -0
- package/skills/era-architecture/SKILL.md +166 -0
- package/skills/era-architecture/claw.json +12 -0
- package/skills/file-management/SKILL.md +127 -0
- package/skills/file-management/claw.json +12 -0
- package/skills/frontend-from-backend/SKILL.md +127 -0
- package/skills/frontend-from-backend/claw.json +12 -0
- package/skills/handoff-protocol/SKILL.md +168 -0
- package/skills/handoff-protocol/claw.json +12 -0
- package/skills/health-audit/SKILL.md +123 -0
- package/skills/health-audit/claw.json +12 -0
- package/skills/implementation-prompt/SKILL.md +361 -0
- package/skills/implementation-prompt/claw.json +12 -0
- package/skills/iterative-scouting/SKILL.md +106 -0
- package/skills/iterative-scouting/claw.json +12 -0
- package/skills/memory-garden/SKILL.md +470 -0
- package/skills/memory-garden/claw.json +12 -0
- package/skills/multi-surface-strategy/SKILL.md +288 -0
- package/skills/multi-surface-strategy/claw.json +12 -0
- package/skills/parallel-tracks/SKILL.md +152 -0
- package/skills/parallel-tracks/claw.json +12 -0
- package/skills/patient-learning-protocol/SKILL.md +438 -0
- package/skills/patient-learning-protocol/claw.json +12 -0
- package/skills/planning-with-files/SKILL.md +139 -0
- package/skills/planning-with-files/claw.json +12 -0
- package/skills/pre-implementation-checklist/SKILL.md +156 -0
- package/skills/pre-implementation-checklist/claw.json +12 -0
- package/skills/process-extraction/SKILL.md +148 -0
- package/skills/process-extraction/claw.json +12 -0
- package/skills/process-extraction/references/process_example_template.md +40 -0
- package/skills/product-positioning/SKILL.md +293 -0
- package/skills/product-positioning/claw.json +12 -0
- package/skills/project-exploration/SKILL.md +168 -0
- package/skills/project-exploration/claw.json +12 -0
- package/skills/release-specification/SKILL.md +645 -0
- package/skills/release-specification/claw.json +12 -0
- package/skills/repo-context-sync/SKILL.md +362 -0
- package/skills/repo-context-sync/claw.json +12 -0
- package/skills/repo-context-sync/references/file_hierarchy_patterns.md +186 -0
- package/skills/repo-context-sync/references/zenflow_repo_patterns.md +328 -0
- package/skills/repo-context-sync/scripts/context_mapper.py +251 -0
- package/skills/repo-context-sync/scripts/diff_tracker.py +187 -0
- package/skills/repo-context-sync/scripts/smart_clone.sh +52 -0
- package/skills/repo-context-sync/templates/context_summary.md +58 -0
- package/skills/repo-status/SKILL.md +240 -0
- package/skills/repo-status/claw.json +12 -0
- package/skills/repo-status/references/semantic-clusters.md +159 -0
- package/skills/repo-status/references/status-template.md +214 -0
- package/skills/research-modes/SKILL.md +515 -0
- package/skills/research-modes/claw.json +12 -0
- package/skills/research-synthesis/SKILL.md +110 -0
- package/skills/research-synthesis/claw.json +12 -0
- package/skills/retrospective/SKILL.md +152 -0
- package/skills/retrospective/claw.json +12 -0
- package/skills/seed-extraction/SKILL.md +419 -0
- package/skills/seed-extraction/claw.json +12 -0
- package/skills/seed-library/SKILL.md +424 -0
- package/skills/seed-library/claw.json +12 -0
- package/skills/seed-library/references/seed_catalog.md +171 -0
- package/skills/seed-library/scripts/apply_seed.py +129 -0
- package/skills/seed-library/scripts/suggest_seeds.py +183 -0
- package/skills/seed-library/seeds/01_three_tiered_governance.md +90 -0
- package/skills/seed-library/seeds/02_harness_trace.md +135 -0
- package/skills/seed-library/seeds/03_context_iceberg.md +120 -0
- package/skills/seed-library/seeds/04_agent_connect.md +106 -0
- package/skills/seed-library/seeds/05_go_live_bundles.md +40 -0
- package/skills/seed-library/seeds/06_cost_guard.md +40 -0
- package/skills/seed-library/seeds/07_safety_switch.md +41 -0
- package/skills/seed-library/seeds/08_implicit_perspective_extraction.md +41 -0
- package/skills/seed-library/seeds/09_mode_based_complexity_gating.md +46 -0
- package/skills/seed-library/seeds/10_shared_infrastructure.md +75 -0
- package/skills/seed-library/seeds/11_voice_before_structure.md +74 -0
- package/skills/seed-library/seeds/12_pointer_directories.md +81 -0
- package/skills/seed-library/seeds/13_granular_visibility.md +82 -0
- package/skills/seed-library/seeds/meta_governance_multiplies_velocity.md +43 -0
- package/skills/seed-to-skill-converter/SKILL.md +113 -0
- package/skills/seed-to-skill-converter/claw.json +12 -0
- package/skills/semantic-clusters/SKILL.md +246 -0
- package/skills/semantic-clusters/claw.json +12 -0
- package/skills/semantic-clusters/references/verb-catalog.md +267 -0
- package/skills/skill-audit-upgrade/SKILL.md +427 -0
- package/skills/skill-audit-upgrade/claw.json +12 -0
- package/skills/skill-creation/LICENSE.txt +202 -0
- package/skills/skill-creation/SKILL.md +252 -0
- package/skills/skill-creation/claw.json +12 -0
- package/skills/skill-creation/references/output-patterns.md +82 -0
- package/skills/skill-creation/references/progressive-disclosure-patterns.md +79 -0
- package/skills/skill-creation/references/workflows.md +28 -0
- package/skills/skill-creation/scripts/init_skill.py +305 -0
- package/skills/skill-creation/scripts/quick_validate.py +134 -0
- package/skills/skill-maintenance/SKILL.md +413 -0
- package/skills/skill-maintenance/claw.json +12 -0
- package/skills/spec-constellation-to-prompt-suite/SKILL.md +174 -0
- package/skills/spec-constellation-to-prompt-suite/claw.json +12 -0
- package/skills/status-template/SKILL.md +211 -0
- package/skills/status-template/claw.json +12 -0
- package/skills/status-template/references/complete-template.md +191 -0
- package/skills/status-writing/SKILL.md +161 -0
- package/skills/status-writing/claw.json +12 -0
- package/skills/strategic-scout/SKILL.md +163 -0
- package/skills/strategic-scout/claw.json +12 -0
- package/skills/strategic-to-tactical-workflow/SKILL.md +391 -0
- package/skills/strategic-to-tactical-workflow/claw.json +12 -0
- package/skills/workspace-navigation/SKILL.md +622 -0
- package/skills/workspace-navigation/claw.json +12 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repo-context-sync
|
|
3
|
+
description: Efficiently sync and extract context from GitHub repositories for grounding architectural, design, and orchestration work. Use when exploring codebases, starting refactoring or architecture conversations, tracking changes between sessions, or before writing implementation prompts. Trigger phrases: 'sync the repo', 'what changed in the codebase', 'clone this repository', 'extract context from', 'understand the repo structure'.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **OpenClaw Integration:** This skill is invoked by the Dojo Genesis plugin via `/dojo run repo-context-sync`.
|
|
7
|
+
> The agent receives project context automatically via the `before_agent_start` hook.
|
|
8
|
+
> Use `dojo_get_context` for full state, `dojo_save_artifact` to persist outputs,
|
|
9
|
+
> and `dojo_update_state` to record phase transitions and decisions.
|
|
10
|
+
|
|
11
|
+
# Repo Context Sync
|
|
12
|
+
|
|
13
|
+
Efficiently sync with relevant parts of GitHub repositories to ground reasoning in actual codebase state. This skill enables context-aware architectural decisions, refactoring, and implementation prompt writing by providing tools to clone, track changes, and extract patterns from repos.
|
|
14
|
+
|
|
15
|
+
## I. The Philosophy: Grounding in Reality
|
|
16
|
+
|
|
17
|
+
Architectural decisions made in a vacuum are fragile. Implementation prompts written without understanding existing patterns create friction. The Repo Context Sync skill embodies **grounding in reality**—the practice of syncing with the actual codebase state before making decisions or writing specifications.
|
|
18
|
+
|
|
19
|
+
This is not about reading every file, but about **surgical context extraction**: identifying what matters for the task at hand, syncing only those parts, and integrating that context into reasoning. It transforms vague architectural discussions into grounded, actionable decisions.
|
|
20
|
+
|
|
21
|
+
## II. When to Use This Skill
|
|
22
|
+
|
|
23
|
+
Trigger this skill when:
|
|
24
|
+
- User mentions "repo", "repository", "codebase", "sync", "what changed"
|
|
25
|
+
- Starting a conversation about refactoring, architecture, or design
|
|
26
|
+
- Writing implementation prompts that need to follow existing patterns
|
|
27
|
+
- User asks about specific repo directories (e.g., `/00_Roadmap/`, `/02_Specs/`)
|
|
28
|
+
- Need to understand current state of dojo-genesis or 11-11 repos
|
|
29
|
+
|
|
30
|
+
## III. Core Workflow
|
|
31
|
+
|
|
32
|
+
### 1. Identify Context Need
|
|
33
|
+
|
|
34
|
+
Parse the user's request to determine:
|
|
35
|
+
- Which repo(s) are relevant (dojo-genesis, 11-11, etc.)
|
|
36
|
+
- Which directories matter for the task
|
|
37
|
+
- What keywords indicate focus areas
|
|
38
|
+
|
|
39
|
+
**Common patterns:**
|
|
40
|
+
- "refactor the agent routing" → Need `/02_Specs/`, `/04_System/`
|
|
41
|
+
- "write implementation prompt for X" → Need existing code patterns
|
|
42
|
+
- "what changed in the backend" → Need diff since last sync
|
|
43
|
+
|
|
44
|
+
### 2. Sync Repo State
|
|
45
|
+
|
|
46
|
+
Use the appropriate script based on repo state:
|
|
47
|
+
|
|
48
|
+
#### If repo not yet cloned:
|
|
49
|
+
```bash
|
|
50
|
+
bash /home/ubuntu/skills/repo-context-sync/scripts/smart_clone.sh \
|
|
51
|
+
<repo_url> \
|
|
52
|
+
<local_path> \
|
|
53
|
+
[dir1] [dir2] ...
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Example:**
|
|
57
|
+
```bash
|
|
58
|
+
bash /home/ubuntu/skills/repo-context-sync/scripts/smart_clone.sh \
|
|
59
|
+
https://github.com/TresPies-source/dojo-genesis \
|
|
60
|
+
/home/ubuntu/repos/dojo-genesis \
|
|
61
|
+
/00_Roadmap/ /02_Specs/ /04_System/
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This uses sparse checkout to only pull specified directories, saving time and space.
|
|
65
|
+
|
|
66
|
+
#### If repo already cloned:
|
|
67
|
+
The script automatically detects existing repos and runs `git fetch && git pull` instead.
|
|
68
|
+
|
|
69
|
+
### 3. Track Changes
|
|
70
|
+
|
|
71
|
+
Generate a diff summary to see what changed since last sync:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
python3.11 /home/ubuntu/skills/repo-context-sync/scripts/diff_tracker.py \
|
|
75
|
+
<repo_path> \
|
|
76
|
+
[last_commit_hash]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Example:**
|
|
80
|
+
```bash
|
|
81
|
+
python3.11 /home/ubuntu/skills/repo-context-sync/scripts/diff_tracker.py \
|
|
82
|
+
/home/ubuntu/repos/dojo-genesis \
|
|
83
|
+
abc123
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This generates a markdown summary showing:
|
|
87
|
+
- Added, modified, deleted files
|
|
88
|
+
- Commit messages
|
|
89
|
+
- Summary statistics
|
|
90
|
+
|
|
91
|
+
The summary is both printed and saved to `.diff_summary.md` in the repo.
|
|
92
|
+
|
|
93
|
+
### 4. Generate Context Map
|
|
94
|
+
|
|
95
|
+
Create a comprehensive overview of the codebase:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
python3.11 /home/ubuntu/skills/repo-context-sync/scripts/context_mapper.py \
|
|
99
|
+
<repo_path> \
|
|
100
|
+
[focus_keywords...]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Example:**
|
|
104
|
+
```bash
|
|
105
|
+
python3.11 /home/ubuntu/skills/repo-context-sync/scripts/context_mapper.py \
|
|
106
|
+
/home/ubuntu/repos/dojo-genesis \
|
|
107
|
+
agent routing supervisor
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This generates:
|
|
111
|
+
- File tree structure
|
|
112
|
+
- Detected languages and frameworks
|
|
113
|
+
- Files matching focus keywords
|
|
114
|
+
- Summaries of relevant files
|
|
115
|
+
- Pattern extraction
|
|
116
|
+
|
|
117
|
+
The summary is saved to `.context_summary.md` in the repo.
|
|
118
|
+
|
|
119
|
+
### 5. Integrate Context
|
|
120
|
+
|
|
121
|
+
Read the generated summaries and integrate into reasoning:
|
|
122
|
+
|
|
123
|
+
1. **Read the context summary** to understand repo structure
|
|
124
|
+
2. **Read relevant files** identified by the mapper
|
|
125
|
+
3. **Check reference docs** for patterns:
|
|
126
|
+
- `/home/ubuntu/skills/repo-context-sync/references/file_hierarchy_patterns.md`
|
|
127
|
+
- `/home/ubuntu/skills/repo-context-sync/references/zenflow_repo_patterns.md`
|
|
128
|
+
4. **Ground architectural decisions** in actual code state
|
|
129
|
+
|
|
130
|
+
## IV. Script Reference
|
|
131
|
+
|
|
132
|
+
### smart_clone.sh
|
|
133
|
+
|
|
134
|
+
**Purpose:** Efficient sparse checkout of relevant directories
|
|
135
|
+
|
|
136
|
+
**Usage:**
|
|
137
|
+
```bash
|
|
138
|
+
bash smart_clone.sh <repo_url> <local_path> [dir1] [dir2] ...
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Behavior:**
|
|
142
|
+
- If repo doesn't exist: Clone with sparse checkout
|
|
143
|
+
- If repo exists: Fetch and pull latest changes
|
|
144
|
+
- Only downloads specified directories (if provided)
|
|
145
|
+
|
|
146
|
+
**Storage location:** `/home/ubuntu/repos/{repo_name}/`
|
|
147
|
+
|
|
148
|
+
### diff_tracker.py
|
|
149
|
+
|
|
150
|
+
**Purpose:** Track and summarize changes since last sync
|
|
151
|
+
|
|
152
|
+
**Usage:**
|
|
153
|
+
```bash
|
|
154
|
+
python3.11 diff_tracker.py <repo_path> [last_commit_hash]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Output:**
|
|
158
|
+
- Markdown summary of changes
|
|
159
|
+
- List of modified/added/deleted files
|
|
160
|
+
- Commit messages
|
|
161
|
+
- Saved to `<repo_path>/.diff_summary.md`
|
|
162
|
+
|
|
163
|
+
**Default behavior:** If no commit hash provided, compares last 10 commits
|
|
164
|
+
|
|
165
|
+
### context_mapper.py
|
|
166
|
+
|
|
167
|
+
**Purpose:** Generate codebase overview for task context
|
|
168
|
+
|
|
169
|
+
**Usage:**
|
|
170
|
+
```bash
|
|
171
|
+
python3.11 context_mapper.py <repo_path> [focus_keywords...]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Output:**
|
|
175
|
+
- File tree structure (max depth 3)
|
|
176
|
+
- Detected languages and frameworks
|
|
177
|
+
- Files matching keywords (via git grep)
|
|
178
|
+
- Summaries of top 5 relevant files
|
|
179
|
+
- Saved to `<repo_path>/.context_summary.md`
|
|
180
|
+
|
|
181
|
+
**Pattern detection:**
|
|
182
|
+
- Languages by file extensions
|
|
183
|
+
- Frameworks by config files (package.json, requirements.txt, etc.)
|
|
184
|
+
- File hierarchy patterns (numbered directories like `/00_Roadmap/`)
|
|
185
|
+
|
|
186
|
+
## V. Reference Documents
|
|
187
|
+
|
|
188
|
+
### file_hierarchy_patterns.md
|
|
189
|
+
|
|
190
|
+
Describes the standard "Planning with Files" hierarchy used in 11-11 and Dojo Genesis:
|
|
191
|
+
|
|
192
|
+
- `/00_Roadmap/` - High-level goals and task_plan.md
|
|
193
|
+
- `/01_PRDs/` - Product Requirement Documents
|
|
194
|
+
- `/02_Specs/` - Technical specifications
|
|
195
|
+
- `/03_Prompts/` - Local prompt library
|
|
196
|
+
- `/04_System/` - AI Personas and system prompts
|
|
197
|
+
- `/05_Logs/` - Dev traces, JOURNAL.md, AUDIT_LOG.md
|
|
198
|
+
|
|
199
|
+
Read this when:
|
|
200
|
+
- Understanding repo structure
|
|
201
|
+
- Determining which directories to sync
|
|
202
|
+
- Writing files that follow conventions
|
|
203
|
+
|
|
204
|
+
### implementation_agent_patterns.md
|
|
205
|
+
|
|
206
|
+
Describes how to work with implementation agents' workflows:
|
|
207
|
+
|
|
208
|
+
- Task artifact structure (e.g., `.zenflow/tasks/{task_id}/` for Zenflow)
|
|
209
|
+
- Built-in workflow types (Quick Change, Fix Bug, Spec and Build, Full SDD)
|
|
210
|
+
- Best practices for reading existing codebases
|
|
211
|
+
- Integration with standard file hierarchy
|
|
212
|
+
|
|
213
|
+
Read this when:
|
|
214
|
+
- Writing implementation prompts
|
|
215
|
+
- Understanding task artifacts
|
|
216
|
+
- Following existing codebase patterns
|
|
217
|
+
|
|
218
|
+
## VI. Common Use Cases
|
|
219
|
+
|
|
220
|
+
### Use Case 1: Starting a Refactoring Conversation
|
|
221
|
+
|
|
222
|
+
**User says:** "Let's refactor the agent routing logic"
|
|
223
|
+
|
|
224
|
+
**Workflow:**
|
|
225
|
+
1. Identify relevant repo: dojo-genesis
|
|
226
|
+
2. Identify relevant dirs: `/02_Specs/`, `/04_System/`
|
|
227
|
+
3. Run smart_clone.sh with those dirs
|
|
228
|
+
4. Run context_mapper.py with keywords: "agent", "routing", "supervisor"
|
|
229
|
+
5. Read generated context summary
|
|
230
|
+
6. Read relevant spec files
|
|
231
|
+
7. Ground refactoring suggestions in actual code
|
|
232
|
+
|
|
233
|
+
### Use Case 2: Writing an Implementation Prompt
|
|
234
|
+
|
|
235
|
+
**User says:** "Write an implementation prompt to implement the Trail of Thought visualization"
|
|
236
|
+
|
|
237
|
+
**Workflow:**
|
|
238
|
+
1. Identify relevant repo: dojo-genesis
|
|
239
|
+
2. Run smart_clone.sh to get latest code
|
|
240
|
+
3. Run context_mapper.py with keywords: "visualization", "trace", "component"
|
|
241
|
+
4. Read implementation_agent_patterns.md for best practices
|
|
242
|
+
5. Extract existing patterns (naming, imports, structure)
|
|
243
|
+
6. Write prompt that says "Follow existing patterns in /src/components/"
|
|
244
|
+
7. Reference specific files and conventions
|
|
245
|
+
|
|
246
|
+
### Use Case 3: Tracking Evolution
|
|
247
|
+
|
|
248
|
+
**User says:** "What changed in the backend since last session?"
|
|
249
|
+
|
|
250
|
+
**Workflow:**
|
|
251
|
+
1. Identify relevant repo: dojo-genesis
|
|
252
|
+
2. Load last sync commit hash from state (if available)
|
|
253
|
+
3. Run diff_tracker.py with that commit
|
|
254
|
+
4. Read generated diff summary
|
|
255
|
+
5. Highlight architectural implications
|
|
256
|
+
6. Summarize for user
|
|
257
|
+
|
|
258
|
+
## VII. State Management
|
|
259
|
+
|
|
260
|
+
Track sync state in `/home/ubuntu/.repo-sync-state.json`:
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"repos": {
|
|
265
|
+
"TresPies-source/dojo-genesis": {
|
|
266
|
+
"last_sync": "2026-01-28T17:48:00Z",
|
|
267
|
+
"commit_hash": "abc123",
|
|
268
|
+
"local_path": "/home/ubuntu/repos/dojo-genesis",
|
|
269
|
+
"tracked_dirs": ["/00_Roadmap/", "/02_Specs/"]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Update this file after each sync to enable diff tracking.
|
|
276
|
+
|
|
277
|
+
## VIII. Integration with Implementation Agents
|
|
278
|
+
|
|
279
|
+
When working with implementation agents (Zenflow, Claude Code, etc.):
|
|
280
|
+
|
|
281
|
+
1. **Read existing codebase first** - Use context_mapper.py before generating code
|
|
282
|
+
2. **Follow existing patterns** - Extract conventions from context summary
|
|
283
|
+
3. **Reference standard hierarchy** - Use file_hierarchy_patterns.md as guide
|
|
284
|
+
4. **Integrate cleanly** - Minimize refactoring, extend existing components
|
|
285
|
+
|
|
286
|
+
Implementation agents typically have full repo access, so prompts should leverage that:
|
|
287
|
+
- "Read /src/components/ to understand component patterns"
|
|
288
|
+
- "Follow the same naming conventions as existing files"
|
|
289
|
+
- "Integrate with existing state management in /src/store/"
|
|
290
|
+
|
|
291
|
+
## IX. Best Practices
|
|
292
|
+
|
|
293
|
+
### Efficiency
|
|
294
|
+
- Only sync directories relevant to the task
|
|
295
|
+
- Use sparse checkout for large repos
|
|
296
|
+
- Cache context summaries (invalidate on sync)
|
|
297
|
+
|
|
298
|
+
### Accuracy
|
|
299
|
+
- Always fetch latest changes before generating context
|
|
300
|
+
- Verify commit hashes in diff tracking
|
|
301
|
+
- Cross-reference multiple files for patterns
|
|
302
|
+
|
|
303
|
+
### Transparency
|
|
304
|
+
- Show user what's being synced and why
|
|
305
|
+
- Surface generated summaries for review
|
|
306
|
+
- Log sync operations to session
|
|
307
|
+
|
|
308
|
+
### Integration
|
|
309
|
+
- Read reference docs to understand patterns
|
|
310
|
+
- Follow existing conventions in repos
|
|
311
|
+
- Update state file after each sync
|
|
312
|
+
|
|
313
|
+
## X. Limitations
|
|
314
|
+
|
|
315
|
+
### What This Skill Does
|
|
316
|
+
- Efficiently clone/sync relevant repo parts
|
|
317
|
+
- Track changes and generate diffs
|
|
318
|
+
- Extract patterns and conventions
|
|
319
|
+
- Provide grounded context for reasoning
|
|
320
|
+
|
|
321
|
+
### What This Skill Doesn't Do
|
|
322
|
+
- Automatically modify code
|
|
323
|
+
- Make architectural decisions
|
|
324
|
+
- Execute implementation tasks
|
|
325
|
+
- Replace manual code review
|
|
326
|
+
- Store full repo history (only relevant parts)
|
|
327
|
+
|
|
328
|
+
## XI. Troubleshooting
|
|
329
|
+
|
|
330
|
+
### Issue: Sparse checkout not working
|
|
331
|
+
**Solution:** Ensure Git version is 2.25+ (sparse-checkout v2 feature)
|
|
332
|
+
|
|
333
|
+
### Issue: Context mapper finds too many files
|
|
334
|
+
**Solution:** Use more specific keywords or limit to specific directories
|
|
335
|
+
|
|
336
|
+
### Issue: Diff tracker shows no changes
|
|
337
|
+
**Solution:** Verify last_commit_hash is correct and repo has been fetched
|
|
338
|
+
|
|
339
|
+
### Issue: Scripts fail with permission errors
|
|
340
|
+
**Solution:** Ensure scripts are executable (`chmod +x`)
|
|
341
|
+
|
|
342
|
+
## XII. Quick Reference
|
|
343
|
+
|
|
344
|
+
| Task | Command |
|
|
345
|
+
|------|---------|
|
|
346
|
+
| Clone repo (sparse) | `bash smart_clone.sh <url> <path> [dirs]` |
|
|
347
|
+
| Update existing repo | `bash smart_clone.sh <url> <path>` (auto-detects) |
|
|
348
|
+
| Track changes | `python3.11 diff_tracker.py <path> [commit]` |
|
|
349
|
+
| Generate context | `python3.11 context_mapper.py <path> [keywords]` |
|
|
350
|
+
| Read hierarchy patterns | `file read references/file_hierarchy_patterns.md` |
|
|
351
|
+
| Read implementation patterns | `file read references/implementation_agent_patterns.md` |
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## OpenClaw Tool Integration
|
|
355
|
+
|
|
356
|
+
When running inside the Dojo Genesis plugin:
|
|
357
|
+
|
|
358
|
+
1. **Start** by calling `dojo_get_context` to retrieve full project state, history, and artifacts
|
|
359
|
+
2. **During** the skill, follow the workflow steps documented above
|
|
360
|
+
3. **Save** outputs using `dojo_save_artifact` with the `artifacts` output directory
|
|
361
|
+
4. **Update** project state by calling `dojo_update_state` to record skill completion and any phase transitions
|
|
362
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dojo-genesis-plugin-repo-context-sync",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Sync and extract context from repositories",
|
|
5
|
+
"author": "dojo-genesis",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"permissions": [],
|
|
8
|
+
"entry": "SKILL.md",
|
|
9
|
+
"tags": ["dojo-genesis", "orchestration", "research", "analysis"],
|
|
10
|
+
"models": ["claude-*", "gpt-*", "gemini-*"],
|
|
11
|
+
"minOpenClawVersion": "2026.1.0"
|
|
12
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# File Hierarchy Patterns in 11-11 and Dojo Genesis Repos
|
|
2
|
+
|
|
3
|
+
This document describes the common file organization patterns found in the 11-11 and Dojo Genesis repositories, based on the "Planning with Files" philosophy.
|
|
4
|
+
|
|
5
|
+
## Core Philosophy: Planning with Files
|
|
6
|
+
|
|
7
|
+
The filesystem is the absolute source of truth. All plans, specifications, prompts, logs, and artifacts are stored as human-readable files in a well-defined hierarchy. This ensures the system remains inspectable, debuggable, and version-controllable.
|
|
8
|
+
|
|
9
|
+
## Standard Directory Structure
|
|
10
|
+
|
|
11
|
+
### `/00_Roadmap/`
|
|
12
|
+
**Purpose:** High-level goals and strategic planning
|
|
13
|
+
|
|
14
|
+
**Common Files:**
|
|
15
|
+
- `task_plan.md` - Current task breakdown and priorities
|
|
16
|
+
- `vision.md` - Long-term vision and goals
|
|
17
|
+
- `milestones.md` - Key milestones and deadlines
|
|
18
|
+
|
|
19
|
+
**When to Read:** When understanding project direction, priorities, or long-term strategy
|
|
20
|
+
|
|
21
|
+
### `/01_PRDs/`
|
|
22
|
+
**Purpose:** Product Requirement Documents
|
|
23
|
+
|
|
24
|
+
**Common Files:**
|
|
25
|
+
- `{feature_name}_prd.md` - Detailed product requirements for specific features
|
|
26
|
+
- `core_features.md` - Overview of core product features
|
|
27
|
+
|
|
28
|
+
**Naming Convention:** Lowercase with underscores, descriptive names
|
|
29
|
+
**When to Read:** When implementing new features or understanding product scope
|
|
30
|
+
|
|
31
|
+
### `/02_Specs/`
|
|
32
|
+
**Purpose:** Technical specifications and architecture
|
|
33
|
+
|
|
34
|
+
**Common Files:**
|
|
35
|
+
- `architecture.md` - System architecture overview
|
|
36
|
+
- `api_spec.md` - API design and endpoints
|
|
37
|
+
- `database_schema.md` - Database structure
|
|
38
|
+
- `{component}_spec.md` - Component-specific technical specs
|
|
39
|
+
|
|
40
|
+
**When to Read:** When implementing technical features, refactoring, or understanding system design
|
|
41
|
+
|
|
42
|
+
### `/03_Prompts/`
|
|
43
|
+
**Purpose:** Local prompt library (reusable AI prompts)
|
|
44
|
+
|
|
45
|
+
**Common Files:**
|
|
46
|
+
- Individual prompt files with `.md` extension
|
|
47
|
+
- `index.md` - Catalog of available prompts
|
|
48
|
+
|
|
49
|
+
**Metadata Pattern:**
|
|
50
|
+
```markdown
|
|
51
|
+
---
|
|
52
|
+
public: true/false
|
|
53
|
+
version: 1.0
|
|
54
|
+
tags: [tag1, tag2]
|
|
55
|
+
---
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**When to Read:** When crafting new prompts or looking for reusable patterns
|
|
59
|
+
|
|
60
|
+
### `/04_System/`
|
|
61
|
+
**Purpose:** AI Personas and system prompts
|
|
62
|
+
|
|
63
|
+
**Common Files:**
|
|
64
|
+
- `dojo_agent.md` - Dojo agent persona and instructions
|
|
65
|
+
- `supervisor_agent.md` - Supervisor routing logic
|
|
66
|
+
- `librarian_agent.md` - Librarian search and retrieval
|
|
67
|
+
- `builder_agent.md` - Code generation agent
|
|
68
|
+
|
|
69
|
+
**When to Read:** When understanding agent behavior, routing logic, or system-level instructions
|
|
70
|
+
|
|
71
|
+
### `/05_Logs/`
|
|
72
|
+
**Purpose:** Development traces, journals, and audit logs
|
|
73
|
+
|
|
74
|
+
**Common Files:**
|
|
75
|
+
- `JOURNAL.md` - Development journal and notes
|
|
76
|
+
- `AUDIT_LOG.md` - Audit trail of key decisions
|
|
77
|
+
- `trace_{timestamp}.json` - Harness trace logs
|
|
78
|
+
- `session_{id}.md` - Session summaries
|
|
79
|
+
|
|
80
|
+
**When to Read:** When debugging, understanding historical decisions, or tracking changes
|
|
81
|
+
|
|
82
|
+
## File Naming Conventions
|
|
83
|
+
|
|
84
|
+
### General Rules
|
|
85
|
+
- **Lowercase with underscores:** `task_plan.md`, not `TaskPlan.md` or `task-plan.md`
|
|
86
|
+
- **Descriptive names:** `agent_routing_spec.md`, not `spec1.md`
|
|
87
|
+
- **Consistent extensions:** `.md` for documentation, `.json` for structured data
|
|
88
|
+
|
|
89
|
+
### Versioning Pattern
|
|
90
|
+
- Append version to filename when maintaining multiple versions: `api_spec_v1.md`, `api_spec_v2.md`
|
|
91
|
+
- Use `_draft` suffix for work-in-progress: `architecture_draft.md`
|
|
92
|
+
|
|
93
|
+
### Timestamps
|
|
94
|
+
- Use ISO 8601 format: `trace_2026-01-28T17-48-00.json`
|
|
95
|
+
- For logs and traces, timestamp in filename helps with chronological sorting
|
|
96
|
+
|
|
97
|
+
## Metadata Patterns
|
|
98
|
+
|
|
99
|
+
### Frontmatter (YAML)
|
|
100
|
+
Many markdown files include YAML frontmatter for metadata:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
---
|
|
104
|
+
title: "Feature Name"
|
|
105
|
+
author: "Manus AI"
|
|
106
|
+
date: "2026-01-28"
|
|
107
|
+
status: "draft" | "final" | "archived"
|
|
108
|
+
version: "1.0"
|
|
109
|
+
public: true | false
|
|
110
|
+
tags: ["tag1", "tag2"]
|
|
111
|
+
---
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Public Flag
|
|
115
|
+
- `public: true` - Can be shared in Commons (Wikipedia of Prompts)
|
|
116
|
+
- `public: false` - Private to project
|
|
117
|
+
|
|
118
|
+
## Integration with Hybrid Storage
|
|
119
|
+
|
|
120
|
+
### Google Drive
|
|
121
|
+
- Used for personal, "calm" work
|
|
122
|
+
- Roadmaps, PRDs, documentation
|
|
123
|
+
- Synced via Google Drive API
|
|
124
|
+
|
|
125
|
+
### GitHub
|
|
126
|
+
- Used for collaborative, version-controlled development
|
|
127
|
+
- Code, prompts, specs
|
|
128
|
+
- Synced via Octokit (GitHub API)
|
|
129
|
+
|
|
130
|
+
## Common Patterns When Reading Repos
|
|
131
|
+
|
|
132
|
+
### 1. Start with Roadmap
|
|
133
|
+
Always check `/00_Roadmap/task_plan.md` first to understand current priorities
|
|
134
|
+
|
|
135
|
+
### 2. Check Specs for Technical Context
|
|
136
|
+
Read relevant files in `/02_Specs/` to understand architecture before making changes
|
|
137
|
+
|
|
138
|
+
### 3. Review System Prompts for Agent Behavior
|
|
139
|
+
Check `/04_System/` to understand how agents should behave
|
|
140
|
+
|
|
141
|
+
### 4. Look for Existing Patterns in Prompts
|
|
142
|
+
Browse `/03_Prompts/` to find reusable patterns before creating new ones
|
|
143
|
+
|
|
144
|
+
### 5. Consult Logs for Historical Context
|
|
145
|
+
Check `/05_Logs/JOURNAL.md` to understand recent decisions and changes
|
|
146
|
+
|
|
147
|
+
## Zenflow Integration
|
|
148
|
+
|
|
149
|
+
When working with Zenflow, these directories map to workflow artifacts:
|
|
150
|
+
|
|
151
|
+
- **Zenflow `plan.md`** → Similar to `/00_Roadmap/task_plan.md`
|
|
152
|
+
- **Zenflow `spec.md`** → Similar to `/02_Specs/{feature}_spec.md`
|
|
153
|
+
- **Zenflow `implementation.md`** → Detailed implementation notes
|
|
154
|
+
|
|
155
|
+
Zenflow tasks run in isolated worktrees under `.zenflow/tasks/{task_id}/`, but should follow the same file hierarchy patterns for consistency.
|
|
156
|
+
|
|
157
|
+
## Best Practices
|
|
158
|
+
|
|
159
|
+
### When Syncing Repos
|
|
160
|
+
1. **Identify relevant directories first** - Don't clone everything
|
|
161
|
+
2. **Check for numbered directories** (`00_`, `01_`, etc.) - These follow the standard pattern
|
|
162
|
+
3. **Look for `index.md` or `README.md`** - Often provide navigation guides
|
|
163
|
+
4. **Read frontmatter** - Metadata tells you status, version, and visibility
|
|
164
|
+
|
|
165
|
+
### When Writing New Files
|
|
166
|
+
1. **Follow the hierarchy** - Put files in the appropriate numbered directory
|
|
167
|
+
2. **Use consistent naming** - Lowercase with underscores
|
|
168
|
+
3. **Add frontmatter** - Include status, version, and public flag
|
|
169
|
+
4. **Update indexes** - If there's an `index.md`, add your new file to it
|
|
170
|
+
|
|
171
|
+
### When Refactoring
|
|
172
|
+
1. **Preserve the hierarchy** - Don't break the numbered directory structure
|
|
173
|
+
2. **Update related files** - If you change a spec, update the corresponding PRD
|
|
174
|
+
3. **Archive, don't delete** - Move old versions to `/05_Logs/archived/` instead of deleting
|
|
175
|
+
|
|
176
|
+
## Quick Reference: What to Read When
|
|
177
|
+
|
|
178
|
+
| Task | Directories to Check |
|
|
179
|
+
|------|---------------------|
|
|
180
|
+
| Understanding project goals | `/00_Roadmap/` |
|
|
181
|
+
| Implementing new feature | `/01_PRDs/`, `/02_Specs/` |
|
|
182
|
+
| Refactoring architecture | `/02_Specs/`, `/05_Logs/` |
|
|
183
|
+
| Writing Zenflow prompt | `/02_Specs/`, `/03_Prompts/` |
|
|
184
|
+
| Understanding agent behavior | `/04_System/` |
|
|
185
|
+
| Debugging issues | `/05_Logs/`, `/02_Specs/` |
|
|
186
|
+
| Finding reusable patterns | `/03_Prompts/` |
|