oh-my-customcode 0.162.1 → 0.164.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/dist/cli/index.js +4800 -4865
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/templates/.claude/rules/SHOULD-memory-integration.md +69 -0
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +42 -15
- package/templates/.claude/skills/scout/SKILL.md +23 -1
- package/templates/.claude/statusline.sh +132 -9
- package/templates/guides/claude-code/15-version-compatibility.md +91 -2
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +309 -29
|
@@ -1,46 +1,326 @@
|
|
|
1
|
-
# /omcustom:workflow auto-dev — Full-auto release pipeline
|
|
2
|
-
# Pre-triages open issues → triage verify-done → plan → implement → verify → PR → followup
|
|
3
|
-
|
|
4
1
|
name: auto-dev
|
|
5
|
-
description: "
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
description: "Automated development pipeline — from issue triage to release"
|
|
3
|
+
version: "2.1.0"
|
|
4
|
+
|
|
5
|
+
# Design rule: each pipeline run produces ONE bounded release unit (3-7 issues), not all open issues.
|
|
6
|
+
# This pipeline is a project-agnostic template. Project-specific overrides belong in
|
|
7
|
+
# the project's own workflows/auto-dev.yaml (e.g., AgentNav, second-brain).
|
|
8
8
|
|
|
9
9
|
steps:
|
|
10
|
-
- name:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
- name: pre-triage
|
|
11
|
+
prompt: |
|
|
12
|
+
Phase 0 — Sync local with remote.
|
|
13
|
+
|
|
14
|
+
1. Fetch all remote state:
|
|
15
|
+
git fetch --all --tags --prune
|
|
16
|
+
|
|
17
|
+
2. Detect behind count vs origin/HEAD branch:
|
|
18
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
19
|
+
behind=$(git rev-list --count HEAD..origin/$current_branch)
|
|
20
|
+
|
|
21
|
+
3. If behind > 0:
|
|
22
|
+
- Working tree clean (git status --short empty):
|
|
23
|
+
git pull --ff-only
|
|
24
|
+
report: "[pre-triage] synced $behind commits"
|
|
25
|
+
- Working tree dirty:
|
|
26
|
+
HALT with "[pre-triage] $behind commits behind, working tree dirty — manual reconcile required"
|
|
27
|
+
exit 1
|
|
28
|
+
|
|
29
|
+
4. Report current state:
|
|
30
|
+
- Latest tag: git tag --sort=-v:refname | head -1
|
|
31
|
+
- Local HEAD: git rev-parse --short HEAD
|
|
32
|
+
- Behind state: synced or 0
|
|
33
|
+
|
|
34
|
+
5. Cross-reference checks (advisory, do NOT halt):
|
|
35
|
+
a. Memory vs git consistency (G7):
|
|
36
|
+
- latest_tag=$(git tag --sort=-v:refname | head -1)
|
|
37
|
+
- Compare with "Last release" or equivalent line in pipeline memory/context
|
|
38
|
+
- If mismatch: stderr warning "[pre-triage] WARNING: memory says vX.Y.Z but git latest tag is vA.B.C — update memory after pipeline completion"
|
|
39
|
+
- Do NOT halt (advisory only — memory updates are session-end responsibility)
|
|
40
|
+
|
|
41
|
+
b. Issue body stale version references (G5):
|
|
42
|
+
- Retrieve open issues: gh issue list --state open --limit 100 --json number,body
|
|
43
|
+
- For each issue body, extract all vX.Y.Z patterns (regex: v\d+\.\d+\.\d+)
|
|
44
|
+
- Retrieve git tag list: git tag --list
|
|
45
|
+
- Flag any issue referencing a version not present in git tags:
|
|
46
|
+
"[pre-triage] WARNING: Issue #N references vX.Y.Z (not in git tags) — body may be stale"
|
|
47
|
+
- Output all warnings as advisory log; do NOT halt
|
|
48
|
+
|
|
49
|
+
Phase 1 — Ensure required labels exist, then scan issues.
|
|
50
|
+
|
|
51
|
+
1. Create labels if missing (idempotent):
|
|
52
|
+
gh label create in-progress --color "FBCA04" --description "Work in progress" --force 2>/dev/null
|
|
53
|
+
gh label create verify-ready --color "0E8A16" --description "Ready for verification" --force 2>/dev/null
|
|
54
|
+
gh label create needs-review --color "D93F0B" --description "Needs manual review" --force 2>/dev/null
|
|
55
|
+
|
|
56
|
+
2. Scan open GitHub issues:
|
|
57
|
+
gh issue list --state open --limit 100 --json number,title,labels,body,milestone
|
|
58
|
+
|
|
59
|
+
3. Group by label and compute for each issue:
|
|
60
|
+
- dependencies: parse "see #N", "depends on #N", "#N 참조" from body
|
|
61
|
+
- blocked_by_decision: true if body references any decision-needed issue
|
|
62
|
+
- effort: XS/S/M/L from scope
|
|
63
|
+
- order: topological sort over dependencies
|
|
64
|
+
|
|
65
|
+
4. Output: dependency-sorted issue table with blocked_by_decision flag.
|
|
66
|
+
description: "Sync remote, stale-version check, memory consistency check, scan issues"
|
|
67
|
+
|
|
68
|
+
- name: scope-selection
|
|
69
|
+
prompt: |
|
|
70
|
+
Select a single bounded release scope (3-7 issues) for THIS pipeline run.
|
|
71
|
+
|
|
72
|
+
## Step 0 — Milestone state pre-check (G3)
|
|
73
|
+
|
|
74
|
+
Before creating a milestone for version vX.Y.Z:
|
|
75
|
+
1. Query all milestones (open and closed):
|
|
76
|
+
existing=$(gh api 'repos/{owner}/{repo}/milestones?state=all&per_page=100' --jq '.[] | select(.title == "vX.Y.Z") | "\(.number)|\(.state)"')
|
|
77
|
+
2. Evaluate:
|
|
78
|
+
- If existing && state=closed:
|
|
79
|
+
HALT with "[scope-selection] BLOCKED: milestone vX.Y.Z already exists and is closed. Bump version or reopen milestone manually."
|
|
80
|
+
- If existing && state=open:
|
|
81
|
+
Use existing milestone as-is (do not create new)
|
|
82
|
+
- If not existing:
|
|
83
|
+
Create new milestone: gh api repos/{owner}/{repo}/milestones --method POST --field title="vX.Y.Z"
|
|
84
|
+
|
|
85
|
+
## Step 1 — Label-based filtering (G4)
|
|
86
|
+
|
|
87
|
+
Reference label semantics: .claude/skills/pipeline/labels.md
|
|
88
|
+
|
|
89
|
+
Apply filter rules:
|
|
90
|
+
- EXCLUDE: blocked_by_decision == true OR labels ∩ {decision-needed, needs-review, verify-done, manual-action, in-progress} ≠ ∅
|
|
91
|
+
- INCLUDE (preferred): labels ∩ {verify-ready, claude-code-release, documentation} ≠ ∅
|
|
92
|
+
- INCLUDE (standard): P1/P2/P3 issues not in excluded set
|
|
93
|
+
- Tie-break: P1 > P2 > P3 > unclassified
|
|
94
|
+
|
|
95
|
+
## Step 2 — Selection rules
|
|
96
|
+
|
|
97
|
+
1. Determine release tier:
|
|
98
|
+
- No tags yet → v0.1.0
|
|
99
|
+
- Otherwise: highest-priority open tier (bug → chore → feature)
|
|
100
|
+
2. Apply Step 1 filter (label-based exclusion and preference)
|
|
101
|
+
3. Sort by dependency: prerequisites before dependents
|
|
102
|
+
4. Cap at 7 issues; if priority issues < 7, stop at that priority (don't mix tiers)
|
|
103
|
+
5. Minimum 1 issue; if 0 eligible, halt with "no eligible issues for auto-dev run"
|
|
104
|
+
|
|
105
|
+
Assign scoped issues to milestone.
|
|
106
|
+
Output markdown release manifest:
|
|
107
|
+
| order | # | title | prerequisite | effort | labels |
|
|
108
|
+
|
|
109
|
+
Persist manifest as pipeline state for subsequent steps.
|
|
110
|
+
description: "Milestone state pre-check, label filter, pick 3-7 issues as v{X.Y.Z} scope"
|
|
111
|
+
depends_on: pre-triage
|
|
112
|
+
|
|
113
|
+
- name: compression-mode-eval
|
|
114
|
+
prompt: |
|
|
115
|
+
Evaluate the pipeline compression mode (G6). Three tiers exist:
|
|
116
|
+
docs-only (heaviest compression) → lite (intermediate) → standard (no compression).
|
|
117
|
+
|
|
118
|
+
## Reference
|
|
119
|
+
|
|
120
|
+
.claude/skills/pipeline/labels.md — "Compression Eligibility" section
|
|
121
|
+
|
|
122
|
+
## Tier 1 — docs-only
|
|
123
|
+
|
|
124
|
+
Conditions (BOTH must hold):
|
|
125
|
+
1. scope size ≤ 3 (number of issues in release manifest)
|
|
126
|
+
2. ALL scoped issues have labels ∩ {documentation, automated, claude-code-release, enhancement-yaml-only} ≠ ∅
|
|
127
|
+
|
|
128
|
+
If met → set compression_mode=docs-only
|
|
129
|
+
- triage step: skip professor-triage skill; perform direct manifest summary instead
|
|
130
|
+
- plan step: skip release-plan skill; single-response plan instead
|
|
131
|
+
- deep-plan step: skip deep-plan skill; single-response implementation notes instead
|
|
132
|
+
- deep-verify step: skip deep-verify skill; perform self-review checklist instead
|
|
133
|
+
- Log: "[compression-mode] docs-only compression activated (scope={n}, all docs/yaml labels)"
|
|
134
|
+
|
|
135
|
+
## Tier 2 — lite (intermediate)
|
|
136
|
+
|
|
137
|
+
Evaluate ONLY if docs-only NOT met. Conditions (ALL must hold):
|
|
138
|
+
1. scope size ≤ 7
|
|
139
|
+
2. ALL scoped issues are low-risk: for EVERY issue,
|
|
140
|
+
labels ∩ {documentation, automated, claude-code-release, feedback, professor, enhancement} ≠ ∅
|
|
141
|
+
3. NO scoped issue carries a breaking-change or decision-needed label
|
|
142
|
+
4. No code logic change is expected — work is docs/rule/skill/config/script-centric
|
|
143
|
+
(verify against each issue body; if any issue implies application code logic change, FAIL the lite check)
|
|
144
|
+
|
|
145
|
+
If met → set compression_mode=lite
|
|
146
|
+
- triage step: MAY replace professor-triage skill spawn with orchestrator integrated analysis
|
|
147
|
+
- plan step: MAY replace release-plan skill spawn with orchestrator integrated analysis
|
|
148
|
+
- deep-plan step: MAY replace deep-plan skill spawn with orchestrator integrated analysis
|
|
149
|
+
- deep-verify step: perform via mgr-sauron R017 structural verification + core self-check
|
|
150
|
+
(instead of full deep-verify skill spawn)
|
|
151
|
+
- implement / verify-build / release / ci-check / post-release-followup: execute normally (no compression)
|
|
152
|
+
- MANDATORY justification log (REQUIRED whenever a skill stage is replaced by integrated analysis):
|
|
153
|
+
"[compression-mode] lite — skill 단계 통합 분석 대체. 정당화: scope={n}, 모든 이슈 저위험(라벨 {labels}), 구현 대상 이슈 본문 명시 {issue_refs}"
|
|
154
|
+
- If the justification cannot be stated concretely (e.g., a stage cannot be safely integrated),
|
|
155
|
+
do NOT compress that stage — fall back to full skill spawn for it.
|
|
156
|
+
|
|
157
|
+
## Tier 3 — standard (fallback)
|
|
158
|
+
|
|
159
|
+
If neither docs-only nor lite met → set compression_mode=standard
|
|
160
|
+
- All pipeline steps execute normally with full skill spawns
|
|
161
|
+
- Log: "[compression-mode] standard mode (scope={n}, mixed/high-risk labels, large scope, or code logic change)"
|
|
162
|
+
|
|
163
|
+
## Output
|
|
164
|
+
|
|
165
|
+
compression_mode ∈ {docs-only, lite, standard} as pipeline state for downstream steps.
|
|
166
|
+
description: "Evaluate compression tier (docs-only/lite/standard); set compression_mode state"
|
|
167
|
+
depends_on: scope-selection
|
|
168
|
+
|
|
169
|
+
- name: triage
|
|
170
|
+
skill: professor-triage
|
|
171
|
+
description: "Cross-analysis triage with priority assessment (scoped to release manifest) — skipped if docs-only, integrated-analysis allowed if lite"
|
|
172
|
+
depends_on: compression-mode-eval
|
|
19
173
|
|
|
20
174
|
- name: plan
|
|
21
|
-
depends_on: issue-analysis
|
|
22
175
|
skill: release-plan
|
|
23
|
-
description:
|
|
24
|
-
|
|
176
|
+
description: "Release unit plan from triaged issues — skipped if docs-only, integrated-analysis allowed if lite"
|
|
177
|
+
depends_on: triage
|
|
25
178
|
|
|
26
179
|
- name: deep-plan
|
|
27
180
|
skill: deep-plan
|
|
28
|
-
description:
|
|
29
|
-
|
|
181
|
+
description: "Research-validated implementation plan (research → plan → verify) — skipped if docs-only, integrated-analysis allowed if lite"
|
|
182
|
+
depends_on: plan
|
|
30
183
|
|
|
31
184
|
- name: implement
|
|
32
|
-
prompt:
|
|
33
|
-
|
|
34
|
-
|
|
185
|
+
prompt: |
|
|
186
|
+
Execute the deep-plan output for the scoped release manifest.
|
|
187
|
+
|
|
188
|
+
Per-issue lifecycle:
|
|
189
|
+
1. Start: gh issue edit <N> --add-label in-progress --assignee @me
|
|
190
|
+
2. Comment: gh issue comment <N> --body "Implementation started via auto-dev pipeline"
|
|
191
|
+
3. Dispatch specialist agents per file domain:
|
|
192
|
+
- Detect file types in scope and route to matching agent
|
|
193
|
+
- Use specialized agents (lang-*, be-*, fe-*, infra-*) over general-purpose
|
|
194
|
+
4. TDD via superpowers:test-driven-development when tests apply
|
|
195
|
+
5. Commit via mgr-gitnerd with `Fixes #<N>` trailer in body
|
|
196
|
+
6. On success: remove in-progress, add verify-ready
|
|
197
|
+
7. On failure: remove in-progress, add needs-review, comment error summary
|
|
198
|
+
|
|
199
|
+
Rules:
|
|
200
|
+
- Parallel execution per R009 (max 4 concurrent, respect dependencies)
|
|
201
|
+
- Issues whose prerequisites failed in-run MUST be skipped (log reason)
|
|
202
|
+
- No direct orchestrator writes (R010)
|
|
203
|
+
- All Agent tool calls MUST pass mode: "bypassPermissions" to prevent permission prompts during unattended execution
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## Sensitive Path Handling (CC v2.1.121+)
|
|
207
|
+
|
|
208
|
+
Direct Write/Edit/Bash on `.claude/**` is permitted under `mode: "bypassPermissions"` as of CC v2.1.121 (#1101). The legacy `/tmp/*.sh` bypass is no longer required. Structural changes (new agents/skills) still go through mgr-creator with R017 verification.
|
|
209
|
+
|
|
210
|
+
For CC < v2.1.121 see git history for the legacy bypass pattern.
|
|
211
|
+
|
|
212
|
+
## Local CI-mimic verification (MUST run before marking implement done)
|
|
213
|
+
|
|
214
|
+
After all implementation tasks complete, run these scripts in sequence and halt on failure:
|
|
35
215
|
|
|
36
|
-
|
|
216
|
+
1. bash .github/scripts/verify-template-sync.sh
|
|
217
|
+
2. bash .github/scripts/verify-wiki-sync.sh
|
|
218
|
+
|
|
219
|
+
If either fails:
|
|
220
|
+
- For wiki-sync failures: delegate to wiki-curator to generate missing pages (`/omcustom:wiki ingest <path>`)
|
|
221
|
+
- For template-sync failures: delegate to mgr-updater to sync `.claude/` -> `templates/.claude/`
|
|
222
|
+
- After fixes, re-run the scripts until both pass
|
|
223
|
+
|
|
224
|
+
This mirrors CI and prevents the known 1-2 wasted push cycles per release (ref: issue #927, v0.98.0 PR #925).
|
|
225
|
+
description: "Per-issue implementation with lifecycle, specialist routing, and CI-mimic verification"
|
|
226
|
+
depends_on: deep-plan
|
|
227
|
+
|
|
228
|
+
- name: verify-build
|
|
229
|
+
prompt: |
|
|
230
|
+
Project-specific build + test verification.
|
|
231
|
+
|
|
232
|
+
For Node/Bun projects (this repo):
|
|
233
|
+
1. bun install — verify lockfile sync (halt on lockfile drift)
|
|
234
|
+
2. bun run lint (if package.json has lint script)
|
|
235
|
+
3. bun run typecheck (if available)
|
|
236
|
+
4. bun test — MANDATORY, no silent skip
|
|
237
|
+
- Baseline reference: #1156 historically documented 86 failures; v0.136.2 fixes resolved them → current baseline = 0
|
|
238
|
+
- Each release: adopt prior version's test result as baseline (dynamic, not hardcoded)
|
|
239
|
+
- Compute current pass/fail counts
|
|
240
|
+
- If current FAIL count > baseline → NEW regression detected → halt + report failure list
|
|
241
|
+
- If current FAIL count <= baseline → continue with advisory log "X failures (baseline {n}, delta {d})"
|
|
242
|
+
5. Build verification (if package has build script)
|
|
243
|
+
|
|
244
|
+
For Python/Go/Docker/static-site projects: auto-detect and run equivalent (py_compile + pytest / go build + go vet + go test / docker build / file validation).
|
|
245
|
+
|
|
246
|
+
Halt conditions:
|
|
247
|
+
- Lint errors (exit != 0)
|
|
248
|
+
- Typecheck errors
|
|
249
|
+
- NEW test failures (regression from baseline)
|
|
250
|
+
- Build failure
|
|
251
|
+
- Lockfile drift
|
|
252
|
+
|
|
253
|
+
Halt → report exact command + stderr + delta details. Do NOT proceed to release on any halt.
|
|
254
|
+
description: "Auto-detected build + test verification (bun test with baseline delta guard)"
|
|
255
|
+
depends_on: implement
|
|
256
|
+
|
|
257
|
+
- name: deep-verify
|
|
37
258
|
skill: deep-verify
|
|
38
|
-
description: Multi-angle release quality verification
|
|
259
|
+
description: "Multi-angle release quality verification — self-review checklist if docs-only; mgr-sauron R017 + core self-check if lite"
|
|
260
|
+
depends_on: verify-build
|
|
39
261
|
|
|
40
262
|
- name: release
|
|
41
|
-
prompt:
|
|
42
|
-
|
|
263
|
+
prompt: |
|
|
264
|
+
Create a GitHub Release.
|
|
265
|
+
|
|
266
|
+
0. Pre-check (mandatory, delegate to mgr-gitnerd per R010): Detect and remove stale local `release` branch if present.
|
|
267
|
+
The local `release` branch (file ref) conflicts with `release/v*` directory ref namespace.
|
|
268
|
+
mgr-gitnerd executes (force-delete acceptable in automation context; warns if branch has unpushed commits):
|
|
269
|
+
if git show-ref --verify --quiet refs/heads/release; then
|
|
270
|
+
# Check for unpushed commits before force-delete
|
|
271
|
+
if [ -n "$(git log refs/heads/release ^origin/develop --oneline 2>/dev/null)" ]; then
|
|
272
|
+
echo "::warning::Local 'release' branch has unpushed commits — force-deleting anyway"
|
|
273
|
+
fi
|
|
274
|
+
git branch -D release
|
|
275
|
+
fi
|
|
276
|
+
Reference: issue #1141 (v0.135.0 follow-up), mgr-gitnerd MEMORY.md.
|
|
277
|
+
|
|
278
|
+
1. Version bump (mandatory):
|
|
279
|
+
Orchestrator delegates to mgr-updater (R010). mgr-updater executes the following atomic edits:
|
|
280
|
+
Determine NEW version per semver rules below.
|
|
281
|
+
npm project (package.json exists):
|
|
282
|
+
a. package.json: jq '.version = "<NEW>"' package.json > package.json.tmp && mv package.json.tmp package.json
|
|
283
|
+
b. templates/manifest.json: jq '.version = "<NEW>"' templates/manifest.json > templates/manifest.json.tmp && mv templates/manifest.json.tmp templates/manifest.json
|
|
284
|
+
c. mgr-gitnerd commit: "chore(release): bump to v<NEW>"
|
|
285
|
+
d. mgr-gitnerd push develop
|
|
286
|
+
e. mandatory verification (with existence guard for partial-update safety):
|
|
287
|
+
[ -f scripts/verify-version-sync.sh ] && bash scripts/verify-version-sync.sh || echo "::warning::verify-version-sync.sh not found, version sync verification skipped"
|
|
288
|
+
(verify-version-sync.sh 가 exit 1 시 release 단계 halt)
|
|
289
|
+
|
|
290
|
+
Version decision (semver):
|
|
291
|
+
- No existing tags → v0.1.0
|
|
292
|
+
- Previous tag exists → patch (bugfix) / minor (features) / major (breaking)
|
|
293
|
+
- Previous tag is ahead of source version (e.g., tag v0.136.1, package.json 0.136.0): use next available skip-version (0.136.2)
|
|
294
|
+
|
|
295
|
+
2. Release notes via omcustom-release-notes skill
|
|
296
|
+
3. Delegate to mgr-gitnerd:
|
|
297
|
+
- git tag + push
|
|
298
|
+
- gh release create
|
|
299
|
+
4. Close milestone
|
|
300
|
+
5. Close verify-ready issues with "Fixed in v{version}"
|
|
301
|
+
Label needs-review issues as "Deferred from v{version}"
|
|
302
|
+
6. Adapt release mechanism to project:
|
|
303
|
+
- npm project: PR + merge + npm publish verification
|
|
304
|
+
- Non-npm: direct tag on main (trunk-based)
|
|
305
|
+
description: "Git tag + GitHub Release + close milestone/issues (with mandatory version sync verification)"
|
|
306
|
+
depends_on: deep-verify
|
|
307
|
+
|
|
308
|
+
- name: ci-check
|
|
309
|
+
prompt: |
|
|
310
|
+
Post-release CI verification.
|
|
311
|
+
|
|
312
|
+
1. Check if .github/workflows/ has CI workflows
|
|
313
|
+
If NOT: skip with "No CI configured. Skipping." and continue.
|
|
314
|
+
2. If CI exists:
|
|
315
|
+
- gh run list --limit 5
|
|
316
|
+
- Wait for runs triggered by the new tag/push
|
|
317
|
+
- If failures: diagnose, fix, re-verify
|
|
318
|
+
3. For npm projects: verify npm publish succeeded (npm view <pkg> version)
|
|
319
|
+
4. Report final CI status.
|
|
320
|
+
description: "Post-release CI verification and fix loop"
|
|
321
|
+
depends_on: release
|
|
43
322
|
|
|
44
|
-
- name: followup
|
|
323
|
+
- name: post-release-followup
|
|
45
324
|
skill: post-release-followup
|
|
46
|
-
description:
|
|
325
|
+
description: "Register follow-ups from this release as new issues"
|
|
326
|
+
depends_on: ci-check
|