Skip to content

docs: document guideline generation modes and add end-to-end tutorial - #297

Open
evduester wants to merge 2 commits into
mainfrom
docs-guidelines-modes-guide
Open

docs: document guideline generation modes and add end-to-end tutorial#297
evduester wants to merge 2 commits into
mainfrom
docs-guidelines-modes-guide

Conversation

@evduester

@evduester evduester commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new "Enabling Guidelines" guide (docs/guides/guidelines.md) covering EVOLVE_GUIDELINES_MODE (regular/consistency/both) — this was previously undocumented anywhere despite existing in code.
  • Documents the missing EVOLVE_GUIDELINES_MODE env var in docs/guides/configuration.md.
  • Adds the missing --guidelines-mode flag to the Phoenix Sync guide, and cross-links guides that previously had no links between them (Configuration, Phoenix Sync, Low-Code Tracing, Extract Trajectories).
  • Reorders the Guides nav so Low-Code Tracing precedes Phoenix Sync (tracing must happen before syncing traces).
  • Adds a new end-to-end tutorial ("Starter Example: Evolving Agent Loop") plus a companion example script (examples/low_code/guidelines_retrieval_demo.py) demonstrating the full loop: trace an agent → generate guidelines → retrieve and inject them back into a new run.

Test plan

  • mkdocs build --strict — only pre-existing, unrelated warnings remain (broken example links in low-code-tracing.md, a stale CLI reference link, a Codex anchor)
  • New example script passes ruff check and ruff format
  • Manually ran through every step of the new tutorial against a live Phoenix + LLM backend; found and fixed a real CWD/filesystem-backend bug in the tutorial steps during that pass

Summary by CodeRabbit

  • Documentation

    • Added guidance for generating regular, consistency, or combined guidelines from agent trajectories.
    • Documented new configuration settings, uncertainty thresholds, skipping behavior, and CLI options.
    • Added Phoenix Sync prerequisites and expanded synchronization instructions.
    • Added an end-to-end tutorial covering tracing, guideline generation, verification, retrieval, and reuse.
    • Updated navigation and cross-references across related guides.
  • Examples

    • Added a demonstration for retrieving guidelines and injecting them into a subsequent agent run.

Consistency guidelines shipped without doc updates, so EVOLVE_GUIDELINES_MODE
and its consistency-tuning env vars were undiscoverable anywhere in docs/.
Adds a new Enabling Guidelines guide covering both regular and consistency
modes, cross-links it from Configuration/Phoenix Sync/Low-Code Tracing, and
reorders the Guides nav so tracing precedes sync (traces must exist before
they can be synced). Also adds a new tutorial plus a companion example script
that walks the full loop: trace an agent, generate guidelines from the trace,
then retrieve and inject those guidelines back into a new run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@evduester
evduester requested review from illeatmyhat and visahak July 28, 2026 19:34
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@evduester, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e2ffea1-8934-4ec5-af98-f5ed438255f1

📥 Commits

Reviewing files that changed from the base of the PR and between 960f476 and e854b75.

📒 Files selected for processing (1)
  • examples/low_code/guidelines_retrieval_demo.py
📝 Walkthrough

Walkthrough

This change documents guideline generation modes and Phoenix synchronization, adds an end-to-end evolving-agent tutorial, introduces a guideline retrieval example, updates documentation navigation, and ignores the notes/ directory.

Changes

Guidelines workflow

Layer / File(s) Summary
Generation modes and configuration
docs/guides/configuration.md, docs/guides/guidelines.md
Documents guideline pipeline entry points, regular/consistency/both modes, uncertainty thresholds, skip behavior, and verification metadata.
Phoenix synchronization workflow
docs/guides/extract-trajectories.md, docs/guides/low-code-tracing.md, docs/guides/phoenix-sync.md
Clarifies tracing prerequisites and distinguishes trajectory extraction from Phoenix synchronization and guideline generation.
Tutorial and guideline injection
docs/tutorials/guidelines-loop.md, examples/low_code/guidelines_retrieval_demo.py, docs/tutorials/index.md, mkdocs.yaml
Adds an end-to-end tutorial, navigation entries, and a CodeAgent example that retrieves and injects guidelines.

Repository housekeeping

Layer / File(s) Summary
Ignore local notes
.gitignore
Adds notes/ to the ignored paths.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CodeAgent
  participant Phoenix
  participant Evolve
  participant EvolveClient
  CodeAgent->>Phoenix: emit traced trajectory
  Phoenix->>Evolve: sync trajectory
  Evolve->>Evolve: generate guideline entities
  EvolveClient->>Evolve: select_guidelines(task)
  Evolve-->>EvolveClient: return guideline entities
  EvolveClient->>CodeAgent: inject formatted guidelines
Loading

Possibly related PRs

Suggested reviewers: visahak

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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 main documentation changes: guideline generation modes and a new end-to-end tutorial.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-guidelines-modes-guide

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.

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/low_code/guidelines_retrieval_demo.py`:
- Around line 77-81: Update the exception handler around agent.run in the
example so agent-run failures propagate as a non-zero process exit status after
reporting the error. Re-raise the caught exception or terminate via SystemExit
chained from the original exception, while preserving the existing error
message.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b53f52d-d05d-4f93-983a-0b3e133aeb69

📥 Commits

Reviewing files that changed from the base of the PR and between f24d05a and 960f476.

📒 Files selected for processing (10)
  • .gitignore
  • docs/guides/configuration.md
  • docs/guides/extract-trajectories.md
  • docs/guides/guidelines.md
  • docs/guides/low-code-tracing.md
  • docs/guides/phoenix-sync.md
  • docs/tutorials/guidelines-loop.md
  • docs/tutorials/index.md
  • examples/low_code/guidelines_retrieval_demo.py
  • mkdocs.yaml

Comment thread examples/low_code/guidelines_retrieval_demo.py Outdated
@agent-toolkit-owl

agent-toolkit-owl commented Jul 28, 2026

Copy link
Copy Markdown

Checks Summary

Last run: 2026-07-28T20:19:46.939Z

Mend Unified Agent vulnerability scan found 4 vulnerabilities:

Severity Identifier Package Details Fix
🔺 High CVE-2026-55685 react-router-7.17.0.tgz
React Router is a router for React. In versions 7.0.0 through 7.17.0, the manifest endpoint could be...React Router is a router for React. In versions 7.0.0 through 7.17.0, the manifest endpoint could be accessed via unauthenticated targeted requests that would put heavy load on the server and slow down response times. This issue is a follow up to CVE-2026-42342, and does not does not impact React Router applications using Declarative Mode () or Data Mode (createBrowserRouter/). This issue has been fixed in version 7.18.0.
Upgrade to version react-router - 7.18.0,https://github.com/remix-run/react-router.git - react-router@7.18.0
🔷 Medium CVE-2026-53669 react-router-7.17.0.tgz
React Router is a router for React. Versions 6.0.0 through 7.17.0 are vulnerable to Open Redirtect t...React Router is a router for React. Versions 6.0.0 through 7.17.0 are vulnerable to Open Redirtect through use of backslashes in and useNavigate. This issue is a follow up to CVE-2025-68470 and has been fixed in version 7.18.0.
Upgrade to version https://github.com/remix-run/react-router.git - react-router@7.18.0
🔷 Medium CVE-2026-53666 react-router-7.17.0.tgz
React Router is a router for React. In versions 6.4.0 through 7.17.0, if application code was writte...React Router is a router for React. In versions 6.4.0 through 7.17.0, if application code was written in a way that allows attacker-supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for an attacker to trigger unexpected constructor execution on the client, which would in turn trigger an outbound network request. This is only possible with very specific (and unlikely) application-layer code. Note that this does not impact an application if it is using Declarative Mode. It only impacts Framework Mode and Data Mode applications that perform manual SSR/hydration. This issue has been fixed in version 7.18.0.
Upgrade to version https://github.com/remix-run/react-router.git - react-router@7.18.0
🔷 Medium CVE-2026-53667 react-router-7.17.0.tgz
React Router is a router for React. In versions 7.11.0 through 7.17.0, the RSCErrorHandler is missin...React Router is a router for React. In versions 7.11.0 through 7.17.0, the RSCErrorHandler is missing protocol validation, allowing for redirects from untrusted sources. This issue is a follow up to CVE-2026-53667, and only affects consuming applications if they are using the unstable RSC APIs. This issue has been fixed in version 7.18.0.
Upgrade to version https://github.com/remix-run/react-router.git - react-router@7.18.0

agent.run() failures were only printed, so the script exited 0 even when
the run failed, hiding real failures from CI/automation. Re-raise as
SystemExit, chained from the original exception, so the failure is
actually visible in the exit status while keeping the error message.

Addresses a CodeRabbit review comment on PR #297.

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.

2 participants