ptah-extension
CLAUDE.md34 starsChanged 9 days agoMITView on GitHub
Wide test runs exhaust the developer machine's RAM. These rules are mandatory for the main agent, every subagent and every CLI lane. Repeat them in any task prompt you hand to a lane. - Verify with npm run verify. It runs nx affected -t lint test typecheck --base=main. - Only some projects or targets: npm run verify -- -p A,B / npm run verify -- -t test -p A. - Extra Nx or Jest flags go after a second --:…
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Hive-Academy/PtahCodeword for word, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Hive-Academy/PtahCode★ 34100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- agent-lanesSkill
- angular-3d-scene-crafterSkill
- angular-frontend-patternsSkill
- angular-gsap-animation-crafterSkill
- ddd-architectureSkill
- execute-phase-gated-taskSkill
- frontend-designSkill
- humanize-librarySkill
- nestjs-backend-patternsSkill
- nestjs-deploymentSkill
- nx-workspace-architectSkill
- orchestrationSkill
- ptah-surface-authoringSkill
- resilient-nestjs-patternsSkill
- saas-platform-patternsSkill
- saas-workspace-initializerSkill
- session-handoffSkill
- skill-creatorSkill
- technical-content-writerSkill
- tribunalSkill
- ui-ux-designerSkill
- webhook-architectureSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
22 rules. About 0 are common, 6 are distinctive, and 16 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.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Verify with npm run verify.
- Very specific: line 9
Only some projects or targets: npm run verify -- -p A,B / npm run verify -- -t test -p A.
- Very specific: line 26
Test, lint and typecheck results are cached in one Nx cache that the main checkout and every worktree share (~/.nx/<workspace-id>/).
- Very specific: line 28
Do not set cacheDirectory or NX_CACHE_DIRECTORY: that turns the sharing off.
- Very specific: line 29
Never run workspace-wide checks, and never nx run-many across projects you did not change.
- Very specific: line 30
Never run build, serve, dev, e2e or package targets unless the user asks for it.
- Very specific: line 31
Prefer one foreground run with a long timeout.
- Very specific: line 40
Keep the Electron renderer in apps/ptah-extension-webview.
- Distinctive: line 41
Run visual reviews and screenshots in Electron only.
- Distinctive: line 42
When a change touches a shared lib, run scoped checks for the affected Electron and renderer projects.
- Very specific: line 43
Keep provider CLI lanes and the benchmark's platform-cli and cli-engine libraries working.
- Very specific: line 47
Prefer ptah_git_worktree_add when listed.
- Very specific: line 48
Before you change any file for a new task, create a worktree on a new branch from main: git worktree add -b <type>/<short-name> …
- Distinctive: line 65
Do not finish a completed task with uncommitted changes or an unpublished branch.
- Distinctive: line 72
If a tool denies an action, stop that action and report the blocker.
- Distinctive: line 73
Only the coordinating agent commits, pushes, and manages the pull request.
- Very specific: line 83
Keep the title under 70 characters.
- Very specific: line 85
After each push, watch the PR's CI jobs and code reviews with gh.
- Distinctive: line 89
Do not treat a successful push as task completion.
- Very specific: line 99
Run git commit in the foreground.
- Very specific: line 103
Run git push (chained with gh pr create when a PR is due) as one background command (the Bash tool's run_in_background) and continue with …
- Very specific: line 112
Read that config before committing.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
CLAUDE.md
STRICT: Verification commands (memory-safe)
Wide test runs exhaust the developer machine's RAM. These rules are mandatory for the main agent, every subagent and every CLI lane. Repeat them in any task prompt you hand to a lane.
- Verify with
npm run verify. It runsnx affected -t lint test typecheck --base=main.- Only some projects or targets:
npm run verify -- -p A,B/npm run verify -- -t test -p A. - Extra Nx or Jest flags go after a second
--:npm run verify -- -p A -- --testPathPatterns=foo.
- Only some projects or targets:
npm run verifytakes a slot of a machine-wide FIFO counting lock first, so at most 3 heavy checks run at a time across all sessions, lanes and worktrees. Another check starts only while at least 5 GB of memory is free and the newest check has run for 30 s. A check on an empty lock always starts. While it waits it prints why (waiting for a slot/waiting for memory). Do not message other sessions about a "slot".node scripts/verify.mjs --statusshows the slot holders, the queue and the free memory. A slot whose process is dead or older than 120 minutes is taken over automatically.- Tune per shell:
PTAH_VERIFY_SLOTS(default 3; 1 restores one check at a time),PTAH_VERIFY_MIN_FREE_GB(default 5),PTAH_VERIFY_SETTLE_SEC(default 30).
- Tune per shell:
npm run verifyruns lint/typecheck with 2 Nx tasks (override withPTAH_VERIFY_LINT_PARALLEL) before tests with 1 Nx task and 2 Jest workers (jest.preset.js). Both phases run and report failures. Do not raise the test caps ornx.jsonparallel: 1: Nx tasks, Jest workers and lock slots multiply. Run any other heavy command under the same lock:node scripts/verify.mjs --exec --task <name> -- <command> [args...].- Test, lint and typecheck results are cached in one Nx cache that the main checkout and every
worktree share (
~/.nx/<workspace-id>/). A check that main already passed is a cache hit. Do not setcacheDirectoryorNX_CACHE_DIRECTORY: that turns the sharing off. - Never run workspace-wide checks, and never
nx run-manyacross projects you did not change. - Never run
build,serve,dev,e2eorpackagetargets unless the user asks for it. - Prefer one foreground run with a long timeout. Filter its output (
| tail,grep) instead of re-running the command to read it.
Product focus: Electron first
The Electron desktop app (apps/ptah-electron) is the priority host. These rules apply to the
main agent, every subagent and every CLI lane. Repeat them in any task prompt you hand to a lane.
- Plan, build and verify features for Electron first.
- Keep the Electron renderer in
apps/ptah-extension-webview; its name does not make it a VS Code host. - Run visual reviews and screenshots in Electron only.
- When a change touches a shared lib, run scoped checks for the affected Electron and renderer projects.
- Keep provider CLI lanes and the benchmark's
platform-cliandcli-enginelibraries working.
Git: start every task in its own worktree
- Prefer
ptah_git_worktree_addwhen listed; it links the worktree to the chat session. Otherwise usegit worktree add. - Before you change any file for a new task, create a worktree on a new branch from
main:git worktree add -b <type>/<short-name> .claude-worktrees/<short-name> main..claude-worktrees/is git-ignored. Keep<type>to the commit type (fix,feat, ...). - Make every edit, check and commit of the task inside that worktree. The main checkout stays
on
mainwith no task changes in it. Give the worktree path to each subagent and as theworkingDirectoryof each CLI lane for that task. - Pure questions, read-only investigation and status commands need no worktree.
- Changes that are already in the main checkout move to a worktree before more work starts:
create the worktree, copy the changed files, confirm they are identical (
cmp), and only then revert them in the main checkout. - The worktree and its branch stay until the user says to remove them. After the PR merges
and the user authorizes cleanup, use
git worktree remove .claude-worktrees/<short-name>.
Git: complete the task through PR checks and review
- The default task workflow is worktree → implement → verify → review → commit → push → open a pull request → watch CI jobs and code reviews → address actionable findings. Do not finish a completed task with uncommitted changes or an unpublished branch.
- This is standing authorization to commit verified task changes, push the task branch, and open or update its pull request without a separate request for each step. It replaces older project preferences that require explicit follow-up approval for commits, pushes, or pull requests. Apply this authorization when a skill says the user handles Git or requires a separate commit/push request. Keep worker-lane ownership restrictions intact. A current user instruction to stop, keep work local, or defer delivery takes precedence. If a tool denies an action, stop that action and report the blocker.
- Only the coordinating agent commits, pushes, and manages the pull request. Delegate these actions explicitly if needed. Implementation lanes report their changes to that agent and must not push or open competing pull requests on their own.
- Inspect the worktree status and the complete task diff before each commit. Stage only
task files by explicit path. Preserve unrelated changes. Follow
.commitlintrc.jsonand the repository commit conventions. Do not bypass hooks or signing. - Complete scoped verification and an independent review before the initial push. If a check cannot run or a failure blocks delivery, report the exact blocker. Do not claim success, suppress failures, or publish unfinished work as ready for review.
- Open the pull request against
main. Inspect every task commit, not only the latest. Keep the title under 70 characters. Include## Summaryand## Test plan, with actual verification results and any checks that did not run. Reuse an existing task PR. - After each push, watch the PR's CI jobs and code reviews with
gh. Use a background watcher for long waits. Inspect failed job logs, review comments, and unresolved threads. Address confirmed task-related defects, verify the fixes, create new commits, and push again. Explain why any disputed finding needs no change. Repeat for the new PR head. - Do not treat a successful push as task completion. Report the PR URL, current head, CI results, and review state. If CI or reviews remain pending, explicitly report that state and keep the watch active while the session permits. Report failed, cancelled, timed-out, or unavailable checks and any blocker that needs the user's decision.
- This authorization does not permit merges, force pushes, history rewrites, branch deletion, or worktree removal. Keep the branch and worktree until the user authorizes cleanup. Never bypass a permission denial through another tool or agent.
Git: commit in the foreground, push in the background
- Run
git commitin the foreground. Never run it in the background: lint-staged hides unstaged changes during the hook and restores them afterwards, so a file edited while the hook runs can be committed or lost (see the TASK_2026_224 comment in.husky/pre-commit). The pre-commit hook is lint-staged only, so it is fast. - Run
git push(chained withgh pr createwhen a PR is due) as one background command (the Bash tool'srun_in_background) and continue with other work; act on the result when it completes. The pre-push hook runs di-lint and the Electronvalidate-depsbuild gate on every push. A failed gate needs a fix commit on top, then push again. The hook takes the same verify lock asnpm run verify, so a push can wait in the queue behind another check.
Repo-local fleet rules
- The commitlint scope enum and other enforced commit rules live in
.commitlintrc.json. Read that config before committing. Keep the subject at most 72 characters and every body line at most 100 characters; wrap body text at 72.securityandgitare not scopes. - A multi-scope subject with commas is allowed, e.g.
fix(agent-sdk,chat): .... - To test only the changed projects, run
npm run verify -- -t test -p A,Band confirm that the output header says "Running target test for N projects" with N equal to the number requested. Never use positionalnx test A Bbecause those names become Jest path filters.
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.

