geometric-resonance-engine 0.1.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 (153) hide show
  1. geometric_resonance_engine-0.1.0/.agents/skills/gre-calibration/SKILL.md +22 -0
  2. geometric_resonance_engine-0.1.0/.agents/skills/gre-calibration/calibration_fields.md +16 -0
  3. geometric_resonance_engine-0.1.0/.agents/skills/gre-circuit/SKILL.md +18 -0
  4. geometric_resonance_engine-0.1.0/.agents/skills/gre-commit/SKILL.md +20 -0
  5. geometric_resonance_engine-0.1.0/.agents/skills/gre-compare/SKILL.md +23 -0
  6. geometric_resonance_engine-0.1.0/.agents/skills/gre-compare/metrics.md +12 -0
  7. geometric_resonance_engine-0.1.0/.agents/skills/gre-context/SKILL.md +24 -0
  8. geometric_resonance_engine-0.1.0/.agents/skills/gre-context/reference.md +14 -0
  9. geometric_resonance_engine-0.1.0/.agents/skills/gre-hardening/SKILL.md +22 -0
  10. geometric_resonance_engine-0.1.0/.agents/skills/gre-ingest/SKILL.md +25 -0
  11. geometric_resonance_engine-0.1.0/.agents/skills/gre-ingest/schema_checklist.md +25 -0
  12. geometric_resonance_engine-0.1.0/.agents/skills/gre-review/SKILL.md +17 -0
  13. geometric_resonance_engine-0.1.0/.agents/skills/gre-workflow/SKILL.md +18 -0
  14. geometric_resonance_engine-0.1.0/.claude/hooks/post_edit_verify.py +32 -0
  15. geometric_resonance_engine-0.1.0/.claude/hooks/pre_bash_guard.py +30 -0
  16. geometric_resonance_engine-0.1.0/.claude/hooks/session_bootstrap.py +23 -0
  17. geometric_resonance_engine-0.1.0/.claude/settings.json +37 -0
  18. geometric_resonance_engine-0.1.0/.claude/skills/gre-calibration/SKILL.md +22 -0
  19. geometric_resonance_engine-0.1.0/.claude/skills/gre-calibration/calibration_fields.md +16 -0
  20. geometric_resonance_engine-0.1.0/.claude/skills/gre-circuit/SKILL.md +18 -0
  21. geometric_resonance_engine-0.1.0/.claude/skills/gre-commit/SKILL.md +20 -0
  22. geometric_resonance_engine-0.1.0/.claude/skills/gre-compare/SKILL.md +23 -0
  23. geometric_resonance_engine-0.1.0/.claude/skills/gre-compare/metrics.md +12 -0
  24. geometric_resonance_engine-0.1.0/.claude/skills/gre-context/SKILL.md +24 -0
  25. geometric_resonance_engine-0.1.0/.claude/skills/gre-context/reference.md +14 -0
  26. geometric_resonance_engine-0.1.0/.claude/skills/gre-hardening/SKILL.md +22 -0
  27. geometric_resonance_engine-0.1.0/.claude/skills/gre-ingest/SKILL.md +25 -0
  28. geometric_resonance_engine-0.1.0/.claude/skills/gre-ingest/schema_checklist.md +25 -0
  29. geometric_resonance_engine-0.1.0/.claude/skills/gre-review/SKILL.md +17 -0
  30. geometric_resonance_engine-0.1.0/.claude/skills/gre-workflow/SKILL.md +18 -0
  31. geometric_resonance_engine-0.1.0/.github/CODEOWNERS +1 -0
  32. geometric_resonance_engine-0.1.0/.github/SECURITY.md +11 -0
  33. geometric_resonance_engine-0.1.0/.github/workflows/publish.yml +33 -0
  34. geometric_resonance_engine-0.1.0/.gitignore +42 -0
  35. geometric_resonance_engine-0.1.0/LICENSE +21 -0
  36. geometric_resonance_engine-0.1.0/PKG-INFO +181 -0
  37. geometric_resonance_engine-0.1.0/README.md +148 -0
  38. geometric_resonance_engine-0.1.0/docs/bloch-spiral-three-views.html +615 -0
  39. geometric_resonance_engine-0.1.0/docs/compiler.md +548 -0
  40. geometric_resonance_engine-0.1.0/docs/corpus_gap_report.md +208 -0
  41. geometric_resonance_engine-0.1.0/docs/corpus_taxonomy.md +391 -0
  42. geometric_resonance_engine-0.1.0/docs/hardware_run_plan.md +95 -0
  43. geometric_resonance_engine-0.1.0/docs/import_format.md +177 -0
  44. geometric_resonance_engine-0.1.0/docs/research_corpus.md +208 -0
  45. geometric_resonance_engine-0.1.0/docs/trihex_route.md +187 -0
  46. geometric_resonance_engine-0.1.0/examples/first_corpus_query.py +202 -0
  47. geometric_resonance_engine-0.1.0/find_escape.py +15 -0
  48. geometric_resonance_engine-0.1.0/gre/__init__.py +32 -0
  49. geometric_resonance_engine-0.1.0/gre/api/__init__.py +3 -0
  50. geometric_resonance_engine-0.1.0/gre/benchmark/__init__.py +0 -0
  51. geometric_resonance_engine-0.1.0/gre/benchmark/metallic_triad.py +340 -0
  52. geometric_resonance_engine-0.1.0/gre/benchmark/trihex_sweep.py +276 -0
  53. geometric_resonance_engine-0.1.0/gre/compiler/__init__.py +15 -0
  54. geometric_resonance_engine-0.1.0/gre/compiler/attractor.py +165 -0
  55. geometric_resonance_engine-0.1.0/gre/compiler/bridge.py +222 -0
  56. geometric_resonance_engine-0.1.0/gre/compiler/comparison.py +245 -0
  57. geometric_resonance_engine-0.1.0/gre/compiler/compiler.py +141 -0
  58. geometric_resonance_engine-0.1.0/gre/compiler/emitters/__init__.py +7 -0
  59. geometric_resonance_engine-0.1.0/gre/compiler/emitters/circuit_model_emitter.py +13 -0
  60. geometric_resonance_engine-0.1.0/gre/compiler/emitters/qasm_emitter.py +35 -0
  61. geometric_resonance_engine-0.1.0/gre/compiler/emitters/qiskit_emitter.py +80 -0
  62. geometric_resonance_engine-0.1.0/gre/compiler/ir.py +149 -0
  63. geometric_resonance_engine-0.1.0/gre/compiler/partitions.py +92 -0
  64. geometric_resonance_engine-0.1.0/gre/compiler/resonance.py +167 -0
  65. geometric_resonance_engine-0.1.0/gre/compiler/symmetry.py +80 -0
  66. geometric_resonance_engine-0.1.0/gre/core/__init__.py +23 -0
  67. geometric_resonance_engine-0.1.0/gre/core/circuit.py +93 -0
  68. geometric_resonance_engine-0.1.0/gre/core/exceptions.py +30 -0
  69. geometric_resonance_engine-0.1.0/gre/core/geometry.py +159 -0
  70. geometric_resonance_engine-0.1.0/gre/core/graph.py +159 -0
  71. geometric_resonance_engine-0.1.0/gre/engine.py +331 -0
  72. geometric_resonance_engine-0.1.0/gre/fractals/__init__.py +11 -0
  73. geometric_resonance_engine-0.1.0/gre/fractals/base.py +69 -0
  74. geometric_resonance_engine-0.1.0/gre/fractals/registry.py +109 -0
  75. geometric_resonance_engine-0.1.0/gre/fractals/sierpinski.py +603 -0
  76. geometric_resonance_engine-0.1.0/gre/fractals/trihex.py +261 -0
  77. geometric_resonance_engine-0.1.0/gre/hardware/__init__.py +3 -0
  78. geometric_resonance_engine-0.1.0/gre/metrics/__init__.py +3 -0
  79. geometric_resonance_engine-0.1.0/gre/quantum/__init__.py +16 -0
  80. geometric_resonance_engine-0.1.0/gre/quantum/gates.py +509 -0
  81. geometric_resonance_engine-0.1.0/gre/quantum/mapper.py +567 -0
  82. geometric_resonance_engine-0.1.0/gre/quantum/qutrit.py +265 -0
  83. geometric_resonance_engine-0.1.0/gre/quantum/validation.py +334 -0
  84. geometric_resonance_engine-0.1.0/gre/quantum/walk_circuit.py +486 -0
  85. geometric_resonance_engine-0.1.0/gre/research/__init__.py +424 -0
  86. geometric_resonance_engine-0.1.0/gre/research/artifacts.py +180 -0
  87. geometric_resonance_engine-0.1.0/gre/research/calibration_fetch.py +670 -0
  88. geometric_resonance_engine-0.1.0/gre/research/catalog.py +433 -0
  89. geometric_resonance_engine-0.1.0/gre/research/corpus.py +470 -0
  90. geometric_resonance_engine-0.1.0/gre/research/corpus_report.py +664 -0
  91. geometric_resonance_engine-0.1.0/gre/research/ingest.py +594 -0
  92. geometric_resonance_engine-0.1.0/gre/research/linkage.py +415 -0
  93. geometric_resonance_engine-0.1.0/gre/research/loader.py +213 -0
  94. geometric_resonance_engine-0.1.0/gre/research/normalizers.py +709 -0
  95. geometric_resonance_engine-0.1.0/gre/research/provenance.py +204 -0
  96. geometric_resonance_engine-0.1.0/gre/research/schemas.py +452 -0
  97. geometric_resonance_engine-0.1.0/gre/research/seed_corpus.py +469 -0
  98. geometric_resonance_engine-0.1.0/gre/simulation/__init__.py +3 -0
  99. geometric_resonance_engine-0.1.0/gre/simulation/entropy.py +172 -0
  100. geometric_resonance_engine-0.1.0/gre/simulation/quantum_walk.py +605 -0
  101. geometric_resonance_engine-0.1.0/gre/visualization/__init__.py +3 -0
  102. geometric_resonance_engine-0.1.0/notebooks/01_Bloch_Sphere_Visualization.ipynb +1 -0
  103. geometric_resonance_engine-0.1.0/notebooks/beat-pattern-analysis.ipynb +337 -0
  104. geometric_resonance_engine-0.1.0/notebooks/bloch-spiral-three-views.ipynb +431 -0
  105. geometric_resonance_engine-0.1.0/notebooks/gap-timeline.ipynb +258 -0
  106. geometric_resonance_engine-0.1.0/notebooks/nearest-neighbor-gap-analysis.ipynb +332 -0
  107. geometric_resonance_engine-0.1.0/notebooks/quantum_walk_simulation.ipynb +317 -0
  108. geometric_resonance_engine-0.1.0/notebooks/trihex_generator.ipynb +291 -0
  109. geometric_resonance_engine-0.1.0/notebooks/trihex_route.ipynb +346 -0
  110. geometric_resonance_engine-0.1.0/notebooks/wrapped-phase-distributions.ipynb +253 -0
  111. geometric_resonance_engine-0.1.0/pyproject.toml +60 -0
  112. geometric_resonance_engine-0.1.0/scripts/backfill_corpus_fields.py +208 -0
  113. geometric_resonance_engine-0.1.0/scripts/benchmark_compiler.py +239 -0
  114. geometric_resonance_engine-0.1.0/scripts/compute_lambda2_from_counts.py +344 -0
  115. geometric_resonance_engine-0.1.0/scripts/generate_heron_r2_calibration.py +329 -0
  116. geometric_resonance_engine-0.1.0/scripts/import_new_ibm_jobs.py +1066 -0
  117. geometric_resonance_engine-0.1.0/scripts/stage_hardware_circuits.py +193 -0
  118. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L4-ibm_fez.metadata.json +38 -0
  119. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L4-ibm_fez.qasm +815 -0
  120. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L4-ibm_kingston.metadata.json +38 -0
  121. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L4-ibm_kingston.qasm +815 -0
  122. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L5-ibm_fez.metadata.json +38 -0
  123. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L5-ibm_fez.qasm +2435 -0
  124. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L5-ibm_kingston.metadata.json +38 -0
  125. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/hanoi-L5-ibm_kingston.qasm +2435 -0
  126. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L4-ibm_fez.metadata.json +38 -0
  127. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L4-ibm_fez.qasm +835 -0
  128. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L4-ibm_kingston.metadata.json +38 -0
  129. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L4-ibm_kingston.qasm +835 -0
  130. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L5-ibm_fez.metadata.json +38 -0
  131. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L5-ibm_fez.qasm +2455 -0
  132. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L5-ibm_kingston.metadata.json +38 -0
  133. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/pascal_mod2-L5-ibm_kingston.qasm +2455 -0
  134. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L4-ibm_fez.metadata.json +38 -0
  135. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L4-ibm_fez.qasm +285 -0
  136. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L4-ibm_kingston.metadata.json +38 -0
  137. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L4-ibm_kingston.qasm +285 -0
  138. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L5-ibm_fez.metadata.json +38 -0
  139. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L5-ibm_fez.qasm +365 -0
  140. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L5-ibm_kingston.metadata.json +38 -0
  141. geometric_resonance_engine-0.1.0/staged/hardware_run_plan/rule90-L5-ibm_kingston.qasm +365 -0
  142. geometric_resonance_engine-0.1.0/tests/test_calibration_fetch.py +450 -0
  143. geometric_resonance_engine-0.1.0/tests/test_compiler_fixtures.py +286 -0
  144. geometric_resonance_engine-0.1.0/tests/test_compiler_fixtures_data/.gitkeep +0 -0
  145. geometric_resonance_engine-0.1.0/tests/test_compiler_fixtures_data/metallic_triad_summary.json +123 -0
  146. geometric_resonance_engine-0.1.0/tests/test_compiler_fixtures_data/metallic_triad_sweep.json +914 -0
  147. geometric_resonance_engine-0.1.0/tests/test_compiler_fixtures_data/trihex_sweep.json +344 -0
  148. geometric_resonance_engine-0.1.0/tests/test_compiler_fixtures_data/trihex_sweep_summary.json +15 -0
  149. geometric_resonance_engine-0.1.0/tests/test_compiler_snapshot.py +136 -0
  150. geometric_resonance_engine-0.1.0/tests/test_corpus_ingestion.py +520 -0
  151. geometric_resonance_engine-0.1.0/tests/test_golden_angle_gate.py +343 -0
  152. geometric_resonance_engine-0.1.0/tests/test_trihex_route.py +299 -0
  153. geometric_resonance_engine-0.1.0/validate_notebooks.py +10 -0
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Upgrade backend calibration artifacts from metadata-level to physical where source payloads exist, and propagate calibration completeness through GRE quality gates.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *)
5
+ paths:
6
+ - "gre/research/**"
7
+ - "imports/calibration/**"
8
+ - "docs/**"
9
+ - "tests/**"
10
+ ---
11
+
12
+ # GRE calibration
13
+
14
+ Instructions:
15
+ 1. Locate calibration payloads or saved exports for target backends.
16
+ 2. Parse physical fields where available.
17
+ 3. Update canonical calibration snapshot without breaking metadata-only compatibility.
18
+ 4. Recompute calibration completeness.
19
+ 5. Recompute quality gates and evidence chain summaries impacted by calibration semantics.
20
+ 6. Add tests for upgrade and fallback behavior.
21
+
22
+ Load calibration_fields.md when needed.
@@ -0,0 +1,16 @@
1
+ # Calibration fields
2
+
3
+ Physical calibration target fields:
4
+ - retrieval_timestamp
5
+ - qubit_count
6
+ - T1_summary
7
+ - T2_summary
8
+ - readout_error_summary
9
+ - gate_error_summary
10
+ - basis_gates
11
+ - source_payload_reference
12
+
13
+ Rules:
14
+ - metadata-only remains valid
15
+ - physical requires actual physical fields, not inferred placeholders
16
+ - preserve provenance of payload source
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Work on graph-to-circuit mapping, quantum walk circuit builders, qutrit encoding, Qiskit compatibility, and graceful degradation when Qiskit is unavailable.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *)
5
+ paths:
6
+ - "gre/quantum/**"
7
+ - "gre/core/**"
8
+ - "tests/**"
9
+ ---
10
+
11
+ # GRE circuit
12
+
13
+ Instructions:
14
+ 1. Preserve no-Qiskit graceful degradation.
15
+ 2. Keep metadata complete on CircuitModel outputs.
16
+ 3. Prefer deterministic circuit generation.
17
+ 4. When adding encoding or walk logic, add tests for both available and unavailable Qiskit environments.
18
+ 5. Do not break existing corpus integration paths.
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Stage and commit GRE changes with a disciplined scientific commit message after reviewing diff, tests, and regression risks.
3
+ disable-model-invocation: true
4
+ allowed-tools: Bash(git status *) Bash(git diff *) Bash(git add *) Bash(git commit *) Read
5
+ ---
6
+
7
+ # GRE commit
8
+
9
+ ## Context
10
+ - Git status:
11
+ !git status --short
12
+ - Git diff:
13
+ !git diff --stat && git diff HEAD
14
+
15
+ ## Instructions
16
+ 1. Summarize the change set.
17
+ 2. Flag any regression or missing-test risk.
18
+ 3. If acceptable, stage relevant files.
19
+ 4. Create a precise commit message in imperative mood.
20
+ 5. Do not push.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Compare generated geometry, graph, walk, or circuit outputs against the imported GRE corpus and report evidence chains, similarity, and claim support.
3
+ argument-hint: [generated-object-or-path]
4
+ disable-model-invocation: true
5
+ allowed-tools: Read Grep Glob Bash(python *)
6
+ paths:
7
+ - "gre/**"
8
+ - "examples/**"
9
+ - "imports/**"
10
+ ---
11
+
12
+ # GRE compare
13
+
14
+ Object or path: $ARGUMENTS
15
+
16
+ Instructions:
17
+ 1. Load corpus if needed.
18
+ 2. Resolve the generated descriptor or file.
19
+ 3. Compare against relevant historical artifacts.
20
+ 4. Report top matching artifacts, similarity metrics, evidence chain, calibration completeness, and whether support is historical_real or synthetic_seed.
21
+ 5. Do not overstate claims when only metadata-level calibration exists.
22
+
23
+ Load metrics.md if needed.
@@ -0,0 +1,12 @@
1
+ # Comparison metrics
2
+
3
+ Prefer:
4
+ - structural similarity
5
+ - graph invariants
6
+ - node count and depth compatibility
7
+ - fidelity alignment
8
+ - entropy alignment
9
+ - backend-conditioned interpretation
10
+ - claim linkage confidence
11
+
12
+ Never present synthetic support as equivalent to measured historical support.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Core project context for Geometric Resonance Engine. Use when working on GRE architecture, research corpus, Sierpinski experiments, provenance, calibration, graph models, circuit mapping, or corpus comparison.
3
+ user-invocable: false
4
+ allowed-tools: Read Grep Glob
5
+ paths:
6
+ - "gre/**"
7
+ - "docs/**"
8
+ - "examples/**"
9
+ - "imports/**"
10
+ ---
11
+
12
+ # GRE context
13
+
14
+ Use scientific terminology. Do not frame the project as sacred geometry software.
15
+
16
+ Core principles:
17
+ - Geometry is an operational encoding layer.
18
+ - Preserve provenance on all imported artifacts.
19
+ - Distinguish historical_real, synthetic_seed, and derived_summary.
20
+ - Treat calibration completeness as a first-class quality dimension.
21
+ - Prefer structural or geometric encoding over simple frequency-multiplication narratives.
22
+ - Preserve compatibility when Qiskit is absent.
23
+
24
+ Load reference.md when you need architecture details, corpus taxonomy, or project terminology.
@@ -0,0 +1,14 @@
1
+ # GRE reference
2
+
3
+ Main domains:
4
+ - Core models: geometry, graph, circuit.
5
+ - Fractals: Sierpinski and future recursive families.
6
+ - Simulation: quantum walks, entropy, localization.
7
+ - Quantum: circuit mapping, qutrit encoding, walk builders, validation.
8
+ - Research: corpus loading, normalization, provenance, claim linkage, comparison.
9
+
10
+ Project rules:
11
+ - Never downgrade provenance.
12
+ - Never merge synthetic and historical evidence without explicit labeling.
13
+ - Prefer deterministic normalization.
14
+ - Keep generated comparison results traceable to both source corpus and generated descriptor.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Run GRE corpus hardening tasks including taxonomy backfill, provenance checks, validation tiers, calibration completeness, and corpus report diagnostics.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *) Bash(git diff *) Bash(git status *)
5
+ paths:
6
+ - "gre/research/**"
7
+ - "docs/**"
8
+ - "imports/**"
9
+ - "tests/**"
10
+ ---
11
+
12
+ # GRE hardening
13
+
14
+ Instructions:
15
+ 1. Check schema compliance.
16
+ 2. Check provenance coverage.
17
+ 3. Check evidence class and validation tier consistency.
18
+ 4. Check backend generation normalization.
19
+ 5. Check calibration completeness semantics.
20
+ 6. Update corpus report if any artifact changes.
21
+ 7. Add or update tests for every hardening rule change.
22
+ 8. Prefer minimal diffs and deterministic behavior.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Import QSG, IBM Quantum, Sierpinski, calibration, TMT, or related historical research artifacts into GRE corpus schemas with provenance sidecars and summaries.
3
+ argument-hint: [source-path-or-project]
4
+ disable-model-invocation: true
5
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *) Bash(git status *) Bash(dir *) Bash(ls *)
6
+ paths:
7
+ - "gre/research/**"
8
+ - "imports/**"
9
+ - "docs/**"
10
+ ---
11
+
12
+ # GRE ingestion
13
+
14
+ Target: $ARGUMENTS
15
+
16
+ Instructions:
17
+ 1. Identify whether the source is hardware runs, Sierpinski experiments, calibration snapshots, or derived summaries.
18
+ 2. Normalize into canonical GRE schemas.
19
+ 3. Generate or update primary JSON, provenance JSON, and summary markdown.
20
+ 4. Preserve source filename where practical.
21
+ 5. Mark evidence class correctly.
22
+ 6. Do not invent metrics absent from source data.
23
+ 7. Run schema validation and corpus report updates.
24
+
25
+ Before editing, read schema_checklist.md.
@@ -0,0 +1,25 @@
1
+ # Ingestion checklist
2
+
3
+ Required provenance fields:
4
+ - artifact_id
5
+ - source_project
6
+ - source_path
7
+ - source_date
8
+ - import_date
9
+ - artifact_type
10
+ - transform_chain
11
+ - sensitivity
12
+
13
+ Required semantic fields where applicable:
14
+ - backend
15
+ - depth
16
+ - shots
17
+ - metrics
18
+ - validation_tier
19
+ - evidence_class
20
+ - backend_generation
21
+
22
+ Rules:
23
+ - calibration snapshots can be metadata-only or physical
24
+ - synthetic_seed must never be promoted to historical_real
25
+ - markdown files are sidecars, not primary artifacts
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Perform a rigorous scientific code review for GRE focused on correctness, provenance, taxonomy integrity, calibration semantics, regression risk, and test adequacy.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Bash(git diff *) Bash(git status *) Bash(python -m pytest *)
5
+ paths:
6
+ - "gre/**"
7
+ - "tests/**"
8
+ - "docs/**"
9
+ ---
10
+
11
+ # GRE review
12
+
13
+ Instructions:
14
+ 1. Review only from current repository evidence.
15
+ 2. Prioritize schema integrity, provenance correctness, calibration semantics, evidence-class separation, deterministic normalization, and test coverage gaps.
16
+ 3. Output critical issues, medium issues, low issues, and suggested tests.
17
+ 4. Avoid style-only feedback unless it affects correctness or maintainability.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Run a structured GRE workflow using a forked subagent for research, audit, or implementation tasks across corpus, quantum, and calibration modules.
3
+ argument-hint: [task]
4
+ context: fork
5
+ disable-model-invocation: true
6
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *) Bash(git status *)
7
+ ---
8
+
9
+ # GRE workflow
10
+
11
+ Task: $ARGUMENTS
12
+
13
+ Instructions:
14
+ 1. Clarify the target in one sentence.
15
+ 2. Inspect relevant files only.
16
+ 3. Produce findings, risks, exact file edits needed, and tests needed.
17
+ 4. If changes are requested, apply minimal edits and run verification.
18
+ 5. Return concise scientific output with no filler.
@@ -0,0 +1,32 @@
1
+ from pathlib import Path
2
+ import subprocess
3
+ import json
4
+
5
+ root = Path.cwd()
6
+ commands = []
7
+
8
+ if (root / "pyproject.toml").exists() or (root / "pytest.ini").exists():
9
+ commands.append(["python", "-m", "pytest", "-q", "--tb=short"])
10
+
11
+ results = []
12
+ for cmd in commands:
13
+ try:
14
+ proc = subprocess.run(cmd, capture_output=True, text=True, timeout=60, cwd=str(root))
15
+ results.append({
16
+ "command": " ".join(cmd),
17
+ "returncode": proc.returncode,
18
+ "stdout": proc.stdout[-3000:],
19
+ "stderr": proc.stderr[-3000:]
20
+ })
21
+ except Exception as e:
22
+ results.append({
23
+ "command": " ".join(cmd),
24
+ "error": str(e)
25
+ })
26
+
27
+ print(json.dumps({
28
+ "hookSpecificOutput": {
29
+ "hookEventName": "PostToolUse",
30
+ "additionalContext": json.dumps(results)
31
+ }
32
+ }))
@@ -0,0 +1,30 @@
1
+ import json
2
+ import sys
3
+
4
+ payload = json.load(sys.stdin)
5
+ cmd = payload.get("tool_input", {}).get("command", "")
6
+
7
+ blocked = [
8
+ "rm -rf /",
9
+ "git push --force",
10
+ "git reset --hard",
11
+ "del /s /q",
12
+ ]
13
+
14
+ for token in blocked:
15
+ if token in cmd:
16
+ print(json.dumps({
17
+ "hookSpecificOutput": {
18
+ "hookEventName": "PreToolUse",
19
+ "permissionDecision": "deny",
20
+ "permissionDecisionReason": f"Blocked unsafe command: {token}"
21
+ }
22
+ }))
23
+ raise SystemExit(2)
24
+
25
+ print(json.dumps({
26
+ "hookSpecificOutput": {
27
+ "hookEventName": "PreToolUse",
28
+ "permissionDecision": "allow"
29
+ }
30
+ }))
@@ -0,0 +1,23 @@
1
+ from pathlib import Path
2
+ import json
3
+
4
+ root = Path.cwd()
5
+ messages = []
6
+
7
+ for p in [
8
+ root / "README.md",
9
+ root / "docs" / "research_corpus.md",
10
+ root / "docs" / "corpus_taxonomy.md",
11
+ ]:
12
+ if p.exists():
13
+ messages.append(f"Context file available: {p.as_posix()}")
14
+
15
+ messages.append("Project mode: scientific terminology only; avoid mystical framing.")
16
+ messages.append("Priority: preserve provenance, schema integrity, and calibration semantics.")
17
+ messages.append("Do not treat synthetic_seed as historical_real.")
18
+ print(json.dumps({
19
+ "hookSpecificOutput": {
20
+ "hookEventName": "SessionStart",
21
+ "additionalContext": "\n".join(messages)
22
+ }
23
+ }))
@@ -0,0 +1,37 @@
1
+ {
2
+ "disableBundledSkills": false,
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "python .claude/hooks/session_bootstrap.py"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "PreToolUse": [
15
+ {
16
+ "matcher": "Bash",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "python .claude/hooks/pre_bash_guard.py"
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "PostToolUse": [
26
+ {
27
+ "matcher": "Edit|Write|MultiEdit",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "python .claude/hooks/post_edit_verify.py"
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Upgrade backend calibration artifacts from metadata-level to physical where source payloads exist, and propagate calibration completeness through GRE quality gates.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *)
5
+ paths:
6
+ - "gre/research/**"
7
+ - "imports/calibration/**"
8
+ - "docs/**"
9
+ - "tests/**"
10
+ ---
11
+
12
+ # GRE calibration
13
+
14
+ Instructions:
15
+ 1. Locate calibration payloads or saved exports for target backends.
16
+ 2. Parse physical fields where available.
17
+ 3. Update canonical calibration snapshot without breaking metadata-only compatibility.
18
+ 4. Recompute calibration completeness.
19
+ 5. Recompute quality gates and evidence chain summaries impacted by calibration semantics.
20
+ 6. Add tests for upgrade and fallback behavior.
21
+
22
+ Load calibration_fields.md when needed.
@@ -0,0 +1,16 @@
1
+ # Calibration fields
2
+
3
+ Physical calibration target fields:
4
+ - retrieval_timestamp
5
+ - qubit_count
6
+ - T1_summary
7
+ - T2_summary
8
+ - readout_error_summary
9
+ - gate_error_summary
10
+ - basis_gates
11
+ - source_payload_reference
12
+
13
+ Rules:
14
+ - metadata-only remains valid
15
+ - physical requires actual physical fields, not inferred placeholders
16
+ - preserve provenance of payload source
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Work on graph-to-circuit mapping, quantum walk circuit builders, qutrit encoding, Qiskit compatibility, and graceful degradation when Qiskit is unavailable.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *)
5
+ paths:
6
+ - "gre/quantum/**"
7
+ - "gre/core/**"
8
+ - "tests/**"
9
+ ---
10
+
11
+ # GRE circuit
12
+
13
+ Instructions:
14
+ 1. Preserve no-Qiskit graceful degradation.
15
+ 2. Keep metadata complete on CircuitModel outputs.
16
+ 3. Prefer deterministic circuit generation.
17
+ 4. When adding encoding or walk logic, add tests for both available and unavailable Qiskit environments.
18
+ 5. Do not break existing corpus integration paths.
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Stage and commit GRE changes with a disciplined scientific commit message after reviewing diff, tests, and regression risks.
3
+ disable-model-invocation: true
4
+ allowed-tools: Bash(git status *) Bash(git diff *) Bash(git add *) Bash(git commit *) Read
5
+ ---
6
+
7
+ # GRE commit
8
+
9
+ ## Context
10
+ - Git status:
11
+ !git status --short
12
+ - Git diff:
13
+ !git diff --stat && git diff HEAD
14
+
15
+ ## Instructions
16
+ 1. Summarize the change set.
17
+ 2. Flag any regression or missing-test risk.
18
+ 3. If acceptable, stage relevant files.
19
+ 4. Create a precise commit message in imperative mood.
20
+ 5. Do not push.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Compare generated geometry, graph, walk, or circuit outputs against the imported GRE corpus and report evidence chains, similarity, and claim support.
3
+ argument-hint: [generated-object-or-path]
4
+ disable-model-invocation: true
5
+ allowed-tools: Read Grep Glob Bash(python *)
6
+ paths:
7
+ - "gre/**"
8
+ - "examples/**"
9
+ - "imports/**"
10
+ ---
11
+
12
+ # GRE compare
13
+
14
+ Object or path: $ARGUMENTS
15
+
16
+ Instructions:
17
+ 1. Load corpus if needed.
18
+ 2. Resolve the generated descriptor or file.
19
+ 3. Compare against relevant historical artifacts.
20
+ 4. Report top matching artifacts, similarity metrics, evidence chain, calibration completeness, and whether support is historical_real or synthetic_seed.
21
+ 5. Do not overstate claims when only metadata-level calibration exists.
22
+
23
+ Load metrics.md if needed.
@@ -0,0 +1,12 @@
1
+ # Comparison metrics
2
+
3
+ Prefer:
4
+ - structural similarity
5
+ - graph invariants
6
+ - node count and depth compatibility
7
+ - fidelity alignment
8
+ - entropy alignment
9
+ - backend-conditioned interpretation
10
+ - claim linkage confidence
11
+
12
+ Never present synthetic support as equivalent to measured historical support.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Core project context for Geometric Resonance Engine. Use when working on GRE architecture, research corpus, Sierpinski experiments, provenance, calibration, graph models, circuit mapping, or corpus comparison.
3
+ user-invocable: false
4
+ allowed-tools: Read Grep Glob
5
+ paths:
6
+ - "gre/**"
7
+ - "docs/**"
8
+ - "examples/**"
9
+ - "imports/**"
10
+ ---
11
+
12
+ # GRE context
13
+
14
+ Use scientific terminology. Do not frame the project as sacred geometry software.
15
+
16
+ Core principles:
17
+ - Geometry is an operational encoding layer.
18
+ - Preserve provenance on all imported artifacts.
19
+ - Distinguish historical_real, synthetic_seed, and derived_summary.
20
+ - Treat calibration completeness as a first-class quality dimension.
21
+ - Prefer structural or geometric encoding over simple frequency-multiplication narratives.
22
+ - Preserve compatibility when Qiskit is absent.
23
+
24
+ Load reference.md when you need architecture details, corpus taxonomy, or project terminology.
@@ -0,0 +1,14 @@
1
+ # GRE reference
2
+
3
+ Main domains:
4
+ - Core models: geometry, graph, circuit.
5
+ - Fractals: Sierpinski and future recursive families.
6
+ - Simulation: quantum walks, entropy, localization.
7
+ - Quantum: circuit mapping, qutrit encoding, walk builders, validation.
8
+ - Research: corpus loading, normalization, provenance, claim linkage, comparison.
9
+
10
+ Project rules:
11
+ - Never downgrade provenance.
12
+ - Never merge synthetic and historical evidence without explicit labeling.
13
+ - Prefer deterministic normalization.
14
+ - Keep generated comparison results traceable to both source corpus and generated descriptor.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Run GRE corpus hardening tasks including taxonomy backfill, provenance checks, validation tiers, calibration completeness, and corpus report diagnostics.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *) Bash(git diff *) Bash(git status *)
5
+ paths:
6
+ - "gre/research/**"
7
+ - "docs/**"
8
+ - "imports/**"
9
+ - "tests/**"
10
+ ---
11
+
12
+ # GRE hardening
13
+
14
+ Instructions:
15
+ 1. Check schema compliance.
16
+ 2. Check provenance coverage.
17
+ 3. Check evidence class and validation tier consistency.
18
+ 4. Check backend generation normalization.
19
+ 5. Check calibration completeness semantics.
20
+ 6. Update corpus report if any artifact changes.
21
+ 7. Add or update tests for every hardening rule change.
22
+ 8. Prefer minimal diffs and deterministic behavior.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Import QSG, IBM Quantum, Sierpinski, calibration, TMT, or related historical research artifacts into GRE corpus schemas with provenance sidecars and summaries.
3
+ argument-hint: [source-path-or-project]
4
+ disable-model-invocation: true
5
+ allowed-tools: Read Grep Glob Edit Write MultiEdit Bash(python *) Bash(git status *) Bash(dir *) Bash(ls *)
6
+ paths:
7
+ - "gre/research/**"
8
+ - "imports/**"
9
+ - "docs/**"
10
+ ---
11
+
12
+ # GRE ingestion
13
+
14
+ Target: $ARGUMENTS
15
+
16
+ Instructions:
17
+ 1. Identify whether the source is hardware runs, Sierpinski experiments, calibration snapshots, or derived summaries.
18
+ 2. Normalize into canonical GRE schemas.
19
+ 3. Generate or update primary JSON, provenance JSON, and summary markdown.
20
+ 4. Preserve source filename where practical.
21
+ 5. Mark evidence class correctly.
22
+ 6. Do not invent metrics absent from source data.
23
+ 7. Run schema validation and corpus report updates.
24
+
25
+ Before editing, read schema_checklist.md.
@@ -0,0 +1,25 @@
1
+ # Ingestion checklist
2
+
3
+ Required provenance fields:
4
+ - artifact_id
5
+ - source_project
6
+ - source_path
7
+ - source_date
8
+ - import_date
9
+ - artifact_type
10
+ - transform_chain
11
+ - sensitivity
12
+
13
+ Required semantic fields where applicable:
14
+ - backend
15
+ - depth
16
+ - shots
17
+ - metrics
18
+ - validation_tier
19
+ - evidence_class
20
+ - backend_generation
21
+
22
+ Rules:
23
+ - calibration snapshots can be metadata-only or physical
24
+ - synthetic_seed must never be promoted to historical_real
25
+ - markdown files are sidecars, not primary artifacts
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Perform a rigorous scientific code review for GRE focused on correctness, provenance, taxonomy integrity, calibration semantics, regression risk, and test adequacy.
3
+ disable-model-invocation: true
4
+ allowed-tools: Read Grep Glob Bash(git diff *) Bash(git status *) Bash(python -m pytest *)
5
+ paths:
6
+ - "gre/**"
7
+ - "tests/**"
8
+ - "docs/**"
9
+ ---
10
+
11
+ # GRE review
12
+
13
+ Instructions:
14
+ 1. Review only from current repository evidence.
15
+ 2. Prioritize schema integrity, provenance correctness, calibration semantics, evidence-class separation, deterministic normalization, and test coverage gaps.
16
+ 3. Output critical issues, medium issues, low issues, and suggested tests.
17
+ 4. Avoid style-only feedback unless it affects correctness or maintainability.