Version 1.10.0#23
Conversation
detect() used existsSync which returns true for files — mkdir then fails with ENOTDIR when trying to create subdirectories inside it. Co-Authored-By: Claude Opus 4.6 (1M context) via AIContext
"(optional)" label caused the AI to skip local runs every time, treating CI as the verification loop instead. Co-Authored-By: Claude via AIContext
Old rule "each new task means a new version" caused the AI to increment versions on its own instead of using the branch name. Co-Authored-By: Claude via AIContext
Co-Authored-By: Claude via AIContext
"No — create one" and "No — skip" shared a prefix that caused the AI to collapse them into a single option. Co-Authored-By: Claude via AIContext
TDD rules and planning guidelines were loaded at session start but forgotten by plan-creation time. Moving them to a dedicated prompt that loads when needed fixes the attention gap. TDD is now config-driven (tdd: true|false|ask). Co-Authored-By: Claude via AIContext
Prompts relied on stale session-start context for branch identity. Now resolve-task-naming, finish-task, and draft-pr explicitly run git status first. Also fixes git log triple-dot to double-dot in draft-pr (triple-dot includes noise from base branch commits). Co-Authored-By: Claude via AIContext
After step creation, only /run-step is relevant — /do-it is for when no step exists yet. Co-Authored-By: Claude via AIContext
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthroughThis PR extracts TDD-aware planning rules into ChangesPlanning Rules Centralization & Prompt + Docs Updates
Assistant Detection, Installer, and CLI Messaging
Sequence DiagramsequenceDiagram
participant User
participant Config as Config/Validation
participant Prompt as Planning Prompt
participant Exec as CLI/Executor
User->>Config: Load repo config (includes `tdd`)
Config->>Config: Validate required keys (tdd, after_step.*, after_task.*)
alt tdd missing or ask
Config->>User: Prompt to resolve `tdd` (yes/no)
end
User->>Prompt: Invoke planning (start-feature/create-task/add-step)
Prompt->>Prompt: Read `tdd` value
alt tdd == true
Prompt->>Prompt: Emit test-first plan steps (test → implement → verify)
else tdd == false
Prompt->>Prompt: Emit standard ordered plan steps
end
Prompt->>Exec: Execute actions (run-step, finish-task, push)
Exec->>Exec: Run git checks (`git status`) and assistant detection (`isDirectory(...)`)
Exec->>User: Ask for confirmations when branch/HEAD invalid or push needed
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
bin/aicontext.js (1)
58-76:⚠️ Potential issue | 🟠 Major | ⚡ Quick winHandle assistant-path file collisions before install (regression in
add-assistant).Directory-only detection is correct, but on Line 1059/Line 1068 a file at
.claude/.cursor/.codexis now treated as “not installed,” then install crashes when writing directories. Add an explicit preflight conflict check inaddAssistant(and ideally shared for install flows).💡 Suggested fix
async function addAssistant(name, targetDir, skipConfirm = false) { const target = path.resolve(targetDir || '.'); @@ const assistant = ASSISTANTS[name]; + const assistantPath = path.join(target, assistant.folder.replace(/\/$/, '')); + const isDirAssistant = ['claude', 'cursor', 'codex'].includes(name); + if (isDirAssistant && fs.existsSync(assistantPath) && !isDirectory(assistantPath)) { + log(`Cannot install ${assistant.label}: ${assistantPath} exists as a file.`, 'red'); + log('Rename/remove the file, then retry.', 'dim'); + return; + } + if (assistant.detect(target)) { log(`${assistant.label} (${assistant.folder}) is already installed.`, 'yellow'); log(`Run \`aicontext update\` to refresh it.`, 'dim'); return; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@bin/aicontext.js` around lines 58 - 76, The install path check is missing a preflight for file-vs-directory collisions causing installs to crash when a file exists at the assistant folder (e.g. ".claude", ".cursor", ".codex"); update addAssistant to call a shared helper (e.g. ensureAssistantTargetIsDirectory or validateInstallTarget) before performing installs so it checks path existence and type and fails fast or prompts when the target exists as a file, and reuse that helper from install flows that call copyRecursive, copyFrameworkAgents, and copyFrameworkSkills; also ensure the per-assistant detect methods remain directory-only but the installer always verifies the target is a directory (or empty/non-existent) before writing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.aicontext/prompts/add-step.md:
- Line 36: Update the confirmation text that currently reads "Show the step that
was added" to handle both the new-add and existing-step flows: detect the
"existing-step" path and use a neutral message like "Show the step that was
added or the existing step referenced" (or similar) so it does not assume a new
add; also prompt the user to execute the step with "/run-step". Locate the
phrase "Show the step that was added" and the "existing-step" path in
add-step.md and replace the hardcoded confirmation with this conditional/neutral
wording and include the suggested "/run-step" instruction.
In @.aicontext/prompts/finish-task.md:
- Line 68: The prompt's instruction for after_task.push that runs "git status"
then "git push -u origin {current-branch}" lacks explicit abort checks; update
the prompt so after_task.push first inspects git status output and aborts if any
fail-fast conditions are detected (detached HEAD, no current branch name,
unmerged/uncommitted changes, or branch mismatch against expected
{current-branch}), instructing the agent to stop and report the exact condition
instead of running git push; reference the after_task.push step and the git push
-u origin {current-branch} action so the agent performs these verifications and
only proceeds to push when all checks pass.
In @.aicontext/prompts/resolve-task-naming.md:
- Line 40: The fallback description incorrectly says to "extract branch name via
task_naming.branch_pattern" — update the wording so it clearly states that when
task_naming.source is unset you should infer package-json if package.json has a
version field, otherwise use git-branch and run git status to extract the
{version} token using task_naming.branch_pattern (i.e., the pattern is used to
derive {version}, not the branch name); adjust the sentence to replace "branch
name" with "{version}" and make clear the pattern maps branch text to the
{version} value.
In @.aicontext/prompts/review-task.md:
- Line 11: The TDD enforcement in the review-task prompt currently flags
test-first violations whenever config.tdd is true; update the check so it
mirrors plan-steps.md by skipping the TDD gate when the plan indicates
"no-tests" (i.e., when the task/plan contains the no-tests marker or explicit
absence of tests). Concretely, modify the TDD structure logic that reads the tdd
flag to also inspect the plan metadata (the same no-tests condition used in
plan-steps.md) and only enforce test-first rules for functions/steps under
/review-task when tdd is true AND no-tests is not set.
---
Outside diff comments:
In `@bin/aicontext.js`:
- Around line 58-76: The install path check is missing a preflight for
file-vs-directory collisions causing installs to crash when a file exists at the
assistant folder (e.g. ".claude", ".cursor", ".codex"); update addAssistant to
call a shared helper (e.g. ensureAssistantTargetIsDirectory or
validateInstallTarget) before performing installs so it checks path existence
and type and fails fast or prompts when the target exists as a file, and reuse
that helper from install flows that call copyRecursive, copyFrameworkAgents, and
copyFrameworkSkills; also ensure the per-assistant detect methods remain
directory-only but the installer always verifies the target is a directory (or
empty/non-existent) before writing.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e5a6b109-8206-41c6-a7ed-0cde103d8888
📒 Files selected for processing (19)
.aicontext/prompts/add-step.md.aicontext/prompts/aic-help.md.aicontext/prompts/create-task.md.aicontext/prompts/draft-pr.md.aicontext/prompts/ensure-config.md.aicontext/prompts/finish-task.md.aicontext/prompts/gh-fix-tests.md.aicontext/prompts/plan-steps.md.aicontext/prompts/plan-tasks.md.aicontext/prompts/resolve-asks.md.aicontext/prompts/resolve-task-naming.md.aicontext/prompts/review-task.md.aicontext/prompts/start-feature.md.aicontext/prompts/start.md.aicontext/readme.md.aicontext/rules/process.md.aicontext/rules/standards.md.aicontext/templates/config.template.ymlbin/aicontext.js
…ts gate
Adds fail-fast before push when HEAD is detached or branch name is
unavailable. Fixes "extract branch name" → "extract {version}" wording.
Mirrors plan-steps.md "skip when no tests" rule in review-task TDD check.
Co-Authored-By: Claude via AIContext
Co-Authored-By: Claude via AIContext
Configurable TDD, plan-steps extraction, branch verification, git range fix, misleading next-action fix. Co-Authored-By: Claude via AIContext
Summary
tdd: true | false | ask) — agents assess testability per step and apply test-first only when configuredplan-steps.mdprompt loaded at plan-creation time, reducing session-start context by ~62 lines fromprocess.mdgit statusbefore remote operations (push, PR creation, version extraction from branch)git logtriple-dot to double-dot indraft-pr.mdfor correct commit range/do-itsuggestion after/add-stepwhen step already existsTest plan
node --test test/*.test.jspasses (171 tests)/create-taskon agit-branchsource project runsgit statusand extracts version correctly/finish-taskwithpush: trueverifies branch before pushing/add-steponly suggests/run-stepin confirmationtdd: trueproduces test-first plan steps;tdd: falseskips TDD assessmentSummary by CodeRabbit
New Features
Improvements
Documentation