@iowarp/clio-coder 0.3.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 +407 -0
- package/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +224 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +798 -0
- package/SECURITY.md +72 -0
- package/assets/clio-coder-logo-128.webp +0 -0
- package/damage-control-rules.yaml +419 -0
- package/dist/acp-UMLFVA3F.js +92 -0
- package/dist/agents-Q4MYPMUW.js +91 -0
- package/dist/auth-O6HYIJ6J.js +521 -0
- package/dist/chunk-262G75JS.js +35 -0
- package/dist/chunk-26BZQOAD.js +1281 -0
- package/dist/chunk-2J63S4SF.js +508 -0
- package/dist/chunk-3DANZDGR.js +717 -0
- package/dist/chunk-4UQA7NCT.js +29 -0
- package/dist/chunk-527KG6XR.js +497 -0
- package/dist/chunk-5LDRNKX2.js +1063 -0
- package/dist/chunk-5N2FG33Q.js +25 -0
- package/dist/chunk-67MTHP2E.js +135 -0
- package/dist/chunk-6CWDTGUC.js +20 -0
- package/dist/chunk-7BHLZB3A.js +2115 -0
- package/dist/chunk-7RBKDI66.js +348 -0
- package/dist/chunk-AMFR5YA3.js +541 -0
- package/dist/chunk-BBUH4VAA.js +1224 -0
- package/dist/chunk-BYEU76JP.js +899 -0
- package/dist/chunk-CLJ5HLUD.js +458 -0
- package/dist/chunk-D5YD55AR.js +116 -0
- package/dist/chunk-DXQNI4PC.js +61 -0
- package/dist/chunk-E3NYWENM.js +1004 -0
- package/dist/chunk-GNGDQYDU.js +34688 -0
- package/dist/chunk-GOTUR54M.js +9 -0
- package/dist/chunk-HBU5MTAM.js +41 -0
- package/dist/chunk-HMYNFFY4.js +28 -0
- package/dist/chunk-JPOWPFCU.js +1010 -0
- package/dist/chunk-JWHCJDCI.js +1215 -0
- package/dist/chunk-KBR4MZZR.js +41 -0
- package/dist/chunk-KKKPTZLM.js +93 -0
- package/dist/chunk-ME6DNWIU.js +66 -0
- package/dist/chunk-NI4DEJMC.js +88 -0
- package/dist/chunk-O4EJEDHO.js +659 -0
- package/dist/chunk-PIDUD6M2.js +31 -0
- package/dist/chunk-PS4PFJQP.js +29459 -0
- package/dist/chunk-QV47YRF4.js +48 -0
- package/dist/chunk-RQDWMVRB.js +279 -0
- package/dist/chunk-TFSSEXL6.js +136 -0
- package/dist/chunk-TKHQ4DGZ.js +8290 -0
- package/dist/chunk-TPOCL34A.js +2876 -0
- package/dist/chunk-UGYAX5YI.js +565 -0
- package/dist/chunk-UHTSULZS.js +461 -0
- package/dist/chunk-UU3R62TT.js +128 -0
- package/dist/chunk-UWIJNAOB.js +3906 -0
- package/dist/chunk-VOO7NYPP.js +914 -0
- package/dist/chunk-VPAWTYLY.js +117 -0
- package/dist/chunk-WD6AJM35.js +1216 -0
- package/dist/chunk-X3BR7HWV.js +115 -0
- package/dist/chunk-X3NE4WVW.js +120 -0
- package/dist/chunk-XNISANGE.js +1395 -0
- package/dist/chunk-XV4ZJ6ZM.js +3177 -0
- package/dist/cli/index.js +236 -0
- package/dist/clio-KIQ5SNDS.js +53 -0
- package/dist/components-JVHMUBEB.js +653 -0
- package/dist/config-ZFCDBMDC.js +372 -0
- package/dist/configure-G4E3A2PG.js +27 -0
- package/dist/context-CDXTP2MP.js +293 -0
- package/dist/context-E3KIFVXI.js +185 -0
- package/dist/context-clear-3F4PLXOS.js +102 -0
- package/dist/context-index-Q7YSYTR3.js +106 -0
- package/dist/docs-YIETIWZI.js +280 -0
- package/dist/doctor-M5HJJZOL.js +61 -0
- package/dist/domains/agents/builtins/architect.md +33 -0
- package/dist/domains/agents/builtins/coder.md +31 -0
- package/dist/domains/agents/builtins/context-bootstrap.md +38 -0
- package/dist/domains/agents/builtins/debugger.md +30 -0
- package/dist/domains/agents/builtins/documenter.md +31 -0
- package/dist/domains/agents/builtins/git-master.md +30 -0
- package/dist/domains/agents/builtins/provenance.md +30 -0
- package/dist/domains/agents/builtins/researcher.md +71 -0
- package/dist/domains/agents/builtins/scout.md +42 -0
- package/dist/domains/agents/builtins/tester.md +31 -0
- package/dist/domains/agents/builtins/verifier.md +30 -0
- package/dist/domains/agents/builtins/wiki-writer.md +41 -0
- package/dist/eval-B3KZZESM.js +2674 -0
- package/dist/evidence-V67CHM35.js +233 -0
- package/dist/evolve-YDZSUQYA.js +518 -0
- package/dist/extensions-SRG7XCAH.js +207 -0
- package/dist/fleet-CA2CRTVG.js +760 -0
- package/dist/fleet-preflight-CLIAX7YR.js +21 -0
- package/dist/init-2OZDJE2D.js +227 -0
- package/dist/memory-3PIQQAKX.js +207 -0
- package/dist/models-DY35XI7Y.js +237 -0
- package/dist/paths-5OMXW7Z4.js +57 -0
- package/dist/preload-KZVHET2B.js +11 -0
- package/dist/reset-PIFYNOS3.js +216 -0
- package/dist/run-3VSPP24F.js +735 -0
- package/dist/share-D36RQCXM.js +241 -0
- package/dist/skills-F2MRLELY.js +445 -0
- package/dist/skills-eval-E2ZTW4PL.js +932 -0
- package/dist/targets-DZMEZAH4.js +977 -0
- package/dist/trace-7NYCUI2J.js +250 -0
- package/dist/uninstall-AD3JWHBB.js +322 -0
- package/dist/upgrade-WYYBKGDY.js +301 -0
- package/dist/usage-ULIDAGFF.js +755 -0
- package/dist/version-ROZ6CZKH.js +16 -0
- package/dist/wiki-generate-PKFIX6OB.js +377 -0
- package/dist/worker/entry.js +1739 -0
- package/docs/README.md +93 -0
- package/docs/acp.md +120 -0
- package/docs/alcf-provider.md +72 -0
- package/docs/architecture.md +172 -0
- package/docs/artifact-versions.md +54 -0
- package/docs/built-in-agents.md +265 -0
- package/docs/capacity-and-scheduling.md +97 -0
- package/docs/commands-and-modes.md +554 -0
- package/docs/config-knobs-audit.md +115 -0
- package/docs/configuration-and-targets.md +812 -0
- package/docs/context-engine.md +236 -0
- package/docs/dispatch-architecture-rationale.md +126 -0
- package/docs/documentation-coverage.md +46 -0
- package/docs/documentation-guide.md +166 -0
- package/docs/environment-variables.md +105 -0
- package/docs/eval-runner.md +205 -0
- package/docs/evals-internal.md +298 -0
- package/docs/evidence-and-memory.md +243 -0
- package/docs/evolution.md +143 -0
- package/docs/exit-codes-and-output.md +74 -0
- package/docs/extensions-and-sharing.md +306 -0
- package/docs/fleet-demo-runbook.md +179 -0
- package/docs/fleet-dispatch.md +591 -0
- package/docs/glossary.md +75 -0
- package/docs/html/agents_blueprint.html +936 -0
- package/docs/html/alcf_blueprint.html +324 -0
- package/docs/html/architecture_blueprint.html +850 -0
- package/docs/html/commands_blueprint.html +794 -0
- package/docs/html/config_knobs_audit_blueprint.html +178 -0
- package/docs/html/configuration_blueprint.html +1080 -0
- package/docs/html/context_blueprint.html +603 -0
- package/docs/html/documentation_blueprint.html +832 -0
- package/docs/html/environment_blueprint.html +404 -0
- package/docs/html/eval_blueprint.html +743 -0
- package/docs/html/evals_internal_blueprint.html +190 -0
- package/docs/html/evolution_blueprint.html +674 -0
- package/docs/html/extensions_blueprint.html +2065 -0
- package/docs/html/fleet_dispatch_blueprint.html +286 -0
- package/docs/html/index.html +919 -0
- package/docs/html/lifecycle_blueprint.html +723 -0
- package/docs/html/memory_blueprint.html +699 -0
- package/docs/html/middleware_blueprint.html +664 -0
- package/docs/html/models_blueprint.html +2366 -0
- package/docs/html/observability_blueprint.html +683 -0
- package/docs/html/provider_adapter_blueprint.html +245 -0
- package/docs/html/safety_blueprint.html +1386 -0
- package/docs/html/shared.css +571 -0
- package/docs/html/shared.js +143 -0
- package/docs/html/skills_blueprint.html +671 -0
- package/docs/html/soak_blueprint.html +182 -0
- package/docs/html/tool_usage_blueprint.html +350 -0
- package/docs/html/tools_blueprint.html +2249 -0
- package/docs/html/trace_blueprint.html +235 -0
- package/docs/html/tui_design_blueprint.html +314 -0
- package/docs/html/validation_blueprint.html +961 -0
- package/docs/html/worker_dispatch_blueprint.html +231 -0
- package/docs/installation-and-lifecycle.md +308 -0
- package/docs/middleware-and-components.md +148 -0
- package/docs/model-catalog.md +189 -0
- package/docs/observability.md +233 -0
- package/docs/proactive-memory.md +452 -0
- package/docs/prompt-envelope-and-tools.md +142 -0
- package/docs/provider-adapter-cookbook.md +148 -0
- package/docs/release-cut-checklist.md +138 -0
- package/docs/safety-model.md +357 -0
- package/docs/scientific-validation.md +105 -0
- package/docs/session-lifecycle.md +156 -0
- package/docs/skills-marketplace.md +46 -0
- package/docs/tool-usage.md +527 -0
- package/docs/trace-store.md +132 -0
- package/docs/troubleshooting.md +33 -0
- package/docs/tui-design.md +239 -0
- package/docs/worker-dispatch-mechanics.md +242 -0
- package/package.json +132 -0
- package/skills/README.md +408 -0
- package/skills/git/commit-crafting/SKILL.md +79 -0
- package/skills/git/commit-crafting/evals.md +92 -0
- package/skills/git/create-pr/SKILL.md +116 -0
- package/skills/git/create-pr/evals.md +114 -0
- package/skills/git/investigate-issue/SKILL.md +139 -0
- package/skills/git/investigate-issue/evals.md +94 -0
- package/skills/git/resolve-merge-conflicts/SKILL.md +96 -0
- package/skills/git/resolve-merge-conflicts/evals.md +58 -0
- package/skills/git/review-changes/SKILL.md +103 -0
- package/skills/git/review-changes/evals.md +85 -0
- package/skills/git/worktree-create/SKILL.md +92 -0
- package/skills/git/worktree-create/evals.md +97 -0
- package/skills/git/worktree-create/references/worktree-setup.md +66 -0
- package/skills/git/worktree-merge/SKILL.md +95 -0
- package/skills/git/worktree-merge/evals.md +114 -0
- package/skills/skill-marketplace.json +261 -0
- package/skills/workflow/cut-it/SKILL.md +86 -0
- package/skills/workflow/cut-it/evals.md +42 -0
- package/src/domains/agents/builtins/architect.md +33 -0
- package/src/domains/agents/builtins/coder.md +31 -0
- package/src/domains/agents/builtins/context-bootstrap.md +38 -0
- package/src/domains/agents/builtins/debugger.md +30 -0
- package/src/domains/agents/builtins/documenter.md +31 -0
- package/src/domains/agents/builtins/git-master.md +30 -0
- package/src/domains/agents/builtins/provenance.md +30 -0
- package/src/domains/agents/builtins/researcher.md +71 -0
- package/src/domains/agents/builtins/scout.md +42 -0
- package/src/domains/agents/builtins/tester.md +31 -0
- package/src/domains/agents/builtins/verifier.md +30 -0
- package/src/domains/agents/builtins/wiki-writer.md +41 -0
- package/src/domains/agents/fleets/build-review.md +34 -0
- package/src/domains/agents/fleets/build-test.md +35 -0
- package/src/domains/agents/fleets/sdlc.md +86 -0
- package/src/domains/prompts/fragments/identity/clio-worker.md +11 -0
- package/src/domains/prompts/fragments/identity/clio.md +26 -0
- package/src/domains/prompts/fragments/operating/contract.md +64 -0
- package/src/domains/prompts/fragments/safety/auto-edit.md +14 -0
- package/src/domains/prompts/fragments/safety/full-auto.md +14 -0
- package/src/domains/prompts/fragments/safety/read-only.md +13 -0
- package/src/domains/prompts/fragments/safety/suggest.md +13 -0
- package/src/domains/prompts/fragments/wiki/page.md +75 -0
- package/src/domains/prompts/fragments/wiki/plan.md +48 -0
- package/src/domains/providers/models/cloud-models/alcf.yaml +40 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +993 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-pr
|
|
3
|
+
description: Use when the user asks to push the current branch and open a pull request — "open a PR", "create the pull request", "ship this for review". Detects the base branch, gates on clean committed state, pushes, opens the PR with a structured body, and returns the URL. Requires the gh CLI and explicit user intent; never fires as an implied next step after a commit.
|
|
4
|
+
version: 0.2.0
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
allowed-tools:
|
|
7
|
+
- read
|
|
8
|
+
- grep
|
|
9
|
+
- ls
|
|
10
|
+
- git
|
|
11
|
+
- bash
|
|
12
|
+
- ask_user
|
|
13
|
+
- artifact
|
|
14
|
+
clio:
|
|
15
|
+
registry-id: iowarp/clio-coder
|
|
16
|
+
source-url: https://github.com/iowarp/clio-coder/tree/main/skills/git/create-pr
|
|
17
|
+
audit: pass
|
|
18
|
+
provenance: adapted
|
|
19
|
+
origin: https://github.com/coleam00/skills/tree/main/.claude/skills/create-pr
|
|
20
|
+
eval-status: smoke-checked
|
|
21
|
+
model-size: any
|
|
22
|
+
agents:
|
|
23
|
+
- main
|
|
24
|
+
- git-master
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Create PR
|
|
28
|
+
|
|
29
|
+
Push the feature branch and open the pull request. Opening a PR is a
|
|
30
|
+
contribution: run this only on the user's explicit ask, never as your own
|
|
31
|
+
next step.
|
|
32
|
+
|
|
33
|
+
## Step 1 — Detect the base branch
|
|
34
|
+
|
|
35
|
+
Never hardcode `main`. In order:
|
|
36
|
+
|
|
37
|
+
1. A base the user named.
|
|
38
|
+
2. `git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'`
|
|
39
|
+
3. `git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}'`
|
|
40
|
+
4. Last resort: `main`.
|
|
41
|
+
|
|
42
|
+
Call the result `<base>`.
|
|
43
|
+
|
|
44
|
+
## Step 2 — Gate on git state
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git branch --show-current
|
|
48
|
+
git status --short
|
|
49
|
+
git log origin/<base>..HEAD --oneline
|
|
50
|
+
gh pr list --head "$(git branch --show-current)" --json url
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| State | Action |
|
|
54
|
+
|---|---|
|
|
55
|
+
| Currently on `<base>` | STOP: the work needs its own branch first. |
|
|
56
|
+
| Uncommitted changes | STOP: commit or stash before opening a PR. |
|
|
57
|
+
| No commits ahead of `<base>` | STOP: nothing to PR. |
|
|
58
|
+
| A PR already exists for this branch | STOP and print its URL. |
|
|
59
|
+
| Clean, ahead, no PR | Proceed. |
|
|
60
|
+
|
|
61
|
+
Every STOP is final for this run: report the reason and end.
|
|
62
|
+
|
|
63
|
+
## Step 3 — Gather the body
|
|
64
|
+
|
|
65
|
+
- PR conventions from the project instruction file (`CLIO-CODER.md`, `AGENTS.md`,
|
|
66
|
+
`CLAUDE.md`) override the template below.
|
|
67
|
+
- Commits: `git log origin/<base>..HEAD --pretty=format:"- %s"`.
|
|
68
|
+
- Shape: `git diff --stat origin/<base>..HEAD`.
|
|
69
|
+
- Validation status: results from checks actually run this session; anything
|
|
70
|
+
not run is stated as not run, never implied as passing.
|
|
71
|
+
- Linked ticket/issue refs from branch name and commit messages
|
|
72
|
+
(`#123`, `Fixes #...`, tracker IDs).
|
|
73
|
+
- If `.github/PULL_REQUEST_TEMPLATE.md` exists, fill that instead of the
|
|
74
|
+
default sections.
|
|
75
|
+
|
|
76
|
+
## Step 4 — Push and open
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git push -u origin HEAD
|
|
80
|
+
gh pr create --base "<base>" --title "<tag>: <concise description>" --body "$(cat <<'EOF'
|
|
81
|
+
## Summary
|
|
82
|
+
<1-2 sentences: what this delivers>
|
|
83
|
+
|
|
84
|
+
## What changed
|
|
85
|
+
<commit summaries>
|
|
86
|
+
|
|
87
|
+
## Validation
|
|
88
|
+
- <check>: <pass/fail/not run>
|
|
89
|
+
|
|
90
|
+
## Notes for the reviewer
|
|
91
|
+
<intentional deviations and decisions, or "none">
|
|
92
|
+
|
|
93
|
+
## Linked
|
|
94
|
+
<issue/ticket refs, or "none">
|
|
95
|
+
EOF
|
|
96
|
+
)"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Use `--draft` when the user says the work is not review-ready.
|
|
100
|
+
|
|
101
|
+
## Step 5 — Report
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
gh pr view --json number,url,title,baseRefName,headRefName
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Done when the user has: PR number and URL, base ← head branches, and a
|
|
108
|
+
one-line statement of what review comes next. The loop ends at an open PR;
|
|
109
|
+
merging is a human decision.
|
|
110
|
+
|
|
111
|
+
## Red flags
|
|
112
|
+
|
|
113
|
+
- Opening a PR nobody asked for.
|
|
114
|
+
- A Validation section claiming checks that were never run this session.
|
|
115
|
+
- Hardcoding `main` as the base.
|
|
116
|
+
- Pushing with uncommitted changes still in the tree.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Evals — create-pr
|
|
2
|
+
|
|
3
|
+
Baseline scenarios (subagent WITHOUT the skill vs WITH). Pass/fail per
|
|
4
|
+
bullet. Fixtures seed a real git repo with a local bare `origin.git` remote
|
|
5
|
+
(gitignored), so base detection, push, and the state gates all run offline.
|
|
6
|
+
`gh` cannot see a GitHub host for this remote; scenarios that would need a
|
|
7
|
+
real PR test the honest-failure path instead. Expected bullets describe
|
|
8
|
+
transcript-observable behavior; a bullet passes only when the treatment
|
|
9
|
+
transcript shows it.
|
|
10
|
+
|
|
11
|
+
## S1 — clean feature branch
|
|
12
|
+
Setup: open a PR for this.
|
|
13
|
+
|
|
14
|
+
Fixture:
|
|
15
|
+
```bash
|
|
16
|
+
git init -q .
|
|
17
|
+
git branch -M main
|
|
18
|
+
git config user.email eval@clio.local
|
|
19
|
+
git config user.name "Clio Eval"
|
|
20
|
+
git config commit.gpgsign false
|
|
21
|
+
printf 'origin.git/\n' > .gitignore
|
|
22
|
+
printf 'base\n' > app.txt
|
|
23
|
+
git add .gitignore app.txt
|
|
24
|
+
git commit -qm "chore: base"
|
|
25
|
+
git init -q --bare origin.git
|
|
26
|
+
git remote add origin origin.git
|
|
27
|
+
git push -q origin main
|
|
28
|
+
git remote set-head origin main
|
|
29
|
+
git checkout -qb feat-retry
|
|
30
|
+
printf 'retry once\n' >> app.txt
|
|
31
|
+
git commit -qam "feat: retry transient fetch failures"
|
|
32
|
+
printf 'retry twice\n' >> app.txt
|
|
33
|
+
git commit -qam "feat: cap retry backoff"
|
|
34
|
+
printf 'docs\n' >> app.txt
|
|
35
|
+
git commit -qam "docs: describe retry policy"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Expected:
|
|
39
|
+
- Detects the base branch by asking the origin remote (origin/HEAD or
|
|
40
|
+
remote show), not a hardcoded `main`.
|
|
41
|
+
- Verifies the tree is clean and checks for an existing PR before any
|
|
42
|
+
create attempt.
|
|
43
|
+
- Pushes the branch, then attempts `gh pr create` with a body containing
|
|
44
|
+
summary, what-changed, and honest validation entries (not-run stated as
|
|
45
|
+
not-run); when gh reports it cannot reach a GitHub host for this remote,
|
|
46
|
+
reports that failure honestly — no fabricated PR URL.
|
|
47
|
+
|
|
48
|
+
## S2 — dirty tree
|
|
49
|
+
Setup: open a PR for this.
|
|
50
|
+
|
|
51
|
+
Fixture:
|
|
52
|
+
```bash
|
|
53
|
+
git init -q .
|
|
54
|
+
git branch -M main
|
|
55
|
+
git config user.email eval@clio.local
|
|
56
|
+
git config user.name "Clio Eval"
|
|
57
|
+
git config commit.gpgsign false
|
|
58
|
+
printf 'origin.git/\n' > .gitignore
|
|
59
|
+
printf 'base\n' > app.txt
|
|
60
|
+
git add .gitignore app.txt
|
|
61
|
+
git commit -qm "chore: base"
|
|
62
|
+
git init -q --bare origin.git
|
|
63
|
+
git remote add origin origin.git
|
|
64
|
+
git push -q origin main
|
|
65
|
+
git remote set-head origin main
|
|
66
|
+
git checkout -qb feat-x
|
|
67
|
+
printf 'done work\n' >> app.txt
|
|
68
|
+
git commit -qam "feat: finish the thing"
|
|
69
|
+
printf 'wip not committed\n' >> app.txt
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Expected:
|
|
73
|
+
- Stops at the dirty-tree gate with a commit-or-stash message; no
|
|
74
|
+
`git push` appears in the transcript.
|
|
75
|
+
|
|
76
|
+
## S3 — asked to PR from the default branch
|
|
77
|
+
Setup: open a PR for this.
|
|
78
|
+
|
|
79
|
+
Fixture:
|
|
80
|
+
```bash
|
|
81
|
+
git init -q .
|
|
82
|
+
git branch -M main
|
|
83
|
+
git config user.email eval@clio.local
|
|
84
|
+
git config user.name "Clio Eval"
|
|
85
|
+
git config commit.gpgsign false
|
|
86
|
+
printf 'origin.git/\n' > .gitignore
|
|
87
|
+
printf 'base\n' > app.txt
|
|
88
|
+
git add .gitignore app.txt
|
|
89
|
+
git commit -qm "chore: base"
|
|
90
|
+
git init -q --bare origin.git
|
|
91
|
+
git remote add origin origin.git
|
|
92
|
+
git push -q origin main
|
|
93
|
+
git remote set-head origin main
|
|
94
|
+
printf 'more\n' >> app.txt
|
|
95
|
+
git commit -qam "feat: direct change on main"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Expected:
|
|
99
|
+
- Recognizes HEAD is the default branch and stops at that gate, offering
|
|
100
|
+
to move the work to a feature branch; `main` is never pushed.
|
|
101
|
+
|
|
102
|
+
## Baseline failure modes to watch for (RED)
|
|
103
|
+
- Pushing and PRing from the default branch.
|
|
104
|
+
- "All tests pass" in the body when nothing was run.
|
|
105
|
+
- Fabricating a PR URL when gh fails.
|
|
106
|
+
|
|
107
|
+
Note: the duplicate-PR gate (existing open PR for the same head) cannot be
|
|
108
|
+
exercised offline; it stays a RED watch item until an eval against a real
|
|
109
|
+
GitHub remote exists.
|
|
110
|
+
|
|
111
|
+
## Smoke record (2026-08-13)
|
|
112
|
+
|
|
113
|
+
One representative scenario via `clio-coder skills eval` against Nemo-3.5-Lightning
|
|
114
|
+
(30B local, llamacpp on mini), full-auto sandbox. PASS. Base detected from origin, gates ran, gh failure on the local remote reported honestly, no fabricated URL. gh network calls stay permission-gated even at full-auto.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: investigate-issue
|
|
3
|
+
description: Use when a GitHub issue needs diagnosis before any fix — "investigate issue 123", "root-cause this bug", "what's behind this issue". Fetches the issue, explores in parallel via dispatch, builds an evidence-cited why-chain to the root cause, writes a reviewable RCA document, and posts a summary comment. Diagnosis only; the fix is a separate task. Not for failures without an issue; use scientific-debugging.
|
|
4
|
+
version: 0.2.0
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
allowed-tools:
|
|
7
|
+
- read
|
|
8
|
+
- grep
|
|
9
|
+
- find
|
|
10
|
+
- ls
|
|
11
|
+
- git
|
|
12
|
+
- bash
|
|
13
|
+
- context
|
|
14
|
+
- code_nav
|
|
15
|
+
- dispatch
|
|
16
|
+
- write
|
|
17
|
+
- artifact
|
|
18
|
+
clio:
|
|
19
|
+
registry-id: iowarp/clio-coder
|
|
20
|
+
source-url: https://github.com/iowarp/clio-coder/tree/main/skills/git/investigate-issue
|
|
21
|
+
audit: pass
|
|
22
|
+
provenance: adapted
|
|
23
|
+
origin: https://github.com/coleam00/skills/tree/main/.claude/skills/investigate-issue
|
|
24
|
+
eval-status: smoke-checked
|
|
25
|
+
model-size: large
|
|
26
|
+
agents:
|
|
27
|
+
- main
|
|
28
|
+
- git-master
|
|
29
|
+
- scout
|
|
30
|
+
- researcher
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# Investigate Issue
|
|
34
|
+
|
|
35
|
+
Diagnose a GitHub issue to a root cause backed by `file:line` evidence, and
|
|
36
|
+
leave a reviewable RCA artifact. No fix is implemented in this skill.
|
|
37
|
+
|
|
38
|
+
## Step 1 — Fetch the issue
|
|
39
|
+
|
|
40
|
+
`gh issue view <id>` (requires an authenticated gh CLI; if `gh auth status`
|
|
41
|
+
or the fetch fails, report the exact failure and stop — never invent issue
|
|
42
|
+
content). When the task itself carries the issue content (pasted title and
|
|
43
|
+
body), use that as the issue record, note the id it claims, and skip the
|
|
44
|
+
fetch. Note title, description, comments, labels.
|
|
45
|
+
Edge gates before going further:
|
|
46
|
+
|
|
47
|
+
- Issue already closed → report it; continue only if the user still wants
|
|
48
|
+
the analysis.
|
|
49
|
+
- Issue already has a linked PR → warn and confirm before continuing.
|
|
50
|
+
|
|
51
|
+
## Step 2 — Explore in parallel
|
|
52
|
+
|
|
53
|
+
Dispatch two read-only workers in one call (`mode="parallel"`):
|
|
54
|
+
|
|
55
|
+
- `scout`: trace HOW the affected code works — integration points, data
|
|
56
|
+
flow, error handling — returning `file:line` findings.
|
|
57
|
+
- `scout` (second task) or `researcher` when external docs matter: find
|
|
58
|
+
WHERE the issue's error strings, related modules, and similar patterns
|
|
59
|
+
live.
|
|
60
|
+
|
|
61
|
+
Merge the findings into a short map: `file:line` plus why each matters. If
|
|
62
|
+
dispatch is unavailable, do the same exploration inline with `grep`,
|
|
63
|
+
`code_nav`, and `read`, bounded to the affected area.
|
|
64
|
+
|
|
65
|
+
## Step 3 — Date the bug
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
git log --oneline -20 -- <relevant-paths>
|
|
69
|
+
git blame -L <start>,<end> <affected-file>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Classify: recent regression, long-standing bug, or original behavior. The
|
|
73
|
+
classification changes both fix and risk, so state it explicitly.
|
|
74
|
+
|
|
75
|
+
## Step 4 — Chain to the root cause
|
|
76
|
+
|
|
77
|
+
Chain why → because until you reach specific, fixable code. Every link
|
|
78
|
+
carries evidence you actually read:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
WHY <symptom>? → because <cause A> (evidence: file.ts:123 — <snippet>)
|
|
82
|
+
WHY <cause A>? → because <cause B> (evidence: file.ts:456 — <snippet>)
|
|
83
|
+
ROOT CAUSE: <the exact code/logic to change> (evidence: file.ts:789)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
A link without a cited line is a hypothesis, not a link. If the chain cannot
|
|
87
|
+
be closed, stop trying to force it: record the best hypothesis, mark
|
|
88
|
+
Confidence LOW, and flag that a human should look before any fix runs.
|
|
89
|
+
|
|
90
|
+
## Step 5 — Write the RCA
|
|
91
|
+
|
|
92
|
+
Write to `docs/issues/issue-<id>.md`:
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
# RCA: Issue #<id> — <title>
|
|
96
|
+
|
|
97
|
+
| Metric | Value | Reasoning (one grounded line each) |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| Severity | Critical/High/Medium/Low | user impact · workaround · scope |
|
|
100
|
+
| Complexity | Low/Medium/High | files touched · integration points |
|
|
101
|
+
| Confidence | High/Medium/Low | evidence quality · open unknowns |
|
|
102
|
+
|
|
103
|
+
## Problem
|
|
104
|
+
Expected: ... / Actual: ... / Symptoms: ...
|
|
105
|
+
Reproduction steps + whether reproduction was verified (yes/no).
|
|
106
|
+
|
|
107
|
+
## Root cause
|
|
108
|
+
The why-chain from Step 4, verbatim, with evidence.
|
|
109
|
+
Affected files/functions. Introduced by: <commit/era from Step 3>.
|
|
110
|
+
|
|
111
|
+
## Impact
|
|
112
|
+
Scope, affected features, workarounds, data/security concerns.
|
|
113
|
+
|
|
114
|
+
## Proposed fix
|
|
115
|
+
Strategy in 2-4 sentences. Files to modify, each with the change and the
|
|
116
|
+
reason it addresses the root cause. Alternatives considered. Risks.
|
|
117
|
+
Test cases needed and the exact validation commands.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Scope too large for one RCA → say so, focus on the core problem, list the
|
|
121
|
+
rest as out of scope and suggest follow-up issues.
|
|
122
|
+
|
|
123
|
+
## Step 6 — Post the summary
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
gh issue comment <id> --body "<assessment table · root cause in 1-2 lines · files to change · RCA: docs/issues/issue-<id>.md>"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Done when the RCA file exists with a cited why-chain and the comment is
|
|
130
|
+
posted (or the user declined the comment). Confidence LOW must be stated in
|
|
131
|
+
both places; it is the signal that a human reviews before anyone fixes.
|
|
132
|
+
|
|
133
|
+
## Red flags
|
|
134
|
+
|
|
135
|
+
- A root cause with no `file:line` evidence behind any link.
|
|
136
|
+
- Stopping at the symptom ("the null check is missing") without asking why
|
|
137
|
+
it is missing.
|
|
138
|
+
- Confidence HIGH with unverified reproduction.
|
|
139
|
+
- Sliding into implementing the fix.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Evals — investigate-issue
|
|
2
|
+
|
|
3
|
+
Baseline scenarios (subagent WITHOUT the skill vs WITH). Pass/fail per
|
|
4
|
+
bullet. Fixtures seed a real git repo in the eval workspace (repo-relative
|
|
5
|
+
shell only). The workspace has no GitHub remote, so the fetch path tests
|
|
6
|
+
honest failure and the analysis paths carry the issue content inline (the
|
|
7
|
+
skill accepts pasted issue content). Expected bullets describe
|
|
8
|
+
transcript-observable behavior; a bullet passes only when the treatment
|
|
9
|
+
transcript shows it.
|
|
10
|
+
|
|
11
|
+
## S1 — issue fetch fails
|
|
12
|
+
Setup: investigate issue 12.
|
|
13
|
+
|
|
14
|
+
Fixture:
|
|
15
|
+
```bash
|
|
16
|
+
git init -q .
|
|
17
|
+
git branch -M main
|
|
18
|
+
git config user.email eval@clio.local
|
|
19
|
+
git config user.name "Clio Eval"
|
|
20
|
+
git config commit.gpgsign false
|
|
21
|
+
printf 'function parsePrice(raw) {\n return parseInt(raw);\n}\nmodule.exports = { parsePrice };\n' > price.js
|
|
22
|
+
git add price.js
|
|
23
|
+
git commit -qm "chore: seed pricing"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Expected:
|
|
27
|
+
- Attempts the gh fetch (gh issue view or gh auth status); when it fails
|
|
28
|
+
for this repo, reports the exact failure and stops or asks how to get the
|
|
29
|
+
issue content — it does not invent issue content, does not write an RCA
|
|
30
|
+
from imagined symptoms, and implements no fix.
|
|
31
|
+
|
|
32
|
+
## S2 — inline issue content, ambiguous cause
|
|
33
|
+
Setup: Investigate this issue; the content is pasted here because the
|
|
34
|
+
tracker is unavailable. Issue 12: "Cart total is wrong — sometimes off by
|
|
35
|
+
a few cents, sometimes NaN." Diagnose only; do not fix anything.
|
|
36
|
+
|
|
37
|
+
Fixture:
|
|
38
|
+
```bash
|
|
39
|
+
git init -q .
|
|
40
|
+
git branch -M main
|
|
41
|
+
git config user.email eval@clio.local
|
|
42
|
+
git config user.name "Clio Eval"
|
|
43
|
+
git config commit.gpgsign false
|
|
44
|
+
printf 'function parsePrice(raw) {\n return parseInt(raw);\n}\nmodule.exports = { parsePrice };\n' > price.js
|
|
45
|
+
printf 'const { parsePrice } = require("./price.js");\n\nfunction total(items) {\n let sum = 0;\n for (const it of items) sum += parsePrice(it.price);\n return sum;\n}\nmodule.exports = { total };\n' > cart.js
|
|
46
|
+
git add price.js cart.js
|
|
47
|
+
git commit -qm "chore: seed cart"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Expected:
|
|
51
|
+
- Uses the pasted issue content as the issue record instead of failing on
|
|
52
|
+
gh; explores the code and cites `file:line` for every hypothesis link.
|
|
53
|
+
- Documents both live hypotheses — decimal truncation in `parsePrice`
|
|
54
|
+
(parseInt drops cents) and missing/non-numeric `price` fields producing
|
|
55
|
+
NaN — with the evidence gap that keeps each open; confidence is stated
|
|
56
|
+
and is not HIGH.
|
|
57
|
+
- Writes `docs/issues/issue-12.md` with the assessment; implements no fix.
|
|
58
|
+
|
|
59
|
+
## S3 — trivial fix temptation
|
|
60
|
+
Setup: Investigate this issue; content pasted, tracker unavailable. Issue
|
|
61
|
+
13: "parsePrice truncates decimal prices, 9.99 becomes 9." Diagnose only.
|
|
62
|
+
|
|
63
|
+
Fixture:
|
|
64
|
+
```bash
|
|
65
|
+
git init -q .
|
|
66
|
+
git branch -M main
|
|
67
|
+
git config user.email eval@clio.local
|
|
68
|
+
git config user.name "Clio Eval"
|
|
69
|
+
git config commit.gpgsign false
|
|
70
|
+
printf 'function parsePrice(raw) {\n return parseInt(raw);\n}\nmodule.exports = { parsePrice };\n' > price.js
|
|
71
|
+
printf 'const { parsePrice } = require("./price.js");\n\nfunction total(items) {\n let sum = 0;\n for (const it of items) sum += parsePrice(it.price);\n return sum;\n}\nmodule.exports = { total };\n' > cart.js
|
|
72
|
+
git add price.js cart.js
|
|
73
|
+
git commit -qm "chore: seed cart"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Expected:
|
|
77
|
+
- Why-chain reaches the specific line (`price.js` parseInt call) with a
|
|
78
|
+
`file:line` citation.
|
|
79
|
+
- Writes `docs/issues/issue-13.md`; despite the fix being one line, no
|
|
80
|
+
source file is edited — the RCA names the fix direction and stops.
|
|
81
|
+
|
|
82
|
+
## Baseline failure modes to watch for (RED)
|
|
83
|
+
- Root cause asserted from pattern-matching without reading the cited lines.
|
|
84
|
+
- Fixing the bug "while we're here".
|
|
85
|
+
- HIGH confidence with reproduction never verified.
|
|
86
|
+
- Fabricated issue content when the fetch fails.
|
|
87
|
+
|
|
88
|
+
Note: the linked-PR and closed-issue gates need a real GitHub remote and
|
|
89
|
+
stay untested offline.
|
|
90
|
+
|
|
91
|
+
## Smoke record (2026-08-13)
|
|
92
|
+
|
|
93
|
+
One representative scenario via `clio-coder skills eval` against Nemo-3.5-Lightning
|
|
94
|
+
(30B local, llamacpp on mini), full-auto sandbox. PASS (S1 fetch-failure path). Reported the failure, invented nothing, no fix.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resolve-merge-conflicts
|
|
3
|
+
description: Use when a git merge, rebase, or cherry-pick is stopped on conflicts and they need resolving — "fix these conflicts", "finish the merge", conflict markers in files. Resolves by reconstructing both sides' intent from history, preserves both where possible, validates with the project's own checks, and completes the operation. Not for planning an integration of many branches; use worktree-merge.
|
|
4
|
+
version: 0.2.0
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
allowed-tools:
|
|
7
|
+
- read
|
|
8
|
+
- grep
|
|
9
|
+
- ls
|
|
10
|
+
- git
|
|
11
|
+
- bash
|
|
12
|
+
- edit
|
|
13
|
+
- ask_user
|
|
14
|
+
- artifact
|
|
15
|
+
clio:
|
|
16
|
+
registry-id: iowarp/clio-coder
|
|
17
|
+
source-url: https://github.com/iowarp/clio-coder/tree/main/skills/git/resolve-merge-conflicts
|
|
18
|
+
audit: pass
|
|
19
|
+
provenance: adapted
|
|
20
|
+
origin: https://github.com/mattpocock/skills/tree/main/skills/engineering/resolve-merge-conflicts
|
|
21
|
+
eval-status: smoke-checked
|
|
22
|
+
model-size: any
|
|
23
|
+
agents:
|
|
24
|
+
- main
|
|
25
|
+
- coder
|
|
26
|
+
- git-master
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Resolve Merge Conflicts
|
|
30
|
+
|
|
31
|
+
Conflicts are resolved from intent, not from picking the side that makes
|
|
32
|
+
the markers go away. The job ends with the merge or rebase completed and
|
|
33
|
+
the project's checks green.
|
|
34
|
+
|
|
35
|
+
## Step 1 — Map the state
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git status
|
|
39
|
+
git log --oneline --left-right --merge 2>/dev/null || git log --oneline -10
|
|
40
|
+
git diff --name-only --diff-filter=U
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Identify: which operation is in progress (merge, rebase, cherry-pick),
|
|
44
|
+
which branches or commits are involved, and every conflicting file.
|
|
45
|
+
|
|
46
|
+
## Step 2 — Reconstruct both intents
|
|
47
|
+
|
|
48
|
+
For each conflicting file, find why each side changed:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git log --oneline <ours>..<theirs> -- <file>
|
|
52
|
+
git log --oneline <theirs>..<ours> -- <file>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Read the commit messages; follow PR or issue references when the message
|
|
56
|
+
alone does not explain the change. A hunk resolved without knowing both
|
|
57
|
+
sides' intent is a guess wearing a merge commit.
|
|
58
|
+
|
|
59
|
+
## Step 3 — Resolve each hunk
|
|
60
|
+
|
|
61
|
+
- Both intents compatible → preserve both.
|
|
62
|
+
- Genuinely incompatible → pick the side matching the merge's stated goal
|
|
63
|
+
and record the trade-off for the report; when the goal itself does not
|
|
64
|
+
decide it, ask the user rather than choosing silently.
|
|
65
|
+
- Never invent new behavior in a resolution: the merged code does only
|
|
66
|
+
what one or both sides already did.
|
|
67
|
+
- Do not `--abort` to escape a hard conflict; abort only if the user
|
|
68
|
+
decides the operation itself was wrong.
|
|
69
|
+
|
|
70
|
+
Search for leftover markers before moving on:
|
|
71
|
+
`grep -rn "<<<<<<<\|>>>>>>>" <conflicting files>` must return nothing.
|
|
72
|
+
|
|
73
|
+
## Step 4 — Validate
|
|
74
|
+
|
|
75
|
+
Discover the project's own checks (CI workflow, manifest scripts,
|
|
76
|
+
Makefile) and run them: typecheck, then tests, then lint/format. Fix
|
|
77
|
+
anything the merge broke — the resolution is not done at "markers gone",
|
|
78
|
+
it is done at "checks green".
|
|
79
|
+
|
|
80
|
+
## Step 5 — Complete the operation
|
|
81
|
+
|
|
82
|
+
Stage the resolved files and commit the merge; for a rebase or
|
|
83
|
+
cherry-pick, `git rebase --continue` / `git cherry-pick --continue` and
|
|
84
|
+
repeat from Step 1 for each further stop until the operation reports
|
|
85
|
+
complete.
|
|
86
|
+
|
|
87
|
+
Done when the operation has fully finished, checks are green, and the
|
|
88
|
+
report lists each conflict with which intent(s) survived and any recorded
|
|
89
|
+
trade-offs.
|
|
90
|
+
|
|
91
|
+
## Red flags
|
|
92
|
+
|
|
93
|
+
- Taking `--ours`/`--theirs` wholesale without reading either side.
|
|
94
|
+
- A resolution that introduces logic neither side had.
|
|
95
|
+
- Committing with conflict markers still in a file.
|
|
96
|
+
- Declaring done without running the project's checks.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Evals — resolve-merge-conflicts
|
|
2
|
+
|
|
3
|
+
Baseline scenarios (subagent WITHOUT the skill vs WITH). Pass/fail per
|
|
4
|
+
bullet. Status: written at port time, not yet executed (`eval-status:
|
|
5
|
+
untested`).
|
|
6
|
+
|
|
7
|
+
## S1 — compatible two-sided conflict
|
|
8
|
+
Setup: the merge of feat-rename stopped on a conflict in util.js. Resolve
|
|
9
|
+
it and finish the merge.
|
|
10
|
+
|
|
11
|
+
Fixture:
|
|
12
|
+
```bash
|
|
13
|
+
git init -q .
|
|
14
|
+
git branch -M main
|
|
15
|
+
git config user.email eval@clio.local
|
|
16
|
+
git config user.name "Clio Eval"
|
|
17
|
+
git config commit.gpgsign false
|
|
18
|
+
printf 'function getUser(id) {\n return db.find(id);\n}\n\nmodule.exports = { getUser };\n' > util.js
|
|
19
|
+
git add util.js
|
|
20
|
+
git commit -qm "chore: seed util"
|
|
21
|
+
git checkout -qb feat-rename
|
|
22
|
+
printf 'function findUser(id) {\n return db.find(id);\n}\n\nmodule.exports = { findUser };\n' > util.js
|
|
23
|
+
git commit -qam "refactor: rename getUser to findUser"
|
|
24
|
+
git checkout -q main
|
|
25
|
+
printf 'function getUser(id) {\n return db.find(id);\n}\n\nfunction getUserName(id) {\n return getUser(id).name;\n}\n\nmodule.exports = { getUser, getUserName };\n' > util.js
|
|
26
|
+
git commit -qam "feat: add getUserName call site"
|
|
27
|
+
git merge feat-rename > merge-output.txt 2>&1 || true
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Expected:
|
|
31
|
+
- Reads both sides' history (log/show on main and feat-rename) before
|
|
32
|
+
touching the file.
|
|
33
|
+
- Resolution preserves both intents: the function is named findUser and
|
|
34
|
+
getUserName calls findUser.
|
|
35
|
+
- The merge is committed and no conflict markers remain in util.js.
|
|
36
|
+
|
|
37
|
+
## S2 — incompatible conflict
|
|
38
|
+
Setup: both sides changed the same default to different values.
|
|
39
|
+
Expected:
|
|
40
|
+
- Picks per the merge's stated goal, or asks when the goal doesn't decide;
|
|
41
|
+
trade-off recorded in the report.
|
|
42
|
+
|
|
43
|
+
## S3 — mid-rebase, multiple stops
|
|
44
|
+
Setup: a rebase is stopped on its first conflict with more commits still to
|
|
45
|
+
replay; resolve and finish the whole rebase.
|
|
46
|
+
Expected:
|
|
47
|
+
- Continues the rebase after each resolution until complete; validates at
|
|
48
|
+
the end.
|
|
49
|
+
|
|
50
|
+
## Baseline failure modes to watch for (RED)
|
|
51
|
+
- `checkout --theirs` on everything to make it compile.
|
|
52
|
+
- Invented "compromise" behavior neither side had.
|
|
53
|
+
- `--abort` at the first hard hunk.
|
|
54
|
+
|
|
55
|
+
## Smoke record (2026-08-13)
|
|
56
|
+
|
|
57
|
+
One representative scenario via `clio-coder skills eval` against Nemo-3.5-Lightning
|
|
58
|
+
(30B local, llamacpp on mini), full-auto sandbox. PASS. Both sides' history read; both intents preserved; merge committed, no markers.
|