jenga-npm
AGENTS.md0 starsChanged 20 days agoApache-2.0View on GitHub
⚠️ CRITICAL — Source of Truth for All Features All features — skills, agents, hooks, scripts, and any other implementation — MUST be created and edited in the root directories (skills/, agents/, hooks/, scripts/, etc.). The .agents/ and .claude/ directories are generated build outputs. They are populated automatically by the /distribute skill and must never be used as the primary location for new or updated features. Any change made only inside .agents/ or .claude/ will be overwritten on the next…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository151 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- j.brainstormSkill
- j.breakSkill
- j.btwSkill
- j.check-inSkill
- j.clearifySkill
- j.close-storySkill
- j.cloud-connectSkill
- j.commitSkill
- j.connectSkill
- j.continueSkill
- j.conventionsSkill
- j.dashboard-shareSkill
- j.dashboardSkill
- j.deep-diveSkill
- j.distributeSkill
- j.docSkill
- j.doc-syncSkill
- j.doooSkill
- j.doSkill
- j.jenga-configSkill
- j.jenga-permission-levelSkill
- j.jengaSkill
- j.errorSkill
- j.evaluateSkill
- j.examplifySkill
- j.gitignoreSkill
- j.helpSkill
- j.ideaSkill
- j.improveSkill
- j.initSkill
- j.jbpSkill
- j.lgtmSkill
- j.pi-planSkill
- j.playbook-newSkill
- j.playbookSkill
- j.proceedSkill
- j.publishSkill
- j.reconcile-originSkill
- j.reconcileSkill
- j.redoSkill
- j.skillifySkill
- j.smoke-testSkill
- j.spinoffSkill
- j.statusSkill
- j.testSkill
- j.todoSkill
- j.toolsSkill
- j.unchartedSkill
- j.wtfSkill
- skill-nameSkill
- j.brainstormSkill
- j.breakSkill
- j.btwSkill
- j.check-inSkill
- j.clearifySkill
- j.close-storySkill
- j.cloud-connectSkill
- j.commitSkill
- j.connectSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 42
Never runs tests — that is the Tester's exclusive responsibility.
- Very specific: line 43
After three failed conflict resolutions, writes a rapport, sets status to Blocked, and halts.
- Very specific: line 44
Never commits .env files or credentials.
- Very specific: line 51
Test tool configuration lives in project/configs/test-config.json (user-approved).
- Distinctive: line 54
After every status update, checks for story/epic rollup and writes a trigger to the queue if warranted.
- Very specific: line 127
When implementing or authoring a skill, offload deterministic, repeatable steps to shell scripts or other static tooling (e.g., bash …
- Distinctive: line 163
When presenting options to the user, ALWAYS use this format instead of open-ended questions if possible:
- Distinctive: line 171
Avoid ask open-ended questions where a list of options would serve better.
- Distinctive: line 220
When divergence is detected, immediately pause the current line of work and present the following structured choice:
- Very specific: line 239
Create a /todo for the diverging topic (with context summary and a /brainstorm offer for Prerequisites).
- Very specific: line 240
Create a /todo for the primary topic (with context summary and a /brainstorm offer for Prerequisites).
- Distinctive: line 241
Ask the user which topic to continue first.
- Very specific: line 253
User wants to pursue both in parallel: Treat this as Option C — capture both as /todo items with full context summaries, then ask the user …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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.
Files
Workflow Rules
⚠️ CRITICAL — Source of Truth for All Features
All features — skills, agents, hooks, scripts, and any other implementation — MUST be created and edited in the root directories (
skills/,agents/,hooks/,scripts/, etc.).The
.agents/and.claude/directories are generated build outputs. They are populated automatically by the/distributeskill and must never be used as the primary location for new or updated features. Any change made only inside.agents/or.claude/will be overwritten on the next distribution run.Rule: If you add or modify a skill, agent, hook, or script, the canonical file lives in the root directory.
.agents/and.claude/are read-only artifacts.
Workflow Lifecycle
/init— Scaffold the project: git init, directories,workflow.json,PROJECT_SUMMARY.mdstub./jenga— Interactive-by-default board orchestrator: bare shows a picker + confirmation tree,<ids>scopes and confirms,*runs the original fully automated pipeline with no prompts./todo(or Scrum Master directly) — Translate requirements into board items (epics → stories → tasks)./do— Pick a task fromproject/todo.md, invoke the Developer agent with full scrum board context and a sender object.- Developer — Reads task, creates a worktree, implements, commits, and calls the Tester.
- Tester — Validates sender object, runs tests, writes status to the board, triggers rollup if all tasks pass.
SessionEndhook —on_session_end.shdetects new rapports and writes triggers to the queue.- Scrum Master (next session) — Processes the queue: rapport review, status review, story/epic rollup.
Agents
Scrum Master (agents/scrum-master.md)
- Owns
project/PROJECT_SUMMARY.md— sole writer. - Processes
project/queue/scrum_triggers.jsonlat every session start. - Creates and amends epics, stories, and tasks using the scrum board schema.
- Handles story and epic rollup when all child items pass.
- Applies advisory file locks before writing any board file.
Developer (agents/developer.md)
- Creates an isolated git worktree per task (
<E##_S##_T##-slug>). - Logs all incoming sender objects to
project/logs/events.jsonbefore doing any work. - Commits at meaningful milestones (not every line, not only at the end).
- Calls the Tester with a full sender object including commit SHAs.
- Never runs tests — that is the Tester's exclusive responsibility.
- After three failed conflict resolutions, writes a rapport, sets status to
Blocked, and halts. - Never commits
.envfiles or credentials.
Tester (agents/tester.md)
- Sole agent permitted to update task and story statuses on the board.
- Validates all required sender fields before proceeding (rejects with
"error"if any are missing). - Manages the full testing lifecycle: unit, integration, e2e, SAST, vulnerability, performance, coverage.
- Test tool configuration lives in
project/configs/test-config.json(user-approved). - SAST/vulnerability scans are opt-in and require explicit user approval, logged to
events.json. - Writes
Rejectedstatus only after notifying the user and receiving confirmation. - After every status update, checks for story/epic rollup and writes a trigger to the queue if warranted.
- Maintains analytics baselines in
project/data/baselines.jsonacross sessions.
Skills (Slash Commands)
Skills are stored in skills/<name>/SKILL.md. Invoke them with /<name> in a Claude Code session.
| Command | Description |
/init | Scaffold project directories, workflow.json, PROJECT_SUMMARY.md, initial commit. |
/jenga | Interactive-by-default board orchestrator with a fully automated escape hatch: bare /jenga renders a picker + confirmation tree, /jenga <ids> resolves an explicit scope + confirms, /jenga * reproduces the original zero-prompt, fully automated run. |
/jbp | Scaffold the project using the JengaBasePlate boilerplate. |
/brainstorm | Focused planning session with the Scrum Master to define and refine features before committing to the board. |
/btw | Capture a mid-flow mission, classify into epic/story structure, implement now or defer. |
/todo | Add missions to project/todo.md linked to epics and stories. Loops until done, then optionally runs /do. |
/redo | Rework a previous implementation by commit SHA or Epic/Story number. Includes scope assessment, plan, and doc updates. |
/uncharted | Entry point for code with no board provenance — three modes: segment (a file or directory), import (an external source), onboard (a whole pre-existing codebase). |
/do | Execute tasks from the scrum board. Resolves each entry to full board context and drives the Developer agent. |
/j-test | Discover the project's test suites, list them numbered, run the ones you pick (blank means all) in order, and print a pass/fail summary; exit code 0 when all passed, 1 otherwise. Never writes board status. |
/j-smoke-test | Structural smoke test of every skill in the catalog: frontmatter, name versus directory, preferred agent, referenced scripts and assets. Classifies findings as critical or minor, prints a pass/fail summary, and exits 1 when any critical finding exists. Read-only. |
/status | Overview of epics, stories, and tasks with statuses, open rapports, and queue depth. |
/jenga-permission-level | Report or switch the current session's 5-tier permission level (Locked/Guarded/Standard/Elevated/Unrestricted) without hand-editing settings.json. |
/commit | Commit completed work using the EST naming convention (epic(...), story(...)). |
/lgtm | Approve current work, commit, and continue. Chains /commit + /continue. |
/continue | Pick up the next incomplete item across PROJECT_SUMMARY.md, epics, and stories. |
/proceed | Resume execution from where it left off. |
/j-break | Stop an orchestration at the next safe task boundary: the current task finishes and records its status, then execution halts before the next one starts — nothing is aborted mid-flight. Soft by default (one-shot); hard persists until /j-break clear; append status for a progress rapport on the current scope of execution. |
/error | Guided troubleshooting — gathers context about an error and investigates a fix. |
/help | List all available skills with descriptions. |
Skill Frontmatter
Each SKILL.md starts with a YAML frontmatter block. Supported fields:
---
name: <skill-name>
description: <one-sentence description>
metadata:
prefered_agent: <agent_name> # optional
keywords: # optional
- "<short phrase>"
examples: # optional
- "<natural-language prompt>"
---| Field | Required | Purpose |
name | ✅ | Skill name — must match the directory name under skills/. |
description | ✅ | Shown in /help listings and the skill registry. |
metadata.prefered_agent | ❌ | Sub-agent to delegate to (scrum-master, developer, tester). |
keywords | ❌ | Short phrases (1–3 words) for Jenga Router keyword matching. |
examples | ❌ | Natural-language prompts for Jenga Router semantic matching. |
See project/documentation/skill-authoring.md for the full authoring guide.
prefered_agent
When a SKILL.md file contains a prefered_agent property in its YAML frontmatter, it indicates which sub-agent should be used to execute the skill. When invoking the skill, delegate execution to that agent by loading its definition from agents/<agent_name>.md and passing it the skill's instructions along with all relevant context.
Valid values match the agent definitions in the agents/ directory: scrum-master, developer, tester.
Skills without this property are executed directly without delegating to a sub-agent.
Skill Implementation Principle — Scripts Over Inline Logic
When implementing or authoring a skill, offload deterministic, repeatable steps to shell scripts or other static tooling (e.g., bash scripts in skills/<name>/scripts/, shared scripts in scripts/) rather than encoding them as agent instructions inside SKILL.md.
Why:
- Scripts execute consistently regardless of model, context length, or session state
- Moving logic out of
SKILL.mdreduces token consumption on every invocation - Scripts are version-controlled, testable, and reusable across skills
Apply this principle when a step:
- Runs a fixed sequence of shell commands (git operations, file manipulation, validation)
- Produces structured output that the agent then reads and acts on
- Would be identical across every invocation (no dynamic reasoning required)
Keep in SKILL.md what requires agent judgment: interpreting output, making decisions based on context, presenting results to the user, and handling edge cases that cannot be enumerated in advance.
Documentation Placement — docs/ versus project/documentation/ versus site/
Rule (
E34_S06, revised byE70_S02):docs/belongs to the project; Jenga scaffolds it but never puts Jenga content in it; Jenga's internal documents live inproject/documentation/, the published site source lives insite/. Maintainer-internal documentation — design notes, mirror and distribution rules, protocol and parity docs, decision records, execution plans and summaries — lives underproject/documentation/, thedocumentationpath inproject/configs/workflow.json.One-line test: would someone who only installed the package want to read this? If not, it is internal.
Skills and agents that create documentation resolve the destination from
workflow.json'spaths.documentation; they never default todocs/. The strategy brief is not an exception: it is an ordinaryproject/documentation/STRATEGY.mdfile (resolved viapaths.strategy). The site's decision record isproject/documentation/site-decisions.md.
Interaction Pattern
When presenting options to the user, ALWAYS use this format instead of open-ended questions if possible:
What would you like to do?
1. Option A
2. Option B
3. Option C
4. Other (describe below)Avoid ask open-ended questions where a list of options would serve better. Free-text input must always appear as the final numbered option.
MCP Tools
mcp/help
Discovers available skills by scanning .agents/skills/. help(path?) returns skill folder names.
cd mcp/help && npm install
node index.jsmcp/execute-ticket
Planned: creates a sub-agent, initialises a git worktree, and names the session after the task ID. See mcp/execute-ticket/index.js.
Hooks
Hooks are configured in settings.json and fire automatically during a Claude Code session.
| Hook | Trigger | Action |
WorktreeCreate | Developer creates a worktree | Runs git worktree add and echoes the worktree path. |
WorktreeRemove | Developer removes a worktree | Runs git worktree remove --force on the given path. |
SessionEnd | Any session ends | Runs hooks/on_session_end.sh asynchronously. |
hooks/on_session_end.sh
Runs at the end of every Developer or Tester session: logs a session-end event to events.json, compares rapports/problems/ against .rapport_manifest.json (skipping *.IGNORE.md files) and writes a rapport_review trigger if new rapports are found, then always appends a status_review trigger for the next Scrum Master session.
Subject Divergence Detection
What Counts as Divergence
A subject has diverged when the user introduces any of the following mid-session:
- A new feature request unrelated to the task or story currently in focus
- An unrelated suggestion (tooling change, refactor, workflow idea) that would require separate planning
- A scope-expanding idea that goes beyond the current story's Acceptance Criteria or Definition of Done
Clarifying questions, follow-up details, or edge cases that directly serve the current topic are not divergence.
Detection & Prompt
When divergence is detected, immediately pause the current line of work and present the following structured choice:
It looks like we're moving into a new topic. How would you like to handle it?
1. Capture the **new topic** as a `/todo` (I'll return to what we were doing)
2. Capture the **current topic** as a `/todo` (I'll continue with the new topic)
3. Capture **both** as `/todo` items (you choose which to continue first)
4. Ignore it — tell me which topic to continue withOption A — Capture the Diverging Topic
- Summarise the diverging topic using context gathered so far and create a
/todowith that summary as the description. - Offer
/brainstormto fill in any missing Prerequisites before finalising the/todo. - Once the
/todois saved, return to the primary topic exactly where it was paused.
Option B — Capture the Primary Topic
- Summarise the primary topic using context gathered so far and create a
/todowith that summary as the description. - Offer
/brainstormto fill in any missing Prerequisites before finalising the/todo. - Once the
/todois saved, continue with the diverging topic.
Option C — Capture Both
- Create a
/todofor the diverging topic (with context summary and a/brainstormoffer for Prerequisites). - Create a
/todofor the primary topic (with context summary and a/brainstormoffer for Prerequisites). - Ask the user which topic to continue first.
Context Surfacing
In every /todo description created through this flow, include:
- A one-sentence summary of the topic
- Key details, constraints, or decisions already discussed
- Any open questions or unknowns raised so far
This ensures no context is lost regardless of which option the user chooses.
Edge Cases
- User declines both options (selects "Ignore it"): Acknowledge the choice without creating any
/todoitems, then ask the user to explicitly state which topic to continue. Follow their direction. - User wants to pursue both in parallel: Treat this as Option C — capture both as
/todoitems with full context summaries, then ask the user which to continue first.
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
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.

