@intentsolutionsio/contributing-clanker 0.1.1
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 +173 -0
- package/hooks/.gitkeep +0 -0
- package/hooks/install.sh +115 -0
- package/hooks/uninstall.sh +70 -0
- package/package.json +42 -0
- package/skills/contribute/SKILL.md +457 -0
- package/skills/contribute/agents/draft-writer.md +110 -0
- package/skills/contribute/agents/repo-analyzer.md +68 -0
- package/skills/contribute/agents/researcher.md +246 -0
- package/skills/contribute/agents/scout.md +182 -0
- package/skills/contribute/agents/test-runner.md +70 -0
- package/skills/contribute/assets/claim-template.md +22 -0
- package/skills/contribute/assets/evidence-template.md +32 -0
- package/skills/contribute/assets/pr-template.md +49 -0
- package/skills/contribute/references/candidate-file-format.md +259 -0
- package/skills/contribute/references/workflow-guide.md +153 -0
- package/skills/contribute/scripts/audit-overrides.sh +180 -0
- package/skills/contribute/scripts/catalog-coverage.sh +99 -0
- package/skills/contribute/scripts/gate-runner.sh +191 -0
- package/skills/contribute/scripts/gates/a01-already-assigned.sh +24 -0
- package/skills/contribute/scripts/gates/a02-already-shipped.sh +31 -0
- package/skills/contribute/scripts/gates/a03-duplicate-flagged.sh +22 -0
- package/skills/contribute/scripts/gates/a04-issue-age.sh +80 -0
- package/skills/contribute/scripts/gates/a05-issue-still-open.sh +33 -0
- package/skills/contribute/scripts/gates/a06-claim-etiquette-required.sh +36 -0
- package/skills/contribute/scripts/gates/a09-mention-routing.sh +63 -0
- package/skills/contribute/scripts/gates/b01-base-branch.sh +29 -0
- package/skills/contribute/scripts/gates/b02-branch-naming.sh +34 -0
- package/skills/contribute/scripts/gates/b03-clone-fresh.sh +33 -0
- package/skills/contribute/scripts/gates/b05-dco-signoff.sh +50 -0
- package/skills/contribute/scripts/gates/b06-commit-format.sh +44 -0
- package/skills/contribute/scripts/gates/b07-scope-files.sh +68 -0
- package/skills/contribute/scripts/gates/b12-new-deps.sh +40 -0
- package/skills/contribute/scripts/gates/b14-local-checks.sh +55 -0
- package/skills/contribute/scripts/gates/b16-local-check-allowlist.sh +32 -0
- package/skills/contribute/scripts/gates/c01-draft-first.sh +23 -0
- package/skills/contribute/scripts/gates/c02-pr-title-format.sh +36 -0
- package/skills/contribute/scripts/gates/c03-pr-body-sections.sh +58 -0
- package/skills/contribute/scripts/gates/c04-ui-screenshots.sh +38 -0
- package/skills/contribute/scripts/gates/c05-test-evidence.sh +31 -0
- package/skills/contribute/scripts/gates/c07-coauthor-banned.sh +30 -0
- package/skills/contribute/scripts/gates/c09-issue-link.sh +31 -0
- package/skills/contribute/scripts/gates/c11-no-force-push.sh +32 -0
- package/skills/contribute/scripts/gates/c12-ci-green.sh +29 -0
- package/skills/contribute/scripts/gates/c13-bots-passed.sh +62 -0
- package/skills/contribute/scripts/gates/c16-no-self-merge.sh +24 -0
- package/skills/contribute/scripts/gates/c19-body-claim-vs-diff.sh +64 -0
- package/skills/contribute/scripts/gates/d02-no-ai-bug-reports.sh +48 -0
- package/skills/contribute/scripts/gates/d03-no-ai-pr-reviews.sh +42 -0
- package/skills/contribute/scripts/gates/d05-no-reopen.sh +25 -0
- package/skills/contribute/scripts/gates/e02-ai-strike-track.sh +57 -0
- package/skills/contribute/scripts/gates/e04-fork-target.sh +39 -0
- package/skills/contribute/scripts/gates/f01-license-compat.sh +92 -0
- package/skills/contribute/scripts/gates/f03-fixtures-clean.sh +30 -0
- package/skills/contribute/scripts/gates/f04-override-disclosure.sh +49 -0
- package/skills/contribute/scripts/gates/g01-no-vendored-edits.sh +52 -0
- package/skills/contribute/scripts/gates/g02-protected-paths.sh +30 -0
- package/skills/contribute/scripts/gates/g03-no-changelog-edits.sh +37 -0
- package/skills/contribute/scripts/gates/g04-no-version-bump.sh +36 -0
- package/skills/contribute/scripts/gates/g06-override-rate-limit.sh +31 -0
- package/skills/contribute/scripts/gates/lib/preamble.sh +105 -0
- package/skills/contribute/scripts/lint-candidate.sh +149 -0
- package/skills/contribute/scripts/researcher-build.sh +456 -0
- package/skills/contribute/scripts/test-known-traps.sh +142 -0
- package/skills/contribute/scripts/test-override-audit.sh +102 -0
- package/skills/contribute/scripts/test-plug-in.sh +113 -0
- package/skills/contribute/scripts/test-scout-refresh.sh +157 -0
- package/skills/contribute/scripts/test-stale-dossier-refresh.sh +96 -0
- package/skills/contribute/scripts/transition.sh +260 -0
package/README.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# contributing-clanker
|
|
2
|
+
|
|
3
|
+
> Local-only OSS contribution command center. 41 deterministic gates against AI-slop failure modes.
|
|
4
|
+
|
|
5
|
+
A Claude Code plugin that turns `/contribute` into a discipline tool: every external action (claim, design issue, PR open, comment) passes through phase-appropriate gates that BLOCK or WARN on traps real maintainers complain about. Markdown-only state. No daemons. No SQLite. Filesystem is the tracker.
|
|
6
|
+
|
|
7
|
+
[](https://github.com/jeremylongshore/contributing-clanker)
|
|
8
|
+
[](https://github.com/jeremylongshore/contributing-clanker/blob/master/LICENSE)
|
|
9
|
+
[](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/005-AT-SPEC-gate-inventory.md)
|
|
10
|
+
[](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/007-DR-CATG-failure-mode-catalog.md)
|
|
11
|
+
|
|
12
|
+
**Links:** [source repo](https://github.com/jeremylongshore/contributing-clanker) · [gate inventory](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/005-AT-SPEC-gate-inventory.md) · [failure-mode catalog](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/007-DR-CATG-failure-mode-catalog.md) · [risk register](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/010-OD-RISK-operations-and-risk.md) · [architecture](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/002-AT-ARCH-system-architecture.md)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## One-Pager
|
|
17
|
+
|
|
18
|
+
### The Problem
|
|
19
|
+
|
|
20
|
+
OSS maintainers are drowning in AI-generated low-quality contributions. The pattern is consistent:
|
|
21
|
+
|
|
22
|
+
- Bots and AI-assisted contributors **claim issues without checking** if they're already shipped, already assigned, or against repo policy
|
|
23
|
+
- They **open PRs against `CONTRIBUTING.md` rules** they didn't read (wrong base branch, wrong commit format, missing CLA, banned `Co-Authored-By` lines)
|
|
24
|
+
- They **auto-respond to maintainer feedback** in ways that violate the repo's etiquette norms
|
|
25
|
+
- They **edit vendored code, version files, or changelogs** because the AI didn't recognize "do not touch" boundaries
|
|
26
|
+
|
|
27
|
+
The damage isn't always rejection — sometimes the contribution is technically fine, but the surrounding behavior burns maintainer trust, gets the contributor a soft-ban, and feeds the public "AI ruins OSS" narrative.
|
|
28
|
+
|
|
29
|
+
### The Solution
|
|
30
|
+
|
|
31
|
+
`contributing-clanker` is a **local-first discipline tool** for AI-assisted OSS contribution. Three layers:
|
|
32
|
+
|
|
33
|
+
1. **Per-repo dossiers** — `@researcher` reads each upstream's `CONTRIBUTING.md`, linked policy docs, and bot-detected review patterns into a markdown dossier at `~/.contribute-system/research/<owner>__<repo>.md`. Cached. Refreshed on a 14-day staleness threshold.
|
|
34
|
+
2. **41 deterministic gates** — one bash script per failure mode. `(candidate, dossier, intended action) → PASS / WARN / BLOCK / INFORM`. Read-only. Pluggable. The gates read the dossier, not live `gh` (latency dominates: most pre-PR sweeps complete in single-digit seconds).
|
|
35
|
+
3. **Lifecycle workflow** — `/contribute` walks each candidate through `open → shortlist → claimed → working → submitted → merged`. At each transition, the orchestrator runs the relevant gate set. BLOCK refuses the transition; WARN surfaces in the briefing.
|
|
36
|
+
|
|
37
|
+
Default behavior: **open a Design Issue first, not a PR**. The skill defaults to design-issue-then-PR because auto-PRs generate "whack-a-mole slopfests" for maintainers. PR comes after maintainer approval of the approach.
|
|
38
|
+
|
|
39
|
+
### W5 — Who, What, When, Where, Why
|
|
40
|
+
|
|
41
|
+
| | |
|
|
42
|
+
|---|---|
|
|
43
|
+
| **Who** | Solo OSS contributors using AI assistance who want to contribute *well*, not just contribute. |
|
|
44
|
+
| **What** | A Claude Code plugin (`/contribute`) + a 41-gate runtime under `~/.contribute-system/`. |
|
|
45
|
+
| **When** | Every transition: claim, comment, open Design Issue, open PR. Background scout sweeps for ranked candidates. |
|
|
46
|
+
| **Where** | Entirely local. Reads live GitHub state via `gh` for the few queries that demand it; everything else hits the cached markdown dossier. |
|
|
47
|
+
| **Why** | Because shipping faster than maintainers can review is a failure mode, not a feature. The catalog of 62 enumerated AI-slop patterns is the receipt. |
|
|
48
|
+
|
|
49
|
+
### Stack
|
|
50
|
+
|
|
51
|
+
| Layer | Tool |
|
|
52
|
+
|---|---|
|
|
53
|
+
| Skill orchestration | Claude Code (`/contribute`) + 5 subagents (`@scout`, `@researcher`, `@draft-writer`, `@test-runner`, `@repo-analyzer`) |
|
|
54
|
+
| Gate execution | bash + `jq` + `gh` CLI; one script per failure mode under `~/.contribute-system/gates/` |
|
|
55
|
+
| State | Markdown candidate files + per-repo markdown dossiers + JSONL append-only event log |
|
|
56
|
+
| Prereqs | `gh` authenticated, `jq` on PATH, Claude Code 1.x |
|
|
57
|
+
|
|
58
|
+
### Key Differentiators
|
|
59
|
+
|
|
60
|
+
- **Catalog-anchored gates.** Every gate maps to one of 62 enumerated failure modes ([catalog](https://github.com/jeremylongshore/contributing-clanker/blob/master/000-docs/007-DR-CATG-failure-mode-catalog.md)). New gates require a real-world trigger — speculative guards are rejected in review.
|
|
61
|
+
- **Override with audit trail.** `--override-gate <ID> "reason"` is an explicit escape hatch. Reasons land in `~/.contribute-system/log.jsonl`. The bundled `audit-overrides.sh` reports gates overridden ≥50% of the time — those are wrong, not yours.
|
|
62
|
+
- **Filesystem-only.** No SQLite. No Cloud Functions. No daemons. The candidate file IS the tracker. Greppable. Git-trackable. Survives any tool.
|
|
63
|
+
- **Default to design-issue first.** PRs come after maintainer approval. The skill explicitly refuses to auto-submit external content.
|
|
64
|
+
- **Per-repo opt-out.** A dossier can disable specific gates with `disabled_gates: [...]`. Honors weird-but-legitimate repo conventions without forking the gate set.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Operator-Grade System Analysis
|
|
69
|
+
|
|
70
|
+
### Architecture summary
|
|
71
|
+
|
|
72
|
+
Three layers, deliberately uncoupled. Each can be disabled independently without breaking the others:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌──────────────────────────┐
|
|
76
|
+
│ /contribute (the skill) │ Layer 3 — lifecycle
|
|
77
|
+
│ open → shortlist → │ walks transitions,
|
|
78
|
+
│ claimed → working → │ invokes gate-runner
|
|
79
|
+
│ submitted → merged │ per transition
|
|
80
|
+
└────────────┬─────────────┘
|
|
81
|
+
│
|
|
82
|
+
┌────────────▼─────────────┐
|
|
83
|
+
│ gate-runner.sh │ Layer 2 — gates
|
|
84
|
+
│ 41 scripts × phase A-G │ stateless,
|
|
85
|
+
│ → PASS/WARN/BLOCK/SKIP │ read-only,
|
|
86
|
+
└────────────┬─────────────┘ plug-in
|
|
87
|
+
│
|
|
88
|
+
┌────────────▼─────────────┐
|
|
89
|
+
│ Per-repo dossiers │ Layer 1 — knowledge
|
|
90
|
+
│ ~/.contribute-system/ │ built by @researcher,
|
|
91
|
+
│ research/<o>__<r>.md │ refreshed @ 14d
|
|
92
|
+
└──────────────────────────┘
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Trust boundaries
|
|
96
|
+
|
|
97
|
+
| Boundary | Trust posture |
|
|
98
|
+
|---|---|
|
|
99
|
+
| User → skill | Full. The skill is the user's tool. |
|
|
100
|
+
| Skill → gates | Full read-trust on the dossier; treats `gh` output as untrusted (validates JSON shape via `jq`). |
|
|
101
|
+
| Gates → external (GitHub) | `gh_safe` retry wrapper: 3 retries + exponential backoff + 30s per-call timeout. On exhausted retries, gate returns SKIP, not BLOCK. |
|
|
102
|
+
| User data | Lives only at `~/.contribute-system/`. Plugin install creates the dirs; uninstall removes plugin-shipped scripts but **leaves user data intact**. |
|
|
103
|
+
|
|
104
|
+
### Failure modes the system itself can hit
|
|
105
|
+
|
|
106
|
+
| Mode | Detection | Response |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| Gate has a bug, exits non-zero unexpectedly | `lib/preamble.sh` ERR trap converts to fail-closed BLOCK with reason "gate crashed at line N" | Engineer reviews log.jsonl, fixes the bug; user-side, the candidate is just blocked, not silently passed |
|
|
109
|
+
| Gate latency exceeds 10s | Per-gate `timeout 10` in gate-runner | Gate returns SKIP with reason "gate timed out"; user warned, transition continues |
|
|
110
|
+
| Dossier is stale (>14d) | Skill Step 0.5 checks `last_refreshed:` field at runtime | Auto-invokes `@researcher refresh` before transition; if refresh fails, surfaces a WARN |
|
|
111
|
+
| User overrides a gate routinely (≥50%) | `audit-overrides.sh --since=30` cron-style report | Surface to user; the gate is wrong, not the user — refine or retire |
|
|
112
|
+
| Candidate state drifts vs. live GitHub | Reconciliation step in skill (manual: "reconcile candidates") | Walks candidates with `pr_number:`, calls `gh pr view`, updates `status:` field atomically |
|
|
113
|
+
|
|
114
|
+
### Observability surface
|
|
115
|
+
|
|
116
|
+
- `~/.contribute-system/log.jsonl` — append-only event log: every gate run, every transition attempt, every override, every scout/researcher invocation, with UTC timestamps
|
|
117
|
+
- `audit-overrides.sh [--since=N --scope=org:X --gate=ID --json]` — per-gate override-rate report
|
|
118
|
+
- `catalog-coverage.sh` — coverage of installed gates against the 62-mode catalog (currently 41 of 65 = 63%)
|
|
119
|
+
|
|
120
|
+
### Recovery posture
|
|
121
|
+
|
|
122
|
+
| Failure | Recovery |
|
|
123
|
+
|---|---|
|
|
124
|
+
| One gate over-fires across all repos | `chmod -x ~/.contribute-system/gates/<gate>.sh` (runner skips it) |
|
|
125
|
+
| One gate over-fires on a specific repo | Edit dossier: `disabled_gates: [<gate>]` |
|
|
126
|
+
| Dossier mis-reads a repo | `rm` the dossier, `@researcher build` from scratch |
|
|
127
|
+
| Lifecycle workflow misbehaves | Edit `~/.claude/skills/contribute/SKILL.md` (markdown — surgical edit safe) |
|
|
128
|
+
| Whole system is wrong | Skip the skill — `gh issue comment` / `gh pr create` directly. Opt-in via `/contribute`; nothing forces its use. |
|
|
129
|
+
|
|
130
|
+
### What this is NOT
|
|
131
|
+
|
|
132
|
+
- A bounty board — pre-2026-04-30 versions had Algora/Gumroad framing; that's gone
|
|
133
|
+
- A tracker — no SQLite, no dashboard, no cloud backend
|
|
134
|
+
- A multi-user system — Phase 1 is single-user. Phase 3 (containerized service) only triggers if multi-user demand surfaces
|
|
135
|
+
- An auto-PR generator — defaults to design-issue-first; never auto-submits without explicit human approval
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Install
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
/plugin install contributing-clanker
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The post-install hook creates `~/.contribute-system/{candidates,research,gates,gates/lib,bin,check-runs,test-logs}` and copies the runtime scripts in. Your candidate state and dossier history are yours — uninstall preserves them.
|
|
146
|
+
|
|
147
|
+
**Prerequisites**: `gh` authenticated (`gh auth status`) and `jq` on `PATH`.
|
|
148
|
+
|
|
149
|
+
## Verify
|
|
150
|
+
|
|
151
|
+
After install, in any Claude Code session:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
/contribute
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The skill activates, reports state (PRs in flight, claimed candidates, ready-to-pick queue), and stays out of the way until you give it work.
|
|
158
|
+
|
|
159
|
+
## Troubleshooting
|
|
160
|
+
|
|
161
|
+
| Symptom | Fix |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `/contribute` doesn't activate after install | Restart Claude Code |
|
|
164
|
+
| `gh: not logged in` | `gh auth login` |
|
|
165
|
+
| `jq: command not found` | `apt-get install jq` (or equivalent for your platform) |
|
|
166
|
+
| Gate BLOCKs unexpectedly | Run `audit-overrides.sh --gate=<ID>` to see if it's a known false-positive cluster; override with `--override-gate <ID> "reason"` if the BLOCK is wrong; submit a refinement to the source repo if the gate itself needs fixing |
|
|
167
|
+
| Dossier missing for a repo | First contribution to that repo; `@researcher` auto-builds on first transition |
|
|
168
|
+
| Stale dossier (>14 days) | Auto-refresh on next gate run; or `@researcher refresh <owner>/<repo>` |
|
|
169
|
+
| Want to disable one gate for one repo | Edit the dossier: `disabled_gates: [<gate-id>]` |
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
MIT — see [LICENSE](https://github.com/jeremylongshore/contributing-clanker/blob/master/LICENSE) in the source repo.
|
package/hooks/.gitkeep
ADDED
|
File without changes
|
package/hooks/install.sh
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# install.sh — post-install hook for the contributing-clanker plugin.
|
|
3
|
+
#
|
|
4
|
+
# Runs after `/plugin install contributing-clanker`. Idempotent — re-running
|
|
5
|
+
# is safe and overwrites runtime scripts with the freshly-installed versions
|
|
6
|
+
# (which is desired: the plugin upgrade path is "uninstall + install").
|
|
7
|
+
#
|
|
8
|
+
# What it does:
|
|
9
|
+
# 1. Creates ~/.contribute-system/{candidates,research,gates,gates/lib,bin,
|
|
10
|
+
# check-runs,test-logs} if missing
|
|
11
|
+
# 2. Copies the plugin's runtime scripts (gates + orchestrators + reporters
|
|
12
|
+
# + lib) into the runtime dirs with chmod +x
|
|
13
|
+
# 3. If ~/.contribute-system/profile.md is missing, writes a starter
|
|
14
|
+
# template the user can fill in
|
|
15
|
+
# 4. Prints next-steps
|
|
16
|
+
#
|
|
17
|
+
# What it does NOT touch (your data is yours):
|
|
18
|
+
# - ~/.contribute-system/candidates/*.md
|
|
19
|
+
# - ~/.contribute-system/research/*.md
|
|
20
|
+
# - ~/.contribute-system/log.jsonl
|
|
21
|
+
# - ~/.contribute-system/profile.md (only created if missing)
|
|
22
|
+
|
|
23
|
+
set -euo pipefail
|
|
24
|
+
|
|
25
|
+
# Resolve PLUGIN_DIR — Claude Code sets CLAUDE_PLUGIN_ROOT at hook execution.
|
|
26
|
+
# Fallback resolves relative to this script for manual invocation.
|
|
27
|
+
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
28
|
+
RUNTIME_DIR="${CONTRIBUTE_SYSTEM_DIR:-$HOME/.contribute-system}"
|
|
29
|
+
|
|
30
|
+
printf '\n Installing contributing-clanker runtime to %s\n\n' "$RUNTIME_DIR"
|
|
31
|
+
|
|
32
|
+
# 1. Create runtime directory tree
|
|
33
|
+
for sub in candidates research gates gates/lib bin check-runs test-logs; do
|
|
34
|
+
/usr/bin/mkdir -p "$RUNTIME_DIR/$sub"
|
|
35
|
+
done
|
|
36
|
+
|
|
37
|
+
# 2. Copy plugin's runtime scripts into the runtime dirs
|
|
38
|
+
SKILL_SCRIPTS="$PLUGIN_DIR/skills/contribute/scripts"
|
|
39
|
+
|
|
40
|
+
if [[ ! -d "$SKILL_SCRIPTS" ]]; then
|
|
41
|
+
printf ' ! plugin skill scripts missing at %s\n' "$SKILL_SCRIPTS" >&2
|
|
42
|
+
printf ' (expected the release script to have synced them — manifest mismatch)\n' >&2
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Top-level orchestrators + reporters → ~/.contribute-system/bin/
|
|
47
|
+
for f in "$SKILL_SCRIPTS"/*.sh; do
|
|
48
|
+
[[ -f "$f" ]] || continue
|
|
49
|
+
/usr/bin/cp -f "$f" "$RUNTIME_DIR/bin/"
|
|
50
|
+
/usr/bin/chmod +x "$RUNTIME_DIR/bin/$(basename "$f")"
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
# Gates → ~/.contribute-system/gates/
|
|
54
|
+
for f in "$SKILL_SCRIPTS"/gates/*.sh; do
|
|
55
|
+
[[ -f "$f" ]] || continue
|
|
56
|
+
/usr/bin/cp -f "$f" "$RUNTIME_DIR/gates/"
|
|
57
|
+
/usr/bin/chmod +x "$RUNTIME_DIR/gates/$(basename "$f")"
|
|
58
|
+
done
|
|
59
|
+
|
|
60
|
+
# Gate library → ~/.contribute-system/gates/lib/
|
|
61
|
+
if [[ -f "$SKILL_SCRIPTS/gates/lib/preamble.sh" ]]; then
|
|
62
|
+
/usr/bin/cp -f "$SKILL_SCRIPTS/gates/lib/preamble.sh" "$RUNTIME_DIR/gates/lib/preamble.sh"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
GATE_COUNT=$(/usr/bin/find "$RUNTIME_DIR/gates" -maxdepth 1 -name '*.sh' -type f 2>/dev/null | /usr/bin/wc -l)
|
|
66
|
+
SCRIPT_COUNT=$(/usr/bin/find "$RUNTIME_DIR/bin" -maxdepth 1 -name '*.sh' -type f 2>/dev/null | /usr/bin/wc -l)
|
|
67
|
+
|
|
68
|
+
printf ' ✓ %d gate scripts installed at %s\n' "$GATE_COUNT" "$RUNTIME_DIR/gates/"
|
|
69
|
+
printf ' ✓ %d orchestrator + reporter scripts at %s\n' "$SCRIPT_COUNT" "$RUNTIME_DIR/bin/"
|
|
70
|
+
|
|
71
|
+
# 3. Starter profile.md if missing
|
|
72
|
+
PROFILE="$RUNTIME_DIR/profile.md"
|
|
73
|
+
if [[ ! -f "$PROFILE" ]]; then
|
|
74
|
+
/usr/bin/cat > "$PROFILE" <<'PROFILE_TEMPLATE'
|
|
75
|
+
---
|
|
76
|
+
title: Contribution profile
|
|
77
|
+
created: 2026-01-01
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
# Contribution profile
|
|
81
|
+
|
|
82
|
+
Edit this file with your preferred languages, target repo tiers, and any
|
|
83
|
+
constraints. The `@scout` subagent reads this when sweeping for new work.
|
|
84
|
+
|
|
85
|
+
## Languages
|
|
86
|
+
|
|
87
|
+
- (e.g.) typescript
|
|
88
|
+
- python
|
|
89
|
+
- bash
|
|
90
|
+
|
|
91
|
+
## Target repo tiers
|
|
92
|
+
|
|
93
|
+
- mainstream # >5k stars, active maintainers, predictable etiquette
|
|
94
|
+
- emerging # 500-5k stars, smaller community, faster turnaround
|
|
95
|
+
- niche # <500 stars, often single-maintainer
|
|
96
|
+
|
|
97
|
+
## Constraints
|
|
98
|
+
|
|
99
|
+
- (e.g.) no CLA-required repos for trivial work
|
|
100
|
+
- (e.g.) no Java repos (out of stack strength)
|
|
101
|
+
- (e.g.) avoid GPL-incompatible licensing if your work has commercial reuse needs
|
|
102
|
+
PROFILE_TEMPLATE
|
|
103
|
+
printf ' ✓ wrote starter profile at %s\n' "$PROFILE"
|
|
104
|
+
else
|
|
105
|
+
printf ' ✓ profile.md already exists — left untouched\n'
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
# 4. Next steps
|
|
109
|
+
printf '\n Done.\n\n'
|
|
110
|
+
printf ' Next steps:\n'
|
|
111
|
+
printf ' 1. Edit %s with your languages + target tiers\n' "$PROFILE"
|
|
112
|
+
printf ' 2. Verify gh + jq: gh auth status && command -v jq\n'
|
|
113
|
+
printf ' 3. In Claude Code: /contribute\n\n'
|
|
114
|
+
printf ' Your candidate state, dossiers, and event log will live at %s\n' "$RUNTIME_DIR"
|
|
115
|
+
printf ' (preserved across plugin upgrade and uninstall)\n\n'
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# uninstall.sh — pre-uninstall hook for the contributing-clanker plugin.
|
|
3
|
+
#
|
|
4
|
+
# Runs before `/plugin uninstall contributing-clanker`. Removes the
|
|
5
|
+
# plugin-shipped runtime scripts and preserves the user's data.
|
|
6
|
+
#
|
|
7
|
+
# What it does:
|
|
8
|
+
# - Removes ~/.contribute-system/bin/*.sh
|
|
9
|
+
# - Removes ~/.contribute-system/gates/*.sh
|
|
10
|
+
# - Removes ~/.contribute-system/gates/lib/*.sh
|
|
11
|
+
#
|
|
12
|
+
# What it does NOT touch (your data is yours):
|
|
13
|
+
# - ~/.contribute-system/candidates/ (your candidate queue)
|
|
14
|
+
# - ~/.contribute-system/research/ (your dossiers)
|
|
15
|
+
# - ~/.contribute-system/log.jsonl (your event history)
|
|
16
|
+
# - ~/.contribute-system/profile.md (your preferences)
|
|
17
|
+
# - ~/.contribute-system/check-runs/ (your check-run logs)
|
|
18
|
+
# - ~/.contribute-system/test-logs/ (your test output logs)
|
|
19
|
+
#
|
|
20
|
+
# To purge entirely: rm -rf ~/.contribute-system/
|
|
21
|
+
|
|
22
|
+
set -euo pipefail
|
|
23
|
+
|
|
24
|
+
RUNTIME_DIR="${CONTRIBUTE_SYSTEM_DIR:-$HOME/.contribute-system}"
|
|
25
|
+
|
|
26
|
+
if [[ ! -d "$RUNTIME_DIR" ]]; then
|
|
27
|
+
printf ' ! runtime directory %s not found — nothing to uninstall\n' "$RUNTIME_DIR"
|
|
28
|
+
exit 0
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
printf '\n Removing contributing-clanker runtime scripts from %s\n\n' "$RUNTIME_DIR"
|
|
32
|
+
|
|
33
|
+
REMOVED_BIN=0
|
|
34
|
+
REMOVED_GATES=0
|
|
35
|
+
|
|
36
|
+
if [[ -d "$RUNTIME_DIR/bin" ]]; then
|
|
37
|
+
for f in "$RUNTIME_DIR"/bin/*.sh; do
|
|
38
|
+
[[ -f "$f" ]] || continue
|
|
39
|
+
/usr/bin/rm -f "$f"
|
|
40
|
+
REMOVED_BIN=$((REMOVED_BIN + 1))
|
|
41
|
+
done
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
if [[ -d "$RUNTIME_DIR/gates" ]]; then
|
|
45
|
+
for f in "$RUNTIME_DIR"/gates/*.sh; do
|
|
46
|
+
[[ -f "$f" ]] || continue
|
|
47
|
+
/usr/bin/rm -f "$f"
|
|
48
|
+
REMOVED_GATES=$((REMOVED_GATES + 1))
|
|
49
|
+
done
|
|
50
|
+
/usr/bin/rm -f "$RUNTIME_DIR/gates/lib/preamble.sh" 2>/dev/null || true
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
printf ' ✓ removed %d orchestrator/reporter script(s) from %s/bin/\n' "$REMOVED_BIN" "$RUNTIME_DIR"
|
|
54
|
+
printf ' ✓ removed %d gate script(s) from %s/gates/\n' "$REMOVED_GATES" "$RUNTIME_DIR"
|
|
55
|
+
|
|
56
|
+
# Preserved data summary
|
|
57
|
+
CAND_COUNT=$(/usr/bin/find "$RUNTIME_DIR/candidates" -maxdepth 1 -name '*.md' -type f 2>/dev/null | /usr/bin/wc -l)
|
|
58
|
+
DOSSIER_COUNT=$(/usr/bin/find "$RUNTIME_DIR/research" -maxdepth 1 -name '*.md' -type f 2>/dev/null | /usr/bin/wc -l)
|
|
59
|
+
if [[ -f "$RUNTIME_DIR/log.jsonl" ]]; then
|
|
60
|
+
LOG_LINES=$(/usr/bin/wc -l < "$RUNTIME_DIR/log.jsonl")
|
|
61
|
+
else
|
|
62
|
+
LOG_LINES=0
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
printf '\n Preserved (your data — left untouched):\n'
|
|
66
|
+
printf ' %d candidate(s) at %s/candidates/\n' "$CAND_COUNT" "$RUNTIME_DIR"
|
|
67
|
+
printf ' %d dossier(s) at %s/research/\n' "$DOSSIER_COUNT" "$RUNTIME_DIR"
|
|
68
|
+
printf ' %s event(s) in %s/log.jsonl\n' "$LOG_LINES" "$RUNTIME_DIR"
|
|
69
|
+
printf ' profile.md at %s\n' "$RUNTIME_DIR/profile.md"
|
|
70
|
+
printf '\n To purge entirely: rm -rf %s\n\n' "$RUNTIME_DIR"
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentsolutionsio/contributing-clanker",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Local-only OSS contribution command center with 41 deterministic gates against AI-slop failure modes",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"oss",
|
|
7
|
+
"contributions",
|
|
8
|
+
"github",
|
|
9
|
+
"ai-slop-prevention",
|
|
10
|
+
"code-review",
|
|
11
|
+
"open-source",
|
|
12
|
+
"gates",
|
|
13
|
+
"deterministic",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"claude-plugin",
|
|
16
|
+
"tonsofskills"
|
|
17
|
+
],
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/jeremylongshore/claude-code-plugins-plus-skills.git",
|
|
21
|
+
"directory": "plugins/community/contributing-clanker"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://tonsofskills.com/plugins/contributing-clanker",
|
|
24
|
+
"bugs": "https://github.com/jeremylongshore/claude-code-plugins-plus-skills/issues",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Jeremy Longshore",
|
|
28
|
+
"email": "jeremy@intentsolutions.io",
|
|
29
|
+
"url": "https://github.com/jeremylongshore"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"README.md",
|
|
36
|
+
"skills",
|
|
37
|
+
"hooks"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"postinstall": "node -e \"console.log(\\\"\\\\n→ This npm package is a tracking/proof artifact. Install the plugin via:\\\\n ccpi install contributing-clanker\\\\n or /plugin install contributing-clanker@claude-code-plugins-plus in Claude Code\\\\n\\\")\""
|
|
41
|
+
}
|
|
42
|
+
}
|