DinoStack / bin
AGENTS.md13 starsChanged 2 months agoApache-2.0View on GitHub
CLI entry points (Python, Bash, and Node) that the dinostack methodology exposes as PATH-wired commands - the table below is a curated subset, not a full enumeration (see ls bin/ds-* for the live count). Each binary ships with a module-manifest docstring (Purpose / Public API / Upstream deps / Downstream consumers / Failure modes / Performance) that is the authoritative description of that command. Read the binary itself for full detail; this file is the module-group map, not a duplicate…
- Deletes or force-pushes
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 repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- hooks/AGENTS.mdAGENTS.md
- .kimi/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/agent-methodology.mdcCursor rule
- .cursor/rules/code-standards.mdcCursor rule
- .cursor/rules/conventions.mdcCursor rule
- .cursor/rules/frontmatter/agent-methodology.yamlCursor rule
- .cursor/rules/frontmatter/code-standards.yamlCursor rule
- .cursor/rules/frontmatter/conventions.yamlCursor rule
- .cursor/rules/frontmatter/module-manifest.yamlCursor rule
- .cursor/rules/module-manifest.mdcCursor rule
- dinostackSkill
- contentSkill
- dinostackSkill
- dinostackSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Every ds-* name below has a permanent agentic-* compat symlink (e.g.
- Very specific: line 62
Every binary is fail-open: unexpected input, missing files, and permission errors are swallowed and surfaced via non-zero exit codes or …
≈ “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
bin/
CLI entry points (Python, Bash, and Node) that the dinostack
methodology exposes as PATH-wired commands - the table below is a curated
subset, not a full enumeration (see ls bin/ds-* for the live count).
Each binary ships with a
module-manifest docstring (Purpose / Public API / Upstream deps / Downstream
consumers / Failure modes / Performance) that is the authoritative description
of that command. Read the binary itself for full detail; this file is the
module-group map, not a duplicate of those manifests.
Every ds-* name below has a permanent agentic-* compat symlink (e.g.
bin/agentic-cost -> bin/ds-cost) - both invoke the same file and behave
identically. ds-* is the primary name; the agentic-* form is never
sunset (external cron jobs and shell aliases reference it).
Entry points
| Command | Lang | One-line role |
ds-base-sync | Bash | Fast-forward the local base branch to origin/<base-branch> after a merge, with a normalized exit-code contract (synced/diverged/skipped-dirty/usage-error/inconclusive); prints a non-blocking DS-54 hooks-snapshot-staleness advisory note after every invocation. |
ds-branch-prune | Python | Squash-aware local branch prune (DS-153): deletes a local branch only when a four-layer, first-match-wins subsumption predicate (ancestry, squash-patch equivalence, tip-subsumption, content-on-main) proves its tip content is on the resolved base branch; absence of proof is always SKIP_UNPROVEN, never a force-delete. Resolves its own base via bin/_lib.py's shared resolve_base_branch when --base is omitted, and deletes nothing (no ledger entry, exit 0) when that resolution fails. --dry-run reports without deleting; every deletion is recorded to an append-only ledger BEFORE the destructive git branch -D. Layers L1/L2 structurally cannot prove a squash-merged or rebased branch - those surface as SKIP_UNPROVEN and need archive-then-delete, not a longer PR list. The merged-PR window that feeds L2/L3 is fetched by cursor-paginated GraphQL and its completeness is PROVEN rather than assumed - node count must equal the pullRequests connection's own totalCount, and every other outcome (count mismatch, absent totalCount, mid-pagination failure, GraphQL errors, a gh call or whole-fetch timeout, or exhausting the page bound) prints a NOTE naming the reason and downgrades pr_state to not_checked, never the affirmative NONE. This replaced a gh pr list --limit 500 ceiling that this repository's merged-PR count had already outgrown, so the truncation NOTE fired on every run; absence of a candidate has never been, and still is not, proof that a branch is unmerged. |
ds-calibrate | Python | Render Skeptic calibration rollups (findings density, meta-Skeptic divergence rate) from .agentic/events.jsonl; with $AGENTIC_DIR unset, run from a linked worktree, also reads the primary checkout's hook spawn rows (DS-246). |
ds-change-delta | Python | One-shot before/after telemetry delta tool (DS-241): resolves a --cut (git SHA, committer date, or ISO date) into a UTC instant, computes two equal-length windows either side of it, and re-derives sessions/spawns/hook-denies/tokens/wall-time (merged across every --repo) plus per-repo commits-per-merged-PR from the same live stores ds-cost/ds-evaluate/ds-hook-fire-report/ds-branch-prune already read. A 5-case status precedence (ABSENT/NOT_YET_ELAPSED/INSUFFICIENT_COVERAGE/ZERO_SESSIONS/OK) reports null rather than a misleading numeric zero when a store can't support a trustworthy comparison; tokens/wall-time additionally carry a zero-filled/zero-filled-before/zero-filled-after data-quality flag. DS-246 adds agent_model (per agent x model runs and dollars, exact-id and family-priced reported separately) and per_ticket (Skeptic reviews, findings, QA fail-backs, PRs, loops, end-to-end wall, escaped-defect signals), both computed only from telemetry_v: 2 hook spawn rows and gated by their coverage extent. Read-only: never writes a telemetry file, never mutates git/gh state. |
ds-cleanup-worktrees | Python | Single-repo worktree removal (classify -> lock/dirty -> merge-evidence -> disposition, bin/tests/worktree_model.py), PLUS an in-process --multi-repo/--report surface: discovers a set of repos (explicit --repo xN, positional root scan, --init-config to scaffold, or a ~/.agentic/cleanup-worktrees.json fallback), sweeps each with its own independently-resolved base branch, --max-repos N to bound discovery cost, and can rank them read-only ("which project is worst") via a cheap 2-git-call FAST tier or a full-cost DEEP tier. DS-196 adds a LENIENT-only origin_reachable evidence source (resolves worktree removal, never branch deletion, for a squash-merged/never-PR'd branch that is nonetheless pushed and past a resolved PR state) plus a --activity-window-hours (default 3.0) file-activity liveness gate (SKIP_RECENT_ACTIVITY); also now invoked automatically, backgrounded, from the session-start prune block in content/references/worktree-lifecycle.md - suppressible via AE_WORKTREE_REAP_DISABLE=1. DS-245 moves the lock gate ahead of self and makes --min-age-hours explicit-supply only; every unattended caller (session-start reap, /ds-wrap Step 5, --archive-unproven) supplies it. |
ds-cost | Python | Token / wall-time / dollar rollups per agent, session, task, and developer team from .agentic/events.jsonl and session logs; hook spawn rows are folded and priced by the shared bin/_telemetry.py (DS-246), which also merges the primary checkout's hook spawn rows when run from a linked worktree. |
ds-disable | Python | Append the opt-out marker to AGENTS.md; optionally update the global config. |
ds-doctor | Python | Inspect and repair global install health (symlinks, bin wrappers, hook paths in settings.json, DS-54 hooks-snapshot staleness), foreign-plugin PreToolUse Agent/Task hook detection (DS-198). |
ds-emit | Bash | Append one structured JSON event to .agentic/events.jsonl at orchestration boundaries. |
ds-feedback | Python | Manage the home-dir feedback store (~/.agentic/feedback.jsonl) - append/list/mark operator and agent friction items. |
ds-help | Python | Print the static slash-command reference to stdout. Zero file I/O; never fails. |
ds-hook-fire-report | Python | Per-hook fire-count status for hooks/enforce-*.py, joining posture (ACTION_ONLY vs EVERY_VERDICT, via scripts/lib/enforcer_facts.py) against .agentic/.enforcement-fires.jsonl. Also merges any stranded .claude/worktrees/*/.agentic/.enforcement-fires.jsonl copies (deduped by exact line text) into the same analysis at query time - see meta.stranded_worktree_logs_merged/meta.stranded_worktree_records_merged. Input for /ds-prune-harness Signal 8. |
ds-identity | Python | Manage per-developer identity files used by the Stop hook for session telemetry attribution. |
ds-learning-shard | Python | Manage the home-dir per-session learning shard store (~/.agentic/learnings-shards/<repo-key>/<session-key>.jsonl) - append one in-flight learning (capped at 5 per session, soft-fail), rollup the not-yet-folded raw entries idempotently, list for diagnostics. Performs no classification. --repo accepts any path inside the repo - a linked worktree and its primary checkout resolve to one <repo-key>, via git rev-parse --git-common-dir. |
ds-learnings-retrieval-rate | Python | Read-only, on-demand measurement of the per-role firing rate of the prior-learnings retrieval step, from Claude Code's own subagent transcripts (<config_dir>/projects/*/*/subagents/agent-*.jsonl plus each .meta.json sidecar's agentType). Reports wired roles against unwired controls with both pooled lines; wiring is derived from whether content/agents/<role>.md carries a <!-- shared:learnings-retrieval --> span, so it self-updates. Exit 0 on every path, errors via envelope. Read-side only - DS-159 owns write-side per-entry outcome. |
ds-memory | Python | Query .agentic/events.jsonl, MEMORY.md, and .agentic/context.md; return compact Markdown summaries. |
ds-migrate | Python | Apply additive project scaffolding migrations (check / apply / diff subcommands). |
ds-parse-subagent-usage | Python | Parse a Claude Code subagent transcript JSONL and emit {tokens, model, wall_seconds} for spawn_complete events. |
ds-skill-load-rate | Python | Read-only, on-demand measurement (DS-227) of how often the dinostack skill actually loads per session, from Claude Code's own TOP-LEVEL session transcripts (<config_dir>/projects/<project-dir>/*.jsonl - deliberately not the */subagents/agent-*.jsonl glob ds-learnings-retrieval-rate reads). Headline figure is the unprompted (model-initiated Skill tool_use) load rate against operator-typed /dinostack, plus a nudge-fired-but-no-load count. Scoped by default to the current repo's own project directory (--repo-path/--project-dir/--all-projects to override or widen); reports ABSENT, never 0, when no transcripts are in scope. A diagnostic, not standing telemetry - see its own module docstring's retirement condition. |
ds-status | Python | Read-only dump of the activation resolver state with provenance and plain-English explainer. |
ds-ticket-grant | Python | Write a one-shot, TTL-bounded exception to hooks/enforce-ticket-batching.py's deny on agent-initiated tracker-ticket creation (grant --repo <path> --session-id <id> --reason <str>); the hook itself reads, validates, and atomically consumes it on the next denied creation. |
ds-tracker | Python | Manage the project-local, gitignored .agentic/tracker.yml tracker-config overlay (init / show / set / resolve / path), merged field-by-field over the AGENTS.md tracker resolution chain. |
ds-update | Python | Non-interactive updater: fetch origin, rebuild adapters (forcing the loop even when old_head==new_head if the local DS-54 hooks-snapshot has diverged from the live checkout), reset version-check cache, run ds-doctor --fix. |
ds-wrap-acquire-lock | Node | Poll-wait (background) for the /ds-wrap directory lock, exiting when acquired, on a 20-minute timeout, or (--no-wait) immediately busy; publishes a role-tagged (--role=agent|daemon|commit) lock descriptor and structurally never removes a lock. |
ds-wrap-release-lock | Node | Release the /ds-wrap directory lock (.agentic/wrap/lock) safely where rm -rf is permission-denied; owner-scoped - refuses removal when the descriptor names a live foreign-process PID, and refuses to touch anything at the lock path that isn't a lock directory it created. |
Upstream dependencies
- Python 3 stdlib only - no third-party installs required for any Python binary.
ds-wrap-acquire-lockandds-wrap-release-lockrequire Node; both loadhooks/lib/wrap-marker.jsvia__dirname-relative path (notcwd).ds-emitshells out topython3anddatefor safe JSON assembly.ds-costsoft-depends onpyyamlfor~/.agentic/pricing.yml; absent = token-only output.ds-updateshells out togitandbash <adapter>/install.sh.ds-parse-subagent-usagereads<config_dir>/projects/transcript files, whereconfig_diris resolved viabin/_lib.py'sresolve_claude_config_dir():AGENTIC_CONFIG_DIR>CLAUDE_CONFIG_DIR>CODEX_HOME>PI_CODING_AGENT_DIR(first non-empty wins), falling back to~/.claudeonly when none is set - not a hardcoded~/.claude/projects/path.
Downstream consumers
content/commands/ slash-command specs; adapter install scripts (.claude/install.sh, .codex/install.sh, etc.) that symlink these onto PATH; hooks/stop-context.js for ds-identity helpers; Activation preflight Step 6 for ds-migrate; content/commands/ds-wrap.md Part D.5 and content/commands/ds-feedback-triage.md for ds-feedback.
Failure-mode discipline
Every binary is fail-open: unexpected input, missing files, and permission
errors are swallowed and surfaced via non-zero exit codes or stderr lines,
never uncaught exceptions. Exit-code conventions are per-command in each
binary's Public API block. Conductors must not treat a non-zero exit as a
session-fatal error.
Why polling belongs in a binary, not conductor prose
An LLM cannot reliably run a long foreground poll loop (foreground sleep is blocked in the harness). /ds-wrap's lock-wait was once prose the conductor hand-ran ("poll every 5s for 20min") and reliably gave up after one or two checks. Fix pattern: move the poll loop into a small binary invoked as a background spawn (run_in_background: true) so the conductor stays available and gets notified with an exit code on completion - a background spawn on this harness does deliver a synchronous exit code on completion. This is why ds-wrap-acquire-lock exists as a binary rather than as conductor prose.
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.

