pocketpal-dev-team
AGENTS.md2 starsChanged 3 months agoMITView on GitHub
This repo is the workflow control plane for PocketPal AI. The app lives in the read-only submodule repos/pocketpal-ai; all app work happens in worktrees created from it. The delivery runbook (pipeline, handoff block, routing, complexity, critic loops) is docs/workflows/pipeline.md. These hold for every agent and every task. Most are hook-enforced. These apply to work that becomes an app PR. Keep only a genuine "why" the code cannot show. The full test is under "Comments" in docs/standards/code-review.md. This repo is one…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- benchSkill
- figma-implementSkill
- memory-profileSkill
- review-l10nSkill
- review-prSkill
- run-e2eSkill
- run-pr-e2eSkill
- start-taskSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 1 is distinctive, and 8 are 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.
8
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
- Very specific: line 12
Create worktrees only from the submodule, via tools/create-worktree.sh.
- Very specific: line 13
Remove them only with ./tools/remove-worktree.sh <name> --yes, and only when the user asks.
- Very specific: line 14
Stop and report when you're inside the submodule, on main/master, or missing the WORKTREE, BRANCH, or story context your task needs.
- Distinctive: line 34
Comments: Default to none. A comment is usually a symptom:
- Very specific: line 39
Keep only a genuine "why" the code cannot show.
- Very specific: line 46
before editing context/architecture/, run git status --porcelain -- context/architecture/.
- Very specific: line 48
commit your change at once, path-scoped (git commit -- <file>, never add -A).
- Very specific: line 74
Bot identity: Every public GitHub write goes through tools/ghb, which runs gh as the pocketpal-dev-team[bot] App.
- Very specific: line 76
When the bot token is unavailable, ghb runs as the operator and warns.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Agent Instructions
This repo is the workflow control plane for PocketPal AI. The app lives in the read-only submodule repos/pocketpal-ai; all app work happens in worktrees created from it. The delivery runbook (pipeline, handoff block, routing, complexity, critic loops) is docs/workflows/pipeline.md.
Guardrails
These hold for every agent and every task. Most are hook-enforced.
- Submodule read-only. Inside
repos/pocketpal-ai/, never edit, build, test, commit, or switch branches, and never use its build artifacts or upload its files as generated assets. Read it with absolute paths (git -C "$ROOT/repos/pocketpal-ai" …,grep -rn … "$ROOT/repos/pocketpal-ai/src"); after acd, the harness can't resolve relative paths. - Worktrees.
- App work happens in
worktrees/<TASK-or-PR>/on a non-mainbranch. - Create worktrees only from the submodule, via
tools/create-worktree.sh. - Remove them only with
./tools/remove-worktree.sh <name> --yes, and only when the user asks. Never use rawgit worktree remove/prune,rm -r, orrmdir. - Stop and report when you're inside the submodule, on
main/master, or missing theWORKTREE,BRANCH, or story context your task needs.
- App work happens in
- Secrets. Agents never read
.env,.env.*, keystores, or key files (hook-guarded). Config reaches worktrees only throughtools/sync-worktree-config.sh/tools/create-worktree.sh; never bulk-copy it. - App code reaches
mainonly through a reviewed PR. Push the feature branch; never push, fast-forward, or merge a branch onto the app'smainyourself (hook-enforced, any refspec). - Public artifacts. GitHub artifacts (PR title, body, and comments; issues; commit messages) and everything in the app (source, tests, configs) reference only public things: GitHub
#123, file paths, library names. Leave out:- internal tracker IDs (
context/issue-tracking.md) andlinear.applinks; - task IDs;
- story anchors (
I_DSn,Dn,§4x,Scenario X,WHAT/HOW,round N).
- internal tracker IDs (
Delivery rules
These apply to work that becomes an app PR.
- Keep the four stages intact: Intent → WHAT → HOW → Implementation. Implementation and independent review never collapse into one role. The orchestrator runs stages without interactive prompts; the stop conditions are in
pipeline.md. - Story gate. Trivial work needs
intent-brief.md; quick work addshow.md; standard and complex work addwhat.md. - Architecture docs (
context/architecture/, one per flow; lifecycle in its README):- a change to behaviour a flow doc describes updates that doc in the same round. The doc lives in this repo, so the update is a path-scoped commit here, not part of the app PR;
- for standard and complex work, WHAT is a detailed delta on the flow doc, and the implementer distills it into the doc;
- the architect runs a drift check first, because drift is a bug.
- Native changes. Work touching
package.json, native modules,ios/,android/, a Podfile, orbuild.gradleisNATIVE_CHANGES=YES. It needspod install, an iOS build, and an Android build before it is ready. - Visual evidence. A PR that changes visible UI carries durable captures posted to the PR (
docs/workflows/visual-capture.md). Comments. Default to none. A comment is usually a symptom:
- of a redundant line: delete it;
- of unclear code: fix the code;
- of a forced design: move the rationale to
context/architecture/.
Keep only a genuine "why" the code cannot show. The full test is under "Comments" in
docs/standards/code-review.md.
Shared checkout
This repo is one checkout on main, shared by parallel sessions (worktrees/ belong to the app repo).
- Architecture docs. A lost update here is silent (last writer wins, and the diff looks clean). So:
- before editing
context/architecture/, rungit status --porcelain -- context/architecture/; - a foreign modification means stop;
- commit your change at once, path-scoped (
git commit -- <file>, neveradd -A).
- before editing
- Story files.
workflows/stories/*andworkflows/reviews/*exist only on the machine that wrote them. Put their content inline in a PR instead of citing the path. - Follow-ups. An agent can only arm a mechanism that outlives it. "I will do X when the build finishes", followed by exiting, arms nothing.
- Review subagents. The user authorises delegated subreviews (architect, QA, security, performance, mobile, data, UX, local-invariants) wherever the review workflow requires them.
Harness layout
This repo runs under Claude Code, Codex, opencode, and pi from one source:
- Roles live in
agents/<name>.mdand skills inskills/<name>/SKILL.md. These are the only copies, so edit them directly. Harness paths point back at them:
.claude/,.opencode/and.pi/agents, and all skill dirs, are symlinks;.codex/agents/*.tomlare one-line stubs.
tools/sync-harness.pycreates them. Run it only when you add, rename, or remove a role or skill, or change a role's description;--checkreports drift.- The guards are the
tools/guard-*.shscripts, wired as hooks in.claude/settings.json,.codex/hooks.json,.opencode/plugins/guards.ts, and.pi/extensions/guards/. Add a new guard to all four. - Source files use plain paths ("Read
docs/..."), never@pathimports; only Claude expands those.
GitHub conventions
Signature: one line naming the harness that did the work. It is the only footer, with no harness-injected footers and no session links.
Generated by [PocketPal Dev Team](https://github.com/a-ghorbani/pocketpal-dev-team) · <Claude Code | Codex | opencode>Bot identity. Every public GitHub write goes through tools/ghb, which runs gh as the pocketpal-dev-team[bot] App. That covers pr create, pr comment, issue comment, and pr review --comment / --request-changes.
- Approvals and merges stay on the operator's account;
ghbrefuses them. - When the bot token is unavailable,
ghbruns as the operator and warns. Ifghbcan't run, plainghis fine. - Setup:
docs/workflows/github-bot-identity.md.
Commits and titles.
- Commits never carry
Co-Authored-Bytrailers (hook-enforced). - Titles:
[Bug]: …(labelbug),[Feat]: …(labelenhancement), or a short PR description under 70 characters.
Worktrees and naming
| Type | Worktree | Branch | Story directory |
| New task | worktrees/TASK-YYYYMMDD-HHMM | feature/TASK-YYYYMMDD-HHMM | workflows/stories/TASK-YYYYMMDD-HHMM/ |
| PR fix | worktrees/PR-<n> | pr-<n> | workflows/stories/PR-<n>-fix/ |
| PR E2E | worktrees/PR-<n>-e2e | detached | n/a |
./tools/create-worktree.sh TASK-YYYYMMDD-HHMM # branch feature/TASK-..., ref origin/main
./tools/create-worktree.sh PR-490 --branch pr-490 --ref pr-490 # fetch the PR ref first
./tools/create-worktree.sh PR-490-e2e --detach --ref origin/<branch>
./tools/sync-worktree-config.sh ./worktrees/<name> # re-sync allowlisted config
./tools/remove-worktree.sh <name> --yes [--force] # only when the user asksKey references
- Pipeline runbook:
docs/workflows/pipeline.md - Templates:
templates/ - Architecture library:
context/architecture/README.md - Project context:
context/patterns.md,context/pocketpal-overview.md - Standards:
docs/standards/code-review.md,docs/workflows/visual-capture.md - Tracker routing:
context/issue-tracking.md
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.

