Skip to content

fix(plan): support self-targeting nightlight's own TASKS.md - #10

Closed
c0d3ster wants to merge 2 commits into
mainfrom
worktree-plan-self-target
Closed

fix(plan): support self-targeting nightlight's own TASKS.md#10
c0d3ster wants to merge 2 commits into
mainfrom
worktree-plan-self-target

Conversation

@c0d3ster

@c0d3ster c0d3ster commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • plan.sh already resolved absolute paths that were real directories, bypassing PROJECT_REPOS_DIR — but pointing it at nightlight's own repo root still passed that same path to --add-dir, redundant with (and potentially conflicting with) the identical cwd.
  • Detect when the resolved REPO matches the current working directory (nightlight planning itself, per the existing root TASKS.md) and invoke /plan-tasks with no --add-dir in that case, since cwd files are already readable without it.
  • External repos (by name via PROJECT_REPOS_DIR, or by absolute path) are unaffected — they still get --add-dir.

Test plan

  • bash -n plan.sh — syntax check
  • Manual dry run with a stubbed claude binary: plan.sh ., plan.sh <absolute nightlight path>, and plan.sh other-repo (via PROJECT_REPOS_DIR) all resolved to the expected invocation
  • Real run: pnpm plan . from the nightlight repo, confirm /plan-tasks proposes a breakdown against nightlight's own TASKS.md

🤖 Generated with Claude Code

plan.sh already resolved absolute paths that exist as directories,
bypassing PROJECT_REPOS_DIR. But pointing it at nightlight's own repo
root still passed that path to --add-dir on top of the identical cwd.
Detect when the resolved REPO matches the current working directory
and invoke /plan-tasks directly, since cwd files are already readable
without --add-dir.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c91d3a3-8b85-4522-ac52-723b828bd940

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@c0d3ster

c0d3ster commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

Closing — turns out no fix was needed. I assumed pointing --add-dir at the same directory as cwd would be redundant/problematic, but I tested it directly (claude -p ... --add-dir $(pwd)) and it works fine. The original plan.sh already supports self-targeting as-is: pnpm plan . or pnpm plan /absolute/path/to/nightlight both resolve correctly through the existing -d check and pass straight through to --add-dir with no issue. Reverted the unnecessary change.

@c0d3ster c0d3ster closed this Aug 3, 2026
@c0d3ster
c0d3ster deleted the worktree-plan-self-target branch August 3, 2026 03:56
c0d3ster added a commit that referenced this pull request Aug 3, 2026
* chore(tasks): number and stack self-targeting task list

Assign #1-#10 task numbers and [stack] annotations to TASKS.md's
Agent-Ready/Verify/Research/Decisions items for nightlight's
self-improvement backlog. Introduce docs/nightlight-meta.json with
nextTaskNumber: 11.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* chore: gitignore .claude/worktrees/

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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