Harvest debt

From jikig-ai/soleur · View interactive version

Harvest debt is an AI agent skill from the GitHub repository jikig-ai/soleur. This skill should be used when harvesting inline SOLEUR-DEBT: markers from the codebase into a ledger grouped by file, flagging markers with no upgrade trigger.

How to use this skill

Skill file

<!-- grok-harness-invoke:start -->

Grok Build (plugins/soleur/lib/harness.ts invokeSkill()): Read this SKILL.md in this process and run it to completion. A one-segment soleur:<name> in this document names a SKILL — on Grok Build, Read plugins/soleur/skills/<name>/SKILL.md in this process; it is not a nested tool_use. A multi-segment id such as soleur:<domain>:<name> names an AGENT: spawn it, never Read it, and on Grok Build spawn_subagent takes the id with its colons replaced by hyphens (agentIdToGrokSubagentType). Claude Code: Skill tool for a skill (soleur:<name>), Task tool with subagent_type for an agent. Forbidden is executing a subset, not the Read.

<!-- grok-harness-invoke:end -->

Harvest Inline Deferral Markers

Read-only harvester for inline SOLEUR-DEBT: deferral markers. It makes the

deliberate shortcuts left in code grep-discoverable so a deferral cannot quietly

become permanent. It complements — never duplicates — the reactive

technical-debt ledger:

It writes nothing and closes nothing; promotion and closure stay deliberate acts.

The marker convention

A deliberate shortcut is annotated inline, in a code comment, with the ceiling it

tops out at and the observable trigger that says "do the real thing now":

// SOLEUR-DEBT: <ceiling>; <upgrade trigger>

collides with skill references like soleur:go throughout the docs.

the text after is the upgrade trigger.

it no-trigger.

This marker is the canonical, grep-discoverable form of the in-place deferral that

the wg-when-deferring-a-capability-create-a gate prefers over filing speculative backlog

issues. Document a deferral here, in code, and harvest makes it visible without

converting every shortcut into phantom backlog.

Run

bash "${CLAUDE_PLUGIN_ROOT}/skills/harvest-debt/scripts/harvest-debt.sh"

Run from the repo root. The harvester (harvest-debt.sh):

  1. Greps tracked source for SOLEUR-DEBT: markers.
  2. Groups hits by file and splits each on the first ; into ceiling + trigger.
  3. Flags any marker with no trigger as no-trigger.
  4. Prints a markdown report ending with <N> markers, <M> with no trigger., or

No SOLEUR-DEBT markers found. when the tree is clean.

--help prints usage. The script is idempotent and read-only.

After harvesting

For each surfaced marker, decide:

into a technical-debt/ ledger entry, then soleur:resolve-debt

to close it with a linked issue once the upgrade trigger fires.

marker if the shortcut is now permanent and accepted.

Scope (and its one limitation)

The harvest scans CODE comments only. Prose (*.md — the convention doc, plans,

specs, SKILL bodies), node_modules, and build output (_site, dist, *.min.*)

are excluded so the marker DEFINITION never self-reports as debt. This is a **path

denylist, not a semantic check**: a SOLEUR-DEBT: literal placed in a non-.md

source file purely as documentation would still be reported. Keep marker examples

in markdown.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.