Claude Skill

can-i-help

Use when the user asks "where to help", "contribution opportunities", or "find a good first issue". Returns data-backed first steps. Not for PR review queues: use gh-review-requests.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download outlinedriven-outline-driven-development-.devin_skills_can-i-help-b0e8ce8.zip · 11 KB
Part of outlinedriven/outline-driven-development — 145 skills

Install

skills CLI npx skills add https://github.com/OutlineDriven/outline-driven-development/tree/main/.devin/skills/can-i-help
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install outlinedriven-outline-driven-development@llmmart
Git git clone https://github.com/OutlineDriven/outline-driven-development.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole outlinedriven/outline-driven-development collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Can I help

Contract

Field Bound contract
Trigger The user asks "where can I help", "what can I contribute", "find a good first issue", or "what should I work on".
Authority Read-only. No file, VCS, credential, paid, published, deployed, or remote mutation.
Side effect None; ranked recommendations only.
Done Two to five evidenced recommendations with what, why, location, and first step, each based on a read source range and carrying a certainty label.

Inputs

  • Target repository (optional): defaults to the current working directory. If the user supplies a path, use it.
  • Developer interest (collected during execution, not supplied upfront): a single-select choice that routes signal ranking.

Procedure

  1. Bound scope. If the user already named an exact task or issue, stop: solve that task instead. If the request is pure project orientation with no contribution decision, produce orientation, not recommendations. If the repo cannot be read locally and no public issue tracker is available, report what is missing and stop. Done when: scope is bounded to contribution recommendations, or the request is redirected to the named task or orientation.

  2. Resolve target and collect base context. Default target is the current repo unless the user supplied a path. Capture the project shape before ranking:

    • Manifests: fd '^(package.json|pyproject.toml|Cargo.toml|go.mod|pom.xml|build.gradle|deno.json|bun.lockb|pnpm-lock.yaml|requirements.txt)$' <repo>.
    • Top-level structure: fd --max-depth 3 --type f <repo>; exclude generated/vendor directories.
    • README / contributing docs: fd '^(README|CONTRIBUTING|DEVELOPMENT|HACKING)(\..*)?$' <repo> then read the relevant file ranges.
    • Test roots: fd '(^test$|^tests$|__tests__|spec$|\.test\.|\.spec\.)' <repo>.
    • Build/test commands: derive from manifest scripts, Makefile targets, CI config, or existing docs; mark certainty MEDIUM unless a command is explicitly declared. Done when: the project shape and active local modifications are recorded.
  3. Collect contribution signals with native recipes. Prefer indexed codegraph when available; otherwise use ast-grep, rg, fd, and git history. Keep every signal as {kind, file, line?, metric, confidence, evidence}. Missing kind, file for file-backed work, or evidence downgrades the candidate to LOW. Done when: every collected signal has kind, file where applicable, evidence, and confidence.

    • Good-first areas: low blast radius, clear adjacent patterns, nearby tests, recent maintainer activity, low bug density. Fallback: count importers with rg -n 'from .*/<module>|require\(.*/<module>|use .*<module>|import .*<module>' and prefer files with few dependents plus visible neighboring tests.
    • Test gaps: hot source files with no co-changing test file. git --no-pager log --since='180 days ago' --name-only --format='commit:%H' -- <src-paths>; rank source files by touches, then subtract files whose commits include a matching test|tests|spec|__tests__ path. HIGH when source churn ≥5 and zero matching test co-change; MEDIUM when no test root exists but naming conventions are unclear.
    • Doc drift: docs with zero or weak code coupling, stale inline identifiers, or examples importing paths that no longer exist. git --no-pager log --since='365 days ago' --name-only --format='commit:%H' -- docs README* CONTRIBUTING*; compute doc commits with no source files. Extract backticked identifiers/import paths from docs, check via codegraph search, else rg -n '<identifier-or-path>' <repo>. HIGH for broken import/path; MEDIUM for zero code coupling over the window.
    • Bugspots: files repeatedly touched by fix commits. git --no-pager log --since='365 days ago' --regexp-ignore-case --grep='fix|bug|regression|crash|panic|race|leak|broken' --name-only --format='commit:%H' -- <repo>; bug-fix rate = fix_touches / max(total_touches, 1). HIGH when fix_touches ≥3 and rate ≥0.25; MEDIUM when only one threshold holds.
    • Open issues: gh issue list --state open --limit 15 --json number,title,labels. Route labels: bug/regression/crash → bugs; good first issue/help wanted → newcomer; documentation/docs → docs; test/testing/coverage → tests; cleanup/refactor/chore → cleanup only after repo verification. If gh fails, mark issue signal unavailable and continue.
    • Slop-deletion candidates: commented-out code, orphan exports, passthrough wrappers, and always-true/always-false conditions. Use AST where possible; never promise zero-behavior cleanup until the slop verification gate (step 8) passes.
  4. Ask the developer's interest, mandatory and first, before recommendations. Present a single-select with exactly one Recommended option. Do this even if signals already look obvious. Done when: the developer selects one interest. Prompt: What kind of contribution do you want to make? Options:

    • New to the stack: Recommended when good-first areas or cleanup candidates exist.
    • Experienced: hard problems, bugspots, architecture-adjacent issues.
    • Want to write tests: test gaps and bugspot overlap.
    • Want to fix bugs: bug-labelled issues, bugspots, suspicious conditions.
    • Want to improve docs: stale references, doc drift, documentation issues.
    • Want quick cleanup: verified deletion-only or tightly-contained cleanup.
  5. Route interest to signals. Lead with the strongest non-empty primary signal for the chosen interest; skip empty subsections with one sentence, not a filler apology. If the chosen interest has no supporting signal, name which signal was empty and pivot to the nearest adjacent interest with data. Done when: the selected interest is routed to its strongest available signal or an explicit data-backed pivot.

    • New to the stack → good-first areas (primary), verified cleanup / good first issue labels (secondary); prefer one-file tasks with examples nearby and low blast radius.
    • Experienced → bugspots, high-impact open issues, repeated-churn areas (primary); suspicious conditions, architectural labels (secondary); prefer bug-fix rate + open issue overlap.
    • Want to write tests → test gaps, test-gap ∩ bugspot (primary); test/testing/coverage labels, nearby test templates (secondary); sort by hotness + bug-fix rate.
    • Want to fix bugs → bug/regression/crash issues, bugspots (primary); always-true/false conditions, flaky-test labels, recent reverts (secondary); issue + bugspot overlap first.
    • Want to improve docs → stale inline symbols/import paths, zero-coupling docs (primary); documentation labels, README examples failing lookup (secondary); broken symbol/path beats coarse zero-coupling.
    • Want quick cleanup → verified commented-out code, verified orphan exports (primary); passthrough wrappers, redundant branches as bug investigation (secondary); pure deletion HIGH before contained refactor MEDIUM.
  6. Score and rank candidates. Order candidates within the selected interest: base = confidence(HIGH=3, MEDIUM=2, LOW=1); overlap_bonus = 2 if two primary signals match else 0; locality_bonus = 1 if one file and nearby examples exist else 0; issue_bonus = 1 if matching open issue label exists else 0; risk_penalty = 2 if exported/public/entrypoint, 1 if generated-looking, 3 if no file read yet; score = base + overlap_bonus + locality_bonus + issue_bonus - risk_penalty. Suppress candidates with score <= 1 unless every signal is weak; in that case disclose LOW certainty and ask whether to inspect deeper. Prioritize file-level evidence over directory-level evidence. Prefer overlap (test gap ∩ bugspot beats standalone test gap). Cap to 5 recommendations. Exclude generated, vendored, lockfile, snapshot, and build-output files. Done when: candidates are scored, ranked, filtered, and capped to five.

  7. Read before explaining. For every candidate that survives ranking, read the target file range plus enough surrounding code to understand the local pattern. For docs, read the stale doc and the current code target. For tests, read one nearby existing test pattern. Structural claims without a read are Graft; exclude them. Done when: every surviving candidate has a read source range backing its explanation.

  8. Apply the slop cleanup gate when a recommendation is cleanup-shaped and claims "zero behavior change". A recommendation that makes no such claim never routes through this gate. Before any zero-behavior wording:

    • Read the file and surrounding block.
    • Check references: codegraph callers/search when indexed; fallback rg -n '<symbol>' <repo> and language-specific ast-grep for import/export sites.
    • Check framework entry reachability: route files, plugin registries, CLI command tables, dynamic imports, reflection decorators, config exports, generated public APIs.
    • Classify: Pure deletion HIGH: commented-out code that re-parses as old code with no live marker, or orphan export with no references and no entry reachability. Contained refactor MEDIUM: passthrough wrapper with all call sites visible; first step is call-site inventory, not deletion. Bug investigation MEDIUM: always-true/false condition; likely wrong predicate, not cleanup.
    • If any entry-reachability doubt remains, phrase as "cleanup candidate" and make the first step verification, not removal. Done when: each zero-behavior cleanup claim is verified or downgraded to a candidate with verification first.
  9. Emit 2 to 5 recommendations. Each uses the four-field shape so a contributor can act without re-reading the code:

    • What: exact file and line/range, function, issue number, or doc section. If issue-backed, include #<number> and still name the file once known.
    • Why: data-backed metric: bug-fix rate, test-gap touch count, zero doc coupling, broken symbol lookup, issue label, confidence score.
    • How: 2 to 3 sentences based on reading the file. Explain the local pattern, what would change, and why this is a bounded contribution. For tests, name the branch/case to cover. For docs, name the stale claim and the current code truth. For cleanup, state whether it is pure deletion, contained refactor, or bug investigation.
    • First step: exact command or action. Prefer bat -P -p -n <file>, rg -n '<symbol>' <paths>, gh issue view <number>, or a concrete edit after verification. If line numbers are unavailable, the First step must produce them. Do not include a recommendation that cannot fill all four fields. Done when: two to five recommendations fill all four fields and carry certainty labels.
  10. Offer the next depth step. Close with: Want me to walk you through one of these? I can read the target code, outline the exact diff, or draft the PR description. Done when: the depth-step offer is delivered.

Failure and recovery

  • Not a git repo: history-backed signals (bugspots, test gaps, doc drift) are unavailable. Use file structure, tests/docs presence, and open issues if available. Do not fabricate git history.
  • gh unavailable or unauthenticated: open issues signal unavailable. Continue with local bugspots, test gaps, doc drift, and cleanup signals.
  • No manifests found: mark stack certainty LOW. Infer from extensions only after reading representative files.
  • No test root found: do not claim absent tests globally. Treat test-gap confidence as MEDIUM until conventions are known.
  • Churn history too shallow: avoid bug-fix-rate percentages. Use current issue labels and code reads.
  • Developer picks interest with no signal: name the empty signal explicitly. Pivot to the nearest adjacent interest with non-empty evidence.
  • Cleanup candidate touches public/exported surface: downgrade safety claim. Make caller/reachability verification the First step.
  • Only LOW-certainty candidates exist: present at most two with LOW label. Ask whether to inspect deeper before editing.
  • No contribution opportunities survive: report that no safe, data-backed recommendation was found. Offer to broaden scope to issues, docs, or tests after more context.
  • Partial results: return whatever non-empty signals survived with their certainty labels. Never present LOW as fact or suppress a failed signal silently.
  • Non-mutation: this skill performs no file, VCS, or remote mutation. No rollback is needed; the only recovery is to report what is missing and continue with available signals.

Output

A ranked list of 2 to 5 recommendations, each in the four-field shape (What / Why / How / First step), preceded by the developer's chosen interest and the signals that routed to it. Each recommendation carries a certainty label (HIGH, MEDIUM, or LOW). The list closes with an offer to walk through one recommendation in depth. If no safe recommendation survives, a terminal report stating that no data-backed contribution opportunity was found, naming the signals checked and the reason each was empty.

Files (outline-driven-development)
  • agents
    • openai.yaml 169 B
      interface:
        display_name: "Can I Help"
        short_description: "Use when the user asks \"where to help\", \"contribution opportunities\", or \"find a good first issue\"."
      
  • references
    • interest-routing.md 10.7 KB
      # Interest routing contract
      
      Use this reference as the deterministic routing layer after base context and contribution signals have been collected. It is intentionally self-contained: no external cache, no plugin state, no dependency on other skills.
      
      ## Signal shapes
      
      Normalize every collector result before matching:
      
      ```json
      {
        "kind": "test-gap | doc-drift | stale-doc | bugspot | issue | good-first | cleanup",
        "file": "src/parser/expr.ts",
        "line": 42,
        "symbol": "parseExpr",
        "metric": "bug-fix rate 38%",
        "confidence": "HIGH | MEDIUM | LOW",
        "evidence": ["git fix_touches=5 total_touches=13", "no co-changing test file"],
        "firstStep": "bat -P -p -n src/parser/expr.ts"
      }
      ```
      
      Missing optional fields are acceptable; missing `kind`, `file` for file-backed work, or `evidence` downgrades the candidate to LOW and usually excludes it from the final list.
      
      ## Interest → signal map
      
      | Developer interest | Primary signals | Secondary signals | Ranking rule | Degradation |
      |---|---|---|---|---|
      | New to the stack | `good-first` areas: low dependents, clear related patterns, nearby tests/docs | verified commented-out-code cleanup; verified orphan exports; `good first issue` / `help wanted` labels | prefer one-file tasks with examples nearby and low blast radius | if no good-first signal, offer docs or quick cleanup with verification-first wording |
      | Experienced | bugspots; high-impact open issues; needs-help areas with repeated churn | suspicious always-true/false conditions; architectural issue labels | prefer repeated bug-fix rate + open issue overlap; avoid easy chores unless asked | if only LOW issue labels exist, say hard-problem evidence is weak and offer bugspot exploration |
      | Want to write tests | test gaps; test-gap ∩ bugspot | open issues labelled `test`, `testing`, `coverage`; nearby test templates | sort by `(hotness + bug_fix_rate)` and availability of a test pattern | if test gaps empty, say hot files appear covered and pivot to bug or docs |
      | Want to fix bugs | open issues labelled `bug`, `regression`, `crash`; bugspots | always-true/false conditions; flaky-test labels; recent revert commits | issue + bugspot overlap first; otherwise bugspot with clear local entry point | if `gh` unavailable, use bugspots only and state issue tracker unavailable |
      | Want to improve docs | stale inline symbols/import paths; docs with zero code coupling | open issues labelled `documentation`; README examples that fail lookup | broken symbol/path beats coarse zero-coupling; docs issue + stale reference beats both | if docs signal empty, say no stale docs found and offer tests or cleanup |
      | Want quick cleanup | verified commented-out code; verified orphan exports | passthrough wrappers with visible call sites; redundant always-true branches as bug investigation | pure deletion HIGH before contained refactor MEDIUM; never start with exported public surface | if all cleanup counts zero, say no safe cleanup candidates detected and offer docs/tests |
      
      ## Candidate scoring
      
      Use scoring to order candidates within the selected interest; do not show raw scores unless useful.
      
      ```text
      base = confidence(HIGH=3, MEDIUM=2, LOW=1)
      overlap_bonus = 2 if candidate matches two primary signals else 0
      locality_bonus = 1 if one file and nearby examples exist else 0
      issue_bonus = 1 if matching open issue label exists else 0
      risk_penalty = 2 if exported/public/entrypoint; 1 if generated-looking; 3 if no file read yet
      score = base + overlap_bonus + locality_bonus + issue_bonus - risk_penalty
      ```
      
      Suppress candidates with `score <= 1` unless every signal is weak; in that case disclose LOW certainty and ask whether to inspect deeper.
      
      ## Four-field recommendation template
      
      Every recommendation uses this exact shape.
      
      ```markdown
      ### <N>. <imperative contribution title>
      
      **What**: `<file>:<line-range>`: <symbol/section/issue>. If issue-backed, include `#<number>` and still name the file once known.
      
      **Why**: <data-backed evidence>. Examples: `bug-fix rate 38% (5 fix commits / 13 touches)`, `test gap: 11 source touches, zero co-changing test file`, `0.75 orphan-export confidence plus zero references`, `zero doc coupling across 365 days`, `open issue #42 labelled bug + touches src/auth.ts`.
      
      **How**: <2–3 sentences based on reading the file>. Explain the local pattern, what would change, and why this is a bounded contribution. For tests, name the branch/case to cover. For docs, name the stale claim and the current code truth. For cleanup, state whether it is pure deletion, contained refactor, or bug investigation.
      
      **First step**: `<exact command or action>`. Prefer `bat -P -p -n <file>`, `rg -n '<symbol>' <paths>`, `gh issue view <number>`, or a concrete edit after verification.
      ```
      
      Do not include a recommendation that cannot fill all four fields. If line numbers are unavailable, the First step must produce them (`rg -n` or `bat -P -p -n`).
      
      ## Slop verification rules
      
      Cleanup recommendations require a separate verification pass before any zero-behavior wording.
      
      ### Commented-out code
      
      HIGH when all hold:
      - The comment block parses as old code or contains obvious disabled code syntax.
      - Surrounding code has a live replacement or no reference to the commented names.
      - The block is not explanatory pseudocode, generated docs, license text, or deliberate sample code.
      
      First step template:
      
      ```text
      bat -P -p -n <file> | inspect lines <start>-<end>, then delete only that comment block and run the repo's normal test command.
      ```
      
      ### Orphan exports
      
      HIGH only after caller/reachability checks:
      - Codegraph callers/search returns no importers; fallback `rg -n '<symbol>' <repo>` finds only definition/export sites.
      - The symbol is not framework-discovered by filename, decorator, route table, plugin registry, CLI command table, config export, migration hook, serialization name, or public package API.
      - Package manifest / module export maps do not expose it as an external API, or the project accepts breaking removal.
      
      If any doubt remains, downgrade to MEDIUM and phrase the First step as verification:
      
      ```text
      rg -n '<symbol>' . && inspect package export maps before deleting <file>:<line>.
      ```
      
      ### Passthrough wrappers
      
      MEDIUM by default. They are rarely deletion-only because call sites must be updated.
      
      Require:
      - Wrapper only forwards arguments to one callee.
      - No validation, logging, metrics, auth, error translation, type narrowing, memoization, or public API compatibility role.
      - All call sites are visible.
      
      First step:
      
      ```text
      rg -n '<wrapperName>' <repo> to inventory call sites; inline one call site only after confirming behavior is identical.
      ```
      
      ### Always-true / always-false conditions
      
      Never call these cleanup. Treat as bug-investigation candidates.
      
      Examples:
      - `if (x === x)`
      - `if (count >= 0 || count < 0)`
      - Rust/Go/Python equivalents where the predicate is tautological or impossible.
      
      First step:
      
      ```text
      bat -P -p -n <file> and read the variables feeding the predicate; infer the intended comparison from adjacent branches/tests before editing.
      ```
      
      ## Native signal recipes
      
      These recipes are runnable and replace external analyzers with local evidence.
      
      ### Bugspots
      
      ```bash
      git --no-pager log --since='365 days ago' --regexp-ignore-case \
        --grep='fix|bug|regression|crash|panic|race|leak|broken' \
        --name-only --format='commit:%H' -- <repo>
      
      git --no-pager log --since='365 days ago' --name-only --format='commit:%H' -- <repo>
      ```
      
      Count file appearances in fix commits and all commits. Report `bug-fix rate = fix_touches / max(total_touches, 1)`. HIGH when `fix_touches >= 3` and rate `>= 0.25`; MEDIUM when only one threshold holds.
      
      ### Test gaps
      
      ```bash
      git --no-pager log --since='180 days ago' --name-only --format='commit:%H' -- <src-paths>
      fd '(^test$|^tests$|__tests__|spec$|\.test\.|\.spec\.)' <repo>
      ```
      
      A file is a test gap when it is a hot source file and commits touching it do not also touch a likely test file. HIGH when source touches `>= 5`, no co-changing test path, and no nearby test file exists.
      
      ### Doc drift / stale docs
      
      ```bash
      git --no-pager log --since='365 days ago' --name-only --format='commit:%H' -- docs README* CONTRIBUTING*
      rg -n '`[^`]+`|from ["'"'][^"'"']+["'"']|require\(["'"'][^"'"']+["'"']\)' docs README* CONTRIBUTING*
      ```
      
      For each backticked symbol or import path, use codegraph search when indexed. Fallback:
      
      ```bash
      rg -n '<identifier-or-import-path>' <repo>
      ```
      
      HIGH for broken import path or vanished symbol; MEDIUM for docs with zero source co-change over the window.
      
      ### Good-first areas
      
      Collect candidates from:
      - source files with tests nearby,
      - low bug-fix rate,
      - low dependent count,
      - recent maintainer edits,
      - open issues labelled `good first issue` or `help wanted`.
      
      Codegraph route:
      - `codegraph_impact` for candidate symbols/files.
      - `codegraph_callers` for entrypoint risk.
      - `codegraph_files` for neighborhood shape.
      
      Fallback route:
      
      ```bash
      rg -n 'import .*<module>|from .*<module>|require\(.*<module>|use .*<module>' <repo>
      fd '<module-or-basename>.*(test|spec)' <repo>
      git --no-pager log --since='180 days ago' --format='%an' -- <file>
      ```
      
      Prefer candidates with few dependents, visible examples, and active ownership.
      
      ### Open issues
      
      ```bash
      gh issue list --state open --limit 15 --json number,title,labels
      ```
      
      Label routing:
      - `bug`, `regression`, `crash` → bugs.
      - `good first issue`, `help wanted` → newcomer.
      - `documentation`, `docs` → docs.
      - `test`, `testing`, `coverage` → tests.
      - `cleanup`, `refactor`, `chore` → cleanup only after repo verification.
      
      ## Error / degradation table
      
      | Situation | Response | Fallback |
      |---|---|---|
      | Target is not a git repo | Say history-backed signals are unavailable | Use file structure, tests/docs presence, and open issues if available |
      | `gh` unavailable or unauthenticated | Say open issues unavailable | Use local bugspots/test gaps/docs/cleanup signals |
      | No manifests found | Mark stack certainty LOW | Infer from extensions only after reading representative files |
      | No test root found | Do not claim absent tests globally | Treat test-gap confidence as MEDIUM until conventions are known |
      | Churn history too shallow | Avoid bug-fix-rate percentages | Use current issue labels and code reads |
      | Developer picks interest with no signal | Name the empty signal explicitly | Pivot to the nearest adjacent interest with non-empty evidence |
      | Cleanup candidate touches public/exported surface | Downgrade safety claim | Make caller/reachability verification the First step |
      | Candidate file is generated/vendor/lock/snapshot | Exclude | Choose the next candidate |
      | Only LOW-certainty candidates exist | Present at most two with LOW label | Ask whether to inspect deeper before editing |
      | No contribution opportunities survive | Report that no safe, data-backed recommendation was found | Offer to broaden scope to issues, docs, or tests after more context |
      
    • slop-cleanup-gate.md 1 KB
      # Slop cleanup gate
      
      Cleanup candidates are attractive but dangerous because "deletion-only" is easy to overclaim.
      
      Before any cleanup recommendation says "zero behavior change":
      1. Read the file and surrounding block.
      2. Check references with codegraph callers/search when indexed; fallback `rg -n '<symbol>' <repo>` and language-specific `ast-grep` for import/export sites.
      3. Check framework entry reachability: route files, plugin registries, CLI command tables, dynamic imports, reflection decorators, config exports, and generated public APIs.
      4. Classify:
         - Pure deletion HIGH: commented-out code that re-parses as old code and has no live marker; orphan export with no references and no entry reachability.
         - Contained refactor MEDIUM: passthrough wrapper with all call sites visible; first step is call-site inventory, not deletion.
         - Bug investigation MEDIUM: always-true/false condition; likely wrong predicate, not cleanup.
      5. If any entry-reachability doubt remains, phrase as "cleanup candidate" and make the first step verification, not removal.
      
  • SKILL.md 13 KB
    ---
    name: can-i-help
    description: 'Use when the user asks "where to help", "contribution opportunities", or "find a good first issue". Returns data-backed first steps. Not for PR review queues: use gh-review-requests.'
    ---
    
    # Can I help
    
    ## Contract
    
    | Field | Bound contract |
    |---|---|
    | Trigger | The user asks "where can I help", "what can I contribute", "find a good first issue", or "what should I work on". |
    | Authority | Read-only. No file, VCS, credential, paid, published, deployed, or remote mutation. |
    | Side effect | None; ranked recommendations only. |
    | Done | Two to five evidenced recommendations with what, why, location, and first step, each based on a read source range and carrying a certainty label. |
    
    ## Inputs
    
    - Target repository (optional): defaults to the current working directory. If the user supplies a path, use it.
    - Developer interest (collected during execution, not supplied upfront): a single-select choice that routes signal ranking.
    
    ## Procedure
    
    1. **Bound scope.** If the user already named an exact task or issue, stop: solve that task instead. If the request is pure project orientation with no contribution decision, produce orientation, not recommendations. If the repo cannot be read locally and no public issue tracker is available, report what is missing and stop. **Done when:** scope is bounded to contribution recommendations, or the request is redirected to the named task or orientation.
    
    2. **Resolve target and collect base context.** Default target is the current repo unless the user supplied a path. Capture the project shape before ranking:
       - Manifests: `fd '^(package.json|pyproject.toml|Cargo.toml|go.mod|pom.xml|build.gradle|deno.json|bun.lockb|pnpm-lock.yaml|requirements.txt)$' <repo>`.
       - Top-level structure: `fd --max-depth 3 --type f <repo>`; exclude generated/vendor directories.
       - README / contributing docs: `fd '^(README|CONTRIBUTING|DEVELOPMENT|HACKING)(\..*)?$' <repo>` then read the relevant file ranges.
       - Test roots: `fd '(^test$|^tests$|__tests__|spec$|\.test\.|\.spec\.)' <repo>`.
       - Build/test commands: derive from manifest scripts, Makefile targets, CI config, or existing docs; mark certainty MEDIUM unless a command is explicitly declared. **Done when:** the project shape and active local modifications are recorded.
    
    3. **Collect contribution signals with native recipes.** Prefer indexed codegraph when available; otherwise use `ast-grep`, `rg`, `fd`, and git history. Keep every signal as `{kind, file, line?, metric, confidence, evidence}`. Missing `kind`, `file` for file-backed work, or `evidence` downgrades the candidate to LOW. **Done when:** every collected signal has kind, file where applicable, evidence, and confidence.
       - Good-first areas: low blast radius, clear adjacent patterns, nearby tests, recent maintainer activity, low bug density. Fallback: count importers with `rg -n 'from .*/<module>|require\(.*/<module>|use .*<module>|import .*<module>'` and prefer files with few dependents plus visible neighboring tests.
       - Test gaps: hot source files with no co-changing test file. `git --no-pager log --since='180 days ago' --name-only --format='commit:%H' -- <src-paths>`; rank source files by touches, then subtract files whose commits include a matching `test|tests|spec|__tests__` path. HIGH when source churn ≥5 and zero matching test co-change; MEDIUM when no test root exists but naming conventions are unclear.
       - Doc drift: docs with zero or weak code coupling, stale inline identifiers, or examples importing paths that no longer exist. `git --no-pager log --since='365 days ago' --name-only --format='commit:%H' -- docs README* CONTRIBUTING*`; compute doc commits with no source files. Extract backticked identifiers/import paths from docs, check via codegraph search, else `rg -n '<identifier-or-path>' <repo>`. HIGH for broken import/path; MEDIUM for zero code coupling over the window.
       - Bugspots: files repeatedly touched by fix commits. `git --no-pager log --since='365 days ago' --regexp-ignore-case --grep='fix|bug|regression|crash|panic|race|leak|broken' --name-only --format='commit:%H' -- <repo>`; bug-fix rate = `fix_touches / max(total_touches, 1)`. HIGH when fix_touches ≥3 and rate ≥0.25; MEDIUM when only one threshold holds.
       - Open issues: `gh issue list --state open --limit 15 --json number,title,labels`. Route labels: `bug`/`regression`/`crash` → bugs; `good first issue`/`help wanted` → newcomer; `documentation`/`docs` → docs; `test`/`testing`/`coverage` → tests; `cleanup`/`refactor`/`chore` → cleanup only after repo verification. If `gh` fails, mark issue signal unavailable and continue.
       - Slop-deletion candidates: commented-out code, orphan exports, passthrough wrappers, and always-true/always-false conditions. Use AST where possible; never promise zero-behavior cleanup until the slop verification gate (step 8) passes.
    
    4. **Ask the developer's interest, mandatory and first, before recommendations.** Present a single-select with exactly one Recommended option. Do this even if signals already look obvious. **Done when:** the developer selects one interest.
       Prompt: `What kind of contribution do you want to make?`
       Options:
       - `New to the stack`: Recommended when good-first areas or cleanup candidates exist.
       - `Experienced`: hard problems, bugspots, architecture-adjacent issues.
       - `Want to write tests`: test gaps and bugspot overlap.
       - `Want to fix bugs`: bug-labelled issues, bugspots, suspicious conditions.
       - `Want to improve docs`: stale references, doc drift, documentation issues.
       - `Want quick cleanup`: verified deletion-only or tightly-contained cleanup.
    
    5. **Route interest to signals.** Lead with the strongest non-empty primary signal for the chosen interest; skip empty subsections with one sentence, not a filler apology. If the chosen interest has no supporting signal, name which signal was empty and pivot to the nearest adjacent interest with data. **Done when:** the selected interest is routed to its strongest available signal or an explicit data-backed pivot.
       - New to the stack → good-first areas (primary), verified cleanup / `good first issue` labels (secondary); prefer one-file tasks with examples nearby and low blast radius.
       - Experienced → bugspots, high-impact open issues, repeated-churn areas (primary); suspicious conditions, architectural labels (secondary); prefer bug-fix rate + open issue overlap.
       - Want to write tests → test gaps, test-gap ∩ bugspot (primary); `test`/`testing`/`coverage` labels, nearby test templates (secondary); sort by hotness + bug-fix rate.
       - Want to fix bugs → `bug`/`regression`/`crash` issues, bugspots (primary); always-true/false conditions, flaky-test labels, recent reverts (secondary); issue + bugspot overlap first.
       - Want to improve docs → stale inline symbols/import paths, zero-coupling docs (primary); `documentation` labels, README examples failing lookup (secondary); broken symbol/path beats coarse zero-coupling.
       - Want quick cleanup → verified commented-out code, verified orphan exports (primary); passthrough wrappers, redundant branches as bug investigation (secondary); pure deletion HIGH before contained refactor MEDIUM.
    
    6. **Score and rank candidates.** Order candidates within the selected interest:
       `base = confidence(HIGH=3, MEDIUM=2, LOW=1); overlap_bonus = 2 if two primary signals match else 0; locality_bonus = 1 if one file and nearby examples exist else 0; issue_bonus = 1 if matching open issue label exists else 0; risk_penalty = 2 if exported/public/entrypoint, 1 if generated-looking, 3 if no file read yet; score = base + overlap_bonus + locality_bonus + issue_bonus - risk_penalty`.
       Suppress candidates with `score <= 1` unless every signal is weak; in that case disclose LOW certainty and ask whether to inspect deeper. Prioritize file-level evidence over directory-level evidence. Prefer overlap (test gap ∩ bugspot beats standalone test gap). Cap to 5 recommendations. Exclude generated, vendored, lockfile, snapshot, and build-output files. **Done when:** candidates are scored, ranked, filtered, and capped to five.
    
    7. **Read before explaining.** For every candidate that survives ranking, read the target file range plus enough surrounding code to understand the local pattern. For docs, read the stale doc and the current code target. For tests, read one nearby existing test pattern. Structural claims without a read are Graft; exclude them. **Done when:** every surviving candidate has a read source range backing its explanation.
    
    8. **Apply the slop cleanup gate when a recommendation is cleanup-shaped and claims "zero behavior change".** A recommendation that makes no such claim never routes through this gate. Before any zero-behavior wording:
       - Read the file and surrounding block.
       - Check references: codegraph callers/search when indexed; fallback `rg -n '<symbol>' <repo>` and language-specific `ast-grep` for import/export sites.
       - Check framework entry reachability: route files, plugin registries, CLI command tables, dynamic imports, reflection decorators, config exports, generated public APIs.
       - Classify: **Pure deletion HIGH**: commented-out code that re-parses as old code with no live marker, or orphan export with no references and no entry reachability. **Contained refactor MEDIUM**: passthrough wrapper with all call sites visible; first step is call-site inventory, not deletion. **Bug investigation MEDIUM**: always-true/false condition; likely wrong predicate, not cleanup.
       - If any entry-reachability doubt remains, phrase as "cleanup candidate" and make the first step verification, not removal. **Done when:** each zero-behavior cleanup claim is verified or downgraded to a candidate with verification first.
    
    9. **Emit 2 to 5 recommendations.** Each uses the four-field shape so a contributor can act without re-reading the code:
       - What: exact file and line/range, function, issue number, or doc section. If issue-backed, include `#<number>` and still name the file once known.
       - Why: data-backed metric: bug-fix rate, test-gap touch count, zero doc coupling, broken symbol lookup, issue label, confidence score.
       - How: 2 to 3 sentences based on reading the file. Explain the local pattern, what would change, and why this is a bounded contribution. For tests, name the branch/case to cover. For docs, name the stale claim and the current code truth. For cleanup, state whether it is pure deletion, contained refactor, or bug investigation.
       - First step: exact command or action. Prefer `bat -P -p -n <file>`, `rg -n '<symbol>' <paths>`, `gh issue view <number>`, or a concrete edit after verification. If line numbers are unavailable, the First step must produce them.
       Do not include a recommendation that cannot fill all four fields. **Done when:** two to five recommendations fill all four fields and carry certainty labels.
    
    10. **Offer the next depth step.** Close with: `Want me to walk you through one of these? I can read the target code, outline the exact diff, or draft the PR description.` **Done when:** the depth-step offer is delivered.
    
    ## Failure and recovery
    - Not a git repo: history-backed signals (bugspots, test gaps, doc drift) are unavailable. Use file structure, tests/docs presence, and open issues if available. Do not fabricate git history.
    - `gh` unavailable or unauthenticated: open issues signal unavailable. Continue with local bugspots, test gaps, doc drift, and cleanup signals.
    - No manifests found: mark stack certainty LOW. Infer from extensions only after reading representative files.
    - No test root found: do not claim absent tests globally. Treat test-gap confidence as MEDIUM until conventions are known.
    - Churn history too shallow: avoid bug-fix-rate percentages. Use current issue labels and code reads.
    - Developer picks interest with no signal: name the empty signal explicitly. Pivot to the nearest adjacent interest with non-empty evidence.
    - **Cleanup candidate touches public/exported surface**: downgrade safety claim. Make caller/reachability verification the First step.
    - Only LOW-certainty candidates exist: present at most two with LOW label. Ask whether to inspect deeper before editing.
    - No contribution opportunities survive: report that no safe, data-backed recommendation was found. Offer to broaden scope to issues, docs, or tests after more context.
    - Partial results: return whatever non-empty signals survived with their certainty labels. Never present LOW as fact or suppress a failed signal silently.
    - Non-mutation: this skill performs no file, VCS, or remote mutation. No rollback is needed; the only recovery is to report what is missing and continue with available signals.
    
    ## Output
    A ranked list of 2 to 5 recommendations, each in the four-field shape (What / Why / How / First step), preceded by the developer's chosen interest and the signals that routed to it. Each recommendation carries a certainty label (HIGH, MEDIUM, or LOW). The list closes with an offer to walk through one recommendation in depth. If no safe recommendation survives, a terminal report stating that no data-backed contribution opportunity was found, naming the signals checked and the reason each was empty.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related