cairntir 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. cairntir-1.0.0/.claude-plugin/plugin.json +36 -0
  2. cairntir-1.0.0/.editorconfig +18 -0
  3. cairntir-1.0.0/.gitattributes +41 -0
  4. cairntir-1.0.0/.github/CODEOWNERS +6 -0
  5. cairntir-1.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +62 -0
  6. cairntir-1.0.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  7. cairntir-1.0.0/.github/ISSUE_TEMPLATE/feature_request.yml +33 -0
  8. cairntir-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +32 -0
  9. cairntir-1.0.0/.github/dependabot.yml +23 -0
  10. cairntir-1.0.0/.github/workflows/ci.yml +91 -0
  11. cairntir-1.0.0/.github/workflows/codeql.yml +25 -0
  12. cairntir-1.0.0/.github/workflows/docs.yml +46 -0
  13. cairntir-1.0.0/.github/workflows/release.yml +60 -0
  14. cairntir-1.0.0/.gitignore +93 -0
  15. cairntir-1.0.0/.mcp.json +9 -0
  16. cairntir-1.0.0/.pre-commit-config.yaml +48 -0
  17. cairntir-1.0.0/.vscode/extensions.json +10 -0
  18. cairntir-1.0.0/.vscode/settings.json +20 -0
  19. cairntir-1.0.0/CHANGELOG.md +120 -0
  20. cairntir-1.0.0/CLAUDE.md +459 -0
  21. cairntir-1.0.0/CODE_OF_CONDUCT.md +28 -0
  22. cairntir-1.0.0/CONTRIBUTING.md +110 -0
  23. cairntir-1.0.0/ETHOS.md +154 -0
  24. cairntir-1.0.0/GOVERNANCE.md +71 -0
  25. cairntir-1.0.0/HARNESS_AUDIT.md +293 -0
  26. cairntir-1.0.0/LICENSE +21 -0
  27. cairntir-1.0.0/PKG-INFO +352 -0
  28. cairntir-1.0.0/README.md +288 -0
  29. cairntir-1.0.0/SECURITY.md +37 -0
  30. cairntir-1.0.0/commands/reason.md +12 -0
  31. cairntir-1.0.0/commands/recall.md +9 -0
  32. cairntir-1.0.0/commands/remember.md +13 -0
  33. cairntir-1.0.0/docs/cairntir-for-dummies.md +253 -0
  34. cairntir-1.0.0/docs/concept.md +109 -0
  35. cairntir-1.0.0/docs/conception.md +240 -0
  36. cairntir-1.0.0/docs/deprecation-policy.md +128 -0
  37. cairntir-1.0.0/docs/how-to-use.md +327 -0
  38. cairntir-1.0.0/docs/index.md +21 -0
  39. cairntir-1.0.0/docs/integration-guide.md +298 -0
  40. cairntir-1.0.0/docs/lineage/brainstormer.md +119 -0
  41. cairntir-1.0.0/docs/lineage/mempalace.md +98 -0
  42. cairntir-1.0.0/docs/manifesto.md +69 -0
  43. cairntir-1.0.0/docs/publish-checklist.md +227 -0
  44. cairntir-1.0.0/docs/recipes/signal-reader/README.md +285 -0
  45. cairntir-1.0.0/docs/recipes/signal-reader/examples/march-2026.md +432 -0
  46. cairntir-1.0.0/docs/roadmap.md +366 -0
  47. cairntir-1.0.0/lineage/brainstormer/ETHOS.md +154 -0
  48. cairntir-1.0.0/lineage/brainstormer/HARNESS_AUDIT.md +293 -0
  49. cairntir-1.0.0/lineage/brainstormer/agent-species.md +178 -0
  50. cairntir-1.0.0/lineage/brainstormer/brainstormer-CLAUDE.md +243 -0
  51. cairntir-1.0.0/lineage/brainstormer/crucible-SKILL.md +377 -0
  52. cairntir-1.0.0/lineage/brainstormer/oracle-round-table-transcript.md +224 -0
  53. cairntir-1.0.0/lineage/brainstormer/project_v1_realization.md +23 -0
  54. cairntir-1.0.0/lineage/brainstormer/quality-SKILL.md +368 -0
  55. cairntir-1.0.0/lineage/brainstormer/severity-tiers.md +159 -0
  56. cairntir-1.0.0/lineage/brainstormer/user_tsc_ethos.md +25 -0
  57. cairntir-1.0.0/mkdocs.yml +59 -0
  58. cairntir-1.0.0/plans/purrfect-drifting-sparrow.md +308 -0
  59. cairntir-1.0.0/plans/signal-reader.md +289 -0
  60. cairntir-1.0.0/pyproject.toml +176 -0
  61. cairntir-1.0.0/scripts/check_no_silent_except.py +67 -0
  62. cairntir-1.0.0/src/cairntir/__init__.py +86 -0
  63. cairntir-1.0.0/src/cairntir/__main__.py +8 -0
  64. cairntir-1.0.0/src/cairntir/cli.py +661 -0
  65. cairntir-1.0.0/src/cairntir/config.py +28 -0
  66. cairntir-1.0.0/src/cairntir/contracts.py +102 -0
  67. cairntir-1.0.0/src/cairntir/daemon/__init__.py +28 -0
  68. cairntir-1.0.0/src/cairntir/daemon/__main__.py +34 -0
  69. cairntir-1.0.0/src/cairntir/daemon/capture.py +99 -0
  70. cairntir-1.0.0/src/cairntir/daemon/spool.py +119 -0
  71. cairntir-1.0.0/src/cairntir/errors.py +66 -0
  72. cairntir-1.0.0/src/cairntir/impl/__init__.py +33 -0
  73. cairntir-1.0.0/src/cairntir/mcp/__init__.py +11 -0
  74. cairntir-1.0.0/src/cairntir/mcp/backend.py +165 -0
  75. cairntir-1.0.0/src/cairntir/mcp/server.py +158 -0
  76. cairntir-1.0.0/src/cairntir/memory/__init__.py +41 -0
  77. cairntir-1.0.0/src/cairntir/memory/belief.py +94 -0
  78. cairntir-1.0.0/src/cairntir/memory/consolidate.py +197 -0
  79. cairntir-1.0.0/src/cairntir/memory/embeddings.py +120 -0
  80. cairntir-1.0.0/src/cairntir/memory/retrieval.py +95 -0
  81. cairntir-1.0.0/src/cairntir/memory/store.py +417 -0
  82. cairntir-1.0.0/src/cairntir/memory/taxonomy.py +108 -0
  83. cairntir-1.0.0/src/cairntir/portable.py +347 -0
  84. cairntir-1.0.0/src/cairntir/py.typed +0 -0
  85. cairntir-1.0.0/src/cairntir/reason/__init__.py +36 -0
  86. cairntir-1.0.0/src/cairntir/reason/loop.py +157 -0
  87. cairntir-1.0.0/src/cairntir/reason/model.py +76 -0
  88. cairntir-1.0.0/src/cairntir/reason/ports.py +94 -0
  89. cairntir-1.0.0/src/cairntir/skills/__init__.py +38 -0
  90. cairntir-1.0.0/src/cairntir/skills/crucible.md +223 -0
  91. cairntir-1.0.0/src/cairntir/skills/quality.md +157 -0
  92. cairntir-1.0.0/src/cairntir/skills/reason.md +168 -0
  93. cairntir-1.0.0/tests/conftest.py +17 -0
  94. cairntir-1.0.0/tests/contract/__init__.py +1 -0
  95. cairntir-1.0.0/tests/contract/test_store_contract.py +174 -0
  96. cairntir-1.0.0/tests/eval/test_longmemeval_subset.py +124 -0
  97. cairntir-1.0.0/tests/integration/test_daemon_capture.py +137 -0
  98. cairntir-1.0.0/tests/integration/test_mcp_backend.py +108 -0
  99. cairntir-1.0.0/tests/property/__init__.py +1 -0
  100. cairntir-1.0.0/tests/property/test_retrieval_monotonicity.py +162 -0
  101. cairntir-1.0.0/tests/property/test_taxonomy_properties.py +60 -0
  102. cairntir-1.0.0/tests/unit/test_belief.py +137 -0
  103. cairntir-1.0.0/tests/unit/test_cli.py +462 -0
  104. cairntir-1.0.0/tests/unit/test_consolidate.py +181 -0
  105. cairntir-1.0.0/tests/unit/test_embeddings.py +42 -0
  106. cairntir-1.0.0/tests/unit/test_plugin.py +39 -0
  107. cairntir-1.0.0/tests/unit/test_portable.py +217 -0
  108. cairntir-1.0.0/tests/unit/test_public_api.py +84 -0
  109. cairntir-1.0.0/tests/unit/test_reason_loop.py +246 -0
  110. cairntir-1.0.0/tests/unit/test_retrieval.py +73 -0
  111. cairntir-1.0.0/tests/unit/test_skills.py +25 -0
  112. cairntir-1.0.0/tests/unit/test_smoke.py +32 -0
  113. cairntir-1.0.0/tests/unit/test_store.py +330 -0
  114. cairntir-1.0.0/tests/unit/test_taxonomy.py +43 -0
  115. cairntir-1.0.0/uv.lock +2616 -0
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://claude.com/schemas/plugin.json",
3
+ "name": "cairntir",
4
+ "version": "1.0.0",
5
+ "description": "Memory-first reasoning layer for Claude Code. Kills cross-chat AI amnesia.",
6
+ "author": {
7
+ "name": "Patrick McGuire",
8
+ "url": "https://github.com/pnmcguire480"
9
+ },
10
+ "license": "MIT",
11
+ "homepage": "https://github.com/pnmcguire480/cairntir",
12
+ "repository": "https://github.com/pnmcguire480/cairntir",
13
+ "commands": [
14
+ {
15
+ "name": "remember",
16
+ "description": "Store a verbatim memory drawer in the current wing.",
17
+ "file": "commands/remember.md"
18
+ },
19
+ {
20
+ "name": "recall",
21
+ "description": "Semantic + metadata search across stored drawers.",
22
+ "file": "commands/recall.md"
23
+ },
24
+ {
25
+ "name": "reason",
26
+ "description": "Think through a question using memory-backed retrieval.",
27
+ "file": "commands/reason.md"
28
+ }
29
+ ],
30
+ "mcpServers": {
31
+ "cairntir": {
32
+ "command": "python",
33
+ "args": ["-m", "cairntir.mcp.server"]
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,18 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.{json,yml,yaml,md}]
12
+ indent_size = 2
13
+
14
+ [*.{bat,cmd,ps1}]
15
+ end_of_line = crlf
16
+
17
+ [Makefile]
18
+ indent_style = tab
@@ -0,0 +1,41 @@
1
+ # Normalize line endings for text files
2
+ * text=auto eol=lf
3
+
4
+ # Python
5
+ *.py text diff=python
6
+ *.pyi text diff=python
7
+
8
+ # Config
9
+ *.toml text
10
+ *.yaml text
11
+ *.yml text
12
+ *.json text
13
+ *.md text
14
+ *.txt text
15
+ *.cfg text
16
+ *.ini text
17
+
18
+ # Shell
19
+ *.sh text eol=lf
20
+ *.bash text eol=lf
21
+
22
+ # Windows scripts
23
+ *.bat text eol=crlf
24
+ *.cmd text eol=crlf
25
+ *.ps1 text eol=crlf
26
+
27
+ # Binary
28
+ *.png binary
29
+ *.jpg binary
30
+ *.jpeg binary
31
+ *.gif binary
32
+ *.ico binary
33
+ *.db binary
34
+ *.sqlite binary
35
+ *.sqlite3 binary
36
+ *.zip binary
37
+ *.gz binary
38
+ *.tar binary
39
+
40
+ # Jupyter notebooks — diff as JSON
41
+ *.ipynb text
@@ -0,0 +1,6 @@
1
+ # Cairntir CODEOWNERS
2
+ #
3
+ # @pnmcguire480 is the sole owner for v1. Add contributors here as trust is earned.
4
+ # See GOVERNANCE.md for the decision model.
5
+
6
+ * @pnmcguire480
@@ -0,0 +1,62 @@
1
+ name: Bug Report
2
+ description: Report a defect in Cairntir
3
+ title: "[bug] "
4
+ labels: ["bug", "triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for reporting. Cairntir takes correctness seriously — every bug report matters.
10
+ - type: textarea
11
+ id: what-happened
12
+ attributes:
13
+ label: What happened?
14
+ description: A clear description of the bug.
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: expected
19
+ attributes:
20
+ label: What did you expect to happen?
21
+ validations:
22
+ required: true
23
+ - type: textarea
24
+ id: reproduce
25
+ attributes:
26
+ label: Steps to reproduce
27
+ placeholder: |
28
+ 1. Run `cairntir ...`
29
+ 2. ...
30
+ 3. See error
31
+ validations:
32
+ required: true
33
+ - type: input
34
+ id: version
35
+ attributes:
36
+ label: Cairntir version
37
+ placeholder: "0.1.0.dev0"
38
+ validations:
39
+ required: true
40
+ - type: input
41
+ id: python
42
+ attributes:
43
+ label: Python version
44
+ placeholder: "3.12.5"
45
+ validations:
46
+ required: true
47
+ - type: dropdown
48
+ id: os
49
+ attributes:
50
+ label: Operating system
51
+ options:
52
+ - Linux
53
+ - macOS
54
+ - Windows
55
+ - Other
56
+ validations:
57
+ required: true
58
+ - type: textarea
59
+ id: logs
60
+ attributes:
61
+ label: Relevant logs / tracebacks
62
+ render: shell
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://pnmcguire480.github.io/cairntir/
5
+ about: Read the docs before filing an issue.
6
+ - name: Discussions
7
+ url: https://github.com/pnmcguire480/cairntir/discussions
8
+ about: Ask a question or start a discussion.
@@ -0,0 +1,33 @@
1
+ name: Feature Request
2
+ description: Suggest an idea for Cairntir
3
+ title: "[feat] "
4
+ labels: ["enhancement", "triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Before proposing a feature, please re-read `docs/concept.md`. Cairntir is deliberately minimal — we say no to most features. Please argue for *why* this one serves the north star (killing cross-chat amnesia).
10
+ - type: textarea
11
+ id: problem
12
+ attributes:
13
+ label: What problem does this solve?
14
+ description: Describe the pain point. Not the feature yet — the pain.
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: proposal
19
+ attributes:
20
+ label: Proposed solution
21
+ validations:
22
+ required: true
23
+ - type: textarea
24
+ id: alternatives
25
+ attributes:
26
+ label: Alternatives considered
27
+ - type: textarea
28
+ id: north-star
29
+ attributes:
30
+ label: How does this serve the north star?
31
+ description: The north star is killing cross-chat amnesia. How does this feature advance it?
32
+ validations:
33
+ required: true
@@ -0,0 +1,32 @@
1
+ ## Summary
2
+
3
+ <!-- What does this PR do, in 1-3 sentences? -->
4
+
5
+ ## Why
6
+
7
+ <!-- What problem does it solve, or what mission does it serve? Link issues. -->
8
+
9
+ Closes #
10
+
11
+ ## Changes
12
+
13
+ <!-- Bullet list of the actual changes. -->
14
+
15
+ -
16
+ -
17
+
18
+ ## Checklist
19
+
20
+ - [ ] My commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)
21
+ - [ ] `ruff check src tests` passes with zero warnings
22
+ - [ ] `ruff format --check src tests` passes
23
+ - [ ] `mypy --strict src` passes with zero errors
24
+ - [ ] `pytest` passes with ≥80% coverage
25
+ - [ ] No silent `except: pass` blocks introduced (CI enforces this)
26
+ - [ ] No hardcoded paths (use `platformdirs` / config)
27
+ - [ ] Documentation updated if public API changed
28
+ - [ ] `CHANGELOG.md` updated under `[Unreleased]`
29
+
30
+ ## Screenshots / Output
31
+
32
+ <!-- If relevant. Delete if not. -->
@@ -0,0 +1,23 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ day: "monday"
8
+ open-pull-requests-limit: 5
9
+ commit-message:
10
+ prefix: "chore(deps)"
11
+ labels:
12
+ - "dependencies"
13
+
14
+ - package-ecosystem: "github-actions"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ day: "monday"
19
+ commit-message:
20
+ prefix: "chore(ci)"
21
+ labels:
22
+ - "dependencies"
23
+ - "ci"
@@ -0,0 +1,91 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ lint:
16
+ name: Lint & Type Check
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v3
22
+ with:
23
+ enable-cache: true
24
+ - name: Set up Python
25
+ run: uv python install 3.12
26
+ - name: Install dependencies
27
+ run: uv sync --all-extras --dev
28
+ - name: Ruff check
29
+ run: uv run ruff check src tests
30
+ - name: Ruff format check
31
+ run: uv run ruff format --check src tests
32
+ - name: Mypy strict
33
+ run: uv run mypy --strict src
34
+ - name: No silent except check
35
+ run: uv run python scripts/check_no_silent_except.py
36
+
37
+ test:
38
+ name: Test (${{ matrix.os }} / Python ${{ matrix.python }})
39
+ needs: lint
40
+ runs-on: ${{ matrix.os }}
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ os: [ubuntu-latest, macos-latest, windows-latest]
45
+ python: ["3.11", "3.12", "3.13"]
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+ - name: Install uv
49
+ uses: astral-sh/setup-uv@v3
50
+ with:
51
+ enable-cache: true
52
+ - name: Set up Python ${{ matrix.python }}
53
+ run: uv python install ${{ matrix.python }}
54
+ - name: Install dependencies
55
+ run: uv sync --all-extras --dev
56
+ - name: Run tests
57
+ run: uv run pytest -m "not slow" --cov-fail-under=80
58
+
59
+ eval:
60
+ name: LongMemEval R@5 Gate
61
+ needs: test
62
+ runs-on: ubuntu-latest
63
+ steps:
64
+ - uses: actions/checkout@v4
65
+ - name: Install uv
66
+ uses: astral-sh/setup-uv@v3
67
+ with:
68
+ enable-cache: true
69
+ - name: Set up Python
70
+ run: uv python install 3.12
71
+ - name: Install dependencies
72
+ run: uv sync --all-extras --dev
73
+ - name: Run LongMemEval subset (R@5 >= 0.80 or fail)
74
+ run: uv run pytest -m eval --no-cov -q
75
+
76
+ build:
77
+ name: Build Package
78
+ needs: test
79
+ runs-on: ubuntu-latest
80
+ steps:
81
+ - uses: actions/checkout@v4
82
+ - name: Install uv
83
+ uses: astral-sh/setup-uv@v3
84
+ - name: Build
85
+ run: uv build
86
+ - name: Upload artifact
87
+ uses: actions/upload-artifact@v4
88
+ with:
89
+ name: dist
90
+ path: dist/
91
+ retention-days: 7
@@ -0,0 +1,25 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 6 * * 1"
10
+
11
+ jobs:
12
+ analyze:
13
+ name: Analyze Python
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ actions: read
17
+ contents: read
18
+ security-events: write
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: github/codeql-action/init@v3
22
+ with:
23
+ languages: python
24
+ queries: security-and-quality
25
+ - uses: github/codeql-action/analyze@v3
@@ -0,0 +1,46 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "docs/**"
8
+ - "mkdocs.yml"
9
+ - ".github/workflows/docs.yml"
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ pages: write
15
+ id-token: write
16
+
17
+ concurrency:
18
+ group: pages
19
+ cancel-in-progress: false
20
+
21
+ jobs:
22
+ build:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v3
28
+ - name: Install docs deps
29
+ run: uv sync --extra docs
30
+ - name: Build site
31
+ run: uv run mkdocs build --strict
32
+ - name: Upload Pages artifact
33
+ uses: actions/upload-pages-artifact@v3
34
+ with:
35
+ path: site
36
+
37
+ deploy:
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ environment:
41
+ name: github-pages
42
+ url: ${{ steps.deployment.outputs.page_url }}
43
+ steps:
44
+ - name: Deploy to GitHub Pages
45
+ id: deployment
46
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,60 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write # PyPI trusted publishing
12
+
13
+ jobs:
14
+ build:
15
+ name: Build
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v3
21
+ - name: Build distributions
22
+ run: uv build
23
+ - name: Upload
24
+ uses: actions/upload-artifact@v4
25
+ with:
26
+ name: dist
27
+ path: dist/
28
+
29
+ publish-pypi:
30
+ name: Publish to PyPI
31
+ needs: build
32
+ runs-on: ubuntu-latest
33
+ environment:
34
+ name: pypi
35
+ url: https://pypi.org/p/cairntir
36
+ steps:
37
+ - uses: actions/download-artifact@v4
38
+ with:
39
+ name: dist
40
+ path: dist/
41
+ - name: Publish
42
+ uses: pypa/gh-action-pypi-publish@release/v1
43
+
44
+ github-release:
45
+ name: GitHub Release
46
+ needs: build
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: actions/download-artifact@v4
51
+ with:
52
+ name: dist
53
+ path: dist/
54
+ - name: Create release
55
+ uses: softprops/action-gh-release@v2
56
+ with:
57
+ files: dist/*
58
+ generate_release_notes: true
59
+ draft: false
60
+ prerelease: ${{ contains(github.ref_name, '-') }}
@@ -0,0 +1,93 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ share/python-wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+ MANIFEST
24
+
25
+ # Virtual environments
26
+ .env
27
+ .venv
28
+ env/
29
+ venv/
30
+ ENV/
31
+ env.bak/
32
+ venv.bak/
33
+
34
+ # Testing
35
+ .pytest_cache/
36
+ .coverage
37
+ .coverage.*
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ coverage.xml
42
+ *.cover
43
+ *.py,cover
44
+ .hypothesis/
45
+
46
+ # Type checking
47
+ .mypy_cache/
48
+ .dmypy.json
49
+ dmypy.json
50
+ .pyre/
51
+ .pytype/
52
+
53
+ # Ruff
54
+ .ruff_cache/
55
+
56
+ # Docs
57
+ site/
58
+ /public
59
+
60
+ # Editors
61
+ .vscode/*
62
+ !.vscode/settings.json
63
+ !.vscode/extensions.json
64
+ .idea/
65
+ *.swp
66
+ *.swo
67
+ *~
68
+ .DS_Store
69
+ Thumbs.db
70
+
71
+ # Cairntir runtime
72
+ *.db
73
+ *.db-journal
74
+ *.sqlite
75
+ *.sqlite3
76
+ cairntir.db
77
+ .cairntir/
78
+ embeddings_cache/
79
+
80
+ # uv
81
+ .uv/
82
+
83
+ # Logs
84
+ *.log
85
+ logs/
86
+
87
+ # OS
88
+ .DS_Store
89
+ .AppleDouble
90
+ .LSOverride
91
+ ehthumbs.db
92
+ Desktop.ini
93
+ cairntir-signal-reader.zip
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "cairntir": {
4
+ "command": "python",
5
+ "args": ["-m", "cairntir.mcp.server"],
6
+ "env": {}
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,48 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-toml
9
+ - id: check-added-large-files
10
+ args: ["--maxkb=1000"]
11
+ - id: check-merge-conflict
12
+ - id: check-case-conflict
13
+ - id: mixed-line-ending
14
+ args: ["--fix=lf"]
15
+ - id: detect-private-key
16
+
17
+ - repo: https://github.com/astral-sh/ruff-pre-commit
18
+ rev: v0.6.9
19
+ hooks:
20
+ - id: ruff
21
+ args: ["--fix", "--exit-non-zero-on-fix"]
22
+ - id: ruff-format
23
+
24
+ - repo: https://github.com/pre-commit/mirrors-mypy
25
+ rev: v1.11.2
26
+ hooks:
27
+ - id: mypy
28
+ additional_dependencies:
29
+ - pydantic>=2.7.0
30
+ - types-PyYAML
31
+ args: ["--strict", "--config-file=pyproject.toml"]
32
+ files: ^src/
33
+
34
+ - repo: https://github.com/compilerla/conventional-pre-commit
35
+ rev: v3.4.0
36
+ hooks:
37
+ - id: conventional-pre-commit
38
+ stages: [commit-msg]
39
+ args: [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert]
40
+
41
+ - repo: local
42
+ hooks:
43
+ - id: no-silent-except
44
+ name: ban silent except:pass
45
+ entry: python scripts/check_no_silent_except.py
46
+ language: system
47
+ pass_filenames: false
48
+ files: ^src/.*\.py$
@@ -0,0 +1,10 @@
1
+ {
2
+ "recommendations": [
3
+ "charliermarsh.ruff",
4
+ "ms-python.python",
5
+ "ms-python.mypy-type-checker",
6
+ "tamasfe.even-better-toml",
7
+ "editorconfig.editorconfig",
8
+ "yzhang.markdown-all-in-one"
9
+ ]
10
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "python.analysis.typeCheckingMode": "strict",
3
+ "python.testing.pytestEnabled": true,
4
+ "python.testing.pytestArgs": ["tests"],
5
+ "editor.formatOnSave": true,
6
+ "editor.codeActionsOnSave": {
7
+ "source.fixAll.ruff": "explicit",
8
+ "source.organizeImports.ruff": "explicit"
9
+ },
10
+ "[python]": {
11
+ "editor.defaultFormatter": "charliermarsh.ruff"
12
+ },
13
+ "files.exclude": {
14
+ "**/__pycache__": true,
15
+ "**/.pytest_cache": true,
16
+ "**/.mypy_cache": true,
17
+ "**/.ruff_cache": true,
18
+ "**/*.egg-info": true
19
+ }
20
+ }