Skip to content

Add aidd-fix skill for structured bug fixing workflow#103

Merged
ericelliott merged 45 commits intomainfrom
claude/aidd-fix-pr-97-9vPbt
Mar 3, 2026
Merged

Add aidd-fix skill for structured bug fixing workflow#103
ericelliott merged 45 commits intomainfrom
claude/aidd-fix-pr-97-9vPbt

Conversation

@ericelliott
Copy link
Collaborator

@ericelliott ericelliott commented Feb 24, 2026

Description

Introduces a new aidd-fix skill that provides a structured, step-by-step process for fixing bugs and implementing review feedback. This skill enforces test-driven development (TDD) practices and ensures quality through mandatory e2e testing before commits.

Changes

  • ai/skills/fix/SKILL.md (new): Comprehensive skill documentation defining the 6-step AIDD fix process:

    1. Gain context and validate the issue
    2. Document requirements in task epics
    3. Write failing tests first (TDD)
    4. Implement the fix
    5. Review and run e2e tests
    6. Commit and push
  • ai/commands/aidd-fix.md (new): Command entry point that loads and executes the fix skill

  • AGENTS.md: Added task index mapping fix bug => /aidd-fix for discoverability

  • ai/rules/please.mdc: Registered the new 🐛 /aidd-fix command in the available commands list

Rationale

This skill standardizes the bug-fixing workflow across the team by:

  • Enforcing TDD discipline (failing test before implementation)
  • Requiring e2e validation before commits
  • Documenting requirements in task epics for traceability
  • Preventing common mistakes (skipping tests, committing without validation)
  • Providing clear, sequential steps that reduce decision fatigue

Test Plan

N/A — This is documentation and command registration. The skill will be validated through actual usage in bug-fixing workflows.

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z


Note

Medium Risk
Touches installer/CLI behavior and TypeScript config (NodeNext + checkJs), which can affect installs and downstream typechecking despite being mostly additive and well-tested.

Overview
Adds a new bug-fixing workflow command /aidd-fix and supporting skill docs, wiring it into please.mdc, AGENTS.md, and generated ai/**/index.md navigation.

Introduces an aidd-custom/ customization layer (docs + default config.yml + auto-generated index) and updates the installer (executeClone) and pre-commit hook to create/index it, while ensuring config.yml is never overwritten (even with --force) and dry-run output reports its status.

Refactors AGENTS.md directive management to include the new aidd-custom directive, avoid duplicating the auto-appended wrapper on upgrades, and aligns exports/types (camelCase constants, updated .d.ts). Adds lib/cli-core.d.ts, normalizes generateAllIndexes error shape, extends index generation to optionally index aidd-custom/, and turns on repo-wide JS typechecking (checkJs, NodeNext resolution) with new ambient/types and updated tests.

Written by Cursor Bugbot for commit eebf4ed. This will update automatically on new commits. Configure here.

- Add ai/skills/fix/SKILL.md: structured 6-step TDD fix process
- Add ai/commands/aidd-fix.md: command entry point for the skill
- Add 🐛 /aidd-fix to please.mdc Commands section
- Add task index mapping to AGENTS.md (fix bug => /aidd-fix)

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z
Copilot AI review requested due to automatic review settings February 24, 2026 23:29
Copy link
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 pull request introduces a new aidd-fix skill that standardizes the bug-fixing workflow by enforcing test-driven development (TDD) practices through a structured 6-step process. The skill ensures quality through mandatory test writing before implementation and e2e validation before commits, addressing common pitfalls in bug-fixing workflows.

Changes:

  • Adds comprehensive aidd-fix skill documentation with a 6-step AIDD fix process (context validation, epic documentation, TDD test writing, implementation, e2e testing, and commit)
  • Registers the new /aidd-fix command in the command system and available commands list
  • Adds task index mapping for bug-fixing discoverability

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ai/skills/fix/SKILL.md New skill file defining the complete 6-step AIDD fix process with constraints, requirements format, and test-driven workflow
ai/commands/aidd-fix.md Command entry point that loads and executes the fix skill
ai/rules/please.mdc Registers the new 🐛 /aidd-fix command in the available commands list
AGENTS.md Adds task index mapping "fix bug => /aidd-fix" for command discoverability

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

@ericelliott
Copy link
Collaborator Author

@cursoragent please /review

@cursor
Copy link
Contributor

cursor bot commented Feb 24, 2026

Now I'll conduct a thorough code review following the review.mdc guidelines.

🔬 Code Review - PR #97: Add aidd-fix skill for structured bug fixing workflow

Overview

This PR introduces a new /aidd-fix command and skill to standardize bug-fixing workflows with TDD discipline. The implementation follows existing patterns well but has several issues that need to be addressed before merge.


🎯 Review Analysis

Files Changed:

  • ai/skills/fix/SKILL.md (new)
  • ai/commands/aidd-fix.md (new)
  • AGENTS.md (updated)
  • ai/rules/please.mdc (updated)

⚠️ Issues Found

1. Missing Index Files - BLOCKING

Issue: The ai/skills/ directory is not discoverable via the progressive discovery pattern.

Evidence:

  • ai/skills/index.md does not exist
  • ai/skills/ is not listed in ai/index.md subdirectories section

Impact: Agents following AGENTS.md progressive discovery won't find the skills directory.

Root cause: The pre-commit hook hasn't run yet to auto-generate index files.

Resolution: This will auto-resolve when the pre-commit hook runs (node bin/aidd.js --index). However, should be verified before merge.


2. Incorrect File Reference - MEDIUM PRIORITY

Location: ai/skills/fix/SKILL.md:71

Current:

## Step 5 — Review and run e2e tests

Using `review.mdc`:

Issue: The reference "Using review.mdc" is incorrect:

  • Should reference the command pattern like other steps
  • The actual files are:
    • .cursor/rules/review.mdc (rule file, different path)
    • ai/commands/review.md (command file)

Recommended fix:

## Step 5 — Review and run e2e tests

Using `/review`:

This matches the pattern used in step 6 where it just references the command, not the implementation file.


3. Path Reference Inconsistency - LOW PRIORITY

Issue: Mixed reference styles throughout SKILL.md:

Line 33: "Using `task-creator.mdc`:"  ← rule file reference
Line 46: "Using `tdd.mdc`:"             ← rule file reference  
Line 71: "Using `review.mdc`:"          ← INCORRECT reference
Line 83: "Using `commit.md`:"           ← command file reference

Recommendation: Standardize to use command names (e.g., /review, /commit) for user-facing workflow references, reserving file paths for internal documentation only.


✅ Correct Implementations

Command Registration

  • ✅ Properly added to ai/rules/please.mdc commands list
  • ✅ Task index mapping added to AGENTS.md
  • ✅ Command file follows existing pattern in ai/commands/

Epic Requirements Format

  • ✅ "Given X, should Y" format matches task-creator.mdc template
  • ✅ Consistent with existing epics (e.g., tasks/form-csrf.md)

Frontmatter Structure

  • ✅ Includes required name and description fields
  • ✅ Adds helpful compatibility field

Workflow Structure

  • ✅ Six clear, sequential steps
  • ✅ Explicit constraints prevent common mistakes
  • ✅ TDD discipline properly enforced (test before implementation)
  • ✅ E2E validation required before commit

🔐 Security Review

Status: ✅ PASSED

No security concerns - this PR contains only documentation and workflow files with no:

  • Authentication/authorization logic
  • Sensitive data handling
  • Network operations
  • Runtime code execution

OWASP Top 10 Check: N/A (documentation only)


📊 Code Quality Assessment

Criterion Status Notes
Documentation clarity Clear, well-structured steps
Pattern consistency ⚠️ Minor inconsistencies in file references
Completeness All workflow steps covered
TDD discipline Properly enforces test-first
Error prevention Explicit constraints included
Discoverability ⚠️ Requires index generation

🏗️ Architecture Review

Separation of concerns: Command file cleanly delegates to skill file
Integration: Properly references existing tools (tdd.mdc, task-creator.mdc, review.mdc)
Workflow design: Systematic, prevents skipping steps
Traceability: Links requirements → epics → tests → code


📋 Actionable Recommendations

Required Before Merge:

  1. Fix file reference in ai/skills/fix/SKILL.md:71

    - Using `review.mdc`:
    + Using `/review`:
  2. Verify index generation - Run pre-commit hook or manually verify:

    node bin/aidd.js --index
    git add ai/**/index.md

Suggested Improvements (Optional):

  1. Add usage example to SKILL.md showing a minimal end-to-end bug fix

  2. Standardize references throughout SKILL.md to use command names (/review, /commit) instead of file paths

  3. Consider adding a brief "When to use" section to help agents decide when to invoke this skill vs. handling bugs directly


📝 Test Plan Review

Stated: "N/A — This is documentation and command registration."

Assessment: ✅ Appropriate. The skill will be validated through actual usage in bug-fixing workflows. No automated tests needed for documentation.


✨ Final Recommendation

Status: ⚠️ APPROVE WITH CHANGES

This PR provides valuable standardization for bug-fixing workflows and follows good patterns. The implementation is sound, but requires:

  1. Fixing the incorrect file reference on line 71
  2. Ensuring index files are generated before merge

Once these are addressed, the PR is ready to merge.

Risk Level: Low (documentation only, no runtime changes)


💬 Summary

This skill introduces a well-structured, systematic approach to bug fixing that enforces TDD discipline and prevents common mistakes. The step-by-step workflow with explicit constraints will help maintain code quality. Minor fixes needed before merge, but overall this is a valuable addition to the AIDD framework.

Open in Web Open in Cursor 

Replace file path references with command names throughout:
- task-creator.mdc → /task
- tdd.mdc → /task
- review.mdc → /review (incorrect file ref)
- commit.md → /commit

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z
@ericelliott
Copy link
Collaborator Author

@cursoragent please review fixes in 5f8744e

@cursor
Copy link
Contributor

cursor bot commented Feb 26, 2026

🔬 Review of Fixes - Commit 5f8744e

Summary of Changes

The commit attempted to standardize command references by replacing file path references with command names. Here's what changed:

Changes Made:

  • Line 34: task-creator.mdc/task
  • Line 45: tdd.mdc/task
  • Line 70: review.mdc/review
  • Line 83: commit.md/commit

⚠️ New Issue Introduced

Location: ai/skills/fix/SKILL.md:45

Problem: Step 3 incorrectly references /task command

## Step 3 — TDD: write a failing test first

Using `/task`:

Why This Is Wrong:

  • Step 3 is about writing tests using TDD principles
  • /task command is for creating and planning task epics
  • There is no /tdd command available in the system
  • The original reference to tdd.mdc was semantically correct (it's a rule file that provides TDD guidance)

Recommended Fix:

## Step 3 — TDD: write a failing test first

Following TDD principles from `tdd.mdc`:

OR remove the reference entirely since the step title already says "TDD":

## Step 3 — TDD: write a failing test first

1. Write a test that captures the new requirement

✅ Issues Resolved

  1. Line 70 fix - ✅ RESOLVED

    • Changed review.mdc to /review
    • This was the primary issue from the previous review
  2. Index files - ✅ RESOLVED

    • Running node bin/aidd.js --index generated:
      • ai/skills/index.md
      • ai/skills/fix/index.md
    • Updated ai/index.md to include skills/ subdirectory
    • However, these generated files are NOT committed yet

📊 Current Status

Issue Previous Status Current Status Notes
Missing index files ⚠️ BLOCKING ✅ RESOLVED Generated but need to commit
Incorrect review.mdc reference ⚠️ MEDIUM ✅ FIXED Line 70 now correctly uses /review
Mixed reference styles ⚠️ LOW ⚠️ PARTIALLY FIXED Improved but introduced new error on line 45

🚨 Remaining Issues

Critical Issue: Incorrect Step 3 Reference

The fix commit over-corrected and introduced a semantic error:

  • Before: Referenced tdd.mdc (a rule file, correct context)
  • After: References /task (wrong command for the context)

Impact: Agents following this workflow will invoke task planning when they should be applying TDD principles for test writing.


📋 Required Actions Before Merge

  1. Fix Step 3 reference in ai/skills/fix/SKILL.md:45

    • Either reference tdd.mdc (rule file)
    • Or remove the reference entirely
    • Do NOT reference /task
  2. Commit the generated index files:

    git add ai/index.md ai/commands/index.md ai/skills/index.md ai/skills/fix/index.md
    git commit -m "chore: generate index files for skills directory"

✨ Overall Assessment

Progress: The fix commit resolved the main issue (line 70) but introduced a new semantic error (line 45).

Recommendation: ⚠️ NEEDS ONE MORE FIX

The PR is very close to being ready. Once the Step 3 reference is corrected and index files are committed, this will be good to merge.

Next Steps:

  1. Fix line 45 reference issue
  2. Commit generated index files
  3. Final verification, then approve for merge

Open in Web Open in Cursor 

…mands block

- Drop "read please.mdc" constraint (already in every invoked command)
- Drop Step 3 item 4 (duplicates top-level "Never implement before writing a failing test")
- Drop "using /review" from Step 5 item 2 (redundant with section header)
- Remove Commands {} block (belongs in please.mdc, not the skill itself)

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z
Copilot AI review requested due to automatic review settings February 26, 2026 20:33
Copy link
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 4 out of 4 changed files in this pull request and generated 5 comments.


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

@ianwhitedeveloper
Copy link

🔬 Agent Skills Spec Cross-Reference

Cross-referencing ai/skills/fix/SKILL.md against the Agent Skills specification surfaced two issues:


🚨 name must match the parent directory name

The spec states:

name — Must match the parent directory name

The skill lives at ai/skills/fix/SKILL.md, so the directory name is fix. The frontmatter declares name: aidd-fix. These don't match — the skill fails spec validation.

Recommended fix: Rename the directory from fix/aidd-fix/. This aligns with the command name used everywhere else (please.mdc, AGENTS.md, ai/commands/aidd-fix.md) and has the side benefit of producing correctly named index files when the pre-commit hook runs.


🟡 Description is missing the "when to use it" clause

The spec says:

Should describe both what the skill does and when to use it. Should include specific keywords that help agents identify relevant tasks.

Agents load name + description at startup for all skills (~100 tokens) to decide whether to activate the skill. The current description covers what but not when, which reduces activation accuracy.

Recommended fix:

description: >
  Fix a bug or implement review feedback following the AIDD fix process.
  Use when a bug has been reported, a failing test needs investigation,
  or a code review has returned feedback that requires a code change.

compatibility field is valid per spec

A previous review flagged this as non-standard. To correct that: the spec explicitly defines and supports compatibility for environment requirements. The current value is a textbook correct use — no change needed.

Copilot AI review requested due to automatic review settings March 2, 2026 07:40
Copy link
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 4 out of 4 changed files in this pull request and generated 2 comments.


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

claude added 2 commits March 2, 2026 08:06
/review is review-only and must not imply executing commands.
Move `npm run test:e2e` to a standalone instruction and make
/review an optional follow-up for self-review.

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z
Copilot AI review requested due to automatic review settings March 2, 2026 08:07
claude added 3 commits March 2, 2026 08:09
Adds missing ai/skills/index.md and ai/skills/fix/index.md so the
aidd-fix skill is discoverable via the index system. Also updates
ai/index.md and ai/commands/index.md to reflect current directory state.

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z
New skills from main (aidd-ecs, aidd-layout, aidd-lit, aidd-namespace,
aidd-observe, aidd-react, aidd-service, aidd-structure) needed indexing.

https://claude.ai/code/session_01ESPcHDaPRBLaTxDspPMd3Z
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 00:18
Copilot AI review requested due to automatic review settings March 3, 2026 00:21
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 00:21
Copilot AI review requested due to automatic review settings March 3, 2026 00:23
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 00:23
Copilot AI review requested due to automatic review settings March 3, 2026 00:43
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 00:43
Copilot AI review requested due to automatic review settings March 3, 2026 00:44
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 00:44
Copilot AI review requested due to automatic review settings March 3, 2026 00:45
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 00:45
… declarations

- Switch tsconfig to NodeNext module resolution (supports import attributes,
  import.meta.url)
- Add paths for aidd/utils and aidd/server package self-imports in exports.test.js
- Install @types/node and @types/fs-extra
- Add d.ts sidecars for utils (async-pipe, pipe, compose) and lib/release-helpers
  so TypeScript uses declarations instead of checking .js implementations
- Add // @ts-check to all test files (per-file opt-in; avoids cascading checkJs
  into src/server implementation files)
- Fix implicit-any issues: let tempDir initializers, consoleSpy JSDoc type,
  catch-block error casts, optional chaining for .find() and parseFrontmatter results
Copilot AI review requested due to automatic review settings March 3, 2026 01:01
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 01:01
Tests now verify type correctness end-to-end. 88 type errors in src/server/
remain — tracked in the epic, to be fixed in follow-up tasks.
Copilot AI review requested due to automatic review settings March 3, 2026 01:16
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 01:16
- Add types/error-causes.d.ts ambient declaration (temporary local fix;
  upstream tracked at github.com//issues/109)
- Wire types/ into tsconfig include
- Annotate all implicit-any parameters in src/server/ with JSDoc @param
  and inline /** @type */ casts on destructured context arguments
- Fix headers nullability in with-auth.js getSession call
- Fix response.locals optional-chaining via any cast in with-auth.js
- Fix Record<> index signature in with-config.js loadConfigFromEnv
- Fix asyncPipe spread cast and sanitizeHeaders type in create-route.js
- Fix createServer mock return cast in test-utils.js
Copilot AI review requested due to automatic review settings March 3, 2026 01:25
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 01:25
Co-authored-by: Eric Elliott <support@paralleldrive.com>
Copilot AI review requested due to automatic review settings March 3, 2026 01:38
@ericelliott ericelliott review requested due to automatic review settings March 3, 2026 01:38
@ericelliott ericelliott merged commit c6f9ab6 into main Mar 3, 2026
7 checks passed
@ericelliott ericelliott deleted the claude/aidd-fix-pr-97-9vPbt branch March 3, 2026 01:47
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.

7 participants