Skip to content

Agent guides: add the mechanical-simple-auditable design law - #2339

Merged
jaylfc merged 1 commit into
devfrom
exec/tsk-kxbvup
Aug 9, 2026
Merged

Agent guides: add the mechanical-simple-auditable design law#2339
jaylfc merged 1 commit into
devfrom
exec/tsk-kxbvup

Conversation

@jaylfc

@jaylfc jaylfc commented Aug 9, 2026

Copy link
Copy Markdown
Owner

CARD TITLE (intent, not commit subject): Agent guides: add the mechanical-simple-auditable design law

Autonomous build of board card tsk-kxbvup.

REVIEW WARNING (automated): this card's text asks for tests, but the diff changes no test file. Either the acceptance criteria are unmet or the card needs correcting. Do not merge without resolving this.

Add the design law to 01-rules.md with a worked example anonymised as
'an agent', link it from index.md, and rebuild the compiled manual. Trim
verbose prose in the image-prompting guide to stay within the compiled
manual 18000-char budget. Update CHANGELOG.

Files:
CHANGELOG.md | 7 +++
docs/agent-manual/01-rules.md | 13 +++++-
docs/agent-manual/10-image-prompting.md | 68 +++++++++++-----------------
docs/agent-manual/index.md | 2 +-
docs/taos-agent-manual.md | 79 +++++++++++++++------------------
5 files changed, 83 insertions(+), 86 deletions(-)

Summary by CodeRabbit

  • Documentation
    • Added guidance on designing systems that are mechanical, simple, auditable, and easy to diagnose.
    • Documented realtime notifications and cautioned against unnecessary coordination and polling patterns.
    • Streamlined image-generation guidance, including prompt structure, parameter selection, model choice, negative prompts, and deliberate iteration.
    • Updated the compiled manual and its index to reflect the new guidance.
    • Added an unreleased changelog entry summarizing these documentation improvements.

Add the design law to 01-rules.md with a worked example anonymised as
'an agent', link it from index.md, and rebuild the compiled manual. Trim
verbose prose in the image-prompting guide to stay within the compiled
manual 18000-char budget. Update CHANGELOG.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds design-law guidance to the agent manual and compiled manual. It also shortens image-prompting guidance while retaining core prompt, parameter, model-selection, and iteration recommendations. The changelog records both documentation updates.

Changes

Agent manual documentation

Layer / File(s) Summary
Design law guidance
docs/agent-manual/01-rules.md, docs/agent-manual/index.md, docs/taos-agent-manual.md
Adds mechanical, simple, auditable design principles and a polling anti-pattern example.
Image-prompting guidance
docs/agent-manual/10-image-prompting.md, docs/taos-agent-manual.md, CHANGELOG.md
Condenses image-prompting structure, examples, negative prompts, parameters, model selection, iteration guidance, and changelog notes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the primary change: adding the mechanical-simple-auditable design law to the agent guides.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch exec/tsk-kxbvup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@jaylfc
jaylfc merged commit 514be45 into dev Aug 9, 2026
18 of 19 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
CHANGELOG.md (1)

12-15: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add an automated check for the compiled-manual budget.

The changelog records an 18,000-character constraint, but this diff adds no test or documentation check. Add CI validation that compares generated output with docs/taos-agent-manual.md and enforces the stated budget.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG.md` around lines 12 - 15, Add CI validation for the generated agent
manual, comparing the generated output against docs/taos-agent-manual.md and
failing when the compiled content exceeds the documented 18,000-character
budget. Anchor the check to the existing manual generation command or workflow
configuration, and ensure it detects both stale generated output and budget
violations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/taos-agent-manual.md`:
- Line 45: Update the markdown generation logic in scripts/build-agent-manual.py
to emit a blank line before each `---` separator, including separators in the
worked example and final iteration sections, so separators remain separate
blocks and do not underline preceding prose. Regenerate
docs/taos-agent-manual.md with the updated script.

---

Nitpick comments:
In `@CHANGELOG.md`:
- Around line 12-15: Add CI validation for the generated agent manual, comparing
the generated output against docs/taos-agent-manual.md and failing when the
compiled content exceeds the documented 18,000-character budget. Anchor the
check to the existing manual generation command or workflow configuration, and
ensure it detects both stale generated output and budget violations.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fea12032-73e2-4e8c-9b4e-bc99378da388

📥 Commits

Reviewing files that changed from the base of the PR and between 2d2d50f and d24510e.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/agent-manual/01-rules.md
  • docs/agent-manual/10-image-prompting.md
  • docs/agent-manual/index.md
  • docs/taos-agent-manual.md

Comment thread docs/taos-agent-manual.md
5. THE WARNING SIGN: if you are chaining components to simulate something ONE CALL would do, stop and find the direct call. Async coordination faking synchronous request/response is a recurring anti-pattern here.
6. Applies to WORKFLOWS AND PROCESSES too, not only code: monitoring, health checks, handoffs, escalation.

**Worked example**: an agent needed to know when a job finished, so it chained five moving parts -- a stream watcher, a spool file, a cron, a ticker, and a polling loop -- to simulate a return value by polling. One synchronous call to the job's status endpoint was the answer. The chain was auditable only by stitching four different logs, and failed in five different ways.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 4 -- 'build-agent-manual|rstrip|strip|---' scripts/build-agent-manual.py

Repository: jaylfc/taOS

Length of output: 1971


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== source files =="
git ls-files docs/agent-manual | sort

echo "== separator occurrences in source files =="
rg -n '^---$' docs/agent-manual || true

echo "== relevant output sections =="
sed -n '35,55p' docs/taos-agent-manual.md
sed -n '255,275p' docs/taos-agent-manual.md

Repository: jaylfc/taOS

Length of output: 3350


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re
src = Path('docs/agent-manual')
paths = sorted(src.rglob('*'))
text = re.sub(r'^<!-- .+ -->\n', '', ''.join(p.read_text() for p in paths if p.is_file()), flags=re.MULTIPLE).strip()
sections = [re.sub(r'^<!-- .+ -->\n', '', p.read_text(), flags=re.MULTILINE).strip() for p in paths]
body = '\n---\n\n'.join(sections)
output = "<!-- GENERATED from docs/agent-manual/ by scripts/build-agent-manual.py. Edit the source files, not this file. -->\n\n" + body + "\n"
output = re.sub(r"\n{3,}", "\n\n", output)
output = "\n".join(line.rstrip() for line in output.splitlines())
output = output.rstrip("\n") + "\n"
next20 = output.find('**Worked example**')
m1 = output.index('**Worked example**', next20)
m2 = output.index('This section covers', m1)
segment = output[m1-30:m2+80]
print(segment)
print("occurrences before generated-separator:", tuple(output.find(s) for s in ['**Worked example**', '-- WORKED EXAMPL --', 'This section covers', '**Final iteration**']))
print("precedes separator lines:")
for i, line in enumerate(output.splitlines(), 1):
    if line == '---':
        print(i, repr(output.splitlines()[i-2]) if i > 1 else '<none>', '---', repr(line))
PY

Repository: jaylfc/taOS

Length of output: 278


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== source files =="
git ls-files docs/agent-manual | sort

echo "== separator occurrences in source files =="
rg -n '^---$' docs/agent-manual || true

echo "== relevant output sections =="
sed -n '35,55p' docs/taos-agent-manual.md
sed -n '255,275p' docs/taos-agent-manual.md

echo "== generated separator context =="
python3 - <<'PY'
from pathlib import Path
import re
paths = [Path(p) for p in open('/dev/stdin') if Path(p).is_file()]
sections = [re.sub(r'^<!-- .+ -->\n', '', p.read_text(), flags=re.MULTILINE).strip() for p in paths]
body = '\n---\n\n'.join(sections)
output = "\n".join([line.rstrip() for line in (
    "<!-- GENERATED from docs/agent-manual/ by scripts/build-agent-manual.py. Edit the source files, not this file. -->\n\n" + body + "\n"
).splitlines()])
lines = output.splitlines()
for idx in [44, 240, 241, 265, 266, 267, 268, 269]:
    print(idx, repr(lines[idx-1]), '---', repr(lines[idx]) if idx < len(lines)+1 else '<none>')
PY
git ls-files docs/agent-manual | sort

Repository: jaylfc/taOS

Length of output: 3526


Keep separators on separate blocks so they do not underline prose.

The generated output has --- immediately after ended paragraphs in the worked example and final iteration sections. Add a blank line before each separator in scripts/build-agent-manual.py, then regenerate docs/taos-agent-manual.md so the next link does not render as a heading.

🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 45-45: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/taos-agent-manual.md` at line 45, Update the markdown generation logic
in scripts/build-agent-manual.py to emit a blank line before each `---`
separator, including separators in the worked example and final iteration
sections, so separators remain separate blocks and do not underline preceding
prose. Regenerate docs/taos-agent-manual.md with the updated script.

Source: Linters/SAST tools

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