/engine-patches:investigatefrom AI-DLC patches
Use to investigate a bug in the AI-DLC engine (awslabs/aidlc-workflows) in the person's fork — reproduce it, find the cause in the engine source (core/tools/*.ts), and write a test that fails for that cause. Triggers — "why does aidlc refuse this", "find the cause of this engine bug", "reproduce the pin deadlock", "write a failing test for it", an `aidlc engine …` refusal or wrong next_stage pasted from a project. Read-only toward the fork's main; it writes only a test on a branch of its own.
Ships in AI-DLC patches. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
FORKS, here and in the reference files, is python3 "${CLAUDE_PLUGIN_ROOT}/scripts/forks.py" --data "${CLAUDE_PLUGIN_DATA}", exactly as written on this page (the reference files show only the
name).
${CLAUDE_PLUGIN_ROOT}/references/fork.md and do what it says. Read
${CLAUDE_PLUGIN_ROOT}/references/lessons.md once. Work in a worktree of the clone on a new
branch from origin/main: git -C <clone> worktree add <path> -b investigate/<slug> origin/main.Write down, before touching code:
next_stage, the hang);aidlc --version on the machine, and the project's .aidlc-version;Missing pieces: ask the person. Do not open or message the project's live sessions to find out (lessons, "People and sessions"). Read the project's files, its audit shards and state, read-only.
Check the fork's patch notes (its "known bugs" list, its open patch branches) and the fork's open
issues and PRs: gh issue list --repo <fork>, gh pr list --repo <fork>. The bug may already be
known or half-done.
Smallest first:
covers:
headers: grep -rl 'covers:.*<function or subcommand>' tests/. Extend its scenario or copy its
setup.Run the engine as the fork builds it. If the fork has a script that installs the checkout as a local test build, use that, with a test version string that cannot be mistaken for a release. Retry on a lock message (lessons, "Running things on a shared machine").
Show the reproduction failing the same way the person saw it. If it does not, say what differs and stop.
core/tools/*.ts for the refusal text or the field that is wrong. Follow the call chain to
the decision that goes wrong. Note it as core/tools/<file>.ts:<line>.git log -L <start>,<end>:core/tools/<file>.ts --oneline or
git blame. Then, is it upstream's code or one of the fork's patches?
git log --oneline <base>..origin/main -- core/tools/<file>.ts.
check-upstream looks for an upstream fix next.series step.Put it where the owning tests live, usually tests/unit/. Name it like its neighbours
(t-<what>.test.ts). Start it with a covers: header and a comment: what broke, why, and what
is now true.
Assert the specific wrong behaviour (the refusal text, the stage name), not just a non-zero exit.
Run only that file, outside the session's markers:
env -u CLAUDECODE -u CLAUDE_CODE_SESSION_ID bash tests/run-tests.sh --unit --filter '^<name>\.test\.ts$'
It must fail on the fork's main. If the cause is upstream's code, it must also fail on the
base tag with only the test applied: git worktree add <tmp> <base>, copy the test in, run it.
Commit the test alone on the branch: test(<scope>): <what must be true>. Typecheck and lint it
(bun scripts/package.ts && bun run typecheck && bun run lint).
Tell the person, in a few lines:
core/tools/<file>.ts:<line>, and whose code it is (upstream, or patch NN);main (and on <base> for an upstream bug);Then run check-upstream. Skip it only when the cause is one of the fork's own patches, not one
carried from an upstream PR: that goes straight to series, "Change a patch".
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub maksymskuibida/mskuibida-ai-tools --plugin engine-patches7 skills in this plugin
/check-upstreamUse before patching the AI-DLC engine in the person's fork, and before moving the fork to a newer upstream release — check whether upstream (awslabs/aidlc-workflows) already fixes the bug or is about to — upstream main since the fork's base tag, newer stable and preview releases, and open and merged upstream PRs and issues touching the same code — then decide: drop the patch, carry upstream's PR, or write our own. Triggers — "does upstream fix this already", "is there an upstream PR for it", "check upstream before we patch", "can we drop patch 07 now"./fixUse when the person wants an AI-DLC engine bug fixed in their own fork of awslabs/aidlc-workflows, end to end — "fix this aidlc bug in my fork", "patch the engine so pin stops deadlocking", "the engine refuses report --result skipped, fix it and release". Runs the plugin's steps in order: investigate, check upstream, add the patch to the series, release, roll into projects, and offer an upstream PR. For one step alone, use that step's skill./forksUse to see, add, change or remove the forks of the AI-DLC engine (awslabs/aidlc-workflows) this person patches — "which forks do I have", "add my fork alice/aidlc-workflows", "my clone of it is at ~/src/aidlc", "forget that fork", "use the other fork" — and whenever the person names a fork of the engine this plugin has not saved yet. The list is kept in the plugin's data folder, so it survives plugin updates.