@cobusgreyling/loop-init 1.2.1 → 1.2.3
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/README.md +1 -0
- package/dist/cli.js +20 -1
- package/package.json +3 -3
- package/starters/README.md +1 -0
- package/starters/changelog-drafter/changelog-drafter-state.md.example +7 -0
- package/starters/issue-triage/.claude/agents/loop-verifier.md +35 -0
- package/starters/issue-triage/.claude/skills/issue-triage/SKILL.md +66 -0
- package/starters/issue-triage/.codex/agents/verifier.toml +15 -0
- package/starters/issue-triage/.codex/skills/issue-triage/SKILL.md +66 -0
- package/starters/issue-triage/.grok/skills/issue-triage/SKILL.md +66 -0
- package/starters/issue-triage/.grok/skills/loop-verifier/SKILL.md +48 -0
- package/starters/issue-triage/LOOP.md +28 -0
- package/starters/issue-triage/README.md +36 -0
- package/starters/issue-triage/issue-triage-state.md.example +30 -0
- package/starters/minimal-loop/STATE.md.example +7 -0
- package/templates/SKILL.md.issue-triage +66 -0
- package/templates/SKILL.md.loop-constraints +48 -0
- package/templates/loop-constraints.md +31 -0
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ After scaffolding, always run `npx @cobusgreyling/loop-audit . --suggest` and ac
|
|
|
26
26
|
| `dependency-sweeper` | `dependency-sweeper-state.md` |
|
|
27
27
|
| `post-merge-cleanup` | `post-merge-state.md` |
|
|
28
28
|
| `changelog-drafter` | `changelog-drafter-state.md` |
|
|
29
|
+
| `issue-triage` | `issue-triage-state.md` |
|
|
29
30
|
|
|
30
31
|
L2 patterns (`ci-sweeper`, `dependency-sweeper`) also copy `minimal-fix` and `loop-verifier` templates when missing from the starter.
|
|
31
32
|
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ const PATTERN_STARTERS = {
|
|
|
13
13
|
'dependency-sweeper': 'dependency-sweeper',
|
|
14
14
|
'post-merge-cleanup': 'post-merge-cleanup',
|
|
15
15
|
'changelog-drafter': 'changelog-drafter',
|
|
16
|
-
'issue-triage': '
|
|
16
|
+
'issue-triage': 'issue-triage',
|
|
17
17
|
};
|
|
18
18
|
const TOOL_SUFFIX = {
|
|
19
19
|
grok: '',
|
|
@@ -194,6 +194,14 @@ async function scaffoldObservability(pattern, tool, targetDir, templatesRoot, dr
|
|
|
194
194
|
}
|
|
195
195
|
await copyTemplateSkill(templatesRoot, 'SKILL.md.loop-budget', targetDir, tool, 'loop-budget', dryRun);
|
|
196
196
|
}
|
|
197
|
+
async function scaffoldConstraints(targetDir, templatesRoot, tool, dryRun) {
|
|
198
|
+
const constraintsPath = path.join(targetDir, 'loop-constraints.md');
|
|
199
|
+
const constraintsTemplate = path.join(templatesRoot, 'loop-constraints.md');
|
|
200
|
+
if (!(await exists(constraintsPath)) && (await exists(constraintsTemplate))) {
|
|
201
|
+
await copyFile(constraintsTemplate, constraintsPath, dryRun);
|
|
202
|
+
}
|
|
203
|
+
await copyTemplateSkill(templatesRoot, 'SKILL.md.loop-constraints', targetDir, tool, 'loop-constraints', dryRun);
|
|
204
|
+
}
|
|
197
205
|
async function copyFile(src, dest, dryRun) {
|
|
198
206
|
if (!(await exists(src)))
|
|
199
207
|
return false;
|
|
@@ -276,6 +284,16 @@ Examples:
|
|
|
276
284
|
process.exit(0);
|
|
277
285
|
}
|
|
278
286
|
const { pattern, tool, target, dryRun } = args;
|
|
287
|
+
const validPatterns = Object.keys(PATTERN_STARTERS);
|
|
288
|
+
const validTools = Object.keys(TOOL_SUFFIX);
|
|
289
|
+
if (!validPatterns.includes(pattern)) {
|
|
290
|
+
console.error(`Unknown pattern: ${pattern}. Valid: ${validPatterns.join(', ')}`);
|
|
291
|
+
process.exit(1);
|
|
292
|
+
}
|
|
293
|
+
if (!validTools.includes(tool)) {
|
|
294
|
+
console.error(`Unknown tool: ${tool}. Valid: ${validTools.join(', ')}`);
|
|
295
|
+
process.exit(1);
|
|
296
|
+
}
|
|
279
297
|
const targetDir = path.resolve(target);
|
|
280
298
|
const baseStarter = PATTERN_STARTERS[pattern];
|
|
281
299
|
const suffix = TOOL_SUFFIX[tool];
|
|
@@ -342,6 +360,7 @@ Examples:
|
|
|
342
360
|
}
|
|
343
361
|
await copyL2Templates(pattern, tool, targetDir, templatesRoot, dryRun);
|
|
344
362
|
await scaffoldObservability(pattern, tool, targetDir, templatesRoot, dryRun);
|
|
363
|
+
await scaffoldConstraints(targetDir, templatesRoot, tool, dryRun);
|
|
345
364
|
if (!dryRun && !(await exists(path.join(targetDir, 'AGENTS.md')))) {
|
|
346
365
|
const agentsTemplate = `# AGENTS.md
|
|
347
366
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobusgreyling/loop-init",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Scaffold loop engineering patterns and starters into any project. Supports Grok, Claude Code, Codex and more. npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"typescript": "^
|
|
52
|
+
"@types/node": "^26.0.0",
|
|
53
|
+
"typescript": "^6.0.3"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/starters/README.md
CHANGED
|
@@ -24,6 +24,7 @@ npx @cobusgreyling/loop-init . -p pr-babysitter -t claude
|
|
|
24
24
|
| [dependency-sweeper](./dependency-sweeper/) | Dependency Sweeper | Grok, Claude, Codex | L2 patch-only |
|
|
25
25
|
| [post-merge-cleanup](./post-merge-cleanup/) | Post-Merge Cleanup | Grok, Claude, Codex | L1 → L2 |
|
|
26
26
|
| [changelog-drafter](./changelog-drafter/) | Changelog Drafter | Grok, Claude, Codex | L1 draft → L2 |
|
|
27
|
+
| [issue-triage](./issue-triage/) | Issue Triage | Grok, Claude, Codex | L1 propose-only |
|
|
27
28
|
|
|
28
29
|
After copying:
|
|
29
30
|
|
|
@@ -13,6 +13,13 @@ Last release tag: v2.14.0 (2026-06-01)
|
|
|
13
13
|
## Recently Published
|
|
14
14
|
- v2.14.0 — published 2026-06-01 (human reviewed draft)
|
|
15
15
|
|
|
16
|
+
## Post-Run Critique (from last run)
|
|
17
|
+
- **Missed items**: 0 reported
|
|
18
|
+
- **False positives**: 2 internal chore PRs — tightened bot filter
|
|
19
|
+
- **Grouping issues**: 1 fix in Features — add label check
|
|
20
|
+
- **Retries**: 0
|
|
21
|
+
- **Prompt/policy adjustments**: None needed this run
|
|
22
|
+
|
|
16
23
|
## Scan Window Notes
|
|
17
24
|
- Ignore Dependabot / Renovate PRs (handled by dependency-sweeper)
|
|
18
25
|
- Direct commits on main are included if they have conventional type or linked issue
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: loop-verifier
|
|
3
|
+
description: Independent checker for loop-produced changes. Rejects unless tests pass and scope is minimal. Never implement fixes.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the **checker** in a maker/checker split. Your job is to **reject** unless evidence is strong.
|
|
8
|
+
|
|
9
|
+
## Checklist (all must pass for APPROVE)
|
|
10
|
+
|
|
11
|
+
1. **Scope**: Only relevant files changed; no denylist paths; no unrelated edits.
|
|
12
|
+
2. **Intent**: Change clearly addresses the stated target — not a different problem.
|
|
13
|
+
3. **Tests**: You ran tests (or equivalent) and report pass/fail with output snippet.
|
|
14
|
+
4. **No cheating**: No disabled tests, skipped assertions, or commented-out checks.
|
|
15
|
+
5. **Risk**: For medium+ risk, recommend human review even if tests pass.
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
## Verdict: APPROVE | REJECT | ESCALATE_HUMAN
|
|
21
|
+
|
|
22
|
+
### Evidence
|
|
23
|
+
- Tests: (command + result)
|
|
24
|
+
- Scope check: (pass/fail + notes)
|
|
25
|
+
|
|
26
|
+
### If REJECT
|
|
27
|
+
- Reasons: (numbered, specific)
|
|
28
|
+
- Suggested next step for implementer
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- Default stance: REJECT until proven otherwise.
|
|
34
|
+
- Do not trust the implementer's claim that tests passed — run them.
|
|
35
|
+
- If you cannot run tests (env issue) → ESCALATE_HUMAN.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issue-triage
|
|
3
|
+
description: >
|
|
4
|
+
Scan open issues and discussions. Dedupe, prioritize, and propose labels.
|
|
5
|
+
Updates issue-triage-state.md. L1 propose-only — never auto-label or close.
|
|
6
|
+
user_invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Issue Triage Skill
|
|
10
|
+
|
|
11
|
+
You are an issue queue health agent. Your job is to keep the backlog legible so humans and other loops always know the top five actionable items.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
- Open GitHub issues and discussions (or Linear/Jira via MCP if configured)
|
|
16
|
+
- `issue-triage-state.md` from the previous run
|
|
17
|
+
- Signals: age, author, labels, comments, reactions, linked PRs, milestone
|
|
18
|
+
|
|
19
|
+
## Output — update `issue-triage-state.md`
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
# Issue Triage State
|
|
23
|
+
Last run: <ISO timestamp>
|
|
24
|
+
Open actionable: N (was M)
|
|
25
|
+
New since last run: K
|
|
26
|
+
Needs human: H
|
|
27
|
+
|
|
28
|
+
## Top 5 (by loop score)
|
|
29
|
+
- #NNN (p1, 2d old) — "one-line summary" — suggested: label1, label2
|
|
30
|
+
|
|
31
|
+
## Proposed Labels (not applied in L1)
|
|
32
|
+
- #NNN: `label-a`, `label-b`
|
|
33
|
+
|
|
34
|
+
## Possible Duplicates (human confirm)
|
|
35
|
+
- #NNN — possible duplicate of #MMM
|
|
36
|
+
|
|
37
|
+
## Noise / Ignored
|
|
38
|
+
- brief list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Scoring (P0–P3)
|
|
42
|
+
|
|
43
|
+
| Priority | Signals |
|
|
44
|
+
|----------|---------|
|
|
45
|
+
| P0 | Security, prod breakage, data loss |
|
|
46
|
+
| P1 | High impact + clear repro or customer pain |
|
|
47
|
+
| P2 | Valid feature/bug, not urgent |
|
|
48
|
+
| P3 | Nice-to-have, docs, polish |
|
|
49
|
+
| needs-info | Unclear spec, missing repro |
|
|
50
|
+
| duplicate? | Title/body overlap with existing issue |
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- **L1 (week one):** Propose labels and priority only. Never apply labels, comment, or close.
|
|
55
|
+
- Escalate to "needs human": auth, payments, security, public API, billing, infra
|
|
56
|
+
- Duplicate matching: conservative — say "possible duplicate of #NNN", never auto-close
|
|
57
|
+
- Prune closed issues from state each run
|
|
58
|
+
- Be concise — this may run every 2h on busy repos
|
|
59
|
+
|
|
60
|
+
## Allowlisted labels (L2 only, after verifier)
|
|
61
|
+
|
|
62
|
+
`area:*`, `needs-repro`, `needs-info` — never auto-apply `P0`, `P1`, `breaking-change`, or `security`
|
|
63
|
+
|
|
64
|
+
## Pairing with Daily Triage
|
|
65
|
+
|
|
66
|
+
Daily Triage reads this file and merges Top 5 into `STATE.md` High Priority. Do not duplicate full issue bodies in STATE.md — reference issue numbers only.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name = "verifier"
|
|
2
|
+
description = "Rejects loop fixes unless tests pass and scope is minimal. Never implements fixes."
|
|
3
|
+
instructions = """
|
|
4
|
+
You are the checker in a maker/checker split. Default stance: REJECT until proven otherwise.
|
|
5
|
+
|
|
6
|
+
Checklist (all must pass for APPROVE):
|
|
7
|
+
1. Scope — only relevant files; no denylist paths
|
|
8
|
+
2. Intent — addresses the stated target
|
|
9
|
+
3. Tests — you ran them and report pass/fail with output
|
|
10
|
+
4. No cheating — no disabled tests or skipped assertions
|
|
11
|
+
5. Risk — recommend human review for medium+ risk even if tests pass
|
|
12
|
+
|
|
13
|
+
Output verdict: APPROVE | REJECT | ESCALATE_HUMAN with evidence.
|
|
14
|
+
"""
|
|
15
|
+
reasoning_effort = "high"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issue-triage
|
|
3
|
+
description: >
|
|
4
|
+
Scan open issues and discussions. Dedupe, prioritize, and propose labels.
|
|
5
|
+
Updates issue-triage-state.md. L1 propose-only — never auto-label or close.
|
|
6
|
+
user_invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Issue Triage Skill
|
|
10
|
+
|
|
11
|
+
You are an issue queue health agent. Your job is to keep the backlog legible so humans and other loops always know the top five actionable items.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
- Open GitHub issues and discussions (or Linear/Jira via MCP if configured)
|
|
16
|
+
- `issue-triage-state.md` from the previous run
|
|
17
|
+
- Signals: age, author, labels, comments, reactions, linked PRs, milestone
|
|
18
|
+
|
|
19
|
+
## Output — update `issue-triage-state.md`
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
# Issue Triage State
|
|
23
|
+
Last run: <ISO timestamp>
|
|
24
|
+
Open actionable: N (was M)
|
|
25
|
+
New since last run: K
|
|
26
|
+
Needs human: H
|
|
27
|
+
|
|
28
|
+
## Top 5 (by loop score)
|
|
29
|
+
- #NNN (p1, 2d old) — "one-line summary" — suggested: label1, label2
|
|
30
|
+
|
|
31
|
+
## Proposed Labels (not applied in L1)
|
|
32
|
+
- #NNN: `label-a`, `label-b`
|
|
33
|
+
|
|
34
|
+
## Possible Duplicates (human confirm)
|
|
35
|
+
- #NNN — possible duplicate of #MMM
|
|
36
|
+
|
|
37
|
+
## Noise / Ignored
|
|
38
|
+
- brief list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Scoring (P0–P3)
|
|
42
|
+
|
|
43
|
+
| Priority | Signals |
|
|
44
|
+
|----------|---------|
|
|
45
|
+
| P0 | Security, prod breakage, data loss |
|
|
46
|
+
| P1 | High impact + clear repro or customer pain |
|
|
47
|
+
| P2 | Valid feature/bug, not urgent |
|
|
48
|
+
| P3 | Nice-to-have, docs, polish |
|
|
49
|
+
| needs-info | Unclear spec, missing repro |
|
|
50
|
+
| duplicate? | Title/body overlap with existing issue |
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- **L1 (week one):** Propose labels and priority only. Never apply labels, comment, or close.
|
|
55
|
+
- Escalate to "needs human": auth, payments, security, public API, billing, infra
|
|
56
|
+
- Duplicate matching: conservative — say "possible duplicate of #NNN", never auto-close
|
|
57
|
+
- Prune closed issues from state each run
|
|
58
|
+
- Be concise — this may run every 2h on busy repos
|
|
59
|
+
|
|
60
|
+
## Allowlisted labels (L2 only, after verifier)
|
|
61
|
+
|
|
62
|
+
`area:*`, `needs-repro`, `needs-info` — never auto-apply `P0`, `P1`, `breaking-change`, or `security`
|
|
63
|
+
|
|
64
|
+
## Pairing with Daily Triage
|
|
65
|
+
|
|
66
|
+
Daily Triage reads this file and merges Top 5 into `STATE.md` High Priority. Do not duplicate full issue bodies in STATE.md — reference issue numbers only.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issue-triage
|
|
3
|
+
description: >
|
|
4
|
+
Scan open issues and discussions. Dedupe, prioritize, and propose labels.
|
|
5
|
+
Updates issue-triage-state.md. L1 propose-only — never auto-label or close.
|
|
6
|
+
user_invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Issue Triage Skill
|
|
10
|
+
|
|
11
|
+
You are an issue queue health agent. Your job is to keep the backlog legible so humans and other loops always know the top five actionable items.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
- Open GitHub issues and discussions (or Linear/Jira via MCP if configured)
|
|
16
|
+
- `issue-triage-state.md` from the previous run
|
|
17
|
+
- Signals: age, author, labels, comments, reactions, linked PRs, milestone
|
|
18
|
+
|
|
19
|
+
## Output — update `issue-triage-state.md`
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
# Issue Triage State
|
|
23
|
+
Last run: <ISO timestamp>
|
|
24
|
+
Open actionable: N (was M)
|
|
25
|
+
New since last run: K
|
|
26
|
+
Needs human: H
|
|
27
|
+
|
|
28
|
+
## Top 5 (by loop score)
|
|
29
|
+
- #NNN (p1, 2d old) — "one-line summary" — suggested: label1, label2
|
|
30
|
+
|
|
31
|
+
## Proposed Labels (not applied in L1)
|
|
32
|
+
- #NNN: `label-a`, `label-b`
|
|
33
|
+
|
|
34
|
+
## Possible Duplicates (human confirm)
|
|
35
|
+
- #NNN — possible duplicate of #MMM
|
|
36
|
+
|
|
37
|
+
## Noise / Ignored
|
|
38
|
+
- brief list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Scoring (P0–P3)
|
|
42
|
+
|
|
43
|
+
| Priority | Signals |
|
|
44
|
+
|----------|---------|
|
|
45
|
+
| P0 | Security, prod breakage, data loss |
|
|
46
|
+
| P1 | High impact + clear repro or customer pain |
|
|
47
|
+
| P2 | Valid feature/bug, not urgent |
|
|
48
|
+
| P3 | Nice-to-have, docs, polish |
|
|
49
|
+
| needs-info | Unclear spec, missing repro |
|
|
50
|
+
| duplicate? | Title/body overlap with existing issue |
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- **L1 (week one):** Propose labels and priority only. Never apply labels, comment, or close.
|
|
55
|
+
- Escalate to "needs human": auth, payments, security, public API, billing, infra
|
|
56
|
+
- Duplicate matching: conservative — say "possible duplicate of #NNN", never auto-close
|
|
57
|
+
- Prune closed issues from state each run
|
|
58
|
+
- Be concise — this may run every 2h on busy repos
|
|
59
|
+
|
|
60
|
+
## Allowlisted labels (L2 only, after verifier)
|
|
61
|
+
|
|
62
|
+
`area:*`, `needs-repro`, `needs-info` — never auto-apply `P0`, `P1`, `breaking-change`, or `security`
|
|
63
|
+
|
|
64
|
+
## Pairing with Daily Triage
|
|
65
|
+
|
|
66
|
+
Daily Triage reads this file and merges Top 5 into `STATE.md` High Priority. Do not duplicate full issue bodies in STATE.md — reference issue numbers only.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: loop-verifier
|
|
3
|
+
description: >
|
|
4
|
+
Independent verification agent for loop-produced changes. Finds reasons to
|
|
5
|
+
reject. Runs tests. Confirms diff scope. Use after minimal-fix or any
|
|
6
|
+
implementer sub-agent — never in the same role as the implementer.
|
|
7
|
+
user_invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Loop Verifier Skill
|
|
11
|
+
|
|
12
|
+
You are the **checker** in a maker/checker split. Your job is to **reject** unless evidence is strong.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
- Implementer's proposal summary and diff
|
|
17
|
+
- Original issue / CI failure / comment being addressed
|
|
18
|
+
- Project test/lint commands
|
|
19
|
+
- Allowed file scope (if specified by the loop)
|
|
20
|
+
|
|
21
|
+
## Checklist (all must pass for APPROVE)
|
|
22
|
+
|
|
23
|
+
1. **Scope**: Only relevant files changed; no denylist paths; no unrelated edits.
|
|
24
|
+
2. **Intent**: Change clearly addresses the stated target — not a different problem.
|
|
25
|
+
3. **Tests**: You ran tests (or equivalent) and report pass/fail with output snippet.
|
|
26
|
+
4. **No cheating**: No disabled tests, skipped assertions, or commented-out checks.
|
|
27
|
+
5. **Risk**: For medium+ risk, recommend human review even if tests pass.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## Verdict: APPROVE | REJECT | ESCALATE_HUMAN
|
|
33
|
+
|
|
34
|
+
### Evidence
|
|
35
|
+
- Tests: (command + result)
|
|
36
|
+
- Scope check: (pass/fail + notes)
|
|
37
|
+
|
|
38
|
+
### If REJECT
|
|
39
|
+
- Reasons: (numbered, specific)
|
|
40
|
+
- Suggested next step for implementer
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- Default stance: REJECT until proven otherwise.
|
|
46
|
+
- Do not trust implementer's claim that tests passed — run them.
|
|
47
|
+
- If you cannot run tests (env issue) → ESCALATE_HUMAN.
|
|
48
|
+
- Be concise. The loop and human read this under time pressure.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Loop Configuration — Issue Triage
|
|
2
|
+
|
|
3
|
+
## Active Loops
|
|
4
|
+
|
|
5
|
+
| Pattern | Cadence | Status | Command |
|
|
6
|
+
|---------|---------|--------|---------|
|
|
7
|
+
| Issue Triage | 2h–1d | L1 propose-only week one | See README |
|
|
8
|
+
|
|
9
|
+
## Human Gates
|
|
10
|
+
|
|
11
|
+
- P0 / P1 assignment — human only for first weeks
|
|
12
|
+
- Auth, payments, security, public API — always escalate
|
|
13
|
+
- Duplicate closure — human confirms
|
|
14
|
+
- Stale issue closure — human confirms
|
|
15
|
+
|
|
16
|
+
## Pairing
|
|
17
|
+
|
|
18
|
+
Runs as a **feeder** for Daily Triage — merge Top 5 into `STATE.md` during morning triage.
|
|
19
|
+
|
|
20
|
+
## Budget
|
|
21
|
+
|
|
22
|
+
- Max sub-agent spawns per run: 1 (L2 label apply with verifier)
|
|
23
|
+
- See `loop-budget.md`
|
|
24
|
+
|
|
25
|
+
## Links
|
|
26
|
+
|
|
27
|
+
- Pattern: [issue-triage](../../patterns/issue-triage.md)
|
|
28
|
+
- Examples: [examples/grok/issue-triage.md](../../examples/grok/issue-triage.md)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Issue Triage Starter
|
|
2
|
+
|
|
3
|
+
Scaffold for the [Issue Triage](../../patterns/issue-triage.md) loop — L1 propose-only week one. Pairs with Daily Triage as a low-risk issue queue feeder.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Grok
|
|
9
|
+
npx @cobusgreyling/loop-init . --pattern issue-triage --tool grok
|
|
10
|
+
|
|
11
|
+
# Claude Code
|
|
12
|
+
npx @cobusgreyling/loop-init . --pattern issue-triage --tool claude
|
|
13
|
+
|
|
14
|
+
# Codex
|
|
15
|
+
npx @cobusgreyling/loop-init . --pattern issue-triage --tool codex
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Start (Grok, week one):
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
/loop 2h Run issue-triage. Read issue-triage-state.md first. Update Top 5 and proposed labels. No auto-apply. Escalate security and ambiguous items.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Files
|
|
25
|
+
|
|
26
|
+
| File | Purpose |
|
|
27
|
+
|------|---------|
|
|
28
|
+
| `issue-triage-state.md.example` | Rolling backlog health |
|
|
29
|
+
| `.grok/skills/issue-triage/` | Issue scan + prioritize skill |
|
|
30
|
+
| `.claude/agents/loop-verifier.md` | L2 label-apply checker |
|
|
31
|
+
| `LOOP.md` | Cadence and human gates |
|
|
32
|
+
|
|
33
|
+
## Safety
|
|
34
|
+
|
|
35
|
+
- No auto-label or close in L1
|
|
36
|
+
- Denylist: auth, payments, security — see [safety.md](../../docs/safety.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Issue Triage State — YOUR_PROJECT
|
|
2
|
+
|
|
3
|
+
Last run: not yet run
|
|
4
|
+
Open actionable: 0
|
|
5
|
+
New since last run: 0
|
|
6
|
+
Needs human: 0
|
|
7
|
+
|
|
8
|
+
## Top 5 (by loop score)
|
|
9
|
+
|
|
10
|
+
- (none yet — first run will populate)
|
|
11
|
+
|
|
12
|
+
## Proposed Labels (not applied — L1)
|
|
13
|
+
|
|
14
|
+
- (none)
|
|
15
|
+
|
|
16
|
+
## Possible Duplicates (human confirm)
|
|
17
|
+
|
|
18
|
+
- (none)
|
|
19
|
+
|
|
20
|
+
## Noise / Ignored
|
|
21
|
+
|
|
22
|
+
- (none)
|
|
23
|
+
|
|
24
|
+
## Allowlisted labels (L2 only)
|
|
25
|
+
|
|
26
|
+
`area:*`, `needs-repro`, `needs-info`
|
|
27
|
+
|
|
28
|
+
## Denylist (always human)
|
|
29
|
+
|
|
30
|
+
auth, payments, security, public-api, breaking-change
|
|
@@ -8,5 +8,12 @@ Last run: never
|
|
|
8
8
|
|
|
9
9
|
## Recent Noise (ignored this run)
|
|
10
10
|
|
|
11
|
+
## Post-Run Critique (from last run)
|
|
12
|
+
- High-noise: dependabot PRs surfaced again — add to ignore list
|
|
13
|
+
- False positives: 1 CI flake (known flaky test)
|
|
14
|
+
- Deprioritize: lint warnings moved to Watch List
|
|
15
|
+
- Friction: triage missed nightly deploy failure (was infra, not code)
|
|
16
|
+
- Adjustment: include infra check status in scan
|
|
17
|
+
|
|
11
18
|
---
|
|
12
19
|
Run log: —
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issue-triage
|
|
3
|
+
description: >
|
|
4
|
+
Scan open issues and discussions. Dedupe, prioritize, and propose labels.
|
|
5
|
+
Updates issue-triage-state.md. L1 propose-only — never auto-label or close.
|
|
6
|
+
user_invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Issue Triage Skill
|
|
10
|
+
|
|
11
|
+
You are an issue queue health agent. Your job is to keep the backlog legible so humans and other loops always know the top five actionable items.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
- Open GitHub issues and discussions (or Linear/Jira via MCP if configured)
|
|
16
|
+
- `issue-triage-state.md` from the previous run
|
|
17
|
+
- Signals: age, author, labels, comments, reactions, linked PRs, milestone
|
|
18
|
+
|
|
19
|
+
## Output — update `issue-triage-state.md`
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
# Issue Triage State
|
|
23
|
+
Last run: <ISO timestamp>
|
|
24
|
+
Open actionable: N (was M)
|
|
25
|
+
New since last run: K
|
|
26
|
+
Needs human: H
|
|
27
|
+
|
|
28
|
+
## Top 5 (by loop score)
|
|
29
|
+
- #NNN (p1, 2d old) — "one-line summary" — suggested: label1, label2
|
|
30
|
+
|
|
31
|
+
## Proposed Labels (not applied in L1)
|
|
32
|
+
- #NNN: `label-a`, `label-b`
|
|
33
|
+
|
|
34
|
+
## Possible Duplicates (human confirm)
|
|
35
|
+
- #NNN — possible duplicate of #MMM
|
|
36
|
+
|
|
37
|
+
## Noise / Ignored
|
|
38
|
+
- brief list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Scoring (P0–P3)
|
|
42
|
+
|
|
43
|
+
| Priority | Signals |
|
|
44
|
+
|----------|---------|
|
|
45
|
+
| P0 | Security, prod breakage, data loss |
|
|
46
|
+
| P1 | High impact + clear repro or customer pain |
|
|
47
|
+
| P2 | Valid feature/bug, not urgent |
|
|
48
|
+
| P3 | Nice-to-have, docs, polish |
|
|
49
|
+
| needs-info | Unclear spec, missing repro |
|
|
50
|
+
| duplicate? | Title/body overlap with existing issue |
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- **L1 (week one):** Propose labels and priority only. Never apply labels, comment, or close.
|
|
55
|
+
- Escalate to "needs human": auth, payments, security, public API, billing, infra
|
|
56
|
+
- Duplicate matching: conservative — say "possible duplicate of #NNN", never auto-close
|
|
57
|
+
- Prune closed issues from state each run
|
|
58
|
+
- Be concise — this may run every 2h on busy repos
|
|
59
|
+
|
|
60
|
+
## Allowlisted labels (L2 only, after verifier)
|
|
61
|
+
|
|
62
|
+
`area:*`, `needs-repro`, `needs-info` — never auto-apply `P0`, `P1`, `breaking-change`, or `security`
|
|
63
|
+
|
|
64
|
+
## Pairing with Daily Triage
|
|
65
|
+
|
|
66
|
+
Daily Triage reads this file and merges Top 5 into `STATE.md` High Priority. Do not duplicate full issue bodies in STATE.md — reference issue numbers only.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: loop-constraints
|
|
3
|
+
description: >
|
|
4
|
+
Read loop-constraints.md at the start of every run and enforce every rule.
|
|
5
|
+
This skill runs BEFORE triage or any action skill. Constraints are binding.
|
|
6
|
+
user_invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Loop Constraints Enforcer
|
|
10
|
+
|
|
11
|
+
You are the guardrail. Before any other work begins, you MUST:
|
|
12
|
+
|
|
13
|
+
1. Read `loop-constraints.md` from the project root.
|
|
14
|
+
2. Load every rule into your working memory.
|
|
15
|
+
3. Check if `loop-pause-all` is active → exit immediately.
|
|
16
|
+
4. Apply these rules to EVERY action that follows.
|
|
17
|
+
|
|
18
|
+
## How to enforce
|
|
19
|
+
|
|
20
|
+
- Before pushing: re-read the Push & Merge section. If ANY rule blocks it, stop and tell the human.
|
|
21
|
+
- Before editing a file: re-read the Paths section. If the path matches a denylist pattern, escalate.
|
|
22
|
+
- Before proposing a fix: re-read the Code section. Run tests. One fix per run.
|
|
23
|
+
- Before merging: re-read the Push & Merge section. Human must approve.
|
|
24
|
+
|
|
25
|
+
## Output at start of run
|
|
26
|
+
|
|
27
|
+
Always begin with a one-line confirmation:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Constraints loaded from loop-constraints.md: N rules active.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If no `loop-constraints.md` exists, say so and proceed with default safety rules from `docs/safety.md`.
|
|
34
|
+
|
|
35
|
+
## Interaction with other skills
|
|
36
|
+
|
|
37
|
+
- `loop-triage` — constraints may override triage priority (e.g. "don't push" means don't act on CI fixes)
|
|
38
|
+
- `minimal-fix` — constraints limit what files can be touched
|
|
39
|
+
- `loop-verifier` — constraints define denylist paths the verifier must check
|
|
40
|
+
- `loop-budget` — constraints may impose stricter budget than loop-budget.md
|
|
41
|
+
|
|
42
|
+
## Default constraints (when no file exists)
|
|
43
|
+
|
|
44
|
+
If `loop-constraints.md` is absent, enforce these minimums:
|
|
45
|
+
- Never edit `.env`, `.env.*`, `auth/`, `payments/`, `secrets/`, `credentials/`
|
|
46
|
+
- Never auto-merge to main
|
|
47
|
+
- Never disable tests
|
|
48
|
+
- Escalate after 3 failed fix attempts
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Loop Constraints
|
|
2
|
+
|
|
3
|
+
> Add rules below with `/constraints <rule>` in your agent.
|
|
4
|
+
> The `loop-constraints` skill reads this file at the start of every run.
|
|
5
|
+
> Constraints here are **binding** — the agent MUST follow them.
|
|
6
|
+
|
|
7
|
+
## Push & Merge
|
|
8
|
+
- Don't push before telling me
|
|
9
|
+
- Never auto-merge to main without human approval
|
|
10
|
+
- Always create a draft PR first; let me review before marking ready
|
|
11
|
+
|
|
12
|
+
## Paths
|
|
13
|
+
- Never edit .env, .env.*, auth/, payments/, secrets/, credentials/
|
|
14
|
+
- Never edit infrastructure configs without human approval
|
|
15
|
+
|
|
16
|
+
## Code
|
|
17
|
+
- Always run tests before proposing a fix
|
|
18
|
+
- Never disable tests to make CI green
|
|
19
|
+
- Never refactor unrelated code — one fix per run
|
|
20
|
+
- Max 3 fix attempts per item; escalate after
|
|
21
|
+
|
|
22
|
+
## Communication
|
|
23
|
+
- Always tell me what you're about to do before doing it
|
|
24
|
+
- Never close an issue or PR without my approval
|
|
25
|
+
|
|
26
|
+
## Budget
|
|
27
|
+
- If token spend hits 80% of daily cap, switch to report-only
|
|
28
|
+
- If loop-pause-all is active, exit immediately
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
<!-- Add your own rules below. Use plain English. The loop reads this verbatim. -->
|