Skip to content

Improve agent orientation: project.md convention, jvm-project.md, Copilot instructions#666

Merged
alexander-yevsyukov merged 37 commits into
masterfrom
improve-caching
May 25, 2026
Merged

Improve agent orientation: project.md convention, jvm-project.md, Copilot instructions#666
alexander-yevsyukov merged 37 commits into
masterfrom
improve-caching

Conversation

@alexander-yevsyukov
Copy link
Copy Markdown
Contributor

@alexander-yevsyukov alexander-yevsyukov commented May 24, 2026

Summary

New conventions and orientation

  • Introduce .agents/project.md convention: repo-specific context (Overview + Architecture) read by all agents at session start; migrate seeds it from .agents/project.template.md only when the target repo has none
  • Add .agents/jvm-project.md as the shared JVM requirements doc (build stack, Kotlin/Java style, tests, versioning) that project.md files link to
  • Add .github/copilot-instructions.md — project-neutral universal safety rules + pointer to project.md; distributed to all repos by migrate

Agent instruction consolidation

  • Consolidate agent instructions into AGENTS.md: move universal rules (orientation, memory, verification & quality, core principles, task planning) from CLAUDE.md so Codex, Copilot, and Claude Code all read from a single source; CLAUDE.md becomes a thin @AGENTS.md wrapper plus Claude Code-specific notes
  • Add cherry-pick to the git history safety prohibition in AGENTS.md
  • Scope the api-discovery bullet in CLAUDE.md to JVM repos (Hugo repos don't have that skill after migration)
  • Trim quick-reference-card.md to its one universal item: the commit safety rule

pre-pr skill improvements

  • Standardize terminology: N/Anot-applicable throughout
  • Split sentinel into separate build=<command> and build_status=PASS|FAIL|skipped fields
  • After a version-bump auto-fix, recompute the changed-file list before Step 3 (the bump commit adds version.gradle.kts to the diff)
  • PASS criteria: allow build_status=skipped when no command is documented for the change type
  • Complete the deps classification bullet (was a sentence fragment)
  • Handle a missing .agents/running-builds.md: treat as "no documented command" → build_status=skipped (Hugo repos don't have this file after migration)
  • Guard /bump-version auto-fix and reviewer dispatch against missing skills (Hugo repos pruned by migrate)
  • Fix the cached check-links result to record plain APPROVE; document auto-fix behaviour and sentinel contract

migrate robustness

  • Add mkdir -p ../.agents guard before project.md restore in both Hugo and JVM paths
  • Fix mktemp portability: use mktemp -t name.XXXXXX for all three temp-file calls (bare mktemp fails on macOS)

Settings

  • Remove git push from the deny list in .claude/settings.json (it was silently overriding the existing allow rule)

Team memory

  • Add cache-hygiene feedback and Anthropic API caching reference docs
  • Add feedback/copilot-review-request.md: GraphQL botIds is the only reliable path to request or re-request a Copilot PR review; the REST endpoint silently no-ops on re-requests

🤖 Generated with Claude Code

alexander-yevsyukov and others added 4 commits May 24, 2026 19:47
…nstructions

- Introduce `.agents/project.md` as the repo-specific context file (Overview +
  Architecture), preserved by `migrate` across updates
- Add `.agents/jvm-project.md` as the shared JVM requirements doc (build stack,
  coding style, tests, versioning) that project.md files link to
- Add `.github/copilot-instructions.md` (project-neutral; universal safety rules
  + pointer to project.md); distributed to all repos by `migrate`
- Strengthen `AGENTS.md` to peer with CLAUDE.md: full commit-safety rule,
  project.md orientation, other safety rules
- Trim `quick-reference-card.md` to the one universal item: commit safety rule
- Update `CLAUDE.md` to reference project.md and jvm-project.md conventions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, link style

- Renumber _TOC.md items 3-22 (duplicate 3 after insertion)
- Fix task frontmatter: branch master to improve-caching; add related-memories
- Add template comment to project.md so agents do not read it as live context
- Use footnote-style reference link for Kotest URL in jvm-project.md
- Normalise .agents/ link paths in AGENTS.md (drop leading ./)
- Align org name to Spine SDK organisation in copilot-instructions.md
- Broaden cache-hygiene memory to include .agents/, .claude/, buildSrc/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9fceaba816

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread migrate
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 standardizes agent “orientation” across the Spine SDK org by introducing a repo-specific .agents/project.md convention (plus a shared .agents/jvm-project.md), distributing GitHub Copilot instructions via migrate, and adding prompt-caching hygiene guidance to team memory.

Changes:

  • Add .agents/project.md (repo context convention) and .agents/jvm-project.md (shared JVM requirements + review checklist), and update .agents/_TOC.md accordingly.
  • Strengthen agent guidance in AGENTS.md / CLAUDE.md, and simplify the quick reference card to the commit/history safety rule.
  • Add Copilot instructions and prompt-caching task/memory docs; update migrate to preserve an existing sibling repo’s .agents/project.md and to copy Copilot instructions into target repos.

Reviewed changes

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

Show a summary per file
File Description
migrate Preserves target repo .agents/project.md during .agents refresh; copies Copilot instructions into target .github/.
CLAUDE.md Adds guidance to read .agents/project.md / shared requirement docs.
AGENTS.md Adds orientation + explicit commit/history safety policy; reorganizes sections.
.github/copilot-instructions.md Introduces universal Copilot rules and points to .agents/project.md and .agents/_TOC.md.
.agents/tasks/prompt-caching-org.md Adds an org-level task plan for improving prompt caching hit rates.
.agents/quick-reference-card.md Trims down to the single universal commit/history safety rule.
.agents/project.md Adds a project.md template intended for sibling repos.
.agents/memory/MEMORY.md Indexes new memory entries.
.agents/memory/feedback/cache-hygiene.md Adds cache hygiene guidance for shared-config edits.
.agents/memory/reference/cache-warm-window.md Documents practical cache TTL/windows and org/workspace implications.
.agents/memory/reference/anthropic-api-caching.md Documents a cache_control pattern for future direct Anthropic API callers.
.agents/jvm-project.md Adds shared JVM requirements + code review checklist.
.agents/_TOC.md Adds the JVM requirements doc to the documentation index.

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

Comment thread migrate
Comment thread CLAUDE.md Outdated
Comment thread .agents/project.template.md
alexander-yevsyukov and others added 2 commits May 24, 2026 23:03
…SKILL.md cache verdict

- Rename .agents/project.md to project.template.md so agents do not load the
  placeholder as live repo context; migrate seeds project.md from the template
  only when the target repo has none (simpler than preserve-and-restore)
- Update CLAUDE.md to reference project.template.md as the starting point
- Add mkdir -p ../.github before copying copilot-instructions.md in Hugo path
  to avoid cp failure on repos without an existing .github directory
- Fix pre-pr SKILL.md: record cached check-links result as plain APPROVE with
  prose note, matching the PASS criteria and check-links SKILL.md convention

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pre-pr SKILL.md

- Notes section: add that the skill may auto-fix a missing version bump via
  /bump-version; all other fixes require explicit user confirmation
- Sentinel section: restore the mention that pre-pr-gate.sh reads head= and
  status=, making clear the sentinel format is a hook contract not just a log

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move universal rules (orientation, memory, quality, principles, task
planning) from CLAUDE.md into AGENTS.md so Codex, Copilot, and Claude
Code all read from a single source. CLAUDE.md becomes a thin @AGENTS.md
wrapper plus Claude Code-specific notes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 15 out of 15 changed files in this pull request and generated 4 comments.

Comment thread migrate Outdated
Comment thread migrate Outdated
Comment thread .agents/skills/pre-pr/SKILL.md
Comment thread .agents/tasks/setup-cross-tool-agent-instructions.md
Copy link
Copy Markdown
Contributor Author

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

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

@copilot, please change the text as instructed. Commit the changes when done.

Comment thread .agents/memory/feedback/cache-hygiene.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI commented May 24, 2026

@copilot, please change the text as instructed. Commit the changes when done.

Done in commit 8a2efcf.

Updated the requested text in:

  • .agents/skills/pre-pr/SKILL.md (auto-fix policy wording)
  • .agents/tasks/setup-cross-tool-agent-instructions.md (Copilot instruction references)
  • .agents/memory/feedback/cache-hygiene.md ("several developers")

…ching

# Conflicts:
#	.agents/skills/pre-pr/SKILL.md
#	.agents/tasks/setup-cross-tool-agent-instructions.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 15 out of 15 changed files in this pull request and generated 4 comments.

Comment thread .agents/skills/pre-pr/SKILL.md Outdated
Comment thread .agents/tasks/setup-cross-tool-agent-instructions.md Outdated
Comment thread AGENTS.md Outdated
Comment thread .agents/project.template.md Outdated
@alexander-yevsyukov alexander-yevsyukov changed the title Improve agent orientation: project.md convention, jvm-project.md, Copilot instructions Improve agent orientation: project.md convention, jvm-project.md, Copilot instructions May 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread migrate Outdated
Comment thread migrate
Bare mktemp without a template fails on macOS's default mktemp.
Use mktemp -t <name>.XXXXXX for all three temp-file calls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 17 out of 17 changed files in this pull request and generated 1 comment.

Comment thread .agents/skills/pre-pr/SKILL.md Outdated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread CLAUDE.md Outdated
Comment thread .agents/skills/pre-pr/SKILL.md Outdated
…covery note to JVM repos

In Hugo repos, migrate removes running-builds.md, so pre-pr Step 3 must
treat a missing file as 'no documented command' rather than failing.
Also qualifies the api-discovery bullet in CLAUDE.md as JVM-only, since
migrate removes that skill from Hugo repos.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread .agents/skills/pre-pr/SKILL.md Outdated
Comment thread .agents/skills/pre-pr/SKILL.md
Step 2: only auto-invoke /bump-version when .agents/skills/bump-version/
exists; otherwise record a Must-fix for manual bump.
Step 4: check skill directory exists before dispatching; skip with
'not applicable for this repo' note when absent (covers Hugo repos
where migrate removes kotlin-review, dependency-audit, bump-version).
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 17 out of 17 changed files in this pull request and generated no new comments.

@alexander-yevsyukov alexander-yevsyukov merged commit 56b5c90 into master May 25, 2026
2 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the improve-caching branch May 25, 2026 15:19
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.

4 participants