feat(discover): add discover-tasks skill and pnpm discover script - #12
Merged
Conversation
Mines a target repo's own memory for task candidates and proposes additions to its TASKS.md \`## Discovered\` section, gated behind an approval prompt. Repo-scanning (--scan) is stubbed to dispatch a not-yet-built task-scout agent; it reports and skips gracefully today. pnpm discover <repo> [--scan] mirrors plan.sh's invocation shape. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds the ChangesTask discovery workflow
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant discover.sh
participant Claude
participant RepositoryMemory
participant TASKS.md
Operator->>discover.sh: Run discovery command
discover.sh->>Claude: Invoke /discover-tasks with repository path
Claude->>RepositoryMemory: Read candidate task memory
Claude->>TASKS.md: Append approved tasks
Claude->>RepositoryMemory: Clear consumed memory
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
discover.sh always passed --add-dir <repo>, even when the target was nightlight itself. /plan-tasks already handles self-targeting cleanly because nobody routes it through plan.sh with a self-referencing path — you just run it directly inside nightlight, no --add-dir needed. discover.sh had no equivalent self-detection, so self-targeting forced a redundant --add-dir pointing at the CLI's own primary directory, which is where the '.' vs './' path-resolution flakiness came from. Detect when REPO resolves to nightlight's own directory and skip --add-dir entirely in that case. Also fix discover-tasks/SKILL.md's Phase 1 memory lookup, which assumed the target repo's memory folder is always distinct from nightlight's — false when self-targeting, where it's simply this session's own already-loaded memory.
…add-dir Previous commit skipped --add-dir entirely for self-targeting, based on an incorrect theory that --add-dir pointing at the CLI's own primary directory was the source of './ ' vs '.' flakiness. Confirmed that's wrong: --add-dir referencing the repo you're already in is a harmless no-op (plan.sh has done this via './ ' for a while with no issue). The actual fix is simpler: resolve REPO to an absolute path right after the existing bare-name-vs-directory check, so '.' and './' become byte-identical before they ever reach --add-dir, instead of relying on the CLI to treat two relative-path spellings the same way. Applied to both discover.sh and plan.sh for consistency, since they share the identical unresolved-relative-path pattern. Also reworded discover-tasks/SKILL.md's Phase 1 self-target note: --add-dir is still passed when self-targeting (not omitted), it just resolves to the same absolute path as the session's own primary working directory.
c0d3ster
marked this pull request as ready for review
August 5, 2026 03:31
This was referenced Aug 6, 2026
2 tasks
c0d3ster
added a commit
that referenced
this pull request
Aug 8, 2026
- Archive #2 (fresh-subprocess-per-task execution model, PR #24) as complete; NEEDS HUMAN cache-read comparison trial ongoing outside TASKS.md tracking, see archive note - Add #12 [stack: solo], bundling four turn/cache-read efficiency findings from the c0d3ster cost audit, placed at the top of Agent-Ready - #1 confirmed not implemented, left open and untouched - nextTaskNumber 12 -> 13, tasksCompleted 0 -> 1 Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
discover-tasksskill that mines a target repo's own memory (from direct work sessions in that repo) for task candidates and proposes additions to its TASKS.md## Discoveredsection, behind an approval prompt.discover.sh+pnpm discover <repo> [--scan], mirroringplan.sh's invocation shape.--scan(codebase-scanning phase, via a futuretask-scoutagent) is stubbed: the skill reportstask-scoutdoesn't exist yet and skips that phase gracefully rather than failing the run.Test plan
pnpm discover <repo>against a repo with task-shaped entries in its own memory and confirm they're proposed, approved, and land correctly under TASKS.md## Discoveredwith the source memory file cleared.pnpm discover <repo> --scanand confirm it reportstask-scoutis missing and still completes the memory phase.task-scoutis built, re-test--scanend-to-end (tracked in nightlight-session memory as a follow-up).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
TASKS.md, with duplicate filtering and cleanup of processed memory.Bug Fixes