Skip to content

Version 1.8.0#21

Merged
zahardev merged 20 commits into
mainfrom
version/1.8.0
Apr 13, 2026
Merged

Version 1.8.0#21
zahardev merged 20 commits into
mainfrom
version/1.8.0

Conversation

@zahardev

@zahardev zahardev commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Add PR workflow automation, local version cache, project maintenance, and quality-of-life improvements

Summary

  • PR workflow gatesafter_task.pr and after_task.review_loop config options let /finish-task auto-create PRs and run the review-fix loop. pr.save_to_file and pr.create_in_github prevent accidental GitHub PR creation. Resumable /finish-task supports deferred close for external review workflows
  • Local version cache/start update check reads .aicontext/data/version.json instead of /tmp/ shared cache. CLI seeds the cache during init and update. Faster startup, no extra permission prompts
  • Project maintenance/tidy-aic archives completed tasks/specs and cleans session artifacts. /prepare-release changelog detection scoped to project root
  • ESM compatibility — PR scripts renamed from .js to .cjs to fix "require is not defined" in projects with "type": "module"
  • Review improvements — explicit playbook paths prevent wrong criteria from being used. Config vocabulary renamed partial/fullnormal/deep with auto-migration
  • Issue ID flow/create-task offers to create a GitHub issue inline when {issue_id} is in the naming pattern
  • "Brief" renamed to "task-context" — clearer name, aicontext update migrates automatically
  • TDD-aware planning — AI checks for existing tests before writing plans
  • start.md fix — no longer skips project generation in VSCode parallel reads
  • Misc fixes — negative happy-path labels in prompts, option-label rule in Question UX

Test plan

  • Run node --test test/cli.test.js — all 128 tests pass
  • aicontext init in a fresh directory creates .aicontext/data/version.json
  • aicontext update on an older install refreshes version.json and removes old .js scripts
  • /start reads version cache without permission prompts
  • PR scripts work in a project with "type": "module" in package.json

Summary by CodeRabbit

  • New Features

    • Added /tidy-aic to archive completed work and clean session artifacts.
    • Draft Issue and Draft PR flows can create GitHub items interactively and persist choices; created issue IDs can be auto-filled into new tasks.
  • Enhancements

    • Renamed “Brief” → “Task‑Context” with new templates and migration.
    • Review/tests vocabulary changed to normal/deep.
    • Per-project version cache added; finish-task can defer/resume with PR/review-loop gating.
  • Bug Fixes

    • Fixed startup race in project generation; improved PR workflow compatibility.
  • Chores

    • Consolidated session init and deprecated auto-setup.

zahardev added 17 commits April 11, 2026 14:24
Co-Authored-By: Claude via AIContext
Inline auto-setup.md into start.md with explicit sequential gate to
prevent VSCode extension from batching reads and bypassing the
project.md existence check.

Co-Authored-By: Claude Opus 4.6 via AIContext
Prevents accidental GitHub PR creation by adding pr.save_to_file and
pr.create_in_github config (mirrors issue config). Integrates PR
drafting and review loop as optional gates in finish-task with
resumable close for deferred PR review workflows.

Co-Authored-By: Claude Opus 4.6 via AIContext
Projects with "type": "module" break CommonJS scripts. The .cjs extension
forces Node to use CommonJS regardless. Old .js files are cleaned up during
aicontext update via DEPRECATED_SCRIPTS.

Co-Authored-By: Claude via AIContext
"No — proceed" replaced with "Looks good — proceed" in scope check;
"(Y/n)" replaced with numbered options using "Not yet" in mark-done.

Co-Authored-By: Claude via AIContext
Prompts that need Recommended/default already specify it; don't add
it automatically from tool-level defaults.

Co-Authored-By: Claude via AIContext
…laybook paths

The old names were unintuitive — "partial" and "full" didn't map to the
playbook names (review.md / deep-review.md). New vocabulary makes the
connection self-evident. Old values accepted as aliases, silently migrated.

Co-Authored-By: Claude via AIContext
Version check now uses .aicontext/data/version.json instead of /tmp,
eliminating permission prompts and reducing /start execution time.

Co-Authored-By: Claude via AIContext
…sions

The --cache flag never worked (checkVersion ignored it, schema mismatch).
Replace with convention: `aicontext version <path>` writes cache to
.aicontext/data/version.json with cliVersion, currentVersion, latestVersion.
Prompt now offers upgrade vs update based on two-version comparison.

Co-Authored-By: Claude via AIContext
So /start never hits the missing-cache codepath on first run.
Also fixes || → ?? in writeVersionCache to avoid coercing falsy strings.

Co-Authored-By: Claude via AIContext
When {issue_id} is in the naming pattern, offer provide/create/skip
instead of just asking for the number.

Co-Authored-By: Claude via AIContext
"Brief" was unclear and frequently skipped by AIs. "Task-context" is
self-describing and aligns with the project name. Also flattens
check-task's numbered read steps into a single gate to prevent skipping.

Co-Authored-By: Claude via AIContext
Plans now check for existing tests and structure testable steps as
test-first. review-task-plan flags plans that skip this when tests exist.

Co-Authored-By: Claude via AIContext
Recursive globs for CHANGELOG* and README* get truncated by
vendor/node_modules matches before reaching the root-level file.

Co-Authored-By: Claude via AIContext
Archives completed tasks/specs, deletes session artifacts, moves
done worklog entries to archive/. Also fixes distributed .gitignore
that was incorrectly ignoring specs/ and worklog.md for user projects.

Co-Authored-By: Claude via AIContext
Merged brief-to-task-context, tdd-planning-enforcement, and tidy-aic
specs into the main 1.8.0 spec. Consolidated archived worklog entries
under one heading.

Co-Authored-By: Claude via AIContext
Highlight PR workflow automation, /tidy-aic, /prepare-release,
issue ID flow, and end-to-end pipeline in README.
Bump version to 1.8.0.

Co-Authored-By: Claude via AIContext
@zahardev zahardev changed the title Add PR workflow automation, local version cache, project maintenance, and quality-of-life improvements Version 1.8.0 Apr 13, 2026
@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR updates the framework to v1.8.0: renames the "brief" layer to "task-context", introduces per-project version caching, adds configurable PR/issue Save/Create flows and finish-task PR gating, renames PR scripts to CommonJS (.cjs), adds a /tidy-aic archival skill, and migrates prompts/templates/tests/docs to the new flows and vocabularies.

Changes

Cohort / File(s) Summary
Prompts & UX flows
.aicontext/prompts/... (add-step.md, align-context.md, check-task.md, close-step.md, create-task.md, draft-pr.md, finish-task.md, gh-review-fix-loop.md, run-step.md, run-task.md, start-feature.md, step-loop.md, check-update.md, start.md, etc.)
Renamed "brief" → "task-context" across read/write paths and Decision Overrides; changed review/tests vocab (`partial
Templates & data layout
.aicontext/templates/..., .gitignore
Deleted brief.template.md, added task-context.template.md and linked task template; updated .gitignore and data paths to use .aicontext/data/task-context/ and allow specs/worklog to be tracked.
CLI & core logic
bin/aicontext.js
Added per-project version cache helpers (writeVersionCache), made checkVersion async, seed/refresh .aicontext/data/version.json, add migration from data/briefdata/task-context, introduced DEPRECATED_SCRIPTS and deprecated-script cleanup, and adjusted flag parsing/version command behavior.
Scripts & references
.aicontext/scripts/pr-reviews.cjs, .aicontext/scripts/pr-resolve.cjs, prompts/docs referencing them, bin/aicontext.js
Renamed PR workflow scripts to .cjs, updated help/command strings and prompt references, and remove old .js during update.
New skill: tidy-aic
.aicontext/prompts/tidy-aic.md, .claude/skills/tidy-aic/SKILL.md, .codex/skills/tidy-aic/SKILL.md, docs updates
Added /tidy-aic prompt/skill to archive completed tasks/specs/session artifacts with confirmation and worklog consolidation.
Tests
test/cli.test.js, test/pr-reviews.test.js, test/pr-resolve.test.js
Updated imports to .cjs, added tests for per-project version cache and writeVersionCache, adjusted framework prompt/skill expectations and script-copy/remove assertions.
Docs, READMEs & changelog
README.md, CHANGELOG.md, docs/*.md, .aicontext/readme.md
Documented task-context rename, version-cache behavior, PR/issue config options, tidy-aic, vocabulary updates, and bumped package version to 1.8.0.
Archive/specs & tasks
.aicontext/archive/specs/*, .aicontext/archive/tasks/*, .aicontext/archive/worklog.md
Added many spec/task archival documents describing planned/implemented framework changes (documentation-only).
Skill metadata & frontmatter
.claude/skills/*/SKILL.md, .codex/skills/*/SKILL.md
Updated skill frontmatter/descriptions to reference task-context, added allowed-tools for start, and registered tidy-aic skill.
Config template & migration
.aicontext/templates/config.template.yml, .aicontext/prompts/ensure-config.md
Updated config vocab to `normal

Sequence Diagram(s)

sequenceDiagram
  participant User as User
  participant CLI as aicontext CLI/Skill
  participant FS as Local FS (.aicontext/data/)
  participant GH as GitHub (gh CLI)

  User->>CLI: invoke /draft-issue or /draft-pr
  CLI->>FS: load ensure-config (issue/pr.create_in_github, save_to_file)
  alt create_in_github = ask
    CLI->>User: prompt "Create on GitHub? (y/N)"
    User-->>CLI: yes/no
    alt yes
      CLI->>FS: write temp body file
      CLI->>GH: run gh issue/pr create --body-file {tmp}
      GH-->>CLI: return URL & ID
      CLI->>FS: remove temp file
      alt save_to_file = true
        CLI->>FS: write draft to .aicontext/data/{issue|pr}-drafts/
      end
      CLI->>FS: optionally persist create_in_github/save_to_file in config.yml
    else no
      alt save_to_file = true
        CLI->>FS: write draft to .aicontext/data/{issue|pr}-drafts/
      end
    end
  else if create_in_github = true
    CLI->>FS: write temp body file (if needed)
    CLI->>GH: run gh issue/pr create
    GH-->>CLI: return URL & ID
    CLI->>FS: write draft if configured
  else
    alt save_to_file = true
      CLI->>FS: write draft file only
    end
  end
  CLI->>User: return draft URL/ID or file path
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Version 1.5.1 #17: Changes to bin/aicontext.js version-check/cache helpers and related CLI behavior.
  • Version/1.6.0 #18: Overlaps on prompt/template/skill renames and context-layer migration (brief → task-context).
  • Version/1.7.0 #19: Expands framework config, draft-issue/PR flows, version-cache, and script rename work that this PR continues.

Poem

🐰 I hopped through briefs and left a trace,
Task‑context now keeps the working space.
Tidy‑aic sweeps the old away,
GH gates open when you say.
Cache is local, scripts turned CJS — hurray!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch version/1.8.0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 11

🧹 Nitpick comments (5)
.aicontext/archive/tasks/1.6.0-web-inspect-skill.md (1)

42-42: Use markdown link syntax for attribution consistency.

Consider formatting the raw URL as a markdown link for cleaner rendering in docs.

Suggested doc-only tweak
-- Link to https://github.com/microsoft/playwright-cli (Apache 2.0)
+- Link to [microsoft/playwright-cli](https://github.com/microsoft/playwright-cli) (Apache 2.0)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/archive/tasks/1.6.0-web-inspect-skill.md at line 42, Replace the
raw URL text "Link to https://github.com/microsoft/playwright-cli (Apache 2.0)"
with markdown link syntax so it renders consistently—e.g. change that line to
use [playwright-cli](https://github.com/microsoft/playwright-cli) and preserve
the "(Apache 2.0)" license note; locate the exact line containing the raw URL
text in .aicontext/archive/tasks/1.6.0-web-inspect-skill.md and update it
accordingly.
.aicontext/prompts/check-update.md (1)

22-22: Platform dependency: Bash date command.

The date command is Bash-specific and won't work on Windows without WSL or Git Bash. This assumes users run the framework in a Unix-like environment.

If cross-platform compatibility is desired, consider documenting this requirement or using a portable alternative (e.g., Node.js Date API called via a helper script).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/prompts/check-update.md at line 22, The prompt currently calls
the Bash-only `date` command which breaks on Windows; replace that
platform-dependent usage of `date` in .aicontext/prompts/check-update.md with a
cross-platform alternative (e.g., call Node.js to emit the current date with
`node -e "console.log(new Date().toISOString())"` or add a small helper script
like get-date.js and invoke it), or explicitly document the Unix-only
requirement in the prompt; update references to the `date` command to point to
the chosen cross-platform method and ensure the output format is consistent.
.aicontext/prompts/finish-task.md (2)

61-76: Deferred close pattern adds workflow complexity.

The conditional worklog update with deferred close (lines 70-75) is a thoughtful design for external PR review workflows. However, it requires users to remember to re-run /finish-task after completing their PR review.

Consider whether documentation should highlight this two-phase completion pattern, especially for teams using pr.create_in_github: false.

Not blocking - the resumed run detection (Step 7) handles this gracefully. Just noting the UX complexity for future reference.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/prompts/finish-task.md around lines 61 - 76, Add a short
documentation note explaining the two-phase completion pattern used when no
remote PR is created (e.g., pr.create_in_github: false) and the user must re-run
/finish-task after PR review; update the "Update Worklog (conditional)" prompt
text near the choices and the deferred-summary string ("Task verified. Run
/finish-task again after PR review to mark done.") to explicitly tell users they
must re-run /finish-task to actually mark the task done and reference the
resumed-run detection in Step 7 for clarity.

59-59: Error handling for missing GitHub CLI is partially addressed through documentation.

The GitHub CLI requirement is already documented in README.md line 75, explicitly stating that these scripts need GitHub CLI installed and authenticated. The 2>/dev/null suppression in the gh pr view check is reasonable—when the command fails (due to missing gh, authentication issues, or missing remote), the prompt treats it the same as "no PR exists" and follows the skip path, which is sensible behavior.

However, users without gh installed won't receive explicit feedback about why the PR check was skipped. Adding a note to summarize when the command fails (e.g., "Check skipped—ensure gh is installed and authenticated if you expect a PR to exist") would improve user experience without adding complexity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/prompts/finish-task.md at line 59, Update the finish-task prompt
text around the after_task.review_loop behavior to explicitly inform users when
the GitHub CLI check is skipped; reference the exact command used (`gh pr view
--json number 2>/dev/null`) and add a short sentence like "Check skipped —
ensure `gh` is installed and authenticated if you expect a PR to exist" so users
without `gh` get actionable feedback; keep the existing control flow (delegating
to gh-review-fix-loop.md when a PR exists and deferring close when none) and
mention the /finish-task flow for manual PR creation.
.aicontext/archive/specs/spec-1.7.0-framework-improvements.md (1)

277-280: Optional: add a historical-value note to prevent copy/paste mistakes.

This archived spec still references partial/full. Consider adding a one-line note that v1.8.0 renamed these to normal/deep, so readers don’t reuse deprecated values in current configs.

Also applies to: 423-423

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/archive/specs/spec-1.7.0-framework-improvements.md around lines
277 - 280, Add a one-line historical-note in
spec-1.7.0-framework-improvements.md near the section that lists "Review/tests
take scope values (`partial | full | false | ask`)" stating that in v1.8.0
`partial` and `full` were renamed to `normal` and `deep` to avoid copy/paste
errors; update the note to also call out the related mention at the other
occurrence (around line 423) so readers and config.yml users know those old
tokens are deprecated and should use `normal`/`deep` instead.
🤖 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/archive/tasks/1.6.0-dev-flow-v2.md:
- Around line 113-115: The completion summary line "All 11 steps complete." is
out of sync with the document which now has 14 numbered steps; update that
sentence to "All 14 steps complete." (or otherwise match the actual step count)
in the archived task content so the summary accurately reflects the count—look
for the exact phrase "All 11 steps complete." in the file and replace it to
match the current total steps.

In @.aicontext/archive/tasks/1.7.0-plan-and-commit-hygiene.md:
- Line 63: The committed note contains a machine-specific absolute path
"/home/sezar/.claude/projects/-home-sezar-Work-AIContext/memory/feedback_conciseness_gold_standard.md"
on the line that documents "Feedback memory saved"; redact this by replacing the
absolute path with a generic placeholder (e.g.,
"/home/<user>/.../memory/feedback_conciseness_gold_standard.md" or
"./memory/feedback_conciseness_gold_standard.md") so the entry in the file
referencing feedback_conciseness_gold_standard.md and the MEMORY.md index is not
tied to a specific username or machine.

In @.aicontext/archive/tasks/1.7.0-spec-traceability.md:
- Line 36: Update the checked plan item in
.aicontext/archive/tasks/1.7.0-spec-traceability.md so it matches the final
"Spec Lifecycle" rule in .aicontext/rules/process.md under "Task File
Management": reconcile the contradiction by editing the checklist text to
reflect the same lifecycle policy described in the rule and Completion Notes
(i.e., whether requirements remain forever or are removed/moved once fixed), and
ensure the phrase "Spec Lifecycle" and the bullet text use identical wording so
audits are not misled.

In @.aicontext/archive/tasks/1.7.0-step-lifecycle-config.md:
- Line 98: The relative link to standards.md is incorrect (it currently points
to ".aicontext/rules/standards.md" from .aicontext/archive/tasks/), so update
the link in .aicontext/archive/tasks/1.7.0-step-lifecycle-config.md that
references "standards.md" to use the correct relative path
"../../rules/standards.md" so it resolves to .aicontext/rules/standards.md;
locate the markdown link text that mentions standards.md and replace the target
accordingly.

In @.aicontext/archive/tasks/1.8.0-pr-workflow-integration.md:
- Around line 23-24: The archived task text incorrectly states defaults for
after_task.pr and after_task.review_loop as false whereas the shipped template
now uses "ask"; update the document text around the checklist to either change
the documented defaults to after_task.pr: ask and after_task.review_loop: ask,
or add a clear note explaining that the template defaults changed to "ask" after
this historical version (referencing the symbols after_task.pr and
after_task.review_loop and the checklist lines mentioning them).

In @.aicontext/prompts/draft-pr.md:
- Around line 41-42: The instruction for the pr.create_in_github branch should
guarantee the temporary file is removed regardless of whether the gh pr create
command succeeds or fails; update the wording to say "write the body to a temp
file, run gh pr create --title \"{title}\" --body-file {tmp_file}, show the URL
if creation succeeds, and always delete the temp file (use a finally/ensure or a
context manager) so cleanup happens even on failure"—refer to the
pr.create_in_github flag, the gh pr create invocation, and the temp file to
locate and revise the text.
- Line 41: The PR creation prompt omits the configured base branch: when
pr.create_in_github is true and the flow writes the body to a temp file then
runs gh pr create --title "{title}" --body-file {tmp_file}, add --base
"{project.base_branch}" to that gh pr create invocation (and likewise to the
other gh pr create occurrence in this prompt) so the created PR targets
project.base_branch instead of the repository default; ensure both gh pr create
command templates include --base "{project.base_branch}" before showing the URL
and deleting the temp file.

In @.aicontext/prompts/run-step.md:
- Line 7: Update the task-context read path in run-step.md so it matches the
actual filenames created by the template: change references to
".aicontext/data/task-context/context-{task-filename}" to include the ".md"
extension (i.e., ".aicontext/data/task-context/context-{task-filename}.md") so
the step runner will find existing context files; ensure the string used in the
"read the task file, spec (if linked), and task-context" step inside run-step.md
is updated accordingly.

In @.aicontext/prompts/tidy-aic.md:
- Around line 47-50: The archive creation step is missing stable headings, so
before appending ensure archive/worklog.md exists and contains top-level
headings "## Done" and "## Standalone Tasks" (with at least an empty placeholder
under each); if the file is created, write those headings first, and on
subsequent runs locate those headings and append the moved content under the
appropriate section (append full `## Done` section content to the "## Done"
heading and checked entries into the "## Standalone Tasks" heading), then remove
the moved content from worklog.md while leaving the two headings present and
empty.

In `@bin/aicontext.js`:
- Around line 786-805: Update the 1.8.0 migration spec to match the
implementation: state that the CLI migration not only renames the folder
(oldBriefDir → newContextDir) but also renames files inside matching /^brief-/
to start with "context-" (the loop in the migration that renames files) and that
it deletes the old brief.template.md file; ensure the spec text mirrors the
behavior of the code paths using oldBriefDir, newContextDir, the brief- →
context- renaming loop, and the unlink of brief.template.md so documentation and
implementation are consistent.

In `@test/cli.test.js`:
- Around line 1475-1532: The tests call the real CLI via execSync (using
cliPath) which performs live registry lookups and makes assertions on fields
like latestVersion; instead mock those external network calls so tests are
deterministic. Update these tests to install/use a request-mocking tool (e.g.,
nock) and before each execSync call intercept the registry/package-metadata
endpoint(s) the CLI hits and return a fixed response (with deterministic
latestVersion and timestamp), then cleanup the mock after the test; keep
assertions the same but rely on the mocked response instead of real network.
Ensure you add/require nock in test/cli.test.js, scope the mock to the specific
tests that shell out (referencing execSync, cliPath, VERSION, and CACHE_FILE)
and restore network behavior after each test.

---

Nitpick comments:
In @.aicontext/archive/specs/spec-1.7.0-framework-improvements.md:
- Around line 277-280: Add a one-line historical-note in
spec-1.7.0-framework-improvements.md near the section that lists "Review/tests
take scope values (`partial | full | false | ask`)" stating that in v1.8.0
`partial` and `full` were renamed to `normal` and `deep` to avoid copy/paste
errors; update the note to also call out the related mention at the other
occurrence (around line 423) so readers and config.yml users know those old
tokens are deprecated and should use `normal`/`deep` instead.

In @.aicontext/archive/tasks/1.6.0-web-inspect-skill.md:
- Line 42: Replace the raw URL text "Link to
https://github.com/microsoft/playwright-cli (Apache 2.0)" with markdown link
syntax so it renders consistently—e.g. change that line to use
[playwright-cli](https://github.com/microsoft/playwright-cli) and preserve the
"(Apache 2.0)" license note; locate the exact line containing the raw URL text
in .aicontext/archive/tasks/1.6.0-web-inspect-skill.md and update it
accordingly.

In @.aicontext/prompts/check-update.md:
- Line 22: The prompt currently calls the Bash-only `date` command which breaks
on Windows; replace that platform-dependent usage of `date` in
.aicontext/prompts/check-update.md with a cross-platform alternative (e.g., call
Node.js to emit the current date with `node -e "console.log(new
Date().toISOString())"` or add a small helper script like get-date.js and invoke
it), or explicitly document the Unix-only requirement in the prompt; update
references to the `date` command to point to the chosen cross-platform method
and ensure the output format is consistent.

In @.aicontext/prompts/finish-task.md:
- Around line 61-76: Add a short documentation note explaining the two-phase
completion pattern used when no remote PR is created (e.g., pr.create_in_github:
false) and the user must re-run /finish-task after PR review; update the "Update
Worklog (conditional)" prompt text near the choices and the deferred-summary
string ("Task verified. Run /finish-task again after PR review to mark done.")
to explicitly tell users they must re-run /finish-task to actually mark the task
done and reference the resumed-run detection in Step 7 for clarity.
- Line 59: Update the finish-task prompt text around the after_task.review_loop
behavior to explicitly inform users when the GitHub CLI check is skipped;
reference the exact command used (`gh pr view --json number 2>/dev/null`) and
add a short sentence like "Check skipped — ensure `gh` is installed and
authenticated if you expect a PR to exist" so users without `gh` get actionable
feedback; keep the existing control flow (delegating to gh-review-fix-loop.md
when a PR exists and deferring close when none) and mention the /finish-task
flow for manual PR creation.
🪄 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: 9985599a-0436-4d87-8111-fbbd915c0564

📥 Commits

Reviewing files that changed from the base of the PR and between 3770445 and 1a9c1a3.

⛔ Files ignored due to path filters (2)
  • assets/logo3.svg is excluded by !**/*.svg
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (90)
  • .aicontext/.gitignore
  • .aicontext/archive/specs/spec-1.7.0-draft-issue-improvements.md
  • .aicontext/archive/specs/spec-1.7.0-framework-improvements.md
  • .aicontext/archive/specs/spec-1.8.0.md
  • .aicontext/archive/tasks/1.3.0-agent-override-protection.md
  • .aicontext/archive/tasks/1.4.0-skills-pr-workflow-improvements.md
  • .aicontext/archive/tasks/1.4.1-update-framework-files.md
  • .aicontext/archive/tasks/1.5.0-new-skills-codex-support.md
  • .aicontext/archive/tasks/1.5.1-fix-upgrade-verification.md
  • .aicontext/archive/tasks/1.6.0-aic-help-skills.md
  • .aicontext/archive/tasks/1.6.0-dev-flow-v2.md
  • .aicontext/archive/tasks/1.6.0-fix-scripts-path.md
  • .aicontext/archive/tasks/1.6.0-prepare-release-config.md
  • .aicontext/archive/tasks/1.6.0-review-consolidation.md
  • .aicontext/archive/tasks/1.6.0-unified-prompts.md
  • .aicontext/archive/tasks/1.6.0-web-inspect-skill.md
  • .aicontext/archive/tasks/1.7.0-config-yml.md
  • .aicontext/archive/tasks/1.7.0-consolidate-session-init.md
  • .aicontext/archive/tasks/1.7.0-context-preservation-rules.md
  • .aicontext/archive/tasks/1.7.0-draft-issue-improvements.md
  • .aicontext/archive/tasks/1.7.0-ideas-backlog.md
  • .aicontext/archive/tasks/1.7.0-interview-improvements.md
  • .aicontext/archive/tasks/1.7.0-plan-and-commit-hygiene.md
  • .aicontext/archive/tasks/1.7.0-process-prompts.md
  • .aicontext/archive/tasks/1.7.0-prompt-conciseness-audit.md
  • .aicontext/archive/tasks/1.7.0-spec-traceability.md
  • .aicontext/archive/tasks/1.7.0-step-lifecycle-config.md
  • .aicontext/archive/tasks/1.7.0-update-bulk-overwrite.md
  • .aicontext/archive/tasks/1.7.0-update-notifications.md
  • .aicontext/archive/tasks/1.8.0-brief-to-task-context.md
  • .aicontext/archive/tasks/1.8.0-cjs-script-rename.md
  • .aicontext/archive/tasks/1.8.0-explicit-review-playbook.md
  • .aicontext/archive/tasks/1.8.0-fix-negative-happy-path.md
  • .aicontext/archive/tasks/1.8.0-issue-id-flow.md
  • .aicontext/archive/tasks/1.8.0-local-version-cache.md
  • .aicontext/archive/tasks/1.8.0-pr-workflow-integration.md
  • .aicontext/archive/tasks/1.8.0-start-parallel-read-fix.md
  • .aicontext/archive/tasks/1.8.0-tdd-planning-enforcement.md
  • .aicontext/archive/worklog.md
  • .aicontext/prompts/add-step.md
  • .aicontext/prompts/aic-help.md
  • .aicontext/prompts/align-context.md
  • .aicontext/prompts/auto-setup.md
  • .aicontext/prompts/check-task.md
  • .aicontext/prompts/check-update.md
  • .aicontext/prompts/close-step.md
  • .aicontext/prompts/create-task.md
  • .aicontext/prompts/do-it.md
  • .aicontext/prompts/draft-pr.md
  • .aicontext/prompts/ensure-config.md
  • .aicontext/prompts/finish-task.md
  • .aicontext/prompts/gh-review-check.md
  • .aicontext/prompts/gh-review-fix-loop.md
  • .aicontext/prompts/plan-tasks.md
  • .aicontext/prompts/prepare-release.md
  • .aicontext/prompts/review-task-plan.md
  • .aicontext/prompts/run-step.md
  • .aicontext/prompts/run-task.md
  • .aicontext/prompts/start-feature.md
  • .aicontext/prompts/start.md
  • .aicontext/prompts/step-loop.md
  • .aicontext/prompts/tidy-aic.md
  • .aicontext/readme.md
  • .aicontext/rules/process.md
  • .aicontext/rules/standards.md
  • .aicontext/scripts/pr-resolve.cjs
  • .aicontext/scripts/pr-reviews.cjs
  • .aicontext/templates/brief.template.md
  • .aicontext/templates/config.template.yml
  • .aicontext/templates/task-context.template.md
  • .aicontext/templates/task.template.md
  • .claude/skills/align-context/SKILL.md
  • .claude/skills/run-task/SKILL.md
  • .claude/skills/start/SKILL.md
  • .claude/skills/tidy-aic/SKILL.md
  • .codex/skills/align-context/SKILL.md
  • .codex/skills/finish-task/SKILL.md
  • .codex/skills/run-task/SKILL.md
  • .codex/skills/tidy-aic/SKILL.md
  • .gitignore
  • CHANGELOG.md
  • README.md
  • bin/aicontext.js
  • docs/development-model.md
  • docs/skills.md
  • docs/workflow.md
  • package.json
  • test/cli.test.js
  • test/pr-resolve.test.js
  • test/pr-reviews.test.js
💤 Files with no reviewable changes (3)
  • .aicontext/.gitignore
  • .aicontext/prompts/auto-setup.md
  • .aicontext/templates/brief.template.md

Comment thread .aicontext/archive/tasks/1.6.0-dev-flow-v2.md
Comment thread .aicontext/archive/tasks/1.7.0-plan-and-commit-hygiene.md Outdated
Comment thread .aicontext/archive/tasks/1.7.0-spec-traceability.md
Comment thread .aicontext/archive/tasks/1.7.0-step-lifecycle-config.md Outdated
Comment thread .aicontext/archive/tasks/1.8.0-pr-workflow-integration.md
Comment thread .aicontext/prompts/draft-pr.md Outdated
Comment thread .aicontext/prompts/run-step.md Outdated
Comment thread .aicontext/prompts/tidy-aic.md
Comment thread bin/aicontext.js
Comment thread test/cli.test.js
Redact absolute path in archived task. Fix broken relative link.
Add --base to gh pr create and ensure temp file cleanup on failure.
Add .md extension to task-context paths across all prompts.
Add stable headings requirement to tidy-aic archive creation.

Co-Authored-By: Claude via AIContext

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
.aicontext/archive/tasks/1.7.0-step-lifecycle-config.md (1)

98-98: ⚠️ Potential issue | 🟡 Minor

Fix the standards.md relative link.

The relative path .aicontext/rules/standards.md resolves incorrectly from .aicontext/archive/tasks/ to .aicontext/archive/tasks/.aicontext/rules/standards.md. The link should use ../../rules/standards.md to correctly reach .aicontext/rules/standards.md.

🔗 Proposed fix
-**Rules added to [standards.md](.aicontext/rules/standards.md):**
+**Rules added to [standards.md](../../rules/standards.md):**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/archive/tasks/1.7.0-step-lifecycle-config.md at line 98, Update
the broken relative link in
.aicontext/archive/tasks/1.7.0-step-lifecycle-config.md: replace the incorrect
`.aicontext/rules/standards.md` path that resolves to
`.aicontext/archive/tasks/.aicontext/rules/standards.md` with the correct
relative path `../../rules/standards.md` so the Markdown link under the line
"**Rules added to [standards.md](...):**" points to
.aicontext/rules/standards.md.
🤖 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/draft-pr.md:
- Line 50: Replace the incomplete GH CLI command `gh pr create --base
"{base_branch}"` (the "Create the PR" step) with the full non-interactive form
used elsewhere: `gh pr create --base "{base_branch}" --title "{pr_title}"
--body-file "{pr_body_file}"` so the ask → Yes path does not prompt
interactively and works in CI/automation; ensure the exact flags --title and
--body-file and the same placeholder names are used to match the command at line
41.

In @.aicontext/prompts/finish-task.md:
- Around line 89-94: The resumed-run branch in the finish-task flow currently
always performs "mark done silently" (step 6) for any deferred run; change it to
first verify that the original defer condition is resolved before auto-closing:
detect the deferred-run by non-empty completion notes and all plan steps
checked, then re-check the specific defer reason (e.g., presence of a remote PR
and that the git-gates / review loop has completed) and only execute the "mark
done silently" action if those checks pass; otherwise keep the task open and
surface a message instructing the user to resolve the defer condition (reference
the "finish-task" flow, the "git gates" step, the "mark done silently" action,
and the "completion notes" / "deferred run" detection).

---

Duplicate comments:
In @.aicontext/archive/tasks/1.7.0-step-lifecycle-config.md:
- Line 98: Update the broken relative link in
.aicontext/archive/tasks/1.7.0-step-lifecycle-config.md: replace the incorrect
`.aicontext/rules/standards.md` path that resolves to
`.aicontext/archive/tasks/.aicontext/rules/standards.md` with the correct
relative path `../../rules/standards.md` so the Markdown link under the line
"**Rules added to [standards.md](...):**" points to
.aicontext/rules/standards.md.
🪄 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: 2d8b54c3-2b96-4414-8818-ee54f6e61c01

📥 Commits

Reviewing files that changed from the base of the PR and between 1a9c1a3 and 4022b58.

📒 Files selected for processing (10)
  • .aicontext/archive/tasks/1.7.0-plan-and-commit-hygiene.md
  • .aicontext/archive/tasks/1.7.0-step-lifecycle-config.md
  • .aicontext/prompts/align-context.md
  • .aicontext/prompts/check-task.md
  • .aicontext/prompts/draft-pr.md
  • .aicontext/prompts/finish-task.md
  • .aicontext/prompts/gh-review-fix-loop.md
  • .aicontext/prompts/run-step.md
  • .aicontext/prompts/run-task.md
  • .aicontext/prompts/tidy-aic.md
✅ Files skipped from review due to trivial changes (2)
  • .aicontext/prompts/run-step.md
  • .aicontext/prompts/align-context.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • .aicontext/prompts/check-task.md
  • .aicontext/prompts/run-task.md
  • .aicontext/prompts/gh-review-fix-loop.md

Comment thread .aicontext/prompts/draft-pr.md Outdated
Comment thread .aicontext/prompts/finish-task.md
Prevents interactive prompts in non-TTY contexts.

Co-Authored-By: Claude via AIContext

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.aicontext/prompts/draft-pr.md (1)

41-41: Quote {tmp_file} in gh pr create commands for shell safety.

--body-file {tmp_file} should be --body-file "{tmp_file}" to avoid word-splitting/path issues in shell execution contexts.

Proposed prompt text update
-If `pr.create_in_github` is `true`: write the body to a temp file, run `gh pr create --base "{base_branch}" --title "{title}" --body-file {tmp_file}`, show the URL if successful, and always delete the temp file afterward.
+If `pr.create_in_github` is `true`: write the body to a temp file, run `gh pr create --base "{base_branch}" --title "{title}" --body-file "{tmp_file}"`, show the URL if successful, and always delete the temp file afterward.
@@
-1. Create the PR via `gh pr create --base "{base_branch}" --title "{title}" --body-file {tmp_file}`, show the URL if successful, and always delete the temp file afterward
+1. Create the PR via `gh pr create --base "{base_branch}" --title "{title}" --body-file "{tmp_file}"`, show the URL if successful, and always delete the temp file afterward

Also applies to: 50-50

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/prompts/draft-pr.md at line 41, The gh command invocation when
pr.create_in_github is true currently uses --body-file {tmp_file} which can
break on spaces or special chars; update the logic that builds the command (the
code path handling pr.create_in_github and the variable tmp_file used in the gh
pr create call) to wrap the tmp_file in double quotes so the command uses
--body-file "{tmp_file}" (ensure any string interpolation or command assembly
that references tmp_file is changed accordingly and that temp-file cleanup still
runs).
🤖 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/draft-pr.md:
- Line 35: When pr.save_to_file is true and you write the draft under
.aicontext/data/pr-drafts/ using the branch name as the filename,
sanitize/slugify the branch name first (e.g., replace path separators like '/'
and backslashes, whitespace, and other unsafe filesystem characters with '-' and
optionally lower-case) to prevent creating subpaths or invalid filenames; update
the draft-writing logic that derives the filename from the branch name (the code
path that checks pr.save_to_file and constructs the filename) to run the branch
through this sanitizer before joining it into .aicontext/data/pr-drafts/ and
then write the file and return the sanitized filename to the user.

---

Nitpick comments:
In @.aicontext/prompts/draft-pr.md:
- Line 41: The gh command invocation when pr.create_in_github is true currently
uses --body-file {tmp_file} which can break on spaces or special chars; update
the logic that builds the command (the code path handling pr.create_in_github
and the variable tmp_file used in the gh pr create call) to wrap the tmp_file in
double quotes so the command uses --body-file "{tmp_file}" (ensure any string
interpolation or command assembly that references tmp_file is changed
accordingly and that temp-file cleanup still runs).
🪄 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: 5b07e49d-2e8e-4cea-82bd-311ffbe5a185

📥 Commits

Reviewing files that changed from the base of the PR and between 4022b58 and 4d042c3.

📒 Files selected for processing (1)
  • .aicontext/prompts/draft-pr.md

Comment thread .aicontext/prompts/draft-pr.md Outdated
Replaces / and path-unsafe chars with - to prevent subdirectory creation.

Co-Authored-By: Claude via AIContext

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.aicontext/prompts/draft-pr.md (1)

49-50: Clarify temp-file creation in the ask -> yes path.

Step 1 uses {tmp_file} but does not explicitly say to create/write it in this branch. Adding that phrase will make execution unambiguous.

Suggested wording tweak
-1. Create the PR via `gh pr create --base "{base_branch}" --title "{title}" --body-file {tmp_file}`, show the URL if successful, and always delete the temp file afterward
+1. Write the PR body to a temp file, create the PR via `gh pr create --base "{base_branch}" --title "{title}" --body-file {tmp_file}`, show the URL if successful, and always delete the temp file afterward
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aicontext/prompts/draft-pr.md around lines 49 - 50, The "If yes" branch
mentions using {tmp_file} with gh pr create but doesn't state creating/writing
it; update the "ask -> yes" path to explicitly create and write the temporary
file (populate {tmp_file} with the PR body) before calling gh pr create and then
run gh pr create --base "{base_branch}" --title "{title}" --body-file
{tmp_file}, show the URL if successful, and always delete the temp file
afterward so the sequence create/write -> gh pr create -> show URL -> cleanup is
unambiguous.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.aicontext/prompts/draft-pr.md:
- Around line 49-50: The "If yes" branch mentions using {tmp_file} with gh pr
create but doesn't state creating/writing it; update the "ask -> yes" path to
explicitly create and write the temporary file (populate {tmp_file} with the PR
body) before calling gh pr create and then run gh pr create --base
"{base_branch}" --title "{title}" --body-file {tmp_file}, show the URL if
successful, and always delete the temp file afterward so the sequence
create/write -> gh pr create -> show URL -> cleanup is unambiguous.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5eab6d8f-8122-4e23-9e9b-8686f658c2e5

📥 Commits

Reviewing files that changed from the base of the PR and between 4d042c3 and 3cde6db.

📒 Files selected for processing (1)
  • .aicontext/prompts/draft-pr.md

@zahardev zahardev merged commit 50b6e90 into main Apr 13, 2026
2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 22, 2026
5 tasks
@coderabbitai coderabbitai Bot mentioned this pull request May 3, 2026
5 tasks
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