@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,187 @@
|
|
|
1
|
+
#!/usr/bin/env python3.11
|
|
2
|
+
"""
|
|
3
|
+
diff_tracker.py - Track and summarize changes since last sync
|
|
4
|
+
Usage: python3.11 diff_tracker.py <repo_path> [last_commit_hash]
|
|
5
|
+
Example: python3.11 diff_tracker.py /home/ubuntu/repos/dojo-genesis abc123
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import sys
|
|
9
|
+
import subprocess
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from datetime import datetime
|
|
12
|
+
|
|
13
|
+
def run_git_command(repo_path, command):
|
|
14
|
+
"""Run a git command in the repo directory"""
|
|
15
|
+
try:
|
|
16
|
+
result = subprocess.run(
|
|
17
|
+
command,
|
|
18
|
+
cwd=repo_path,
|
|
19
|
+
capture_output=True,
|
|
20
|
+
text=True,
|
|
21
|
+
check=True
|
|
22
|
+
)
|
|
23
|
+
return result.stdout.strip()
|
|
24
|
+
except subprocess.CalledProcessError as e:
|
|
25
|
+
print(f"❌ Git command failed: {e.stderr}", file=sys.stderr)
|
|
26
|
+
sys.exit(1)
|
|
27
|
+
|
|
28
|
+
def get_current_commit(repo_path):
|
|
29
|
+
"""Get the current commit hash"""
|
|
30
|
+
return run_git_command(repo_path, ["git", "rev-parse", "HEAD"])
|
|
31
|
+
|
|
32
|
+
def get_commit_info(repo_path, commit_hash):
|
|
33
|
+
"""Get commit information"""
|
|
34
|
+
try:
|
|
35
|
+
info = run_git_command(repo_path, [
|
|
36
|
+
"git", "show", "--no-patch", "--format=%H%n%an%n%ae%n%at%n%s",
|
|
37
|
+
commit_hash
|
|
38
|
+
])
|
|
39
|
+
lines = info.split('\n')
|
|
40
|
+
return {
|
|
41
|
+
'hash': lines[0],
|
|
42
|
+
'author': lines[1],
|
|
43
|
+
'email': lines[2],
|
|
44
|
+
'timestamp': int(lines[3]),
|
|
45
|
+
'message': lines[4] if len(lines) > 4 else ''
|
|
46
|
+
}
|
|
47
|
+
except:
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
def get_diff_summary(repo_path, from_commit, to_commit):
|
|
51
|
+
"""Get summary of changes between commits"""
|
|
52
|
+
# Get list of changed files
|
|
53
|
+
files_output = run_git_command(repo_path, [
|
|
54
|
+
"git", "diff", "--name-status", f"{from_commit}..{to_commit}"
|
|
55
|
+
])
|
|
56
|
+
|
|
57
|
+
changes = {
|
|
58
|
+
'added': [],
|
|
59
|
+
'modified': [],
|
|
60
|
+
'deleted': [],
|
|
61
|
+
'renamed': []
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
for line in files_output.split('\n'):
|
|
65
|
+
if not line:
|
|
66
|
+
continue
|
|
67
|
+
parts = line.split('\t')
|
|
68
|
+
status = parts[0]
|
|
69
|
+
filename = parts[1] if len(parts) > 1 else ''
|
|
70
|
+
|
|
71
|
+
if status == 'A':
|
|
72
|
+
changes['added'].append(filename)
|
|
73
|
+
elif status == 'M':
|
|
74
|
+
changes['modified'].append(filename)
|
|
75
|
+
elif status == 'D':
|
|
76
|
+
changes['deleted'].append(filename)
|
|
77
|
+
elif status.startswith('R'):
|
|
78
|
+
changes['renamed'].append(filename)
|
|
79
|
+
|
|
80
|
+
return changes
|
|
81
|
+
|
|
82
|
+
def get_commit_log(repo_path, from_commit, to_commit):
|
|
83
|
+
"""Get commit log between two commits"""
|
|
84
|
+
log_output = run_git_command(repo_path, [
|
|
85
|
+
"git", "log", "--oneline", f"{from_commit}..{to_commit}"
|
|
86
|
+
])
|
|
87
|
+
return log_output.split('\n') if log_output else []
|
|
88
|
+
|
|
89
|
+
def generate_markdown_summary(repo_path, from_commit, to_commit, changes, commits):
|
|
90
|
+
"""Generate a markdown summary of changes"""
|
|
91
|
+
repo_name = Path(repo_path).name
|
|
92
|
+
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
93
|
+
|
|
94
|
+
from_info = get_commit_info(repo_path, from_commit)
|
|
95
|
+
to_info = get_commit_info(repo_path, to_commit)
|
|
96
|
+
|
|
97
|
+
md = f"""# Diff Summary: {repo_name}
|
|
98
|
+
|
|
99
|
+
**Generated:** {current_time}
|
|
100
|
+
**From Commit:** `{from_commit[:7]}` ({from_info['message'] if from_info else 'Unknown'})
|
|
101
|
+
**To Commit:** `{to_commit[:7]}` ({to_info['message'] if to_info else 'Unknown'})
|
|
102
|
+
|
|
103
|
+
## Summary
|
|
104
|
+
|
|
105
|
+
- **Added:** {len(changes['added'])} files
|
|
106
|
+
- **Modified:** {len(changes['modified'])} files
|
|
107
|
+
- **Deleted:** {len(changes['deleted'])} files
|
|
108
|
+
- **Renamed:** {len(changes['renamed'])} files
|
|
109
|
+
- **Total Commits:** {len(commits)}
|
|
110
|
+
|
|
111
|
+
## Commits
|
|
112
|
+
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
for commit in commits:
|
|
116
|
+
md += f"- `{commit}`\n"
|
|
117
|
+
|
|
118
|
+
if changes['added']:
|
|
119
|
+
md += "\n## Added Files\n\n"
|
|
120
|
+
for f in changes['added']:
|
|
121
|
+
md += f"- `{f}`\n"
|
|
122
|
+
|
|
123
|
+
if changes['modified']:
|
|
124
|
+
md += "\n## Modified Files\n\n"
|
|
125
|
+
for f in changes['modified']:
|
|
126
|
+
md += f"- `{f}`\n"
|
|
127
|
+
|
|
128
|
+
if changes['deleted']:
|
|
129
|
+
md += "\n## Deleted Files\n\n"
|
|
130
|
+
for f in changes['deleted']:
|
|
131
|
+
md += f"- `{f}`\n"
|
|
132
|
+
|
|
133
|
+
if changes['renamed']:
|
|
134
|
+
md += "\n## Renamed Files\n\n"
|
|
135
|
+
for f in changes['renamed']:
|
|
136
|
+
md += f"- `{f}`\n"
|
|
137
|
+
|
|
138
|
+
return md
|
|
139
|
+
|
|
140
|
+
def main():
|
|
141
|
+
if len(sys.argv) < 2:
|
|
142
|
+
print("Usage: python3.11 diff_tracker.py <repo_path> [last_commit_hash]")
|
|
143
|
+
print("Example: python3.11 diff_tracker.py /home/ubuntu/repos/dojo-genesis abc123")
|
|
144
|
+
sys.exit(1)
|
|
145
|
+
|
|
146
|
+
repo_path = sys.argv[1]
|
|
147
|
+
|
|
148
|
+
if not Path(repo_path).is_dir():
|
|
149
|
+
print(f"❌ Error: {repo_path} is not a directory", file=sys.stderr)
|
|
150
|
+
sys.exit(1)
|
|
151
|
+
|
|
152
|
+
if not (Path(repo_path) / ".git").is_dir():
|
|
153
|
+
print(f"❌ Error: {repo_path} is not a git repository", file=sys.stderr)
|
|
154
|
+
sys.exit(1)
|
|
155
|
+
|
|
156
|
+
# Get current commit
|
|
157
|
+
current_commit = get_current_commit(repo_path)
|
|
158
|
+
|
|
159
|
+
# Determine from_commit
|
|
160
|
+
if len(sys.argv) >= 3:
|
|
161
|
+
from_commit = sys.argv[2]
|
|
162
|
+
else:
|
|
163
|
+
# Default to 10 commits back
|
|
164
|
+
try:
|
|
165
|
+
from_commit = run_git_command(repo_path, ["git", "rev-parse", "HEAD~10"])
|
|
166
|
+
except:
|
|
167
|
+
# If repo has less than 10 commits, use first commit
|
|
168
|
+
from_commit = run_git_command(repo_path, ["git", "rev-list", "--max-parents=0", "HEAD"])
|
|
169
|
+
|
|
170
|
+
print(f"📊 Analyzing changes from {from_commit[:7]} to {current_commit[:7]}")
|
|
171
|
+
|
|
172
|
+
# Get diff summary
|
|
173
|
+
changes = get_diff_summary(repo_path, from_commit, current_commit)
|
|
174
|
+
commits = get_commit_log(repo_path, from_commit, current_commit)
|
|
175
|
+
|
|
176
|
+
# Generate markdown
|
|
177
|
+
markdown = generate_markdown_summary(repo_path, from_commit, current_commit, changes, commits)
|
|
178
|
+
|
|
179
|
+
print(markdown)
|
|
180
|
+
|
|
181
|
+
# Also save to file
|
|
182
|
+
output_file = Path(repo_path) / ".diff_summary.md"
|
|
183
|
+
output_file.write_text(markdown)
|
|
184
|
+
print(f"\n✅ Summary saved to: {output_file}")
|
|
185
|
+
|
|
186
|
+
if __name__ == "__main__":
|
|
187
|
+
main()
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# smart_clone.sh - Efficient sparse checkout of relevant directories from a GitHub repo
|
|
3
|
+
# Usage: smart_clone.sh <repo_url> <local_path> [dir1] [dir2] ...
|
|
4
|
+
# Example: smart_clone.sh https://github.com/user/repo /home/ubuntu/repos/repo /00_Roadmap/ /02_Specs/
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
if [ "$#" -lt 2 ]; then
|
|
9
|
+
echo "Usage: $0 <repo_url> <local_path> [dir1] [dir2] ..."
|
|
10
|
+
echo "Example: $0 https://github.com/user/repo /home/ubuntu/repos/repo /00_Roadmap/ /02_Specs/"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
REPO_URL="$1"
|
|
15
|
+
LOCAL_PATH="$2"
|
|
16
|
+
shift 2
|
|
17
|
+
DIRS=("$@")
|
|
18
|
+
|
|
19
|
+
echo "🔍 Smart Clone: $REPO_URL"
|
|
20
|
+
echo "📁 Target: $LOCAL_PATH"
|
|
21
|
+
|
|
22
|
+
# Check if directory already exists
|
|
23
|
+
if [ -d "$LOCAL_PATH/.git" ]; then
|
|
24
|
+
echo "✅ Repo already cloned. Fetching latest changes..."
|
|
25
|
+
cd "$LOCAL_PATH"
|
|
26
|
+
git fetch origin
|
|
27
|
+
git pull origin main || git pull origin master
|
|
28
|
+
echo "✅ Updated successfully"
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Create parent directory if needed
|
|
33
|
+
mkdir -p "$(dirname "$LOCAL_PATH")"
|
|
34
|
+
|
|
35
|
+
# Clone with sparse checkout
|
|
36
|
+
echo "📥 Cloning with sparse checkout..."
|
|
37
|
+
git clone --filter=blob:none --sparse "$REPO_URL" "$LOCAL_PATH"
|
|
38
|
+
cd "$LOCAL_PATH"
|
|
39
|
+
|
|
40
|
+
# If specific directories provided, configure sparse checkout
|
|
41
|
+
if [ ${#DIRS[@]} -gt 0 ]; then
|
|
42
|
+
echo "🎯 Configuring sparse checkout for:"
|
|
43
|
+
for dir in "${DIRS[@]}"; do
|
|
44
|
+
echo " - $dir"
|
|
45
|
+
git sparse-checkout add "$dir"
|
|
46
|
+
done
|
|
47
|
+
else
|
|
48
|
+
echo "📦 No specific directories provided, checking out full repo"
|
|
49
|
+
git sparse-checkout disable
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
echo "✅ Clone complete: $LOCAL_PATH"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Repo Context Summary: {repo_name}
|
|
2
|
+
|
|
3
|
+
**Generated:** {timestamp}
|
|
4
|
+
**Path:** `{repo_path}`
|
|
5
|
+
**Branch:** `{branch}`
|
|
6
|
+
**Commit:** `{commit_hash}` - {commit_message}
|
|
7
|
+
**Remote:** {remote_url}
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
{brief_description}
|
|
12
|
+
|
|
13
|
+
## File Structure
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
{tree_view}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Detected Patterns
|
|
20
|
+
|
|
21
|
+
**Languages:** {languages}
|
|
22
|
+
**Frameworks:** {frameworks}
|
|
23
|
+
**File Hierarchy Pattern:** {hierarchy_pattern}
|
|
24
|
+
|
|
25
|
+
## Recent Changes (since {last_sync})
|
|
26
|
+
|
|
27
|
+
{diff_summary}
|
|
28
|
+
|
|
29
|
+
### Commits
|
|
30
|
+
{commit_list}
|
|
31
|
+
|
|
32
|
+
### Modified Files
|
|
33
|
+
{modified_files}
|
|
34
|
+
|
|
35
|
+
### Added Files
|
|
36
|
+
{added_files}
|
|
37
|
+
|
|
38
|
+
### Deleted Files
|
|
39
|
+
{deleted_files}
|
|
40
|
+
|
|
41
|
+
## Key Patterns Extracted
|
|
42
|
+
|
|
43
|
+
### Naming Conventions
|
|
44
|
+
{naming_patterns}
|
|
45
|
+
|
|
46
|
+
### Import Structure
|
|
47
|
+
{import_patterns}
|
|
48
|
+
|
|
49
|
+
### Architecture Notes
|
|
50
|
+
{architecture_notes}
|
|
51
|
+
|
|
52
|
+
## Relevant Files for Current Task
|
|
53
|
+
|
|
54
|
+
{file_list_with_summaries}
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
*This summary was generated by the repo-context-sync skill to ground AI reasoning in actual codebase state.*
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repo-status
|
|
3
|
+
description: Generate comprehensive living status documents for software repositories combining filesystem exploration, semantic clustering, file importance ranking, and health assessment. Use when understanding codebases, auditing repos, creating system maps, assessing health, or onboarding to projects. Trigger phrases: 'give me a complete repo overview', 'understand this codebase', 'what does this repo do', 'create a system map', 'audit this repository', 'build a mental model'.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **OpenClaw Integration:** This skill is invoked by the Dojo Genesis plugin via `/dojo run repo-status`.
|
|
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 Status Skill
|
|
12
|
+
|
|
13
|
+
**Version:** 1.0
|
|
14
|
+
**Created:** 2026-02-08
|
|
15
|
+
**Author:** Cruz + Manus (Cowork)
|
|
16
|
+
**Origin:** Codified from a live repo-context-sync + strategic-scout + status-writing session on Dojo Genesis.
|
|
17
|
+
**Lineage:** status-writing + file-management + health-audit, distilled into a single repeatable workflow.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## I. The Philosophy: See the Whole Before Touching a Part
|
|
22
|
+
|
|
23
|
+
Most codebases are explored piecemeal — someone reads a file, then another, then another, building a fragmentary picture that drifts as the project evolves. This skill takes the opposite approach: **see the whole system first, as a living organism**, then record what you see in a structured artifact that any future agent or human can use as a starting point.
|
|
24
|
+
|
|
25
|
+
The output is a `.status.md` file — a comprehensive, versioned snapshot that bridges three perspectives:
|
|
26
|
+
|
|
27
|
+
- **Status Writer**: Emoji-driven health indicators, workstream tracking, blockers, next steps. The "heartbeat" view.
|
|
28
|
+
- **File Management**: Annotated directory tree with per-folder status. The "anatomy" view.
|
|
29
|
+
- **Health Supervisor**: Critical/security/sustainability assessment. The "checkup" view.
|
|
30
|
+
|
|
31
|
+
A single document. One place to look. Updated over time like a living record.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## II. When to Use This Skill
|
|
36
|
+
|
|
37
|
+
- **Onboarding to a new project:** Before writing a single line, run this skill to build your mental model.
|
|
38
|
+
- **Periodic health check:** Monthly or per-release, re-run to track drift and detect decay.
|
|
39
|
+
- **Before a major refactor:** Understand what exists before deciding what to change.
|
|
40
|
+
- **When handing off context:** Give another agent or team member a single file that tells them everything.
|
|
41
|
+
- **When a project feels "big" or "messy":** Structure reduces anxiety. This skill imposes structure on chaos.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## III. The Workflow
|
|
46
|
+
|
|
47
|
+
This is a 5-phase process. Each phase builds on the previous one.
|
|
48
|
+
|
|
49
|
+
### Phase 1: Grounding (Read Before You Judge)
|
|
50
|
+
|
|
51
|
+
**Objective:** Understand what the project *is* before evaluating how well it works.
|
|
52
|
+
|
|
53
|
+
1. **List the root directory.** Get the top-level shape.
|
|
54
|
+
2. **Read core documents.** In priority order:
|
|
55
|
+
- `README.md` (what it is, how to run it)
|
|
56
|
+
- `STATUS.md` or equivalent (where it is right now)
|
|
57
|
+
- `CHANGELOG.md` or release notes (where it's been)
|
|
58
|
+
- `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml` (tech stack, deps)
|
|
59
|
+
- `ARCHITECTURE.md`, `PHILOSOPHY.md` if they exist (intent, design)
|
|
60
|
+
3. **Identify the tech stack.** Language(s), framework(s), database(s), infra.
|
|
61
|
+
4. **Note the project's self-stated purpose.** This becomes Section 1 of the output.
|
|
62
|
+
|
|
63
|
+
*Time budget: ~10% of total effort. Resist the urge to explore deeply here.*
|
|
64
|
+
|
|
65
|
+
### Phase 2: Deep Inventory (Parallel Exploration)
|
|
66
|
+
|
|
67
|
+
**Objective:** Build a complete picture of everything in the repository.
|
|
68
|
+
|
|
69
|
+
Launch parallel exploration across the major layers. For most projects, these are:
|
|
70
|
+
|
|
71
|
+
| Layer | What to Inventory |
|
|
72
|
+
|-------|-------------------|
|
|
73
|
+
| **Frontend** | Components, routes, state management, styling, tests, LOC estimates |
|
|
74
|
+
| **Backend** | Packages, handlers, services, models, LOC estimates |
|
|
75
|
+
| **Data** | Migrations, schemas, seed data, vector stores |
|
|
76
|
+
| **Knowledge** | Docs, skills, prompts, thinking artifacts, compressions |
|
|
77
|
+
| **Infra** | CI/CD, Docker, scripts, deployment configs |
|
|
78
|
+
| **Tests** | Unit, integration, e2e, coverage estimates |
|
|
79
|
+
|
|
80
|
+
For each layer, collect:
|
|
81
|
+
- File count
|
|
82
|
+
- Approximate LOC (use `wc -l` or `cloc` if available)
|
|
83
|
+
- Package/module count
|
|
84
|
+
- Status (active, legacy, deprecated, empty)
|
|
85
|
+
|
|
86
|
+
*Time budget: ~30% of total effort. Parallelize aggressively.*
|
|
87
|
+
|
|
88
|
+
### Phase 3: Semantic Clustering
|
|
89
|
+
|
|
90
|
+
**Objective:** Group everything by *what the system does*, not where files happen to live.
|
|
91
|
+
|
|
92
|
+
This is the distinctive step. Instead of just listing directories, map every feature to an **action verb** — a cluster that describes a behavioral capability of the system.
|
|
93
|
+
|
|
94
|
+
Read `references/semantic-clusters.md` for the full cluster framework and examples.
|
|
95
|
+
|
|
96
|
+
**The process:**
|
|
97
|
+
|
|
98
|
+
1. Review the inventory from Phase 2.
|
|
99
|
+
2. For each significant component, ask: "What verb describes what this does?"
|
|
100
|
+
3. Assign it to a cluster. Create new clusters if needed.
|
|
101
|
+
4. For each cluster, build a component table: `Component | Location | Status | LOC`
|
|
102
|
+
5. Write a health assessment per cluster.
|
|
103
|
+
6. Identify cross-cluster components (things that serve multiple verbs).
|
|
104
|
+
7. Identify orphans (components that don't fit any cluster) — these may signal architectural confusion.
|
|
105
|
+
|
|
106
|
+
*Time budget: ~25% of total effort. This is where the insight lives.*
|
|
107
|
+
|
|
108
|
+
### Phase 4: Write the .status.md
|
|
109
|
+
|
|
110
|
+
**Objective:** Assemble everything into a single, structured document.
|
|
111
|
+
|
|
112
|
+
Read `references/status-template.md` for the complete output template.
|
|
113
|
+
|
|
114
|
+
The document has 10 sections:
|
|
115
|
+
|
|
116
|
+
1. **Vision & Purpose** — One sentence + core principles (from Phase 1)
|
|
117
|
+
2. **Current State** — Emoji table of major areas (from Phase 2)
|
|
118
|
+
3. **Directory Structure** — Annotated tree with per-folder status (from Phase 2)
|
|
119
|
+
4. **Semantic Clusters** — One subsection per verb, with component tables (from Phase 3)
|
|
120
|
+
5. **File Importance Ranking** — 4 tiers (Critical, Important, Supporting, Knowledge)
|
|
121
|
+
6. **Health Assessment** — Critical issues, security, sustainability (health-audit framework)
|
|
122
|
+
7. **Active Workstreams** — What's being worked on right now
|
|
123
|
+
8. **Blockers & Dependencies** — What's preventing progress
|
|
124
|
+
9. **Next Steps** — Immediate actionable items
|
|
125
|
+
10. **Aggregate Statistics** — Summary numbers table
|
|
126
|
+
|
|
127
|
+
Save to `.status.md` at the project root (dot-prefixed to stay out of the way but discoverable).
|
|
128
|
+
|
|
129
|
+
*Time budget: ~25% of total effort.*
|
|
130
|
+
|
|
131
|
+
### Phase 5: Verification
|
|
132
|
+
|
|
133
|
+
**Objective:** Catch errors, fill gaps, and harden the document.
|
|
134
|
+
|
|
135
|
+
1. **Cross-check statistics programmatically.** Run `find` and `wc -l` to verify LOC claims. Check file counts against actual filesystem.
|
|
136
|
+
2. **Identify unmapped components.** Walk the component directories and confirm every significant directory appears in at least one semantic cluster.
|
|
137
|
+
3. **Validate status emojis.** Ensure every area marked "complete" actually has evidence of completeness.
|
|
138
|
+
4. **Apply corrections.** Update the `.status.md` with any discrepancies found.
|
|
139
|
+
5. **Note confidence level.** If you couldn't verify something, say so.
|
|
140
|
+
|
|
141
|
+
*Time budget: ~10% of total effort. This step prevents the document from being fiction.*
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## IV. The Semantic Cluster Framework
|
|
146
|
+
|
|
147
|
+
The clusters are action verbs that describe what a system *does*. For the full reference with starter verbs and mapping guidance, read:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
references/semantic-clusters.md
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Starter set (adapt to your project):**
|
|
154
|
+
|
|
155
|
+
| Verb | Meaning | Example Components |
|
|
156
|
+
|------|---------|-------------------|
|
|
157
|
+
| CONVERSE | Chat, messaging, streaming | Chat UI, SSE handlers, message models |
|
|
158
|
+
| REASON | Thinking, planning, deciding | Agent, intent classifier, orchestration |
|
|
159
|
+
| REMEMBER | Storage, recall, learning | Memory system, embeddings, seeds |
|
|
160
|
+
| OBSERVE | Monitoring, tracing, metrics | Trace logger, event bus, cost tracker |
|
|
161
|
+
| LEARN | Adaptation, feedback, calibration | Calibration engine, preference system |
|
|
162
|
+
| ACT | Tool execution, side effects | Tool registry, tool implementations |
|
|
163
|
+
| PROTECT | Auth, security, boundaries | Middleware, secure storage, auth context |
|
|
164
|
+
| CONNECT | External integrations | Plugins, APIs, bots, webhooks |
|
|
165
|
+
| PRESENT | UI, rendering, layout | Shell, sidebars, panels, components |
|
|
166
|
+
| PERSIST | Database, migrations, storage | DB manager, migrations, schemas |
|
|
167
|
+
| BUILD | CI/CD, testing, deployment | Workflows, Docker, scripts, tests |
|
|
168
|
+
| THINK | Meta-cognition, knowledge | Skills, prompts, documentation |
|
|
169
|
+
| ORCHESTRATE | Multi-step coordination | DAG engine, task decomposition |
|
|
170
|
+
|
|
171
|
+
Not every project will use all 13. Some projects may need verbs not on this list. The framework is a starting point, not a constraint.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## V. File Importance Ranking
|
|
176
|
+
|
|
177
|
+
Rank files into 4 tiers based on runtime criticality and development importance:
|
|
178
|
+
|
|
179
|
+
| Tier | Criteria | Typical Count |
|
|
180
|
+
|------|----------|---------------|
|
|
181
|
+
| **Tier 1: Critical** | System won't function without these. Core agent, main state, primary API endpoint, database manager. | 10 files |
|
|
182
|
+
| **Tier 2: Important** | Core features break without these. Supporting services, secondary state, routing. | 10 files |
|
|
183
|
+
| **Tier 3: Supporting** | System degrades gracefully without these. Integrations, utilities, background tasks. | 20-30 files |
|
|
184
|
+
| **Tier 4: Knowledge** | Essential for development, not runtime. Docs, specs, skills, prompts. | Variable |
|
|
185
|
+
|
|
186
|
+
For each file in Tiers 1-2, include `Rank | File | Why` — a one-line justification.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## VI. Health Assessment Framework
|
|
191
|
+
|
|
192
|
+
Borrowed directly from the health-audit skill. For each category, use a table with `Area | Status | Notes`.
|
|
193
|
+
|
|
194
|
+
| Category | What to Check |
|
|
195
|
+
|----------|--------------|
|
|
196
|
+
| **Critical Issues** | Can it build? Critical dependency vulnerabilities? Main branch broken? |
|
|
197
|
+
| **Security** | Secrets hardcoded? Auth implemented? RLS policies set? Encryption at rest? |
|
|
198
|
+
| **Sustainability** | Test coverage adequate? CI/CD automated? Technical debt managed? Docs current? Manual processes documented? |
|
|
199
|
+
|
|
200
|
+
Be honest. Use emoji status indicators: ✅ good, ⚠️ concern, ❌ blocked.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## VII. Best Practices
|
|
205
|
+
|
|
206
|
+
- **Dot-prefix the output file.** `.status.md` stays discoverable but doesn't clutter the root alongside README and STATUS.
|
|
207
|
+
- **Separate from STATUS.md.** The lightweight `STATUS.md` (per status-writing skill) is the human-facing dashboard. `.status.md` is the comprehensive agent-facing audit. They complement each other.
|
|
208
|
+
- **Update incrementally.** After the first generation, subsequent runs should diff against the existing `.status.md` and update rather than regenerate from scratch.
|
|
209
|
+
- **Statistics drift is normal.** LOC counts change every commit. The goal is "accurate enough to be useful" — within 10% is fine.
|
|
210
|
+
- **Semantic clusters are the crown jewel.** The directory tree tells you *where* things are. The clusters tell you *what* things do. Prioritize cluster quality over tree completeness.
|
|
211
|
+
- **Parallelize Phase 2.** The deep inventory is the slowest phase. Use subagents or parallel exploration to cut time.
|
|
212
|
+
- **Verification is not optional.** A beautiful document full of wrong numbers is worse than no document. Always verify.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## VIII. Quality Checklist
|
|
217
|
+
|
|
218
|
+
Before delivering the `.status.md`, confirm:
|
|
219
|
+
|
|
220
|
+
- [ ] Vision statement is present and accurate
|
|
221
|
+
- [ ] Every major directory appears in the annotated tree
|
|
222
|
+
- [ ] Every significant component maps to at least one semantic cluster
|
|
223
|
+
- [ ] No orphan directories (unmapped components) remain unexplained
|
|
224
|
+
- [ ] File importance ranking has at least 10 Tier 1-2 files
|
|
225
|
+
- [ ] Health assessment covers critical, security, and sustainability
|
|
226
|
+
- [ ] Aggregate statistics are programmatically verified (within 10%)
|
|
227
|
+
- [ ] Active workstreams reflect actual current work
|
|
228
|
+
- [ ] Next steps are concrete and actionable
|
|
229
|
+
- [ ] The document reads coherently from top to bottom
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## OpenClaw Tool Integration
|
|
233
|
+
|
|
234
|
+
When running inside the Dojo Genesis plugin:
|
|
235
|
+
|
|
236
|
+
1. **Start** by calling `dojo_get_context` to retrieve full project state, history, and artifacts
|
|
237
|
+
2. **During** the skill, follow the workflow steps documented above
|
|
238
|
+
3. **Save** outputs using `dojo_save_artifact` with the `artifacts` output directory
|
|
239
|
+
4. **Update** project state by calling `dojo_update_state` to record skill completion and any phase transitions
|
|
240
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dojo-genesis-plugin-repo-status",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Generate comprehensive repo status documents",
|
|
5
|
+
"author": "dojo-genesis",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"permissions": [],
|
|
8
|
+
"entry": "SKILL.md",
|
|
9
|
+
"tags": ["dojo-genesis", "orchestration", "system", "health"],
|
|
10
|
+
"models": ["claude-*", "gpt-*", "gemini-*"],
|
|
11
|
+
"minOpenClawVersion": "2026.1.0"
|
|
12
|
+
}
|