agentleFS
tanishq286tanishq286/tq-forge/skills/tq-forge-queue/SKILL.md

tq-forge-queue

Skill8 starsChanged 5 months agoMITView on GitHub

Show queued forge work — intents deferred while the halt flag was set, plus items flagged "needs_manual_review" because their score stayed below 7 after a refine attempt. Lets you remove, reorder, or run the next item. Use when asked for "/tq-forge-queue", "what's queued", "show pending forges", or "process the queue".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check it every iteration.

    line 76
  2. Very specific:

    After running an item, the queue length decreased by exactly one (pop removes it).

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/tq-forge-queue — view + manage deferred forge work

When to use

/tq-forge and /tq-forge-skill queue the requested intent (instead of running it) when $TQ_FORGE_HOME/halt.flag is set, and flag artifacts as needs_manual_review when scoring stays <7. This skill is the cockpit for both: inspect what's pending, drop entries you don't want, and run the next one when you're ready.

Procedure

export TQ_FORGE_HOME="${TQ_FORGE_HOME:-$HOME/.tq-forge}"
S="${CLAUDE_PLUGIN_ROOT:-${TQ_FORGE_HOME:-$HOME/.tq-forge}/install}/scripts"
source "$S/common.sh" && tq_ensure_home
  1. Render both lists.
    bash "$S/forge-checkpoint.sh" status
    Two arrays matter: queue (intents waiting to run) and needs_manual_review (slugs scored <7).
  2. Ask the user what to do next via AskUserQuestion:
    • Run next — pop item #1 and process it via the /tq-forge procedure.
    • Run all — loop through every queued intent. Stop if the halt flag re-appears.
    • Drop one — prompt for the index, remove it.
    • Clear queue — drop all queue entries (keeps needs_manual_review).
    • Open review — for a needs_manual_review slug, print its sandbox path so the user can edit by hand, then /tq-forge-test it.
  3. Run next pops atomically:
    INTENT="$(bash "$S/forge-checkpoint.sh" pop)"
    test -n "$INTENT" && echo "Processing: $INTENT"   # then follow /tq-forge
  4. Run all loops, checking the halt flag each iteration:
    while INTENT="$(bash "$S/forge-checkpoint.sh" pop)"; [ -n "$INTENT" ]; do
      test -f "$TQ_FORGE_HOME/halt.flag" && echo "⏸  halt set — stopping." && break
      echo "Processing: $INTENT"   # follow /tq-forge for each
    done
  5. Drop / clear mutate the queue file safely (read-modify-write):
    python3 -c "import json,pathlib,os;p=pathlib.Path(os.environ['TQ_FORGE_HOME'])/'forge-queue.json';q=json.loads(p.read_text());q['queue'].pop(<idx>);p.write_text(json.dumps(q,indent=2))"

Pitfalls

  • forge-queue.json is the source of truth for deferred work. Don't overwrite it blank — always read-modify-write.
  • Older entries may be bare strings; newer ones are {intent, at} dicts. Handle both shapes when displaying.
  • "Run all" without checking the halt flag re-arms the problem the queue solved. Check it every iteration.

Verification

  • After running an item, the queue length decreased by exactly one (pop removes it).
  • forge-queue.json is still valid JSON: python3 -c "import json,sys;json.load(open(sys.argv[1]))" "$TQ_FORGE_HOME/forge-queue.json".

Tags

tq-forge queue pending manage

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.