Skip to content

🤖 Bootstrap agent context infrastructure - #867

Merged
webknjaz merged 7 commits into
ansible:develfrom
webknjaz:servants/context-as-markdown
Aug 15, 2026
Merged

webknjaz merged 7 commits into
ansible:develfrom
webknjaz:servants/context-as-markdown

Conversation

@webknjaz

@webknjaz webknjaz commented Aug 5, 2026

Copy link
Copy Markdown
Member
SUMMARY

This patch establishes the entry-point chain CLAUDE.md -> AGENTS.md -> .agents-ctx/HOUSE_RULES.md, along with .agents-ctx/HOUSE_STYLE.md and a .gitignore that restricts .agents-ctx/ to Markdown files. Together these form the initial scaffolding for the house-style/tribal-knowledge memory that Claude Code and other agentic tools load when working in this repo.

In this patch, HOUSE_STYLE.md documents the only rule so far: no new @-mention imports below AGENTS.md. @-syntax loads eagerly at the start of every session regardless of relevance, so letting it spread would pollute the context window; everything past HOUSE_RULES.md links out with plain Markdown instead, to be pulled in on demand. This mirrors the approach outlined in [1].

The .gitignore also gains a CLAUDE.local.md entry, matching how ansible/ansible keeps that personal override file untracked.

The naming and idea behind HOUSE_STYLE.md come from Bernát Gábor (@gaborbernat), as discussed in the PR thread linked below [2].

[1] https://www.humanlayer.dev/blog/writing-a-good-claude-md
[2] tox-dev/turbohtml#482 (comment)

ISSUE TYPE
  • Infra Pull Request
  • Maintenance Pull Request
ADDITIONAL INFORMATION

N/A

This patch establishes the entry-point chain `CLAUDE.md` ->
`AGENTS.md` -> `.agents-ctx/HOUSE_RULES.md`, along with
`.agents-ctx/HOUSE_STYLE.md` and a `.gitignore` that restricts
`.agents-ctx/` to Markdown files. Together these form the initial
scaffolding for the house-style/tribal-knowledge memory that Claude
Code and other agentic tools load when working in this repo.

In this patch, `HOUSE_STYLE.md` documents the only rule so far: no
new `@`-mention imports below `AGENTS.md`. `@`-syntax loads eagerly
at the start of every session regardless of relevance, so letting
it spread would pollute the context window; everything past
`HOUSE_RULES.md` links out with plain Markdown instead, to be
pulled in on demand. This mirrors the approach outlined in [1].

The `.gitignore` also gains a `CLAUDE.local.md` entry, matching how
`ansible/ansible` keeps that personal override file untracked.

The naming and idea behind `HOUSE_STYLE.md` come from Bernát Gábor
(@gaborbernat), as discussed in the PR thread linked below [2].

[1] https://www.humanlayer.dev/blog/writing-a-good-claude-md
[2] tox-dev/turbohtml#482 (comment)
@webknjaz webknjaz self-assigned this Aug 5, 2026
Copilot AI lite review requested due to automatic review settings August 5, 2026 18:37
@webknjaz webknjaz added the 🤖 infra This includes packaging, CI/CD, test runners, dev env. That sort of stuff. label Aug 5, 2026

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 bootstraps an agent-context “entrypoint chain” for the repository by adding CLAUDE.md → AGENTS.md → .agents-ctx/HOUSE_RULES.md, plus initial “house rules/style” documents and ignore rules intended to keep .agents-ctx/ Markdown-only and to keep CLAUDE.local.md untracked.

Changes:

  • Add CLAUDE.md and AGENTS.md as the agent context entrypoints.
  • Introduce .agents-ctx/ scaffolding with HOUSE_RULES.md, HOUSE_STYLE.md, and a README.
  • Update ignore rules for agent-local overrides and .agents-ctx/ contents.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CLAUDE.md Adds the top-level agent context import chain entrypoint.
AGENTS.md Adds a “load first” instruction pointing to house rules.
.gitignore Ignores a local override file intended to remain untracked.
.agents-ctx/README.md Adds a short pointer to house rules within the agent context directory.
.agents-ctx/HOUSE_STYLE.md Documents the project’s agent-context import style constraints.
.agents-ctx/HOUSE_RULES.md Establishes the initial “house rules” document and links to style.
.agents-ctx/.gitignore Attempts to restrict .agents-ctx/ to Markdown-only tracked files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md
Comment on lines +1 to +4
@~/.claude/ansible/context.md
@~/.claude/ansible/pylibssh/context.md
@AGENTS.md
@CLAUDE.local.md
Comment on lines +5 to +8
Do not introduce additional Claude `@`-mention/import syntax inside
any file under `.agents-ctx/`. The existing chain (`CLAUDE.md` ->
`AGENTS.md` -> `.agents-ctx/HOUSE_RULES.md`) is the only sanctioned
use of `@`-imports.
Comment thread .agents-ctx/.gitignore
Comment on lines +1 to +3
*
!.gitignore
!*.md
@packit-as-a-service

This comment was marked as off-topic.

@webknjaz webknjaz mentioned this pull request Aug 5, 2026
@codecov

This comment was marked as off-topic.

@webknjaz

This comment was marked as off-topic.

@Jakuje

This comment was marked as off-topic.

@webknjaz

This comment was marked as off-topic.

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Aug 15, 2026
@webknjaz
webknjaz marked this pull request as ready for review August 15, 2026 01:08
@webknjaz
webknjaz merged commit de3b20b into ansible:devel Aug 15, 2026
24 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR 🤖 infra This includes packaging, CI/CD, test runners, dev env. That sort of stuff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants