Skip to content

docs: add tracer and capability search guidance - #12

Merged
pertrai1 merged 3 commits into
mainfrom
docs/add-tracer-risk-navigation-guidance
May 1, 2026
Merged

pertrai1 merged 3 commits into
mainfrom
docs/add-tracer-risk-navigation-guidance

Conversation

@pertrai1-bot

@pertrai1-bot pertrai1-bot commented May 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a compact depth/risk/slice gate to task framing so complex or high-risk work routes to exploration, spec, spike, or tracer bullet before full implementation.
  • Adds tracer-vs-full-feature guidance for non-trivial features to encourage small end-to-end slices when integration or feedback risk is high.
  • Adds existing capability search to the Anchor phase, preferring AST-aware search when available with a grep fallback.

Self-Audit

Self-audit completed; no routed findings.

Jenga note: the weakest assumption is that the task-framing gate is worth its added context. This PR keeps it compact and decision-oriented, and avoids adding architecture coupling thresholds or a new directive.

Verification

  • git diff --check passed.
  • Python frontmatter/H1 validation passed for directives/task-framing.md and directives/codebase-navigation.md.
  • Scope control: changed only the two directive files named in the scope budget; no new directive, architecture-boundary threshold, template, or eval harness change added.

Summary by CodeRabbit

  • Documentation
    • Added an explicit "Existing capability search" step to encourage reuse of project utilities and avoid inappropriate consolidation.
    • Included AST-aware query examples and a regex grep fallback for locating exports across source and test roots.
    • Introduced a "Depth, Risk, and Slice Gate" with a routing decision table for task classification and routing.
    • Clarified implementation-style guidance, favoring tracer bullets for multi-layer or user-feedback-sensitive changes.

@coderabbitai

coderabbitai Bot commented May 1, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@pertrai1 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 58 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b74c7e8e-f870-4ae6-92d6-2a8e53ce8dc1

📥 Commits

Reviewing files that changed from the base of the PR and between 1d3a5d4 and 7f80c3d.

📒 Files selected for processing (1)
  • directives/task-framing.md
📝 Walkthrough

Walkthrough

Adds an explicit "Existing capability search" step to the Anchor phase in codebase navigation with AST-aware and grep-based search examples; and introduces a "Depth, Risk, and Slice Gate" in task framing to classify tasks and route work (exploration, spec-driven, tracer bullet, spike) before edits.

Changes

Cohort / File(s) Summary
Codebase Navigation Enhancement
directives/codebase-navigation.md
Inserts an explicit "Existing capability search" step in the Anchor workflow, shifts subsequent step numbering, and adds preferred AST-aware ast-grep queries (exported functions, exported consts) plus a regex grep fallback across chosen source roots and tests.
Task Framing Gating
directives/task-framing.md
Adds a "Depth, Risk, and Slice Gate" pre-edit step with classification (depth/risk), a routing decision table mapping unknown/risk types to modes (Exploration Path, Specification-Driven Development, Tracer bullet, Spike/full feature), and guidance favoring tracer bullets for multi-layer or user-feedback-sensitive changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: adding tracer routing guidance to task-framing and adding existing capability search to the Anchor phase in codebase-navigation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/add-tracer-risk-navigation-guidance

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
Review rate limit: 0/1 reviews remaining, refill in 52 minutes and 58 seconds.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the repo’s agent directives to better guide task scoping/routing for higher-risk work and to encourage reuse-first navigation by searching for existing capabilities before implementing new ones.

Changes:

  • Added a compact “Depth, Risk, and Slice Gate” to task-framing to route complex/high-uncertainty work to exploration/spec/spike/tracer approaches before full implementation.
  • Added “existing capability search” as an explicit Anchor step in codebase-navigation, recommending AST-aware search tools with a grep fallback.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
directives/task-framing.md Adds a depth/risk classification and routing table plus tracer-bullet vs full-feature guidance.
directives/codebase-navigation.md Adds capability reuse search guidance in the Anchor phase with example AST-aware and grep-based search commands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread directives/task-framing.md Outdated
Comment on lines +108 to +113
| Unknown / risk | Route first |
| --- | --- |
| Need to understand existing code, runtime, or dependency behavior | Exploration Path |
| Behavior, API, or acceptance criteria unclear | Specification-Driven Development |
| Feasibility unknown and throwaway validation is acceptable | Spike |
| Multi-layer integration or user feedback may change the shape | Tracer bullet |
Comment thread directives/codebase-navigation.md Outdated
ast-grep --pattern 'export const $NAME = $$$VALUE' src

# Portable fallback when ast-grep is unavailable
grep -R "function .*<domain-term>\|const .*<domain-term>\|export .*<domain-term>" src tests --exclude-dir=node_modules | head -30
Comment thread directives/codebase-navigation.md Outdated
Comment on lines +100 to +104
ast-grep --pattern 'export function $NAME($$$ARGS) { $$$BODY }' src
ast-grep --pattern 'export const $NAME = $$$VALUE' src

# Portable fallback when ast-grep is unavailable
grep -R "function .*<domain-term>\|const .*<domain-term>\|export .*<domain-term>" src tests --exclude-dir=node_modules | head -30
@pertrai1-bot

Copy link
Copy Markdown
Collaborator Author

Copilot review follow-up

Addressed all three Copilot comments:

  • directives/task-framing.md: normalized the route table so it uses route names plus an explicit output constraint instead of mixing paths, directives, and techniques ambiguously.
  • directives/codebase-navigation.md: changed ast-grep examples to use path/to/source/root instead of hardcoded src.
  • directives/codebase-navigation.md: changed the fallback wording from “Portable fallback” to “Grep fallback” and used grep -R -E with placeholder source/test roots rather than --exclude-dir.

Verification:

  • git diff --check
  • Python frontmatter/H1 validation for directives/task-framing.md and directives/codebase-navigation.md

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@directives/task-framing.md`:
- Around line 108-113: The table currently defines "Exploration Path" with two
conflicting constraints (no code edits vs. run a disposable spike); update the
directive by splitting "Exploration Path" into two distinct modes—"Exploration
Path (Read-only)" with Output constraint "No code edits until the unknown is
resolved" and "Exploration Path (Spike)" with Output constraint "Run a
disposable spike; do not ship spike code without a normal implementation
pass"—or alternatively replace the single "Exploration Path" entry with one row
that adds a clarifying sentence in the Output constraint explaining when edits
are allowed (e.g., "Edits permitted only in throwaway spike branches; changes
must be discarded or replaced by production implementation after validation").
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca350ab1-c265-40ae-a2cd-873c1556037a

📥 Commits

Reviewing files that changed from the base of the PR and between d59898e and 1d3a5d4.

📒 Files selected for processing (2)
  • directives/codebase-navigation.md
  • directives/task-framing.md
✅ Files skipped from review due to trivial changes (1)
  • directives/codebase-navigation.md

Comment thread directives/task-framing.md
@pertrai1-bot

Copy link
Copy Markdown
Collaborator Author

CodeRabbit follow-up

Addressed the remaining CodeRabbit comment by splitting the Exploration Path route into explicit modes in directives/task-framing.md:

  • Exploration Path (read-only) — no code edits until the unknown is resolved.
  • Exploration Path (spike) — temporary validation edits are allowed, but spike code must not ship without a normal implementation pass.

Verification:

  • git diff --check
  • Python frontmatter/H1 validation for directives/task-framing.md

@pertrai1
pertrai1 merged commit 9446904 into main May 1, 2026
1 check passed
@pertrai1
pertrai1 deleted the docs/add-tracer-risk-navigation-guidance branch May 1, 2026 13:17
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.

3 participants