Skip to content

chore(dev): add .ai/ shared layer for AI customization#296

Merged
ioncache merged 10 commits into
mainfrom
worktree-feat+ai-customization-shared-layer
May 21, 2026
Merged

chore(dev): add .ai/ shared layer for AI customization#296
ioncache merged 10 commits into
mainfrom
worktree-feat+ai-customization-shared-layer

Conversation

@ioncache
Copy link
Copy Markdown
Owner

@ioncache ioncache commented May 21, 2026

Overview

Creates a .ai/ directory as a single source of truth for all AI customization
content (instructions, skills, prompts). Both GitHub Copilot and Claude Code
now reference this shared layer through thin wrapper files, eliminating
duplication and ensuring both AI systems always follow the same standards.

Details

  • .ai/instructions/ — 7 shared instruction files (code-complexity,
    code-review, comments, jsdoc-tsdoc, plan-writing, security, unit-tests),
    migrated from .github/instructions/ with Copilot frontmatter stripped
  • .ai/skills/ — Shared skill files for plan-writing and three new
    maintenance skills (ai-add-instruction, ai-add-prompt, ai-add-skill)
  • .github/instructions/ and .github/skills/ — Converted to thin
    wrappers: frontmatter preserved, body replaced with #file: reference to
    .ai/
  • .claude/skills/ — New Claude Code thin wrappers using @ import syntax
  • CLAUDE.md — Conventions section now uses @import lines instead of
    inline bullet points
  • Maintenance skillsai-add-instruction, ai-add-prompt, and
    ai-add-skill detect which AI systems are active and auto-generate the
    correct thin wrappers when new content is added to .ai/

Related Tickets and/or Pull Requests

  • Plan: docs/plans/008-ai-customization-shared-layer.md

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Centralized AI customization layer supporting both GitHub Copilot and Claude Code
    • Maintenance workflows to add/register new instructions, prompts and skills across both systems
    • New verification prompt to triage unresolved PR review comments
  • Documentation

    • Comprehensive AI-facing guidance: code complexity, code review, commenting, JSDoc/TSDoc, testing, security, and plan-writing
    • Repository-level guidance and a phased implementation plan for the shared AI layer

Review Change Stack

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 127 / 127
🔵 Statements 100% (🎯 100%) 129 / 129
🔵 Functions 100% (🎯 100%) 14 / 14
🔵 Branches 100% (🎯 100%) 72 / 72
File CoverageNo changed files found.
Generated in workflow #179 for commit ef0ea00 by the Vitest Coverage Report Action

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5f98a00b-ffbe-46bc-bc09-1de4361f422a

📥 Commits

Reviewing files that changed from the base of the PR and between 3ad2b3f and ef0ea00.

📒 Files selected for processing (5)
  • .ai/instructions/code-review.md
  • .ai/skills/ai-add-instruction.md
  • .ai/skills/ai-add-prompt.md
  • .ai/skills/ai-add-skill.md
  • docs/plans/008-ai-customization-shared-layer.md

📝 Walkthrough

Walkthrough

Centralizes AI customization into a shared .ai/ layer (instructions, skills, prompts), updates Copilot (.github/) and Claude (.claude/) thin wrappers to reference that content, adds maintenance skills and CLAUDE.md/.ai/README.md documentation, and wires a verification prompt for unresolved PR comments.

Changes

Shared AI Customization Layer

Layer / File(s) Summary
Plan and layer setup
docs/plans/008-ai-customization-shared-layer.md, .ai/README.md
Implementation plan defines the shared .ai/ directory architecture mapping to Copilot and Claude thin wrappers, phased steps, and verification checks. .ai/README.md documents folder structure, wrapper conventions, and maintenance skill commands.
Shared instruction guidelines
.ai/instructions/code-complexity.md, .ai/instructions/code-review.md, .ai/instructions/comments.md, .ai/instructions/jsdoc-tsdoc.md, .ai/instructions/plan-writing.md, .ai/instructions/security.md, .ai/instructions/unit-tests.md
Core AI behaviour guidelines (code complexity, PR review scope, comment rules, documentation standards, plan structure, security practices, unit test patterns) centralized in .ai/instructions/ as the single source of truth.
Shared maintenance skills
.ai/skills/ai-add-instruction.md, .ai/skills/ai-add-prompt.md, .ai/skills/ai-add-skill.md, .ai/skills/plan-writing.md
Procedural documentation for creating new shared instructions, prompts, and skills with conditional generation/registration of thin-wrapper files for Copilot and Claude.
Copilot integration wrappers
.github/instructions/*.instructions.md, .github/instructions/jsdoc-tsdoc.instructions.md, .github/skills/*/SKILL.md
Copilot instruction/prompt wrappers updated to point to shared .ai/ files via #file: directives and new skill metadata descriptors for maintenance skills; some prior inline files removed.
Claude integration wrappers and settings
.claude/skills/*.md, .claude/settings.json
Claude skill wrapper files added as single-line @.ai/... references to shared .ai/ skills; .claude/settings.json configured to enable required Claude plugins.
Prompts and verification wiring
.ai/prompts/verify-unresolved-pr-comments.md, .github/prompts/verify-unresolved-pr-comments.prompt.md, .claude/skills/verify-unresolved-pr-comments.md
Adds a shared prompt to verify unresolved PR comments and corresponding Copilot/Claude thin-wrapper entries referencing the shared prompt.
Repository configuration and documentation
.gitignore, CLAUDE.md
.gitignore excludes Claude workspace artifacts; CLAUDE.md populated with development/test command and library architecture overview and references to shared instruction files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A cosy .ai/ burrow where prompts align,

wrappers point home and guidelines shine,
Copilot and Claude now read from one tune,
maintenance skills hum beneath the moon,
tidy docs and plans keep progress in line.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: introducing a shared .ai/ layer for AI customization content, which is the primary focus of this PR across multiple files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-feat+ai-customization-shared-layer

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

@ioncache ioncache changed the title feat(308): add .ai/ shared layer for AI customization chore(dev): add .ai/ shared layer for AI customization May 21, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 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 @.ai/instructions/code-review.md:
- Around line 62-66: The listed instruction files paragraph incorrectly
references a non-existent token "performance"; update the list so it matches the
migrated files: remove "performance", change "jsdoc" to "jsdoc-tsdoc" if
present, and ensure "plan-writing" is included alongside "code-complexity",
"code-review", "comments", "security", and "unit-tests"; edit the paragraph that
contains the word "performance" (the instruction files list) to exactly mirror
the migrated-files list from the plan.

In @.ai/skills/ai-add-instruction.md:
- Around line 56-58: The fenced code block showing "@.ai/instructions/<name>.md"
should include a language identifier (e.g., "text" or "markdown") to improve
clarity and syntax highlighting; update the block in
.ai/skills/ai-add-instruction.md (the triple-backtick block containing
"@.ai/instructions/<name>.md") to start with ```text or ```markdown instead of
bare ``` so the snippet is explicitly annotated.

In @.ai/skills/ai-add-prompt.md:
- Around line 49-50: The fenced code block containing the line
"@.ai/prompts/<name>.md" is missing a language identifier; update the
triple-backtick fence to include a language such as "text" or "markdown" (e.g.,
change ``` to ```text) so the block is explicitly typed and renders correctly in
markdown processors.

In @.ai/skills/ai-add-skill.md:
- Around line 52-53: The fenced code block that currently contains the literal
line "@.ai/skills/<name>.md" should include a language identifier for clarity;
update the triple-backtick fence so it starts with ```text (or ```markdown)
instead of just ``` to produce "```text" followed by the "@.ai/skills/<name>.md"
line and the closing triple-backticks, ensuring the snippet is identifiable as
plain text in the skills file.

In `@docs/plans/008-ai-customization-shared-layer.md`:
- Around line 138-140: Update the fenced code block that currently reads ```
followed by "@.ai/skills/plan-writing.md" to include the language specifier
"markdown" (i.e., change the opening fence to ```markdown) so the block is
lint-compliant; locate the code fence in the
docs/plans/008-ai-customization-shared-layer.md content where the snippet
"@.ai/skills/plan-writing.md" is shown and modify the opening triple backticks
accordingly.
- Around line 60-68: The fenced examples for the Claude skill and Claude prompt
are missing language specifiers which harms syntax highlighting; update the two
code fences that show `@.ai/skills/<name>.md` and `@.ai/prompts/<name>.md` so
they start with ```markdown (i.e., add the "markdown" language identifier to the
opening backticks for the snippets referencing `.claude/skills/<name>.md` and
`@.ai/skills/<name>.md`/`@.ai/prompts/<name>.md`) to satisfy linters and enable
proper highlighting.
🪄 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: ASSERTIVE

Plan: Pro Plus

Run ID: 10621e5f-5177-4e0e-ba0c-f00e045bdb01

📥 Commits

Reviewing files that changed from the base of the PR and between 26d6c5a and 476c7b4.

📒 Files selected for processing (33)
  • .ai/README.md
  • .ai/instructions/code-complexity.md
  • .ai/instructions/code-review.md
  • .ai/instructions/comments.md
  • .ai/instructions/jsdoc-tsdoc.md
  • .ai/instructions/plan-writing.md
  • .ai/instructions/security.md
  • .ai/instructions/unit-tests.md
  • .ai/skills/ai-add-instruction.md
  • .ai/skills/ai-add-prompt.md
  • .ai/skills/ai-add-skill.md
  • .ai/skills/plan-writing.md
  • .claude/settings.json
  • .claude/skills/ai-add-instruction.md
  • .claude/skills/ai-add-prompt.md
  • .claude/skills/ai-add-skill.md
  • .claude/skills/plan-writing.md
  • .github/instructions/code-complexity.instructions.md
  • .github/instructions/code-review.instructions.md
  • .github/instructions/comments.instructions.md
  • .github/instructions/jsdoc-tsdoc.instructions.md
  • .github/instructions/jsdoc.instructions.md
  • .github/instructions/performance.instructions.md
  • .github/instructions/plan-writing.instructions.md
  • .github/instructions/security.instructions.md
  • .github/instructions/unit-tests.instructions.md
  • .github/skills/ai-add-instruction/SKILL.md
  • .github/skills/ai-add-prompt/SKILL.md
  • .github/skills/ai-add-skill/SKILL.md
  • .github/skills/plan-writing/SKILL.md
  • .gitignore
  • CLAUDE.md
  • docs/plans/008-ai-customization-shared-layer.md
💤 Files with no reviewable changes (2)
  • .github/instructions/performance.instructions.md
  • .github/instructions/jsdoc.instructions.md

Comment thread .ai/instructions/code-review.md Outdated
Comment thread .ai/skills/ai-add-instruction.md Outdated
Comment thread .ai/skills/ai-add-prompt.md Outdated
Comment thread .ai/skills/ai-add-skill.md Outdated
Comment thread docs/plans/008-ai-customization-shared-layer.md Outdated
Comment thread docs/plans/008-ai-customization-shared-layer.md Outdated
ioncache and others added 2 commits May 21, 2026 00:26
- Update code-review.md to reference jsdoc-tsdoc (not jsdoc) and plan-writing, remove stale performance reference
- Add text language identifier to fenced blocks in maintenance skills and plan doc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ioncache ioncache merged commit 791d29e into main May 21, 2026
5 checks passed
@ioncache ioncache deleted the worktree-feat+ai-customization-shared-layer branch May 21, 2026 04:36
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.

1 participant