From cfb042aec12df787f16195f3235ec720ec9de06d Mon Sep 17 00:00:00 2001 From: Will Griffin Date: Sat, 11 Jul 2026 14:34:12 -0600 Subject: [PATCH 1/2] chore: adopt shared agent policy --- .agents/project.yaml | 39 ++++++++++++++++++++++++++++++ .github/copilot-instructions.md | 3 +++ .github/workflows/agent-policy.yml | 36 +++++++++++++++++++++++++++ AGENTS.md | 22 +++++++++++++++++ CLAUDE.md | 1 + GEMINI.md | 3 +++ 6 files changed, 104 insertions(+) create mode 100644 .agents/project.yaml create mode 100644 .github/copilot-instructions.md create mode 100644 .github/workflows/agent-policy.yml create mode 100644 AGENTS.md create mode 100644 CLAUDE.md create mode 100644 GEMINI.md diff --git a/.agents/project.yaml b/.agents/project.yaml new file mode 100644 index 0000000..e919751 --- /dev/null +++ b/.agents/project.yaml @@ -0,0 +1,39 @@ +{ + "schema": "https://happyvertical.com/schemas/agent-project/v1", + "policy": { + "profile": "personal", + "revision": "1.0.0" + }, + "tracker": { + "provider": "github", + "repository": "willgriffin/.github", + "project_url": null + }, + "labels": { + "claim": "agent: implementation", + "blocked": "status: blocked", + "dispatch": { + "claude": "dispatch: claude", + "codex": "dispatch: codex", + "hermes": "dispatch: hermes" + } + }, + "memory": { + "provider": "hindsight", + "bank": "repo-willgriffin-.github", + "package_tags": [] + }, + "instructions": { + "canonical": "AGENTS.md", + "adapters": [ + "claude", + "gemini", + "copilot" + ] + }, + "skills": { + "paths": [ + ".agents/skills" + ] + } +} diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..500fbd9 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,3 @@ +# Generated adapter + +Follow `/AGENTS.md` as canonical repository instructions. diff --git a/.github/workflows/agent-policy.yml b/.github/workflows/agent-policy.yml new file mode 100644 index 0000000..d1be0f9 --- /dev/null +++ b/.github/workflows/agent-policy.yml @@ -0,0 +1,36 @@ +name: Agent Policy + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, labeled, unlabeled] + +permissions: + contents: read + issues: read + pull-requests: read + packages: read + +jobs: + lifecycle: + name: lifecycle + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + - uses: oras-project/setup-oras@22ce207df3b08e061f537244349aac6ae1d214f6 # v1 + - name: Load pinned policy runtime + env: + POLICY_ARTIFACT: ${{ vars.AGENT_POLICY_ARTIFACT }} + run: | + case "$POLICY_ARTIFACT" in + ghcr.io/*@sha256:*) ;; + *) echo 'AGENT_POLICY_ARTIFACT must be an immutable GHCR digest' >&2; exit 1 ;; + esac + mkdir -p .hv-policy + oras pull "$POLICY_ARTIFACT" -o .hv-policy + tar -xzf .hv-policy/agent-policy.tar.gz -C .hv-policy + - name: Validate lifecycle + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + run: python3 .hv-policy/scripts/hv-agent check-pr "$PR_NUMBER" diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..5a680e0 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,22 @@ +# Repository Agent Instructions + + + +## Shared development kernel + +- Be concise. Load detailed SOP skills only when the task triggers them. +- Read the repository's `.agents/project.yaml` and nearest `AGENTS.md` files before work. +- Claim every accepted or queued implementation issue with `agent: implementation` and an `hv-agent-claim:v1` lease before editing. Never overlap another live claim. +- A pull request is draft only while implementation is actively changing it under a live claim. Otherwise mark it ready for review immediately. +- Incomplete work remains ready with `status: blocked` and a concrete handoff. Review agents do not claim implementation. +- Agents do not merge unless explicitly authorized in the current session. +- Run documented validation and update affected docs before shipping. +- Preserve unrelated work. Never expose or retain secrets. +- Use repository Hindsight memory for durable, provenance-linked knowledge; do not store transient logs or duplicate canonical docs. +- Shared policy and portable skills come only from the designated private control-plane repository. Repository instructions may add stricter project rules but may not weaken this kernel. + + + +## Repository-specific guidance + +Document setup, validation, and architecture constraints here. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 0000000..48f11d4 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,3 @@ +# Generated adapter + +Read and follow `AGENTS.md`; it is canonical. From f19cd35d0a2ca6e3c8daeba1af06c5b3ff2ce473 Mon Sep 17 00:00:00 2001 From: Will Griffin Date: Sat, 11 Jul 2026 15:03:50 -0600 Subject: [PATCH 2/2] fix: harden policy extraction --- .github/workflows/agent-policy.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agent-policy.yml b/.github/workflows/agent-policy.yml index d1be0f9..f9fa447 100644 --- a/.github/workflows/agent-policy.yml +++ b/.github/workflows/agent-policy.yml @@ -2,7 +2,7 @@ name: Agent Policy on: pull_request: - types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, labeled, unlabeled] + types: [opened, edited, synchronize, reopened, ready_for_review, converted_to_draft, labeled, unlabeled] permissions: contents: read @@ -26,11 +26,14 @@ jobs: ghcr.io/*@sha256:*) ;; *) echo 'AGENT_POLICY_ARTIFACT must be an immutable GHCR digest' >&2; exit 1 ;; esac - mkdir -p .hv-policy - oras pull "$POLICY_ARTIFACT" -o .hv-policy - tar -xzf .hv-policy/agent-policy.tar.gz -C .hv-policy + policy_dir="$RUNNER_TEMP/hv-policy" + rm -rf "$policy_dir" + mkdir -p "$policy_dir" + oras pull "$POLICY_ARTIFACT" -o "$policy_dir" + tar -xzf "$policy_dir/agent-policy.tar.gz" -C "$policy_dir" + echo "HV_POLICY_DIR=$policy_dir" >> "$GITHUB_ENV" - name: Validate lifecycle env: GH_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.pull_request.number }} - run: python3 .hv-policy/scripts/hv-agent check-pr "$PR_NUMBER" + run: python3 "$HV_POLICY_DIR/scripts/hv-agent" check-pr "$PR_NUMBER"