Reframing the Command Layer
Command Layer describes how eight existing projects organize their task runners today. When stepping back to redesign this area–following the same modeling approach as Reasoning Log–we should avoid jumping straight from observed repo quirks to a heavy new set of Taskfile rules.
Instead, this note separates three levels of certainty:
- Base structures: What the command layer solidly is, how it relates to project knowledge, where humans and agents differ, and what consequences current repo variations actually have in practice.
- Holding space (beyond commands alone): Two deeper dimensions–epistemic/workflow role and effect/blast-radius boundaries–that surfaced while looking at commands, but actually belong to the whole ADE and runtime system, not just
Taskfile.yml. - Explicit prototypes and future trade-offs: Candidate mechanisms to test selectively when real project friction justifies them, rather than treating them as mandatory boilerplate.
1. Base structures
1.1 Where the command layer sits across ADE (not just one leaf under Workflow Infrastructure)
In ADE’s earlier architecture tree, Taskfile appears as one item under Workflow Infrastructure alongside build/test tools, git hooks, and CI. In practice, as ade.md hints, the command layer acts as an execution spine across all five ADE subsystems:
- Environment Provisioning:
task repo:initruns dependency installation, git hook setup, and workspace symlinks such asrepo:agent-docsandrepo:tasks(Shared agent docs, Task directory). - Workspace Management: Helper scripts in
scripts/devex/and ignored runtime artifacts in.local/(logs, local eval data) sit directly behind commands. - Knowledge Management:
AGENTS.mdroutes to the catalog, anddocs/evergreen/runbook.mdwrites procedures in terms of named commands rather than raw tool flags. - Workflow Infrastructure: Developers, agents, git hooks (
task security:scan:staged), and CI invoke the same wrapped build, lint, type, and test commands. - Agent Integration (“On the boundary” in Definitions and boundaries): Tool-specific settings (
.claude/settings.json, Codex rules) attach permission rules to command prefixes–right where the repository meets each harness.
1.2 How the knowledge interface and the operational interface relate
In Working Assumptions, language models generate candidate explanations and changes while tools and the environment generate discriminating evidence. In ADE’s control terms, Böckeler calls these feedforward guides and feedback sensors.
Seen through both lenses, the knowledge interface (AGENTS.md, docs/, contracts, ADRs) and the operational interface (Taskfile.yml, Makefile, scripts) are not a flat “docs = read, commands = write” split:
- Intended reality (feedforward) vs. observed reality (evidence/feedback). Canonical docs and feature contracts state what the system is supposed to do and why. Read-only checks and runtime commands (
quality:verify,db:status,config:show, log/trace capture) expose what the system actually does right now (Structure and visibility). Investigation, bug resolution, and review live in comparing those two sources–preventing the agent from treating buggy code as intended behavior or unverified prose as working reality. - Conditional judgment vs. repeatable execution.
AGENTS.mdroutes: points to the catalog (task help) and names the baseline gate (task quality:verify) (Make it a map, not a manual).docs/evergreen/runbook.mdholds conditional procedures and human decisions: when and why to run an operation, recovery judgment, and steps that should not run blindly (such as initializing.envwithout overwriting existing credentials).Taskfile.ymlabsorbs unconditional, repeatable sequences: how tools, flags, containers, and step ordering execute once a decision is made.
- Mutual constraining and checking. Docs define what each command namespace owns and does not own (as in
knowledge-assistant’scommands.md), keeping commands modular. Conversely, deterministic verification commands (quality:verify,api:check) check as early as cost allows (“keeping quality left” in Feedback and checks) that code, generated schemas, and contracts have not drifted apart, with failure output written so the agent knows how to fix the violation.
1.3 Where humans and agents differ at the command line
Most good command-layer habits help humans and agents alike, which is why developers, assistants, git hooks, and CI share the same commands. The baseline places where human terminal assumptions fail coding agents are solid:
- Cold start vs. memorized habit: Developers memorize a handful of commands; agents start every session fresh with generic priors (
pip,pytest,npm) and choose commands fromtask helpnames and one-line descriptions. - Returning vs. foreground execution: Developers keep long-running servers in separate terminal tabs (
Ctrl+C); agents in a sequential tool loop need service-start commands that detach and return once healthy (--wait). - Arguments vs. interactive REPLs: Developers explore through interactive shells (
psql); agents need non-interactive commands that accept arguments, print output, and exit. - Files and status commands vs. live visual streams: Developers watch streaming terminal logs or click through a UI; agents inspect discrete
statusoutput, bounded logs, and saved diagnostic files. - Mechanical gates and parallel checkouts: Humans pause before running a script that bills a cloud GPU and usually run one local stack; agents require explicit risk boundaries and collide on fixed ports/volumes when working across parallel git worktrees.
1.4 Three-level command composition
Across the projects that scale cleanly (python-repo-template, knowledge-assistant, lang-assistant), commands form three stable layers:
- Raw tool invocations (
uv run ...,docker compose ..., containerizedbun/pyright), hidden inside the runner file orscripts/devex/helpers. - Atomic subsystem commands (
repo:*,quality:*,security:*,db:*,app:*,api:*,infra:*), each doing one job for one subsystem under explicit Owns / Does not own boundaries. - Scenarios and composite gates (
quality:verify,scenario:local:up,scenario:e2e), which compose atomic commands for multi-step workflows (including exit cleanup) while leaving the atomic commands available when a step fails.
2. Practical consequences of current variations
Not every inconsistency across the eight projects is equally costly. Evaluating their real consequences separates what matters now from what can wait.
2.1 Split task runners (Make + Poe vs. one runner)
In wallet, wallet-evals, and sem-rag, workflows are split between Makefile and poe_tasks.toml. Earlier we noted “extra routing rules in AGENTS.md” as a downside–what does that actually mean, and how much does it matter?
- What “extra routing in
AGENTS.md” means (and why token cost is minor): With one runner (knowledge-assistant),AGENTS.mdneeds one sentence: “Usetask <namespace>:<name>for repository workflows andtask helpfor the current catalog.” WithMake+Poeside by side (sem-rag),AGENTS.mdhas to explain the split itself (usemakefor Docker, Compose, and observability; useuv run poefor Python checks, migrations, API/worker, and query diagnostics). In pure token cost, those extra 2-3 lines are tiny (~40 tokens). - The actual operational costs of the split:
- Two catalogs to discover: An agent looking for workflows has to run both
make helpanduv run poe --help, or guessesmake testwhen tests live inpoe. - Awkward cross-layer composition: Whenever a workflow spans Docker containers and Python scripts (starting services, running migrations, executing E2E tests), one runner ends up shelling out to the other anyway–which is why
walletended up wrappinguv run poe ...targets insideMakefile. - Make-specific sharp edges:
@-prefixed lines inMakefilehide which command failed,make helprequires customawkcomments, and file/target prerequisites likewallet’stest: installtrigger dependency syncs during what looks like a read-only test run.
- Two catalogs to discover: An agent looking for workflows has to run both
- Why Poe was attractive (the real trade-off): Poe installs inside
uvwith no extra host binary and handles typed positional and flag arguments cleanly (uv run poe collect-query-context <query_id>), whereas Go Task passes raw arguments after--and Make relies onVAR=value. - Practical takeaway: In a pure-Python repo with no container orchestration,
Poealone is fine; in multi-service repos, consolidating on a single public runner (Taskfile.ymlcalling Python scripts underscripts/devex/when rich CLI args are needed) removes the two-catalog split cleanly.
2.2 Service status, observation commands, and worktree concurrency
- Service
statusand non-blocking startup: Worth applying incrementally in practice whenever touching a repo’s local stack–adding astatuscheck and ensuringupcan return when healthy (--wait) directly prevents hung agent turns. - Structured observation (
diag:*): Useful in data- and pipeline-heavy systems likesem-rag(collect-query-context), where reconstructing a failed RAG run by hand is tedious. In simpler CRUD or library repos where standard test output and logs suffice, pre-buildingdiag:*commands upfront is unnecessary overhead. - Concurrent worktree stacks: Acceptable to defer where one local stack runs at a time; becomes important once running multiple
bbthreads or agents against live stacks in parallel worktrees.
2.3 Harness permission drift vs. .env secrets (two separate issues)
Earlier we compressed “permission drift” and “.env secrets” into one critique, which obscured how they relate. They are two distinct problems, and separating them shows why safety cannot be solved inside Taskfile.yml alone:
- Permission rule drift (configuration mismatch):
- Harness permission files match the literal command string an agent tries to run–for example,
"ask": ["Bash(task infra:*)"]in.claude/settings.json. - Tool-to-tool drift: Claude Code, Codex, and OpenCode each read different permission files with different capabilities (Several agent tools in one repository). Updating one leaves the others out of sync.
- Taskfile-to-rule drift: If
Taskfile.ymladds a composite command outside that namespace that internally calls a risky one–such aslang-assistant’stask scenario:demo, which resumes the paid RunPod GPU pod–a harness rule watchingBash(task infra:*)will not matchtask scenario:demo, so the prompt never fires.
- Harness permission files match the literal command string an agent tries to run–for example,
- Workspace
.envsecrets (bypassing the command layer entirely):- Even if
"ask": ["Bash(task infra:*)"]is completely accurate,task infra:runpod:upauthenticates usingRUNPOD_API_KEYfrom.envin the repo root. - Because
.envsits in the agent’s working directory and environment, an agent does not needtaskto use that key: it can read.envor runuv run python scripts/...orcurldirectly, bypassing thetask infra:*permission rule altogether.
- Even if
Consequence: In ADE’s boundary model, permission settings sit on the boundary (written in the repo, enforced by only one harness), while credential and sandbox access sit in ADE Access and infrastructure. Grouping risky commands under infra:* is helpful for human clarity and basic harness prompts, but a Taskfile namespace is not a security boundary. Real protection has to live below the command layer–in which credentials exist in the agent’s environment/sandbox in the first place (Where an approval rule goes).
3. Holding space: system-wide dimensions (not built “by commands” alone)
While analyzing commands, two structural axes emerged: what epistemic/workflow job an action performs and what blast radius / side effects it can have.
Crucially, neither of these should be built solely through Taskfile commands. An agent acts through file reads/edits, search tools, git, raw shell calls, Python one-liners, MCP servers, and browsers–not just task <name>. Treating these axes as “Taskfile rules” puts architectural weight on the wrong layer. Following Reasoning Log, we hold them here as system-wide ADE dimensions to evaluate alongside AGENTS.md, harness roles, and sandboxing:
3.1 Candidate dimension A: epistemic and workflow role of operations
Across the engineering workflow (Engineering Workflows), operations on the environment fall into four roles:
Open question in holding space: Which reality probes deserve named Taskfile commands, and which are better left to general agent tools (Read, Grep, ad-hoc uv run python, or MCP inspect tools) so Taskfile.yml stays small?
3.2 Candidate dimension B: effect and blast-radius tiers
Every action available to an agent–whether through task or raw tools–has a blast radius:
Open question in holding space: How should ADE roles (for example, an Investigation or Independent Reviewer assistant vs. an Implementation assistant in Participants & Roles) bind to these tiers at the harness/sandbox level, with Taskfile naming merely mirroring those boundaries for convenience?
4. Explicit design prototypes and future trade-offs
Following Improving the environment and Build Protocol, environment machinery should earn its keep against observed agent failures rather than being added speculatively. The patterns below are explicit prototypes, not baseline requirements–adopt them in python-repo-template or individual projects only when session observations (catalog bypasses, hung turns, port collisions, stale command errors, or permission friction) justify the maintenance cost.
Prototype 1: Standardized non-blocking service verbs (up, status, logs, down, clean)
- Idea: Where a project runs local services, make
updetach and wait for readiness (--wait), always includestatus(non-zero exit when unhealthy), makelogsbounded by default (saving full logs to.local/logs/), keep data ondown, and put volume deletion behindclean(with--dry-run). Keep foreground hot-reload under an explicit human verb likewatchordev. - Trade-off: Slightly more setup in
Taskfile.ymlor a small helper script compared to rawuvicorn --reload, in exchange for eliminating hung agent turns and missingstatuschecks.
Prototype 2: Automatic Git-worktree stack isolation
- Idea: Extend
lang-assistant’slocal_stack.pypattern so that when no--slugis passed,COMPOSE_PROJECT_NAME, host port offsets (or dynamic ports printed bystatus), and volume names derive automatically from the current Git worktree name/hash. - Trade-off: Dynamic or offset ports mean developers cannot rely on a single memorized
localhost:8000URL across worktrees (requiringstatusor a local reverse proxy). Worth adopting only when actively running multiple local stacks across parallel worktrees.
Prototype 3: On-demand diagnostic bundles (diag:*) and read-only query wrappers
- Idea: Generalize
sem-rag’scollect-query-contextand non-interactive read-onlydb:query -- "..."for projects with stateful backends, queues, or multi-step LLM/RAG pipelines. - Trade-off: High value in complex pipelines where reproducing traces manually is slow; dead weight in simple stateless libraries or prototypes where
pytestand container logs already show everything needed.
Prototype 4: ADE link and command drift check (quality:ade)
- Idea: Add a fast Python test or script check verifying that every public command in
Taskfile.ymlhas a namespace anddesc, that everytask <name>cited inAGENTS.md,README.md, anddocs/evergreen/exists (and is not a compatibility alias), and that configured.githooks/ script paths exist on disk. - Trade-off: Prevents silent rot like
knowledge-assistant’s removedtask frontend:runandsem-rag’s deleted.githooks, at the cost of maintaining a small regex/YAML test and conventions for quoting hypothetical command examples in docs.
Prototype 5: Declarative policy sync + externalized Tier 3 secrets
- Idea: Move paid/remote credentials (
RUNPOD_API_KEY, deployment tokens) out of the workspace.envinto a secret store or human-only wrapper (bbsecrets /1password/ host keychain prompt), and generate or lint.claude/settings.jsonand Codex rules from a single repo policy list. - Trade-off: Solves both raw-shell secret bypasses and multi-harness permission drift, but adds friction when a human developer wants to run
infra:runpod:upquickly and requires updating the generator whenever harness config formats change.