Skip to content

docs(agents): introduce ARCHITECTURE.md + lessons + bash/powershell rules; misc lint and CI fixes - #256

Merged
szymonos merged 4 commits into
mainfrom
chore/agents-harness
Jun 14, 2026
Merged

docs(agents): introduce ARCHITECTURE.md + lessons + bash/powershell rules; misc lint and CI fixes#256
szymonos merged 4 commits into
mainfrom
chore/agents-harness

Conversation

@szymonos

@szymonos szymonos commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Agent harness foundation. AGENTS.md slimmed to a compound-knowledge index pointing at new files: ARCHITECTURE.md (host/guest split, distro detection, hook inventory, test layout, recipes), design/lessons.md (4 postmortems mined from fix(*) commits — POSIX guard, SSH probe, safe.directory, BSD regex), .claude/rules/bash-style.md and .claude/rules/powershell-style.md (auto-load on matching globs). Adds the per-repo /second-opinion skill with a linux-setup-scripts-targeted REVIEW-BRIEF.md.
  • fix(sh): install_uv — switch from the brittle --system-certs flag to UV_SYSTEM_CERTS=true UV_NATIVE_TLS=true env vars on uv self update; also quote "$HOME/.local/bin/uv".
  • chore(ci): repo_checks — runner from ubuntu-latest to ubuntu-slim.
  • chore(lint): PREK_RUN macro — centralizes the stage-all → prek → restore-paths flow shared by make lint / lint-diff / lint-all, so auto-fixes land in the working tree without losing the prior staging (path-level; partially-staged hunks become fully staged). Extracts global shellcheck excludes (SC1090/SC2139/SC2148/SC2155/SC2174) into .shellcheckrc so VS Code, CLI, and pre-commit all see the same config; bumps the pre-commit hook to the shellcheck-py mirror.

Test plan

  • make lint-diff — all 13 pre-commit hooks green on the consolidated commits
  • /second-opinion (gpt-5.3-codex) reviewed the WIP — 1 confirmed bug (broken .claude/CLAUDE.md symlink target) fixed before consolidation, 1 warning dismissed as pre-existing
  • Copilot PR review (10 threads) — 6 fixed (lessons.md commit links demoted to bare hashes, .shellcheckrc rationale inlined, install_uv path quoted, Makefile comment scoped to "paths"), 4 dismissed (mktemp false positive, ubuntu-slim valid in env, partial-staging pre-existing)
  • Reviewer: verify .claude/CLAUDE.md resolves to root AGENTS.md (cat .claude/CLAUDE.md should show the AGENTS.md content)
  • Reviewer: skim ARCHITECTURE.md § 5 recipes — are they accurate descriptions of how to extend this repo?
  • Reviewer: skim design/lessons.md entries — each maps to a real commit and a real durable rule

🤖 Generated with Claude Code

Copilot AI 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.

Pull request overview

This PR adds a more structured “agent harness” documentation set (architecture + lessons learned + per-language style rules), introduces a /second-opinion Claude skill backed by GitHub Copilot CLI, and makes several lint/CI reliability tweaks (Makefile lint macro, ShellCheck config centralization, uv update behavior, and a workflow runner change).

Changes:

  • Introduces new docs: ARCHITECTURE.md (repo layout/recipes) and design/lessons.md (incident → rule postmortems), and refactors AGENTS.md into an index.
  • Adds .claude rules and a /second-opinion skill with parsing/brief tooling (review_brief.py, REVIEW-BRIEF.md).
  • Updates lint/CI plumbing: PREK_RUN Makefile macro, moves ShellCheck excludes to .shellcheckrc, swaps ShellCheck pre-commit repo, tweaks uv self-update invocation, and changes the GitHub Actions runner label.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
Makefile Adds PREK_RUN macro to preserve staged paths while running prek and reuses it across lint targets.
design/lessons.md New postmortem-style lessons doc with commit references and durable rules.
ARCHITECTURE.md New repo architecture and extension “recipes” documentation.
AGENTS.md Slims to a compound-knowledge index pointing to the new docs and style rules.
.shellcheckrc Centralizes global ShellCheck disables for consistent CLI/IDE/pre-commit behavior.
.pre-commit-config.yaml Switches ShellCheck hook to the shellcheck-py mirror and relies on .shellcheckrc for excludes.
.gitignore Ignores local Claude/OpenWolf-related files and settings.
.github/workflows/repo_checks.yml Changes CI runner label for pre-commit checks workflow.
.claude/skills/second-opinion/SKILL.md Adds skill definition + workflow for invoking GitHub Copilot CLI review and parsing results.
.claude/skills/second-opinion/scripts/review_brief.py Adds tooling to check/discover/parse the second-opinion review brief.
.claude/skills/second-opinion/REVIEW-BRIEF.md Adds repo-targeted review brief and output format for heterogeneous-model review.
.claude/rules/powershell-style.md Adds PowerShell formatting/naming/error-handling conventions for agent auto-loading.
.claude/rules/bash-style.md Adds Bash portability/style conventions for agent auto-loading.
.assets/provision/install_uv.sh Adjusts uv self update to use env vars instead of the removed/brittle --system-certs flag.

Comment thread Makefile Outdated
Comment thread Makefile
Comment thread design/lessons.md Outdated
Comment thread design/lessons.md Outdated
Comment thread design/lessons.md Outdated
Comment thread design/lessons.md Outdated
Comment thread .shellcheckrc Outdated
Comment thread .github/workflows/repo_checks.yml
Comment thread .claude/skills/second-opinion/REVIEW-BRIEF.md
Comment thread .assets/provision/install_uv.sh Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Comment thread Makefile
Comment thread .claude/skills/second-opinion/scripts/review_brief.py Outdated
Comment thread .claude/skills/second-opinion/scripts/review_brief.py
@szymonos
szymonos force-pushed the chore/agents-harness branch from 3522a40 to 4b99da7 Compare June 14, 2026 13:36
@szymonos
szymonos merged commit 687fdfc into main Jun 14, 2026
3 checks passed
@szymonos
szymonos deleted the chore/agents-harness branch June 14, 2026 13:39
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.

2 participants