-
Notifications
You must be signed in to change notification settings - Fork 326
Zekiog verified memory repo shortlist plan #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Zekiog
wants to merge
7
commits into
LLMQuant:master
Choose a base branch
from
Zekiog:zekiog-verified-memory-repo-shortlist-plan
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5acaff6
docs: add Fincept AI Ops integration guide
Zekiog bad60f5
docs: refresh agentic project positioning
Copilot d3ea090
chore: ignore local virtualenv artifacts
Copilot 9113b1f
Merge pull request #1 from Zekiog/copilot/optimize-readme-for-ai-agents
Zekiog da52908
docs(memory): add verified shortlist correction draft
Zekiog 58912cc
feat(flows): add recoverable validation, governance, and hybrid memory
Zekiog cbe96a6
Potential fix for pull request finding
Zekiog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ CMakeLists_modified.txt | |
|
|
||
| build/ | ||
| *.egg-info | ||
| .venv/ | ||
|
|
||
| lib/ | ||
| bin/ | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"version":1,"sessions":{}} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,144 +1,144 @@ | ||
| # Contributing to QuantMind | ||
|
|
||
| Thank you for contributing to QuantMind! This guide provides essential information for developers. | ||
| Thank you for contributing to QuantMind. | ||
|
|
||
| ## 🚀 Quick Setup | ||
| QuantMind is now a **domain library on top of the OpenAI Agents SDK**, not a | ||
| self-contained agent framework. The first production flow is finance-first, but | ||
| the architecture is intentionally useful for broader agentic knowledge work. | ||
|
|
||
| 1. **Fork and clone** the repository | ||
| 2. **Set up environment**: | ||
| ```bash | ||
| uv venv && source .venv/bin/activate | ||
| uv pip install -e . | ||
| ``` | ||
| 3. **Install pre-commit hooks**: | ||
| ```bash | ||
| ./scripts/pre-commit-setup.sh | ||
| ``` | ||
| ## 🚀 Quick setup | ||
|
|
||
| ## 🛠️ Development Setup | ||
| ```bash | ||
| uv venv | ||
| source .venv/bin/activate | ||
| uv pip install -e ".[dev]" | ||
| ./scripts/pre-commit-setup.sh | ||
| ``` | ||
|
|
||
| ### Pre-commit Hooks | ||
| If `uv` is unavailable in your environment, a standard Python venv is an | ||
| acceptable fallback: | ||
|
|
||
| ```bash | ||
| python3 -m venv .venv | ||
| source .venv/bin/activate | ||
| pip install -e ".[dev]" | ||
| ``` | ||
|
|
||
| We use pre-commit hooks to ensure code quality and consistency. These hooks automatically format code, run linting, and perform other quality checks before each commit. | ||
| ## ✅ Canonical verification loop | ||
|
|
||
| **Install pre-commit hooks:** | ||
| Run this before every push: | ||
|
|
||
| ```bash | ||
| # Automated setup (recommended) | ||
| ./scripts/pre-commit-setup.sh | ||
|
|
||
| # Or manual setup | ||
| pip install pre-commit | ||
| pre-commit install | ||
| pre-commit install --hook-type pre-push | ||
| bash scripts/verify.sh | ||
| ``` | ||
|
|
||
| **What the hooks do:** | ||
| This is the single source of truth for branch health. It runs: | ||
|
|
||
| - **On every commit:** | ||
| - Code formatting with `ruff format` (80-char line length) | ||
| - Linting with `ruff check --fix` (auto-fixes issues) | ||
| - File quality checks (trailing whitespace, EOF, YAML syntax) | ||
| - Safety checks (large files, merge conflicts) | ||
| 1. `ruff format --check` | ||
| 2. `ruff check` | ||
| 3. `basedpyright` | ||
| 4. `lint-imports` | ||
| 5. `pytest --cov` | ||
|
|
||
| - **On push to remote:** | ||
| - Full unit test suite via `scripts/unittest.sh` | ||
| CI runs the same script. | ||
|
|
||
| **Manual execution:** | ||
| ## 🏗️ Current architecture | ||
|
|
||
| ```bash | ||
| # Run formatting and linting | ||
| ./scripts/lint.sh | ||
| The permanent module roots are: | ||
|
|
||
| # Run all pre-commit hooks on all files | ||
| pre-commit run --all-files | ||
| - `quantmind/flows/` — apex orchestration layer | ||
| - `quantmind/configs/` — typed inputs and config | ||
| - `quantmind/knowledge/` — typed knowledge shapes and provenance | ||
| - `quantmind/preprocess/` — fetch + format + clean | ||
| - `quantmind/magic.py` — natural-language resolver | ||
| - `quantmind/mind/` — upcoming memory/store work | ||
| - `quantmind/utils/` — logger only | ||
|
|
||
| # Run specific tests | ||
| ./scripts/unittest.sh tests/quantmind/sources/ | ||
| ./scripts/unittest.sh all # Run all tests | ||
| ``` | ||
| Do **not** re-introduce the deleted transitional/runtime packages such as | ||
| `quantmind.flow`, `quantmind.config`, `quantmind.llm`, or `quantmind.models`. | ||
|
|
||
| ## 🧭 Design rules | ||
|
|
||
| **Troubleshooting:** | ||
| - Prefer **pure functions** over framework classes. | ||
| - Use the **OpenAI Agents SDK directly**; do not build a new runtime wrapper. | ||
| - Keep **Pydantic models at boundaries** and small internal value types simple. | ||
| - Use **absolute imports** across module boundaries. | ||
| - Keep **comments and docstrings in English** with Google-style formatting. | ||
| - Preserve architectural boundaries enforced by `import-linter`. | ||
|
|
||
| - If hooks fail, fix the issues and commit again | ||
| - To skip hooks temporarily (not recommended): `git commit --no-verify` | ||
| - Update hooks: `pre-commit autoupdate` | ||
| ## 🧪 Testing expectations | ||
|
|
||
| ## 📝 Development Standards | ||
| - Add or update tests under `tests/` when behavior changes. | ||
| - New feature work should cover both success and failure paths. | ||
| - Mock external services and network calls. | ||
| - Keep coverage above the configured floor. | ||
|
|
||
| ### Code Requirements | ||
| - **Location**: All new code in `quantmind/` module | ||
| - **Style**: Google-style docstrings, 80-char line length | ||
| - **Architecture**: Abstract base classes + dependency injection | ||
| - **Type Safety**: Pydantic models + comprehensive type hints | ||
| For implementation work, add a simple example when it helps demonstrate the new | ||
| behavior clearly. | ||
|
|
||
| ### Testing | ||
| - **Unit tests**: Required in `tests/quantmind/` (mirror module structure) | ||
| - **Coverage**: Test success and error cases | ||
| - **Mocking**: Mock external APIs and file systems | ||
| ## 🧩 Common contribution paths | ||
|
|
||
| ### Documentation | ||
| - **Examples**: Add to `examples/quantmind/` for new features | ||
| - **Docstrings**: Google-style format for all public methods | ||
| ### New knowledge type | ||
|
|
||
| ## 🏗️ Contribution Types | ||
| - Add a schema under `quantmind/knowledge/` | ||
| - Choose the right base shape (`FlattenKnowledge`, `TreeKnowledge`, or future | ||
| `GraphKnowledge`) | ||
| - Implement `embedding_text()` | ||
| - Add tests under `tests/knowledge/` | ||
|
|
||
| ### New Sources | ||
| - Extend `BaseSource[ContentType]` in `quantmind/sources/` | ||
| - Add config in `quantmind/config/sources.py` | ||
| - Include tests and usage example | ||
| ### New flow | ||
|
|
||
| ### New Parsers | ||
| - Extend `BaseParser` in `quantmind/parsers/` | ||
| - Handle multiple content formats with error handling | ||
| - Add a typed input/config module under `quantmind/configs/` | ||
| - Add a pure `async def ..._flow(...)` under `quantmind/flows/` | ||
| - Use `preprocess/` helpers instead of duplicating fetch/format logic | ||
| - Return a typed knowledge object | ||
| - Add tests under `tests/flows/` | ||
|
|
||
| ### New Taggers | ||
| - Extend `BaseTagger` in `quantmind/tagger/` | ||
| - Support rule-based and ML approaches | ||
| ### New source or format support | ||
|
|
||
| ### Storage Backends | ||
| - Extend `BaseStorage` in `quantmind/storage/` | ||
| - Implement indexing, querying, and concurrent access | ||
| - Add leaf functionality under `quantmind/preprocess/` | ||
| - Keep `preprocess/` independent of `configs/`, `knowledge/`, and `flows/` | ||
| - Add focused tests under `tests/preprocess/` | ||
|
|
||
| ## 🔄 Pull Request Process | ||
| ### New domain extension | ||
|
|
||
| 1. **Create feature branch** from `master` | ||
| 2. **Follow conventional commits**: `type(scope): description` | ||
| 3. **Pre-commit hooks** run automatically on commit/push | ||
| 4. **Before submitting**: | ||
| ```bash | ||
| pre-commit run --all-files | ||
| ./scripts/unittest.sh all | ||
| ``` | ||
| 5. **Submit PR** using our template | ||
| If you are adapting QuantMind beyond finance, read | ||
| `docs/ARCHITECTURE_FOR_NEW_DOMAINS.md` first and keep the extension aligned with | ||
| the existing layering. | ||
|
|
||
| ### PR Checklist | ||
| - [ ] Code in `quantmind/` following architecture patterns | ||
| - [ ] Unit tests with comprehensive coverage | ||
| - [ ] Usage example (for new features) | ||
| - [ ] All pre-commit hooks pass | ||
| - [ ] Conventional commit format | ||
| ## 🔄 Pull request expectations | ||
|
|
||
| ## 💡 Development Tips | ||
| Before submitting a PR: | ||
|
|
||
| ```bash | ||
| # Run specific tests | ||
| pytest tests/quantmind/sources/ | ||
| pytest tests/quantmind/models/ | ||
| pre-commit run --all-files | ||
| bash scripts/verify.sh | ||
| ``` | ||
|
|
||
| # Test CLI functionality | ||
| quantmind extract "test query" --max-papers 5 | ||
| quantmind config show | ||
| Also make sure: | ||
|
|
||
| # Check code quality | ||
| ./scripts/lint.sh | ||
| ``` | ||
| - commits use conventional-commit style (`feat:`, `fix:`, `docs:`, `refactor:`) | ||
| - PR titles and descriptions are written in English | ||
| - docs are updated when behavior or extension points change | ||
|
|
||
| ## 🤖 Agent-facing documentation | ||
|
|
||
| QuantMind is increasingly consumed by AI agents as well as humans. Treat the | ||
| following files as product surfaces: | ||
|
|
||
| - `README.md` | ||
| - `CONTRIBUTING.md` | ||
| - `docs/ARCHITECTURE_FOR_NEW_DOMAINS.md` | ||
|
|
||
| If you change architecture, memory semantics, or extension paths, update the | ||
| relevant documentation in the same PR. During active iteration, these agent- | ||
| facing docs should be reviewed regularly so agent workflows do not drift away | ||
| from the real codebase. | ||
|
|
||
| ## ❓ Questions? | ||
| ## ❓Questions? | ||
|
|
||
| - Check existing [issues](https://github.com/LLMQuant/quant-mind/issues) | ||
| - Review architecture patterns in existing code | ||
| - Look at `examples/` for usage patterns | ||
| - See `CLAUDE.md` for detailed architecture | ||
| - Review `CLAUDE.md` for the detailed architecture context | ||
| - Read `docs/ARCHITECTURE_FOR_NEW_DOMAINS.md` for extension guidance | ||
|
|
||
| Thank you for contributing! 🚀 | ||
| Thank you for contributing. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.