Skip to content

docs: add command hygiene & context discipline rules - #21

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/command-hygiene-clean
Aug 24, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/command-hygiene-clean

Conversation

@atrawog

@atrawog atrawog commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a Command hygiene & context discipline section to the umbrella AGENTS.md — the recurring self-inflicted context-waste failure where grep <pattern> <huge-file> | head -N floods output with grep: write error: Broken pipe (the harness runs commands with SIGPIPE ignored, so grep never dies on the closed pipe and prints EPIPE per failed write) and truncates the response.

The new rules are mandatory:

  • grep -m N for "first N matches" — never grep | head (grep terminates itself; no closed pipe; deterministic everywhere)
  • Redirect large outputs to a file first, then read with grep -m N / sed -n 'a,bp'
  • Bound every command's output or redirect to a file
  • Delegate output-heavy investigation to a subagent (log archaeology, repo-wide greps, build/validator loops) — the subagent returns a concise verdict + evidence paths, keeping the main context clean
  • Never re-issue the same diagnostic command in a loop — change the approach instead

How tested

Docs-only change class. The rules are prose in the rulebook; no runtime path changed. The failure mode they address was reproduced live (hundreds of grep: write error: Broken pipe lines from grep | head on a multi-MB build log) and the fix (grep -m N) verified to produce clean bounded output.

Rulebook compliance

Rule How / N/A
R1 RCA performed: the broken-pipe flood was traced to SIGPIPE-ignored execution + `grep
R3 One canonical rule set in AGENTS.md; no duplication
R4 The fix is a deterministic rule (grep -m N), not a workaround
R6 status checked; no force-push; feat-branch + PR landing
R7 N/A — docs-only change class
R10 N/A — docs-only change class

Change classification

  • Change class: documentation (rulebook)
  • Verification gate: non-runtime standards
  • Attribution tier: documentation reviewed

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (documentation reviewed)

The harness runs commands with SIGPIPE ignored, so `grep <pat> <huge> | head -N`
floods output with `grep: write error: Broken pipe` (grep never dies on the
closed pipe) and truncates the response — a recurring self-inflicted
context-waste failure. Add mandatory rules: `grep -m N` instead of
`grep | head`, redirect large outputs to files before reading, bound every
command's output, delegate output-heavy investigation to subagents, and never
re-issue the same diagnostic command in a loop.
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 79c6d8533829 (branch: feat branch of PR #21)

Security screen: PASS — docs-only diff; no secrets, no scope mismatch, no weakened guardrails; the rulebook addition (command-hygiene guidance) strengthens rather than loosens discipline and contains no embedded directives.
Change class: documentation (rulebook) — 1 file, +25/−0, single atomic commit.
Checklist: All applicable rules PASS or NA (docs-only: no bed/R10/R8/R9 required; documentation reviewed tier is legal for an all-docs diff; body accounts for the full diff; attribution footer in the exact required form and ending the body; CI in progress, no failures).

Verdict: PASS


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 24, 2026 07:34
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: a1abe02c8c46 (branch: feat/command-hygiene-clean)

Security screen: PASS — docs-only rulebook diff (+25/−0, AGENTS.md only); no secrets, no scope mismatch (body accounts for every added bullet), no weakened guardrails — the addition strengthens discipline and is backed by an RCA in the body; no embedded directives aimed at the validator.

Change class: documentation (rulebook) — 1 file, +25/−0, no runtime path. Non-runtime standards only; bed/R10/R8/R9 correctly N/A. Attribution tier documentation reviewed is legal for an all-docs diff; footer *Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (documentation reviewed)* present in the exact required form at body end. R1 RCA supplied for the broken-pipe flood; no forbidden framings; no duplication; placement in umbrella AGENTS.md correct. CI (validate, verify) in progress, no failures.

Comments considered:

  • github-actions[bot] PASS @ 79c6d8533829 — verified-non-blocking: re-derived against current state; the single-commit phrasing is superseded by the main-sync merge commit a1abe02c, but the merge adds no content and the diff is unchanged; all substantive claims still hold.

Verdict: PASS


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit be07414 into main Aug 24, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 24, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 5, 2026
…, spec #97, plugin-check #21/#22, plugin-migrate #5, plugin-record #6, plugin-spice #6, distro-fedora #48) + add plugin-media submodule (#144)
@aitrawog
aitrawog deleted the feat/command-hygiene-clean branch September 25, 2026 18:26
github-actions Bot pushed a commit that referenced this pull request Sep 25, 2026
* chore: sync gitlinks for the check-bed RunEnv cutover

Record the merged check-bed-roster cutover gitlinks (plan §4.2 / F8):
- charly: the pin bump adopting spec/sdk/plugin-check/plugin-fleet (#663)
- plugin-check #58, plugin-fleet #21, sdk #287, spec #159

All five are at their merged default-branch HEAD (policy-B clean).

Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)

* docs: re-freeze the PR body against the final head

---------

Co-authored-by: atrawog <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
…duced (#561) (#570)

The pin was `behind` its remote: a leaf (`upstream:main`), so no other repo had to move
first and nothing was waiting on a producer. Advanced with `charly task sync` (the pin
verb's MODE=bump) in this session's own worktree.

  layer-strata  fb75a53f9e -> 1a12cbc82a

The commit it lands is the repo's own `fix(skills)!: the two skill bodies move to the repo
root` (#21), which is what makes this a leaf advance and not a wave: one repo, one gitlink.

`task sync` reported rc=1 and that is the charly#864/#917 guard, not this change: 427 of
431 pins have no checkout in a session worktree, so the verb advances what it can and
refuses to claim success. What it advanced is what matters (4 submodules rolled, 2 pins
differed from HEAD), and the one this branch keeps is the single line below.

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

Co-authored-by: Andreas Trawoeger <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Nov 25, 2026
… releases land (#1274)

`charly task sync` on a tree current with origin/main (7f11b25): 74 leaf
submodules rolled to their default-branch HEAD (11 moved), 321 leaf pins
advanced in the index (11 moved) — 22 pins total. The five distro-* pin_map
edges were re-pinned from charly's own gitlinks and did not move.

Two of the moves are what this wave is for (#1273):

  sdk                2bfea23e -> dd87eb2c   sdk#640 — a unit never runs as container root
  plugin-deploy-pod  c87f056c -> c10caae    #97 — a CDI device rides a keep-id unit via a
                                            derived devices-only spec; #95 writes the
                                            deploy entry's image before any overlay write

The other 20 travelled on the same mechanism, each a merged upstream PR:
charly #1275, layer-cdi #20, layer-vectorchord #13, marketplace #652,
plugin-enc #11, pod-charly-mcp #15, pod-immich #23, pod-qwen3-tts #15/#13,
spec #440, plus eleven unmaterialized paths advanced in the index
(layer-devops-tools #8, layer-ollama-cuda #11, layer-ollama-rocm #9,
layer-pre-commit #9, layer-versatiles-style #7, pod-airflow #15,
pod-android-emulator-layer #21, pod-appium-server #9, pod-dbus #8,
pod-jupyter-ml #15, pod-pmtiles-viewer #7).

The plugin-deploy-pod advance moved engineDefaultRuntime from engine_ops.go:139-146 to
129-136, out from under the citation DESIGN A.13 records for "containerd namespace per
deployment" (design/dulling.tsv). The row is re-anchored to the construct's new range and
design/cite-baseline.tsv regenerated for that one row; the construct read at the new pin is
the same one, and the regenerated baseline changes no other row.

Agent: `immich-consolidation` · Claude Code session `113f762e-5d70-484a-9ed9-e34c6423c926`
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant