Skip to content

docs: Simplify and improve context7 config#1218

Merged
fcakyon merged 4 commits intomainfrom
fcakyon-patch-1
Aug 3, 2025
Merged

docs: Simplify and improve context7 config#1218
fcakyon merged 4 commits intomainfrom
fcakyon-patch-1

Conversation

@fcakyon
Copy link
Copy Markdown
Collaborator

@fcakyon fcakyon commented Aug 3, 2025

Summary

Overview: Optimizes Context7 configuration by streamlining file exclusion rules and adding valuable documentation guidance, improving AI code analysis coverage while reducing configuration complexity.

Primary Changes

  • Configuration: Simplify exclusion rules - Removes 17 redundant file/folder exclusions that were overly broad in context7.json:L16-L40

    • Verification: ✓ File exists, ✓ Line numbers accurate, ✓ Removes build artifacts and system files
    • Trade-off: Less restrictive exclusions for better code analysis coverage
  • Documentation: Add CHANGELOG.md inclusion - Includes changelog file for better project history context in context7.json:L8

    • Impact: Context7 can now analyze project evolution and version changes
    • Verification: ✓ Addition confirmed, ✓ Follows existing folder pattern
  • Enhancement: Add strategic exclusion for resources - Adds targeted resources/** exclusion in context7.json:L17

    • Rationale: More focused than removed broad exclusions while keeping resource files out
    • Verification: ✓ Proper JSON syntax, ✓ Follows exclusion pattern
  • Documentation: Add contextual guidance rules - Adds 3 new rules for logging imports, documentation links, and update procedures in context7.json:L69-L72

    • Impact: Provides developers with centralized logging guidance and documentation workflow
    • Verification: ✓ Valid JSON array, ✓ Informative content

Technical Considerations

  • Breaking Changes: None - purely additive configuration improvements
  • Performance: Improved Context7 analysis scope with reduced exclusion overhead
  • Dependencies: No dependency changes, configuration-only update

Context & Rationale

This PR refines the Context7 AI tool configuration to be more effective and maintainable. The removed exclusions were redundant with git ignore patterns and overly restrictive, while the new rules provide valuable developer guidance for logging patterns and documentation workflows. The net result is better AI code analysis coverage with cleaner configuration.

@fcakyon fcakyon self-assigned this Aug 3, 2025
@fcakyon fcakyon added the documentation Improvements or additions to documentation label Aug 3, 2025
@onuralpszr
Copy link
Copy Markdown
Collaborator

@fcakyon I saw excludes are removed is it intentional ?

@fcakyon
Copy link
Copy Markdown
Collaborator Author

fcakyon commented Aug 3, 2025

@onuralpszr I removed them since the repo doesn't contain such files (already ignored in the .gitignore file) to simplify context7 config

Comment on lines +69 to +72
"Use Coco.stats to get comprehensive dataset statistics before training (num annotations, area distribution, etc.)",
"Import logger from 'from sahi.logging import logger' instead of creating redundant logging configurations - centralized logging system eliminates duplicate imports across codebase",
"For SAHI documentation, direct users to https://obss.github.io/sahi/ which provides comprehensive guides, interactive examples, CLI reference, and API documentation",
"To update SAHI docs: modify markdown files in docs/ directory, update mkdocs.yml for navigation changes, ensure .github/workflows/publish_docs.yml deploys correctly to GitHub Pages"
Copy link
Copy Markdown
Collaborator Author

@fcakyon fcakyon Aug 3, 2025

Choose a reason for hiding this comment

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

also added these 3 new rules to guide the ai agents @onuralpszr

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For quick-start maybe we can also include another link like this one "https://obss.github.io/sahi/quick-start/" what do you think ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

How about directly directing users to https://obss.github.io/sahi/quick-start instead of https://obss.github.io/sahi/ ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is context7 click the between pages If "yes" then we should stick with main URL or maybe we should include "llms.txt" file so it can read them all ?

Copy link
Copy Markdown
Collaborator Author

@fcakyon fcakyon Aug 3, 2025

Choose a reason for hiding this comment

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

context7 indexes all documentation and generates usage examples for all existing function classes in the repo. Currently, 87 snippets and 12k tokens of example code are available, but the index was last refreshed a month ago, so it doesn't contain your latest docs update changes yet. I'll trigger reindexing after merging this PR 👍🏻

When context7 MCP is called via an AI agent, it performs RAG and retrieves the most relevant bits by default. But it can also retrieve the whole llms.txt content at once by setting a larger max_tokens.

We are adding this https://obss.github.io/sahi/quick-start guidance into context7 rules so that the agent can guide the user to it when needed. Agent doesn't need it (AI Agents already has access to all .md files in the repo by context7 RAG DB.)

@fcakyon fcakyon merged commit f0cd58c into main Aug 3, 2025
6 checks passed
@fcakyon fcakyon deleted the fcakyon-patch-1 branch August 3, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants