Skip to content

docs(agents): put scratch in .work/ and add denial, unattended and security-surface rules - #16608

Open
kyle-sexton wants to merge 2 commits into
mainfrom
docs/agents-scratch-unattended-rules
Open

kyle-sexton wants to merge 2 commits into
mainfrom
docs/agents-scratch-unattended-rules

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: owner-directed rule additions to AGENTS.md and the loop-lane contract.

Summary

Scratch files move to the gitignored .work/, and three rules land where their topic already
lives. None loosens a stop or a permission.

Fix

  • AGENTS.md, Pull request states: one-off tooling and raw data go in the repository's gitignored
    .work/; the session scratchpad only where a session has no checkout or a tool needs a path
    outside a repository, and that path is deleted when the run ends. The commit-the-conclusion and
    harness rules are unchanged.
  • AGENTS.md, Stop and ask first: a denied command is never moved into a script, interpreter call
    or wrapper to change what the permission checks see; it is reported, not reshaped and retried.
    The stop list itself is unchanged.
  • AGENTS.md, Long runs and the final report: a session told to run unattended sets its stop
    condition before it starts and keeps a task file recording each decision and why.
  • docs/contracts/loop-lane/README.md, When work stops for the owner: a security concern names the
    surface that runs today and is exposed, and in what mode, before it is raised as a question, a
    plan or a stop; with none, one line with the condition that would make it matter, and nothing is
    asked. Contract changelog 19.8.0 (minor, additive guidance, matching earlier additions to that
    section).

Verification

  • render-index.sh check --file AGENTS.md (the rules-index hygiene check): exit 0.
  • scripts/check-line-citations.py: pass. scripts/check-contract-clause-coverage.py: pass.
  • markdownlint-cli2 on the three files: 0 issues.
  • session scratchpad grep over docs/, plugins/ and .claude/: no hit documents this
    repository's own scratch rule; the hits describe plugin behavior for consumers, harness paths in
    hook code, or changelog history, so none was changed.

Related

  • docs/contracts/loop-lane/CHANGELOG.md 19.8.0.

session: AI Hero

🤖 Generated with Claude Code

https://claude.ai/code/session_01MWmASNT5Knyq99gphnV6B2

…curity-surface rules

- AGENTS.md: one-off tooling and raw data go in the gitignored .work/;
  the session scratchpad only without a checkout or where a tool needs a
  path outside a repository, deleted when the run ends.
- AGENTS.md: a denied command is reported, never moved into a script,
  interpreter or wrapper and retried.
- AGENTS.md: an unattended session sets its stop condition first and
  keeps a task file recording each decision.
- loop-lane: a security concern names the exposed surface running today
  and its mode before it is raised; with none, one line and no question.
  Contract 19.8.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MWmASNT5Knyq99gphnV6B2
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 16, 2026 19:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T19:16:36.840991Z a92ea1b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 43937423208

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/apply-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 4367693
Run 43937423208

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

This branch has not been deployed

No deployments
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