feat: deploy AIM (AI Agent Instruction Modules)#122
Conversation
Phase 0 of #120 — first PR of the v1.0.0 cycle. - Add AGENTS.md, aim.config.json, and instructions/ with 12 AIM modules (agent-workflow, shorthand, git-workflow, testing, powershell, markdown, readme, github-cli, releases, contributing, update, repository-specific). - Migrate CLAUDE.md content to instructions/repository-specific.instructions.md, keeping only repo-specific content (project layout, $PSBPreference internals, task dependency variables, naming conventions, build workflows, BuildHelpers env vars). Generic content covered by standard AIM modules was dropped to avoid duplication. - Fix stale references during migration: version 0.7.3 -> 0.8.0; public function count 9 -> 12 (signing functions added in 0.8.0). - Delete CLAUDE.md. Docs/config-only — no module code changes. Tests still pass (314 passed, 0 failed, 2 skipped — the skips are git-tagging tests that expectedly skip on feature branches). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude Code auto-loads CLAUDE.md from the project root but does not auto-load AGENTS.md. Add a one-line CLAUDE.md that uses Claude Code's @-import syntax to load AGENTS.md (and through it, the AIM instruction modules) on every Claude Code session in this repo. Without this, fresh Claude Code sessions in the repo would start without AIM context and need to be pointed at AGENTS.md manually each time. Reference: https://code.claude.com/docs/en/memory.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR deploys AIM as the agent-instruction foundation for the v1.0.0 cycle, replacing the old monolithic Claude guide with a modular instruction set and repository-specific guidance.
Changes:
- Adds
AGENTS.md,aim.config.json, and AIM instruction modules. - Migrates repo-specific Claude guidance into
instructions/repository-specific.instructions.md. - Keeps
CLAUDE.mdas a one-line import ofAGENTS.md.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
AGENTS.md |
Adds the agent-facing entry point and instruction matrix. |
aim.config.json |
Configures included AIM modules and external source fallback. |
CLAUDE.md |
Replaces the old guide with an @AGENTS.md import. |
instructions/agent-workflow.instructions.md |
Adds agent workflow and pre-flight guidance. |
instructions/contributing.instructions.md |
Adds upstream AIM contribution guidance. |
instructions/git-workflow.instructions.md |
Adds Git, branch, commit, and PR conventions. |
instructions/github-cli.instructions.md |
Adds GitHub CLI operational guidance. |
instructions/markdown.instructions.md |
Adds Markdown formatting standards. |
instructions/powershell.instructions.md |
Adds PowerShell coding standards. |
instructions/readme.instructions.md |
Adds README maintenance guidance. |
instructions/releases.instructions.md |
Adds release management guidance. |
instructions/repository-specific.instructions.md |
Adds PowerShellBuild-specific project, API, build, and test guidance. |
instructions/shorthand.instructions.md |
Adds abbreviation and shorthand naming guidance. |
instructions/testing.instructions.md |
Adds general testing practices. |
instructions/update.instructions.md |
Adds AIM update and sync procedures. |
Comments suppressed due to low confidence (3)
instructions/repository-specific.instructions.md:110
- This dependency-variable table stops at
$PSBPublishDependency, butPowerShellBuild/psakeFile.ps1also defines$PSBSignModuleDependency,$PSBBuildCatalogDependency,$PSBSignCatalogDependency, and$PSBSignDependency. Include those rows so agents can correctly customize the signing task chain.
| `$PSBPublishDependency` | `@('Test')` |
instructions/repository-specific.instructions.md:198
- The module-level task list omits the signing tasks currently defined in
PowerShellBuild/psakeFile.ps1(SignModule,BuildCatalog,SignCatalog, andSign). Add them here so the repository instructions reflect the actual consumer-facing task surface.
| `Publish` | Publish to repository |
instructions/repository-specific.instructions.md:286
- This Invoke-Build example has the same alias/path issue as the earlier snippet:
PowerShellBuild.IB.Tasksis an exported alias to dot-source afterImport-Module, not a child path to combine with the module directory. Update the example to match the working pattern shown inREADME.mdandtests/TestModule/.build.ps1.
. ([IO.Path]::Combine((Split-Path (Get-Module PowerShellBuild -ListAvailable).Path), 'PowerShellBuild.IB.Tasks'))
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Create release from tag | ||
| gh release create v1.0.0 --title "Version 1.0.0" --notes "Release notes" |
There was a problem hiding this comment.
This is a bug in the upstream AIM template — github-cli.instructions.md is synced from tablackburn/ai-agent-instruction-modules. Filed upstream as tablackburn/ai-agent-instruction-modules#23 to fix at the source; this repo will pick up the corrected version on the next AIM sync. Not patched locally to keep the file as a clean upstream mirror.
|
|
||
| **For new instruction files:** | ||
|
|
||
| - Place in `instructions/` folder |
There was a problem hiding this comment.
This is also a bug in the upstream AIM template — the instruction contradicts upstream's own CONTRIBUTING.md:94, which correctly says new files go in instruction-templates/. Filed upstream as tablackburn/ai-agent-instruction-modules#23. Not patched locally to keep the file as a clean upstream mirror.
…ions - Add Sign and Sign.Catalog rows to $PSBPreference sections table - Fix Invoke-Build alias examples to use Import-Module + dot-source pattern (matches README.md and tests/TestModule/.build.ps1) - Replace stale node_modules psake Include with -FromModule pattern from README - Add four signing task dependency variables to the dependency table - Add four signing tasks (SignModule, BuildCatalog, SignCatalog, Sign) and expand precondition note for Sign.Enabled and Windows-only cmdlet checks Addresses Copilot comments on PR #122. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Addressed Copilot's review in fbf2bbe. Inline comments: replies attached to each thread. Summary:
Suppressed "low confidence" findings (all valid, addressed in the same commit):
|
…otes flag (#24) * fix(instructions): correct upstream folder reference and gh release notes flag - contributing.instructions.md: "Make Changes" pointed at instructions/ instead of instruction-templates/, contradicting CONTRIBUTING.md and the README. Following the bad guidance landed new modules in the dogfood mirror where downstream sync workflows wouldn't pick them up. - github-cli.instructions.md: "Creating Releases" used --notes, contradicting releases.instructions.md which mandates --notes-file. Replaced with a temp-file pattern and added a precedence note. - shorthand.instructions.md: backfilled the Dir -> Directory row (added to the active copy in 0.8.13 but missed in the template), restoring sync between instruction-templates/ and instructions/. Surfaced during Copilot review of psake/PowerShellBuild#122. Closes #23 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: Release v0.8.14 --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 0 of #120 — deploy AIM (AI Agent Instruction Modules) as the first PR of the v1.0.0 cycle.
What's included
AGENTS.md(root) — agent-facing entry point with instruction matrix; Last sync: 2026-05-15aim.config.json— module configuration; external sources enabled (awesome-copilot fallback)instructions/— 12 instruction modules:agent-workflow,shorthand,git-workflow,testing,updatepowershell,markdown,readme,github-clireleases,contributingrepository-specific.instructions.md(migrated from CLAUDE.md)CLAUDE.md— one-line@AGENTS.mdimport so Claude Code auto-loads AIM context (see "CLAUDE.md handling" below)CLAUDE.md migration
CLAUDE.md content was migrated to
instructions/repository-specific.instructions.md, keeping only repo-specific content (project layout,$PSBPreferenceinternals, task dependency variables, naming conventions, build workflows, BuildHelpers env vars). Generic content covered by standard AIM modules (PowerShell style, git workflow, generic testing patterns) was dropped to avoid duplication.Stale references corrected during migration:
CLAUDE.md handling
The original CLAUDE.md was deleted, then re-added as a one-line file containing only
@AGENTS.md. Reason: Claude Code auto-loadsCLAUDE.mdfrom the project root but does not auto-loadAGENTS.md(memory docs). Using the official@-import syntax means fresh Claude Code sessions in this repo automatically pick up AIM context (AGENTS.md → instruction matrix → applicable modules) without needing a manual pointer in every prompt.This matches the AIM source repo, which ships both
AGENTS.mdandCLAUDE.md.Scope
Docs/config-only — no module code changes. Verified locally:
git diff --stat origin/main: 16 files changed, 0 underPowerShellBuild/,requirements.psd1,CHANGELOG.md, or.github/./build.ps1 -Task Test -Bootstrappasses (314 passed, 0 failed, 2 skipped — the skips are git-tagging tests that expectedly skip on feature branches)Note on module count vs #120 checklist
#120's Phase 0 checklist lists 8 modules. This PR deploys 12 — the additional
readme,contributing,update, andrepository-specificmodules were included per the Phase 0 deployment scope I worked from. Happy to drop any of them if the tracking issue's narrower list was intentional.Phase 0 checklist (#120)
AGENTS.md,aim.config.json,instructions/CLAUDE.mdcontent →instructions/repository-specific.instructions.mdagent-workflow,shorthand,git-workflow,testing,powershell,markdown,releases,github-cli(plusreadme,contributing,update,repository-specific— see note above)Commits
feat: deploy AIM (AI Agent Instruction Modules)— main deployment + CLAUDE.md content migration + CLAUDE.md deletiondocs: add CLAUDE.md as @AGENTS.md import for Claude Code auto-loading— restore CLAUDE.md as a 1-line pointer🤖 Generated with Claude Code