agentleFS
samwelmungasamwelmunga/jenga-npm/.agents/skills/j-playbook/SKILL.md

j.playbook

Skill0 starsChanged 23 days agoApache-2.0View on GitHub

Invoke a specific /jenga playbook directly by ID or by its list number, skipping natural-language matching entirely and going straight to chain confirmation and execution. Bare, it lists the playbooks as a numbered list.

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:

    Bare invocation — no argument given: If this skill was invoked with no argument at all, do not proceed to step 1.

    line 39
  2. Very specific:

    Numeric argument: If the argument is purely numeric (^[0-9]+$), it is a list number into the listing above, not an id.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Playbook — Direct Playbook Invocation by ID

Purpose

/jenga's natural-language branch (skills/jenga/SKILL.md) proposes a playbook only when free-text intent doesn't cleanly resolve to a single skill and skills/jenga/scripts/match-playbook.sh finds a confident match. That's the right default when the user doesn't know a playbook exists or doesn't know its exact id. j.playbook <id> is the other case: the user already knows exactly which playbook they want and names it directly — this skill skips detect-nl-intent.sh and match-playbook.sh entirely and goes straight to the same confirmation-and-execution machinery /jenga's natural-language branch already uses (E53_S06_T03, per story E53_S06's fourth and fifth Acceptance Criteria).

This skill never re-implements chain confirmation, sequential execution, forward_from/resolve resolution, or composition/conditional handling — all of that is skills/jenga/SKILL.md's Natural-language branch steps 5a-5e, reused here by reference. The only genuinely new logic in this skill is id resolution (step 1 below).

Instructions

  1. Bare invocation — no argument given. If this skill was invoked with no argument at all, do not proceed to step 1. Instead: a. Run bash "$([ -f skills/j-playbook/scripts/playbook-list.sh ] && echo skills/j-playbook/scripts/playbook-list.sh || echo node_modules/@jenga-ai/agent/skills/j-playbook/scripts/playbook-list.sh)" render. It reads skills/jenga/scripts/load-playbooks.sh's existing full-catalog output and prints one line per playbook in the ranked_list object type (templates/playbook-types.json): <n>. <id> — <name> (<built-in|project>) · steps: <step> -> <step> -> .... b. Print its output verbatim, as the numbered list it is — do not re-render it as a table or add a trailing menu line. If the output is empty, say plainly that no playbooks are available. On exit 2 (loader failure) surface the script's stderr rather than an empty list. c. Halt this invocation after printing the list — do not proceed to step 1. The user can then re-invoke with j.playbook <n> (the list number) or j.playbook <id>.

    Numeric argument. If the argument is purely numeric (^[0-9]+$), it is a list number into the listing above, not an id. Run the same script with resolve <n>: exit 0 prints the id of the n-th playbook (same ordering as the listing) — use that as <id> in step 1 and proceed exactly as the id path does; exit 1 means the number is out of range, so report the script's stderr (it names the valid range) and halt without proceeding to step 1.

  2. Resolve the id — invoke skills/jenga/scripts/load-playbooks.sh lookup "<id>" (E53_S06_T02), where <id> is this skill's argument (or the id a numeric argument resolved to). Branch on the returned status field:

    • "not_found" — no playbook with that id exists. Tell the user plainly that no such playbook was found. As a "did you mean" nudge, you may additionally invoke skills/jenga/scripts/load-playbooks.sh (no arguments, full-catalog mode) and list the available ids from its output — use your judgment on whether this is helpful given the specific id the user typed. Halt this invocation; do not proceed to step 2.
    • "invalid" — a file for that id exists but failed load-time validation. Report the reason field to the user verbatim — never a generic "not found" message, since this is a materially different situation from not_found (the story's explicit distinguishing requirement, E53_S06_T02). Halt this invocation; do not proceed to step 2.
    • "valid" — continue to step 2, using the returned playbook object's id, name, and steps fields. This object has the exact same field shape as one entry from load-playbooks.sh's full-catalog output — the same shape match-playbook.sh's playbook_match result carries id/name/steps in, for /jenga's Natural-language branch step 5.
  3. Confirm and execute the chain — follow skills/jenga/SKILL.md's Natural-language branch step 5, sub-steps a through e, verbatim (conditional/origin metadata resolution; render and confirm the chain via render-playbook-confirmation.sh; the reply loop; sequential-runner init; the execute-in-a-loop procedure covering skip evaluation, forward_from/resolve resolution (E53_S06_T01), invocation, advance, and halt handling) exactly as written there — do not duplicate that prose here. Use the id/name/steps resolved in step 1 above wherever that section refers to match-playbook.sh's playbook_id/name/steps output; every other detail (including how forward_from, resolve, conditionals, and composed/nested steps are handled) is identical, with no special-casing for this direct-invocation entry point.

    The one framing difference: step 5b's confirmation prompt need not (and should not) present this as a proposal the user might not have expected — they named this playbook explicitly by id. Otherwise render, confirm, and execute exactly as that section already does.

  4. On a complete or halted result (per step 5e-v/5e-vi), report exactly as that section already specifies. This skill does not continue into any further phase — there is no /jenga Phase 1-4 to fall into here, since this is a direct entry point, not /jenga itself.

Edge Cases

  • The looked-up playbook contains a resolve step or composed/nested steps — handled identically to the natural-language path; no special-casing exists or is ever needed here (per story E53_S06's fifth Acceptance Criterion).
  • The user cancels at the chain confirmation step (step 5c) — identical posture to /jenga's own playbook-confirmation cancellation: halt immediately after relaying the cancellation acknowledgement, with no step of the chain executed.
  • load-playbooks.sh lookup itself fails unexpectedly (exit code 2, usage/setup error) — this is an environment/setup problem, not a normal not_found/invalid result; surface the script's stderr output to the user rather than treating it as either playbook-lookup outcome.

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.