Skip to content

Conversation

@nanotaboada
Copy link
Owner

@nanotaboada nanotaboada commented Jan 24, 2026

  • Reduce copilot-instructions.md to thin pointer file (~500 tokens)
  • Add AGENTS.md with operational procedures (on-demand loading)
  • Implement tiered loading to minimize auto-loaded token cost
  • Add token efficiency headers explaining load strategy

Instructions now use thin pointer architecture: essential context auto-loads, detailed procedures load on-demand via #file reference.


This change is Reviewable

Summary by CodeRabbit

  • Documentation
    • Reworked AI/Copilot guidance into a concise, guidance-focused reference (Quick Context, Core Conventions, Quick Commands, generation guardrails, and "Need More Detail?" prompts)
    • Added a comprehensive AGENTS.md developer/operational guide covering setup, tests, linting, DB and Docker workflows, CI/CD, troubleshooting, and architecture overview
    • Updated conventions: async/I/O patterns, type-safety, logging/HTTP guidance, token-efficiency, and on-demand context loading notes

✏️ Tip: You can customize this high-level summary in your review settings.

- Reduce copilot-instructions.md to thin pointer file (~500 tokens)
- Add AGENTS.md with operational procedures (on-demand loading)
- Implement tiered loading to minimize auto-loaded token cost
- Add token efficiency headers explaining load strategy

Instructions now use thin pointer architecture: essential context
auto-loads, detailed procedures load on-demand via #file reference.
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Warning

Rate limit exceeded

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

⌛ 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.

Walkthrough

Reformats .github/copilot-instructions.md into a concise Copilot-focused guidance document and adds AGENTS.md, a new top-level operational guide covering setup, development workflow, Docker/DB commands, CI/CD notes, and troubleshooting.

Changes

Cohort / File(s) Summary
Copilot instructions (reworked)
\.github\/copilot-instructions.md
Replaces long project-overview narrative with a compact reference: Quick Context, Core Conventions, Architecture at a Glance, Copilot should/avoid, Quick Commands, token-efficiency and on-demand context guidance, async/type-safety emphasis, and updated CI/Docker/VS Code recommendations.
New operational guide
AGENTS.md
Adds a comprehensive operational/developer guide with quick start, Python/versioning, dev workflow (tests, linting, formatting, pre-commit), SQLite seeding/reset, Docker commands, CI/CD notes, API/examples, troubleshooting, and VS Code config.

Sequence Diagram(s)

(Skipped — changes are documentation-only and do not introduce new multi-component control flow.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10-15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title follows Conventional Commits format with 'docs:' prefix, stays well under 80 characters (57 chars), and accurately describes the main change of optimizing AI agent instructions for token efficiency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/optimize-ai-agent-instructions

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 and usage tips.

@codacy-production
Copy link

codacy-production bot commented Jan 24, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (bce5022) 131 119 90.84%
Head commit (d665986) 131 (+0) 119 (+0) 90.84% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#471) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (bce5022) to head (d665986).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #471   +/-   ##
=======================================
  Coverage   89.65%   89.65%           
=======================================
  Files           3        3           
  Lines         116      116           
=======================================
  Hits          104      104           
  Misses         12       12           
Components Coverage Δ
Services 79.31% <ø> (ø)
Routes 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nanotaboada
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In @.github/copilot-instructions.md:
- Around line 34-35: The documentation has inconsistent cache TTLs: one place
shows "10min/1hr TTL" while another shows "600s"; pick the correct TTL value
(e.g., 600s or 10min/1hr) and update all occurrences so they match—specifically
replace the "10min/1hr TTL" text and any later mention of "600s" (and the
related paragraph at the other noted occurrence) with the agreed-upon TTL string
so the architecture section and cache note are consistent.
- Around line 78-81: The two stray list items ("5. **Caching**: In-memory cache
(10 min TTL) with `X-Cache` headers (HIT/MISS)" and "6. **Async/Await**: All
database operations are async") should be removed from their current orphan
position or moved into the appropriate section (e.g., the "Core Conventions" or
"Architecture" list); update the destination list so numbering/bullets are
consistent and delete the original lines so no disconnected items remain. Ensure
the moved items keep their Markdown formatting and update any surrounding lists
or headings to preserve document structure.
- Around line 57-68: Update the port in the quick commands snippet so it matches
the rest of the docs: change the uvicorn command string "uvicorn main:app
--reload --host 0.0.0.0 --port 8000" to use --port 9000 and update the Swagger
URL "http://localhost:8000/docs" to "http://localhost:9000/docs"; ensure any
other occurrences of "8000" in that snippet are replaced with "9000" for
consistency.

In `@AGENTS.md`:
- Around line 229-230: Replace the bare URL in the prose ("Open
http://localhost:9000/docs - Interactive Swagger UI with "Try it out" buttons")
by wrapping it in angle brackets or inline code formatting to satisfy MD034;
e.g., change the phrase to use `<http://localhost:9000/docs>` or backticks
around the URL so the line reads like "Open <http://localhost:9000/docs> -
Interactive Swagger UI with 'Try it out' buttons" or similar.
- Around line 162-163: The fenced code block containing the architecture snippet
that starts with "routes/          # FastAPI endpoints with caching" is missing
a language tag (MD040); add a language identifier such as text (e.g., change the
opening fence to ```text) so the block becomes a labeled fenced code block and
satisfies markdownlint; locate the block in AGENTS.md and update the opening
fence accordingly.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/copilot-instructions.md (1)

80-258: Major inconsistency: Detailed operational content contradicts thin pointer architecture.

The PR objective states this should be a "thin pointer file (~500 tokens)" with operational procedures moved to AGENTS.md for on-demand loading. However, lines 80-258 contain substantial operational detail (Coding Guidelines, Common Commands, Database Details, API Endpoints, Testing, CI/CD, Common Pitfalls, VS Code Configuration, Additional Resources) that:

  1. Defeats the token optimization goal by auto-loading ~1,500-2,000 extra tokens on every Copilot chat
  2. Contradicts the "Need More Detail?" section (lines 70-75) which directs users to load AGENTS.md for operational procedures
  3. Makes the token efficiency claims in lines 3-5 and 78-79 inaccurate
Suggested resolution

Either:

  • Option 1 (Preferred): Move lines 80-258 to AGENTS.md and end this file at line 79, achieving the stated ~500 token goal
  • Option 2: Update the token efficiency headers (lines 3-5, 78-79) to reflect the actual token count and revise the PR objectives to acknowledge this is not a minimal pointer file

@nanotaboada nanotaboada force-pushed the feat/optimize-ai-agent-instructions branch from b8a7ff2 to fc31838 Compare January 25, 2026 14:41
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@AGENTS.md`:
- Around line 78-105: Update the "Coverage requirement" sentence in AGENTS.md to
attribute CI coverage enforcement to codecov.yml instead of .coveragerc: change
the line that currently says the CI pipeline enforces coverage via `.coveragerc`
to state that `.coveragerc` is for local measurement and that the CI-enforced
80% target is defined in `codecov.yml`; reference the "Coverage requirement"
header and ensure mention of the 80% target and roles of both `.coveragerc`
(local config) and `codecov.yml` (CI enforcement).
🧹 Nitpick comments (1)
AGENTS.md (1)

12-23: Consider a single pip install command to reduce setup drift.

Combining requirements into one command is a bit less error‑prone for new contributors.

♻️ Suggested tweak
-pip install -r requirements.txt
-pip install -r requirements-lint.txt
-pip install -r requirements-test.txt
+pip install -r requirements.txt -r requirements-lint.txt -r requirements-test.txt

@nanotaboada nanotaboada force-pushed the feat/optimize-ai-agent-instructions branch from fc31838 to d665986 Compare January 25, 2026 14:48
@sonarqubecloud
Copy link

@nanotaboada nanotaboada merged commit 887bb70 into master Jan 25, 2026
18 checks passed
@nanotaboada nanotaboada deleted the feat/optimize-ai-agent-instructions branch January 25, 2026 14:58
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