Skip to content

Centralize agent instructions in SPEC - #4912

Merged
ChrisTitusTech merged 8 commits into
ChrisTitusTech:mainfrom
seanh1995:ai-update
Aug 4, 2026
Merged

Centralize agent instructions in SPEC#4912
ChrisTitusTech merged 8 commits into
ChrisTitusTech:mainfrom
seanh1995:ai-update

Conversation

@seanh1995

@seanh1995 seanh1995 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactor
  • UI/UX improvement

Description

This pull request updates the repository’s agent and contributor instructions for clarity, accuracy, and maintainability, and introduces dedicated instruction files for coding agents (Claude, Gemini, Copilot). The most important changes are summarized below. Also updated all reference from hugo to astro.

Major improvements to agent instructions and repo guidance:

  • AGENTS.md:
    • Overhauled to clarify the separation between the project contract (SPEC.md) and agent operating instructions, with repeated references to SPEC.md for architecture, build, and config details.
    • Expanded and reorganized non-negotiable rules, especially around never editing or committing generated files, and never hand-editing auto-generated docs.
    • Added explicit instructions for Pester installation, docs site workflows, and commit hygiene.
    • Clarified which files are source of truth and how to update them, referencing SPEC.md for details.
    • Refined coding, runtime, and verification guidelines to match the actual build and runtime models, with frequent cross-links to SPEC.md.
    • Updated documentation and communication expectations to clarify when and how to update user and developer docs, and to never hand-edit auto-generated documentation subfolders. [1] [2] [3] [4]

Addition of agent-specific instruction files:

  • Added CLAUDE.md, GEMINI.md, and .github/copilot-instructions.md files, each directing coding agents to read AGENTS.md for operating instructions before proceeding. [1] [2] [3]

Project contract and repo structure clarification:

  • SPEC.md:
    • Clarified that AGENTS.md covers agent behavior and points here for project facts.
    • Added and reorganized sections detailing the project stack, repository layout, and the distinction between source and generated files.
    • Improved language to make the contract and non-goals explicit for human and AI contributors.

These changes ensure all contributors and coding agents follow the correct workflow, operate only on source files, and keep documentation and generated artifacts in sync with the project’s architecture and process.

Issue related to PR

  • Resolves #

Move the full coding-agent contract and repository guidance from `AGENTS.md` into `SPEC.md`, and reduce `AGENTS.md` to a simple pointer to the canonical instructions. Add lightweight `CLAUDE.md`, `GEMINI.md`, and `.github/copilot-instructions.md` files so different assistants consistently bootstrap through the same repo-specific guidance.
@github-actions github-actions Bot added the new feature New feature or request label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Added centralized project guidance covering build and test procedures, runtime safety, documentation, and release practices.
    • Updated contributor guidance to direct automated assistants to the canonical project instructions.
    • Defined the project’s technical contract, configuration requirements, documentation structure, and release-artifact rules.
  • Chores

    • Updated ignore rules to exclude local environment files and remove obsolete archived documentation paths.

Walkthrough

The PR defines the project contract in SPEC.md, expands operational guidance in AGENTS.md, routes Copilot, Claude, and Gemini instructions through AGENTS.md, and ignores local documentation environment files.

Changes

Agent guidance and project contract

Layer / File(s) Summary
Canonical project contract
SPEC.md
SPEC.md defines the project stack, build sequence, runtime and UI contracts, configuration rules, documentation structure, testing, CI, and release-artifact rules.
Operational development guidance
AGENTS.md
AGENTS.md adds commands, source-of-truth rules, editing and safety requirements, verification guidance, generated-file handling, communication rules, and corrected section numbering.
Agent routing and local-file hygiene
.github/copilot-instructions.md, CLAUDE.md, GEMINI.md, docs/.gitignore
The agent-specific guidance files require readers to consult AGENTS.md. The documentation ignore file excludes local environment files.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: documentation, skip-changelog

Suggested reviewers: christitustech

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the pull request's main focus on reorganizing and centralizing agent instructions in SPEC.md.
Description check ✅ Passed The description directly explains the updates to agent instructions, SPEC.md, contributor guidance, and agent-specific entry-point files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added documentation Improvements or additions to documentation skip-changelog labels Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@SPEC.md`:
- Line 15: Update the documentation edit rule near the prohibition on
docs/src/content/docs/code-reference/ so it applies only to generated subfolders
or explicitly permits hand-written pages such as architecture.mdx, while
preserving the instruction to avoid modifying generated content directly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f6f22f4-4821-4c43-bb51-5ab1fdb3ae0b

📥 Commits

Reviewing files that changed from the base of the PR and between a0142ac and a85b262.

📒 Files selected for processing (5)
  • .github/copilot-instructions.md
  • AGENTS.md
  • CLAUDE.md
  • GEMINI.md
  • SPEC.md

Comment thread SPEC.md Outdated
Narrowed rule ChrisTitusTech#3 to specify exact auto-generated subdirectories (tweaks/ and features/) rather than the entire code-reference/ directory, and clarified that other hand-written pages (e.g. architecture.mdx) may be edited directly.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a85b26270b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread SPEC.md Outdated
Comment thread SPEC.md Outdated
Comment thread SPEC.md Outdated
Drop the old `docs-old` Hugo ignore rules from `.gitignore`, reflecting that the archived docs build artifacts no longer need special handling there.
Add .env.local and .env.*.local patterns to prevent local environment files from being committed.
Update `SPEC.md` to run Pester in CI mode and tighten repository hygiene instructions around ignored files. The git guidance now points contributors to the actual `.gitignore` files and clarifies that `docs/public/` contains tracked static assets rather than generated output.
@seanh1995

Copy link
Copy Markdown
Contributor Author

@coderabbitai is this ok now?

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '=== Relevant instruction files ==='
fd -a -t f '^(SPEC\.md|AGENTS\.md|CLAUDE\.md|GEMINI\.md|copilot-instructions\.md)$' . \
  -E .git -E node_modules -E dist -E build | sort

printf '%s\n' '=== Current instruction file contents ==='
for file in AGENTS.md SPEC.md CLAUDE.md GEMINI.md .github/copilot-instructions.md; do
  if [ -f "$file" ]; then
    printf '\n--- %s ---\n' "$file"
    cat -n "$file"
  fi
done

printf '%s\n' '=== PR changed files ==='
gh pr view 4912 --repo ChrisTitusTech/winutil --json files \
  --jq '.files[] | "\(.path): +\(.additions)/-\(.deletions)"'

printf '%s\n' '=== Open CodeRabbit review threads ==='
gh api graphql \
  -F owner='ChrisTitusTech' \
  -F name='winutil' \
  -F number=4912 \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          isResolved
          comments(first: 20) {
            nodes { author { login } body path line originalLine }
          }
        }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[]
    | select(.isResolved == false)
    | select(any(.comments.nodes[]; .author.login == "coderabbitai"))
    | .comments.nodes[]
    | select(.author.login == "coderabbitai")
    | {path, line, originalLine, body}'

Length of output: 19886


@seanh1995 Yes. This is OK now.

SPEC.md is the canonical instruction source. AGENTS.md points to it. The agent-specific entry points consistently route through AGENTS.md.

I found no unresolved CodeRabbit review threads.

You are interacting with an AI system.

@mewclouds

Copy link
Copy Markdown
Contributor

I like the idea of keeping the small compatibility files so every agent gets pointed in the right direction! The only change I’d make is keeping AGENTS.md as the actual agent instructions instead of moving all of that into SPEC.md.

To me, they serve different purposes:

  • SPEC.md is the project contract. It should explain what WinUtil is, who it’s for, how the architecture works, important boundaries, contracts, generated files, etc. It should be something anyone can read to understand the project, not something written specifically for an AI agent
  • AGENTS.md is more like “how should an agent work in this repo?” Things like how to verify changes, what not to touch, what docs to read, how to handle generated files, what checks to run, and how tightly to keep changes scoped. It should point to SPEC.md and tell agents to treat it as the source of truth for the project itself, but I wouldn’t make SPEC.md the place where all the agent-specific behavior lives

So I’d keep the flow basically:

CLAUDE.md / GEMINI.md / copilot-instructions.md -> AGENTS.md -> SPEC.md

That keeps the responsibilities pretty clear. SPEC.md defines the project in a way anyone can read, while AGENTS.md defines how an agent should work on it. What do you think?

Move repository working instructions into `AGENTS.md` and refocus `SPEC.md` on the stable WinUtil project contract. This separates agent-specific guidance from architecture, build, runtime, docs, testing, and release details so both documents have clearer ownership.
@seanh1995

Copy link
Copy Markdown
Contributor Author

@mewclouds ok i change that. let me no if this is better

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
SPEC.md (1)

11-18: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

State the exact supported PowerShell runtime.

Replace Windows PowerShell / PowerShell with the supported edition/version contract, such as Windows PowerShell 5.1, PowerShell 7.x, or both. The code calls powershell.exe, uses WPF UI features, installs/loads PowerShell 7 separately, and depends on Pester/Script Analyzer behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SPEC.md` around lines 11 - 18, Update the Stack section’s Language entry to
explicitly state the supported PowerShell edition and version contract,
replacing the ambiguous “Windows PowerShell / PowerShell” wording. Align it with
the runtime invoked by powershell.exe, WPF requirements, and separately
installed PowerShell 7 dependencies; leave the other stack entries unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 32-35: Update the Pester installation instructions in AGENTS.md to
remove -SkipPublisherCheck from the default Install-Module command; only retain
it if the documentation also specifies an explicit package-signature or
integrity verification step.
- Around line 41-43: Update the Script Analyzer command documented in AGENTS.md
to exclude the generated root winutil.ps1 file, either with an explicit file
filter or by limiting scanning to the source directories scripts, functions,
config, and tools; preserve recursive analysis and the existing project
settings.

---

Outside diff comments:
In `@SPEC.md`:
- Around line 11-18: Update the Stack section’s Language entry to explicitly
state the supported PowerShell edition and version contract, replacing the
ambiguous “Windows PowerShell / PowerShell” wording. Align it with the runtime
invoked by powershell.exe, WPF requirements, and separately installed PowerShell
7 dependencies; leave the other stack entries unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 633f9b64-1e75-4356-bd90-744a4eb18b52

📥 Commits

Reviewing files that changed from the base of the PR and between 603e024 and 8458792.

📒 Files selected for processing (2)
  • AGENTS.md
  • SPEC.md

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8458792e5e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread AGENTS.md Outdated
Expand AGENTS.md with context on why -SkipPublisherCheck is needed for Pester installation, why winutil.ps1 should be deleted before running ScriptAnalyzer, and clarify that the source-of-truth rule applies only to compiled-script behavior — repository metadata files are edited directly.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 32-35: Update the Pester installation instructions in AGENTS.md to
avoid making -SkipPublisherCheck the default behavior: remove that switch from
the standard Install-Module command, or add explicit trusted-source and package
signature/hash verification steps before using it. Preserve the pinned Pester
5.8.0 installation guidance.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 51ff8ae8-4445-4bc1-84ca-4e8ada9bb592

📥 Commits

Reviewing files that changed from the base of the PR and between 8458792 and 1d66e23.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md Outdated
Expands the explanation for why -SkipPublisherCheck is needed (catalog-signed vs Authenticode-signed), clarifies it does not skip download integrity, and adds -Repository PSGallery to pin the trusted source explicitly.

@mewclouds mewclouds left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the changes. Well done as usual 😄

@ChrisTitusTech
ChrisTitusTech merged commit b096aaa into ChrisTitusTech:main Aug 4, 2026
5 checks passed
@seanh1995
seanh1995 deleted the ai-update branch August 10, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation new feature New feature or request skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants