seif-cli 0.1.2__tar.gz → 0.2.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 (116) hide show
  1. seif_cli-0.2.0/PKG-INFO +199 -0
  2. seif_cli-0.2.0/README.md +155 -0
  3. {seif_cli-0.1.2 → seif_cli-0.2.0}/pyproject.toml +21 -14
  4. seif_cli-0.2.0/src/seif/cli/cli.py +3071 -0
  5. seif_cli-0.2.0/src/seif/cli/identity.py +261 -0
  6. seif_cli-0.2.0/src/seif/cli/wrapper.py +470 -0
  7. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/constants.py +75 -11
  8. seif_cli-0.2.0/src/seif/context/code_compressor.py +1124 -0
  9. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/context_importer.py +21 -5
  10. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/context_manager.py +123 -60
  11. seif_cli-0.2.0/src/seif/context/file_extractor.py +403 -0
  12. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/ingest.py +20 -6
  13. seif_cli-0.2.0/src/seif/context/nucleus.py +292 -0
  14. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/ref.py +2 -2
  15. seif_cli-0.2.0/src/seif/context/seif_io.py +241 -0
  16. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/workspace.py +184 -10
  17. seif_cli-0.2.0/src/seif/core/fingerprint.py +92 -0
  18. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/core/resonance_signal.py +10 -2
  19. seif_cli-0.2.0/src/seif/core/signing.py +223 -0
  20. seif_cli-0.2.0/src/seif/core/timestamping.py +138 -0
  21. seif_cli-0.2.0/src/seif/data/RESONANCE.json +301 -0
  22. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/data/paths.py +15 -0
  23. seif_cli-0.2.0/src/seif/security/__init__.py +17 -0
  24. seif_cli-0.2.0/src/seif/security/mode.py +103 -0
  25. seif_cli-0.2.0/src/seif/security/redblue.py +495 -0
  26. seif_cli-0.2.0/src/seif_cli.egg-info/PKG-INFO +199 -0
  27. seif_cli-0.2.0/src/seif_cli.egg-info/SOURCES.txt +59 -0
  28. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif_cli.egg-info/entry_points.txt +1 -1
  29. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif_cli.egg-info/requires.txt +8 -4
  30. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif_cli.egg-info/top_level.txt +0 -1
  31. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_init.py +6 -0
  32. seif_cli-0.1.2/PKG-INFO +0 -214
  33. seif_cli-0.1.2/README.md +0 -173
  34. seif_cli-0.1.2/src/seif/analysis/artifact_analyzer.py +0 -472
  35. seif_cli-0.1.2/src/seif/analysis/audio_analyzer.py +0 -197
  36. seif_cli-0.1.2/src/seif/analysis/giza_engine.py +0 -287
  37. seif_cli-0.1.2/src/seif/analysis/pattern_comparator.py +0 -237
  38. seif_cli-0.1.2/src/seif/analysis/phi_damping.py +0 -347
  39. seif_cli-0.1.2/src/seif/analysis/qr_decoder.py +0 -337
  40. seif_cli-0.1.2/src/seif/analysis/quality_gate.py +0 -201
  41. seif_cli-0.1.2/src/seif/analysis/seed_optimizer.py +0 -236
  42. seif_cli-0.1.2/src/seif/bridge/ai_bridge.py +0 -301
  43. seif_cli-0.1.2/src/seif/bridge/conversation_fetcher.py +0 -215
  44. seif_cli-0.1.2/src/seif/bridge/seif_session.py +0 -203
  45. seif_cli-0.1.2/src/seif/bridge/telegram_bot.py +0 -272
  46. seif_cli-0.1.2/src/seif/cli/cli.py +0 -592
  47. seif_cli-0.1.2/src/seif/cli/main.py +0 -445
  48. seif_cli-0.1.2/src/seif/cli/wrapper.py +0 -201
  49. seif_cli-0.1.2/src/seif/context/autonomous.py +0 -758
  50. seif_cli-0.1.2/src/seif/context/evolution.py +0 -240
  51. seif_cli-0.1.2/src/seif/context/git_hooks.py +0 -152
  52. seif_cli-0.1.2/src/seif/core/__init__.py +0 -1
  53. seif_cli-0.1.2/src/seif/core/resonance_encoding.py +0 -283
  54. seif_cli-0.1.2/src/seif/core/triple_gate.py +0 -200
  55. seif_cli-0.1.2/src/seif/data/RESONANCE.json +0 -157
  56. seif_cli-0.1.2/src/seif/data/defaults/claude_implementation.seif +0 -37
  57. seif_cli-0.1.2/src/seif/data/defaults/conversa_md.seif +0 -33
  58. seif_cli-0.1.2/src/seif/data/defaults/paper_thesis.seif +0 -31
  59. seif_cli-0.1.2/src/seif/data/defaults/paper_thesis_full.seif +0 -39
  60. seif_cli-0.1.2/src/seif/generators/__init__.py +0 -1
  61. seif_cli-0.1.2/src/seif/generators/circuit_generator.py +0 -310
  62. seif_cli-0.1.2/src/seif/generators/composite_renderer.py +0 -371
  63. seif_cli-0.1.2/src/seif/generators/dual_qr.py +0 -268
  64. seif_cli-0.1.2/src/seif/generators/fractal_qrcode.py +0 -323
  65. seif_cli-0.1.2/src/seif/generators/glyph_renderer.py +0 -279
  66. seif_cli-0.1.2/src/seif/generators/harmonic_audio.py +0 -341
  67. seif_cli-0.1.2/src/seif/generators/kicad_exporter.py +0 -250
  68. seif_cli-0.1.2/src/seif/generators/spice_netlist.py +0 -472
  69. seif_cli-0.1.2/src/seif_cli.egg-info/PKG-INFO +0 -214
  70. seif_cli-0.1.2/src/seif_cli.egg-info/SOURCES.txt +0 -96
  71. seif_cli-0.1.2/tests/test_advisor.py +0 -101
  72. seif_cli-0.1.2/tests/test_autonomous.py +0 -882
  73. seif_cli-0.1.2/tests/test_canonical_inputs.py +0 -152
  74. seif_cli-0.1.2/tests/test_collaborative_seif.py +0 -245
  75. seif_cli-0.1.2/tests/test_context_qr.py +0 -199
  76. seif_cli-0.1.2/tests/test_dual_qr.py +0 -194
  77. seif_cli-0.1.2/tests/test_evolution.py +0 -314
  78. seif_cli-0.1.2/tests/test_fractal_qrcode.py +0 -73
  79. seif_cli-0.1.2/tests/test_git_hooks.py +0 -125
  80. seif_cli-0.1.2/tests/test_ingest.py +0 -165
  81. seif_cli-0.1.2/tests/test_kicad_exporter.py +0 -148
  82. seif_cli-0.1.2/tests/test_phi_damping.py +0 -103
  83. seif_cli-0.1.2/tests/test_ref.py +0 -188
  84. seif_cli-0.1.2/tests/test_seed_optimizer.py +0 -78
  85. seif_cli-0.1.2/tests/test_spice_netlist.py +0 -142
  86. seif_cli-0.1.2/tests/test_transcompiler.py +0 -69
  87. {seif_cli-0.1.2 → seif_cli-0.2.0}/LICENSE +0 -0
  88. {seif_cli-0.1.2 → seif_cli-0.2.0}/MANIFEST.in +0 -0
  89. {seif_cli-0.1.2 → seif_cli-0.2.0}/setup.cfg +0 -0
  90. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/__init__.py +0 -0
  91. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/__main__.py +0 -0
  92. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/analysis/__init__.py +0 -0
  93. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/analysis/physical_constants.py +0 -0
  94. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/analysis/stance_detector.py +0 -0
  95. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/analysis/transcompiler.py +0 -0
  96. {seif_cli-0.1.2/src/seif/bridge → seif_cli-0.2.0/src/seif/cli}/__init__.py +0 -0
  97. {seif_cli-0.1.2/src/seif/cli → seif_cli-0.2.0/src/seif/context}/__init__.py +0 -0
  98. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/advisor.py +0 -0
  99. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/context_bridge.py +0 -0
  100. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/context_qr.py +0 -0
  101. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/git_context.py +0 -0
  102. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/context/telemetry.py +0 -0
  103. {seif_cli-0.1.2/src/seif/context → seif_cli-0.2.0/src/seif/core}/__init__.py +0 -0
  104. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/core/resonance_gate.py +0 -0
  105. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/core/transfer_function.py +0 -0
  106. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/data/__init__.py +0 -0
  107. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif/data/defaults/__init__.py +0 -0
  108. {seif_cli-0.1.2 → seif_cli-0.2.0}/src/seif_cli.egg-info/dependency_links.txt +0 -0
  109. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_context_repo.py +0 -0
  110. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_git_context.py +0 -0
  111. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_quality_gate.py +0 -0
  112. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_resonance_gate.py +0 -0
  113. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_stance_detector.py +0 -0
  114. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_transfer_function.py +0 -0
  115. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_triple_gate.py +0 -0
  116. {seif_cli-0.1.2 → seif_cli-0.2.0}/tests/test_workspace.py +0 -0
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: seif-cli
3
+ Version: 0.2.0
4
+ Summary: Measure AI output quality, protect sensitive data, and build multi-AI consensus. Works with any LLM.
5
+ Author: André Cunha Antero de Carvalho
6
+ License: CC-BY-NC-SA-4.0
7
+ Project-URL: Homepage, https://github.com/and2carvalho/seif
8
+ Project-URL: Documentation, https://github.com/and2carvalho/seif
9
+ Project-URL: Repository, https://github.com/and2carvalho/seif
10
+ Project-URL: Live Demo, https://seif-framework.streamlit.app
11
+ Keywords: ai-quality,llm-guardrails,ai-consensus,data-classification,context-management,ai-safety,multi-ai,quality-gate,prompt-evaluation,ai-grounding
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Classifier: Topic :: Software Development :: Quality Assurance
17
+ Classifier: Topic :: Security
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy>=2.0
25
+ Requires-Dist: scipy>=1.14
26
+ Provides-Extra: consensus
27
+ Requires-Dist: anthropic>=0.80; extra == "consensus"
28
+ Provides-Extra: generators
29
+ Requires-Dist: matplotlib>=3.9; extra == "generators"
30
+ Requires-Dist: Pillow>=10.0; extra == "generators"
31
+ Requires-Dist: opencv-python-headless>=4.8; extra == "generators"
32
+ Requires-Dist: svgwrite>=1.4; extra == "generators"
33
+ Provides-Extra: web
34
+ Requires-Dist: streamlit>=1.28; extra == "web"
35
+ Provides-Extra: telegram
36
+ Requires-Dist: python-telegram-bot>=21.0; extra == "telegram"
37
+ Provides-Extra: qr
38
+ Requires-Dist: qrcode[pil]>=7.4; extra == "qr"
39
+ Requires-Dist: Pillow>=10.0; extra == "qr"
40
+ Requires-Dist: pyzbar>=0.1.9; extra == "qr"
41
+ Provides-Extra: all
42
+ Requires-Dist: seif-cli[consensus,generators,qr,telegram,web]; extra == "all"
43
+ Dynamic: license-file
44
+
45
+ # SEIF — Measure, Protect, and Triangulate AI Output
46
+
47
+ > One question. Multiple AIs debate it. You get the answer they all agree on — graded for accuracy, with your data protected.
48
+
49
+ [![PyPI](https://img.shields.io/pypi/v/seif-cli)](https://pypi.org/project/seif-cli/)
50
+ [![Tests](https://img.shields.io/badge/tests-626%20passing-brightgreen)]()
51
+ [![License](https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-blue)]()
52
+
53
+ ---
54
+
55
+ ## The Problem
56
+
57
+ 1. **You don't know when AI is making things up.** There's no standard way to measure if a response is grounded in facts or drifting into speculation.
58
+ 2. **Sensitive data leaks to AI APIs.** No guardrail prevents your code, credentials, or internal docs from being sent to external services.
59
+ 3. **One AI can be wrong.** A single model has blind spots. There's no easy way to get multiple AIs to debate and converge on an answer.
60
+
61
+ ## The Solution
62
+
63
+ ```bash
64
+ pip install seif-cli
65
+ ```
66
+
67
+ ### 1. Quality Gate — Is the AI making things up?
68
+
69
+ ```bash
70
+ seif --quality-gate "The framework uses quantum entanglement for data transfer" --role ai
71
+ # Grade: D | Stance: DRIFT | Verifiable: 12%
72
+ # Flags: [UNGROUNDED_CLAIMS]
73
+
74
+ seif --quality-gate "Python 3.11 added the tomllib module for TOML parsing" --role ai
75
+ # Grade: A | Stance: GROUNDED | Verifiable: 100%
76
+ ```
77
+
78
+ Every response gets a grade (A-F) and a stance (GROUNDED, MIXED, or DRIFT). Verifiable claims are counted separately from speculation.
79
+
80
+ ### 2. Classification Gate — Is sensitive data leaking?
81
+
82
+ ```bash
83
+ seif --init # scan your project
84
+ seif --export --classification PUBLIC # only export public content
85
+ ```
86
+
87
+ Content is automatically classified as PUBLIC, INTERNAL, or CONFIDENTIAL. Keywords like `password`, `api_key`, `CVE` auto-escalate to CONFIDENTIAL. The classification gate blocks sensitive data from leaving your environment.
88
+
89
+ Works as a [Claude Code hook](#claude-code-plugin) — blocks writes containing credentials or classified markers in real-time.
90
+
91
+ ### 3. Multi-AI Consensus — Let them debate
92
+
93
+ ```bash
94
+ seif --consensus "Should we use microservices or a monolith for a 3-person team?" \
95
+ --backends claude,grok
96
+ # Claude: monolith (velocity, simplicity)
97
+ # Grok: monolith (team size, operational cost)
98
+ # Consensus: CONVERGED — monolith for teams < 5
99
+
100
+ seif --adversarial "Is our auth middleware secure?"
101
+ # Compares response WITH protocol context vs WITHOUT
102
+ # Delta report shows what context changes
103
+ ```
104
+
105
+ One question goes to multiple AIs. They analyze independently, compare results, and converge. You get the answer they all agree on.
106
+
107
+ ---
108
+
109
+ ## Quick Start
110
+
111
+ ```bash
112
+ pip install seif-cli
113
+ cd my-project
114
+ seif --init # scan project, extract git context, generate .seif/
115
+ seif --sync # re-sync after code changes
116
+ seif --quality-gate "text" # grade AI output (A-F)
117
+ ```
118
+
119
+ That's it. Your project now has persistent, classified, quality-measured context.
120
+
121
+ ## Claude Code Plugin
122
+
123
+ SEIF works as a plugin for [Claude Code](https://github.com/anthropics/claude-code):
124
+
125
+ ```bash
126
+ # Copy skills to your project
127
+ cp -r plugins/claude-code/skills/* .claude/skills/
128
+
129
+ # Add hooks to .claude/settings.json (see plugins/claude-code/README.md)
130
+ ```
131
+
132
+ **What it does:**
133
+ - **Session start**: loads your `.seif/` context automatically
134
+ - **Pre-write**: blocks classified data from being written outside `.seif/`
135
+ - **Slash commands**: `/gate`, `/sync`, `/status`
136
+
137
+ ## CLI Commands
138
+
139
+ ```bash
140
+ # === Core (pip install seif-cli) ===
141
+ seif --init # initialize .seif context
142
+ seif --sync # re-sync git context
143
+ seif --quality-gate "text" # measure quality (Grade A-F)
144
+ seif --compress # compress project into .seif (93% reduction)
145
+ seif --export # export context as markdown
146
+
147
+ # === Classification ===
148
+ seif --export --classification PUBLIC # only public modules
149
+ seif --autonomous enable # AI persists knowledge autonomously
150
+
151
+ # === Multi-AI (pip install seif-cli[consensus]) ===
152
+ seif --consult "question" # auto-route to best AI
153
+ seif --consensus "q" --backends claude,grok # cross-AI consensus
154
+ seif --adversarial "question" # WITH vs WITHOUT comparison
155
+
156
+ # === Workspace ===
157
+ seif --workspace # multi-project discovery + sync
158
+ seif --scan "git" # auto-generate CLI knowledge from --help
159
+ ```
160
+
161
+ ## How Quality Gate Works
162
+
163
+ The quality gate measures two things:
164
+
165
+ | Component | Weight | What it measures |
166
+ |-----------|--------|-----------------|
167
+ | **Stance Detector** | Primary | Counts verifiable vs interpretive claims. GROUNDED (≥80% verifiable), MIXED (40-80%), DRIFT (<40%) |
168
+ | **Resonance Gate** | Secondary | Structural coherence (experimental) |
169
+
170
+ Grades: **A** (≥0.85) → **B** (≥0.70) → **C** (≥0.55) → **D** (≥0.40) → **F** (<0.40)
171
+
172
+ ## Context Persistence
173
+
174
+ SEIF also gives AI persistent memory across sessions — but so does ChatGPT Memory. The difference:
175
+
176
+ | | ChatGPT Memory | SEIF |
177
+ |-|---------------|------|
178
+ | Who controls it | OpenAI | You (local files) |
179
+ | Works with other AIs | No | Yes (any LLM) |
180
+ | Exportable | No | Yes (.seif → markdown) |
181
+ | Quality measured | No | Yes (stance A-F) |
182
+ | Data classified | No | Yes (PUBLIC/INTERNAL/CONFIDENTIAL) |
183
+ | Auditable | No | Yes (hash-chained provenance) |
184
+
185
+ ## Project Stats
186
+
187
+ ```
188
+ 59 modules | 626 tests (33 suites) | 93% context compression
189
+ Classification: PUBLIC / INTERNAL / CONFIDENTIAL with auto-detection
190
+ Quality Gate: Stance detector + resonance gate → Grade A-F
191
+ ```
192
+
193
+ ## Contributing
194
+
195
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
196
+
197
+ ## License
198
+
199
+ CC BY-NC-SA 4.0 — [André Cunha Antero de Carvalho](https://github.com/and2carvalho)
@@ -0,0 +1,155 @@
1
+ # SEIF — Measure, Protect, and Triangulate AI Output
2
+
3
+ > One question. Multiple AIs debate it. You get the answer they all agree on — graded for accuracy, with your data protected.
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/seif-cli)](https://pypi.org/project/seif-cli/)
6
+ [![Tests](https://img.shields.io/badge/tests-626%20passing-brightgreen)]()
7
+ [![License](https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-blue)]()
8
+
9
+ ---
10
+
11
+ ## The Problem
12
+
13
+ 1. **You don't know when AI is making things up.** There's no standard way to measure if a response is grounded in facts or drifting into speculation.
14
+ 2. **Sensitive data leaks to AI APIs.** No guardrail prevents your code, credentials, or internal docs from being sent to external services.
15
+ 3. **One AI can be wrong.** A single model has blind spots. There's no easy way to get multiple AIs to debate and converge on an answer.
16
+
17
+ ## The Solution
18
+
19
+ ```bash
20
+ pip install seif-cli
21
+ ```
22
+
23
+ ### 1. Quality Gate — Is the AI making things up?
24
+
25
+ ```bash
26
+ seif --quality-gate "The framework uses quantum entanglement for data transfer" --role ai
27
+ # Grade: D | Stance: DRIFT | Verifiable: 12%
28
+ # Flags: [UNGROUNDED_CLAIMS]
29
+
30
+ seif --quality-gate "Python 3.11 added the tomllib module for TOML parsing" --role ai
31
+ # Grade: A | Stance: GROUNDED | Verifiable: 100%
32
+ ```
33
+
34
+ Every response gets a grade (A-F) and a stance (GROUNDED, MIXED, or DRIFT). Verifiable claims are counted separately from speculation.
35
+
36
+ ### 2. Classification Gate — Is sensitive data leaking?
37
+
38
+ ```bash
39
+ seif --init # scan your project
40
+ seif --export --classification PUBLIC # only export public content
41
+ ```
42
+
43
+ Content is automatically classified as PUBLIC, INTERNAL, or CONFIDENTIAL. Keywords like `password`, `api_key`, `CVE` auto-escalate to CONFIDENTIAL. The classification gate blocks sensitive data from leaving your environment.
44
+
45
+ Works as a [Claude Code hook](#claude-code-plugin) — blocks writes containing credentials or classified markers in real-time.
46
+
47
+ ### 3. Multi-AI Consensus — Let them debate
48
+
49
+ ```bash
50
+ seif --consensus "Should we use microservices or a monolith for a 3-person team?" \
51
+ --backends claude,grok
52
+ # Claude: monolith (velocity, simplicity)
53
+ # Grok: monolith (team size, operational cost)
54
+ # Consensus: CONVERGED — monolith for teams < 5
55
+
56
+ seif --adversarial "Is our auth middleware secure?"
57
+ # Compares response WITH protocol context vs WITHOUT
58
+ # Delta report shows what context changes
59
+ ```
60
+
61
+ One question goes to multiple AIs. They analyze independently, compare results, and converge. You get the answer they all agree on.
62
+
63
+ ---
64
+
65
+ ## Quick Start
66
+
67
+ ```bash
68
+ pip install seif-cli
69
+ cd my-project
70
+ seif --init # scan project, extract git context, generate .seif/
71
+ seif --sync # re-sync after code changes
72
+ seif --quality-gate "text" # grade AI output (A-F)
73
+ ```
74
+
75
+ That's it. Your project now has persistent, classified, quality-measured context.
76
+
77
+ ## Claude Code Plugin
78
+
79
+ SEIF works as a plugin for [Claude Code](https://github.com/anthropics/claude-code):
80
+
81
+ ```bash
82
+ # Copy skills to your project
83
+ cp -r plugins/claude-code/skills/* .claude/skills/
84
+
85
+ # Add hooks to .claude/settings.json (see plugins/claude-code/README.md)
86
+ ```
87
+
88
+ **What it does:**
89
+ - **Session start**: loads your `.seif/` context automatically
90
+ - **Pre-write**: blocks classified data from being written outside `.seif/`
91
+ - **Slash commands**: `/gate`, `/sync`, `/status`
92
+
93
+ ## CLI Commands
94
+
95
+ ```bash
96
+ # === Core (pip install seif-cli) ===
97
+ seif --init # initialize .seif context
98
+ seif --sync # re-sync git context
99
+ seif --quality-gate "text" # measure quality (Grade A-F)
100
+ seif --compress # compress project into .seif (93% reduction)
101
+ seif --export # export context as markdown
102
+
103
+ # === Classification ===
104
+ seif --export --classification PUBLIC # only public modules
105
+ seif --autonomous enable # AI persists knowledge autonomously
106
+
107
+ # === Multi-AI (pip install seif-cli[consensus]) ===
108
+ seif --consult "question" # auto-route to best AI
109
+ seif --consensus "q" --backends claude,grok # cross-AI consensus
110
+ seif --adversarial "question" # WITH vs WITHOUT comparison
111
+
112
+ # === Workspace ===
113
+ seif --workspace # multi-project discovery + sync
114
+ seif --scan "git" # auto-generate CLI knowledge from --help
115
+ ```
116
+
117
+ ## How Quality Gate Works
118
+
119
+ The quality gate measures two things:
120
+
121
+ | Component | Weight | What it measures |
122
+ |-----------|--------|-----------------|
123
+ | **Stance Detector** | Primary | Counts verifiable vs interpretive claims. GROUNDED (≥80% verifiable), MIXED (40-80%), DRIFT (<40%) |
124
+ | **Resonance Gate** | Secondary | Structural coherence (experimental) |
125
+
126
+ Grades: **A** (≥0.85) → **B** (≥0.70) → **C** (≥0.55) → **D** (≥0.40) → **F** (<0.40)
127
+
128
+ ## Context Persistence
129
+
130
+ SEIF also gives AI persistent memory across sessions — but so does ChatGPT Memory. The difference:
131
+
132
+ | | ChatGPT Memory | SEIF |
133
+ |-|---------------|------|
134
+ | Who controls it | OpenAI | You (local files) |
135
+ | Works with other AIs | No | Yes (any LLM) |
136
+ | Exportable | No | Yes (.seif → markdown) |
137
+ | Quality measured | No | Yes (stance A-F) |
138
+ | Data classified | No | Yes (PUBLIC/INTERNAL/CONFIDENTIAL) |
139
+ | Auditable | No | Yes (hash-chained provenance) |
140
+
141
+ ## Project Stats
142
+
143
+ ```
144
+ 59 modules | 626 tests (33 suites) | 93% context compression
145
+ Classification: PUBLIC / INTERNAL / CONFIDENTIAL with auto-detection
146
+ Quality Gate: Stance detector + resonance gate → Grade A-F
147
+ ```
148
+
149
+ ## Contributing
150
+
151
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
152
+
153
+ ## License
154
+
155
+ CC BY-NC-SA 4.0 — [André Cunha Antero de Carvalho](https://github.com/and2carvalho)
@@ -4,45 +4,52 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "seif-cli"
7
- version = "0.1.2"
8
- description = "S.E.I.F. — Your AI never starts from zero. Compressed, verified, collaborative context for any LLM."
7
+ version = "0.2.0"
8
+ description = "Measure AI output quality, protect sensitive data, and build multi-AI consensus. Works with any LLM."
9
9
  readme = "README.md"
10
10
  license = {text = "CC-BY-NC-SA-4.0"}
11
11
  requires-python = ">=3.11"
12
12
  authors = [
13
- {name = "André Cunha Antero de Carvalho", email = "and2carvalho@gmail.com"},
13
+ {name = "André Cunha Antero de Carvalho"},
14
14
  ]
15
15
  keywords = [
16
- "ai-context", "llm-memory", "context-compression", "team-collaboration",
17
- "resonance", "sacred-geometry", "3-6-9", "golden-ratio",
18
- "prompt-engineering", "ai-communication",
16
+ "ai-quality", "llm-guardrails", "ai-consensus", "data-classification",
17
+ "context-management", "ai-safety", "multi-ai", "quality-gate",
18
+ "prompt-evaluation", "ai-grounding",
19
19
  ]
20
20
  classifiers = [
21
21
  "Development Status :: 3 - Alpha",
22
22
  "Intended Audience :: Developers",
23
23
  "Intended Audience :: Science/Research",
24
- "Topic :: Scientific/Engineering",
25
- "Topic :: Software Development :: Libraries",
24
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
25
+ "Topic :: Software Development :: Quality Assurance",
26
+ "Topic :: Security",
26
27
  "Programming Language :: Python :: 3.11",
27
28
  "Programming Language :: Python :: 3.12",
28
29
  "Programming Language :: Python :: 3.13",
29
30
  ]
30
31
 
31
- # Core dependencies minimal for CLI usage
32
+ # Core: quality gate + context + classification (no heavy deps)
32
33
  dependencies = [
33
34
  "numpy>=2.0",
34
35
  "scipy>=1.14",
35
36
  ]
36
37
 
37
38
  [project.optional-dependencies]
38
- # Full installation (web interface + all generators)
39
- full = [
39
+ # Inter-AI consensus (needs API client)
40
+ consensus = [
41
+ "anthropic>=0.80",
42
+ ]
43
+ # Visual generators (fractal QR, glyphs, circuits, audio)
44
+ generators = [
40
45
  "matplotlib>=3.9",
41
46
  "Pillow>=10.0",
42
47
  "opencv-python-headless>=4.8",
43
48
  "svgwrite>=1.4",
49
+ ]
50
+ # Web interface (Streamlit dashboard)
51
+ web = [
44
52
  "streamlit>=1.28",
45
- "anthropic>=0.80",
46
53
  ]
47
54
  # Telegram bot bridge
48
55
  telegram = [
@@ -56,7 +63,7 @@ qr = [
56
63
  ]
57
64
  # Everything
58
65
  all = [
59
- "seif-cli[full,telegram,qr]",
66
+ "seif-cli[consensus,generators,web,telegram,qr]",
60
67
  ]
61
68
 
62
69
  [project.urls]
@@ -66,8 +73,8 @@ Repository = "https://github.com/and2carvalho/seif"
66
73
  "Live Demo" = "https://seif-framework.streamlit.app"
67
74
 
68
75
  [project.scripts]
69
- seif-cli = "seif.cli.cli:main"
70
76
  seif = "seif.cli.wrapper:main"
77
+ seif-cli = "seif.cli.wrapper:main"
71
78
 
72
79
  [tool.setuptools.packages.find]
73
80
  where = ["src"]