Skip to content

Commit 0359908

Browse files
hyperpolymathclaude
andcommitted
refactor: deep audit — fix stale naming, add innervation architecture
Phase 1 housekeeping: - Replace all stale -scm naming with -a2ml across 33 satellite A2ML files (agentic, playbook, neurosym, anchor, meta, overlay) - Update TOPOLOGY.md: fix diagram, add protocol + integration layers, honest 80% overall (was false 100%) - Rewrite ROADMAP.adoc: reflect actual state, add Phase A (innervation), Phase B (evidence), Phase C (visibility), Phase D (maturity) - Wire Justfile: test/build/lint/fmt/clean now run real sub-project suites instead of stubs; add crg-grade and crg-badge recipes - Fix REQUIRED-FILES.md URLs (×2) New artefacts: - coordination.k9: nerve receptor declaring invariants, protected paths, afferent/efferent/reflex innervation signals - .verisimdb/config.toml: port 8097, 5 octad schemas (crg-grade, proof-status, compliance-scan, ecosystem-link, inline-annotation) - .github/workflows/hypatia-scan.yml: dogfooding self-scan - component-readiness-grades/SELF-ASSESSMENT.adoc: grade B with evidence inventory and documented gaps to A Architecture decision: begin transition from 6a2 static files to innervation model (coordination.k9 + VeriSimDB + Hypatia + inline annotations). Standards repo is the pilot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ea83971 commit 0359908

41 files changed

Lines changed: 821 additions & 187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/hypatia-scan.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Hypatia Neurosymbolic CI/CD Security Scan — SELF-SCAN (dogfooding)
3+
# The standards repo that defines Hypatia scans itself with Hypatia.
4+
name: Hypatia Self-Scan
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
schedule:
12+
- cron: '0 0 * * 0' # Weekly on Sunday
13+
workflow_dispatch:
14+
15+
permissions: read-all
16+
17+
jobs:
18+
scan:
19+
name: Hypatia Neurosymbolic Analysis (Dogfooding)
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Setup Elixir for Hypatia scanner
29+
uses: erlef/setup-beam@2f0cc07b4b9bea248ae098aba9e1a8a1de5ec24c # v1.18.2
30+
with:
31+
elixir-version: '1.19.4'
32+
otp-version: '28.3'
33+
34+
- name: Clone Hypatia
35+
run: |
36+
git clone --depth 1 https://github.com/hyperpolymath/hypatia.git "$HOME/hypatia"
37+
38+
- name: Build Hypatia scanner
39+
working-directory: ${{ env.HOME }}/hypatia
40+
run: |
41+
if [ ! -f hypatia-v2 ]; then
42+
cd scanner && mix deps.get && mix escript.build && mv hypatia ../hypatia-v2
43+
fi
44+
45+
- name: Run Hypatia scan
46+
id: scan
47+
run: |
48+
echo "Scanning standards repo (dogfooding)"
49+
HYPATIA_FORMAT=json "$HOME/hypatia/hypatia-cli.sh" scan . > hypatia-findings.json
50+
51+
FINDING_COUNT=$(jq '. | length' hypatia-findings.json 2>/dev/null || echo 0)
52+
CRITICAL=$(jq '[.[] | select(.severity == "critical")] | length' hypatia-findings.json 2>/dev/null || echo 0)
53+
HIGH=$(jq '[.[] | select(.severity == "high")] | length' hypatia-findings.json 2>/dev/null || echo 0)
54+
MEDIUM=$(jq '[.[] | select(.severity == "medium")] | length' hypatia-findings.json 2>/dev/null || echo 0)
55+
56+
echo "findings_count=$FINDING_COUNT" >> $GITHUB_OUTPUT
57+
echo "critical=$CRITICAL" >> $GITHUB_OUTPUT
58+
echo "high=$HIGH" >> $GITHUB_OUTPUT
59+
echo "medium=$MEDIUM" >> $GITHUB_OUTPUT
60+
61+
echo "## Hypatia Self-Scan Results (Dogfooding)" >> $GITHUB_STEP_SUMMARY
62+
echo "" >> $GITHUB_STEP_SUMMARY
63+
echo "The standards repo scans itself. Findings here are compliance" >> $GITHUB_STEP_SUMMARY
64+
echo "gaps between what we define and what we practice." >> $GITHUB_STEP_SUMMARY
65+
echo "" >> $GITHUB_STEP_SUMMARY
66+
echo "| Severity | Count |" >> $GITHUB_STEP_SUMMARY
67+
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
68+
echo "| Critical | $CRITICAL |" >> $GITHUB_STEP_SUMMARY
69+
echo "| High | $HIGH |" >> $GITHUB_STEP_SUMMARY
70+
echo "| Medium | $MEDIUM |" >> $GITHUB_STEP_SUMMARY
71+
echo "| **Total**| $FINDING_COUNT |" >> $GITHUB_STEP_SUMMARY
72+
73+
- name: Run panic-attack assail
74+
run: |
75+
# Install panic-attack if available
76+
if command -v panic-attack >/dev/null 2>&1; then
77+
panic-attack assail . > panic-attack-findings.json 2>&1 || true
78+
echo "panic-attack scan complete"
79+
else
80+
echo "panic-attack not available in CI — install from hyperpolymath/panic-attacker"
81+
echo "[]" > panic-attack-findings.json
82+
fi
83+
84+
- name: Upload findings artifacts
85+
uses: actions/upload-artifact@65c79d7f54e76e4e3c7a8f34db0f4ac8b515c478 # v4
86+
with:
87+
name: standards-self-scan
88+
path: |
89+
hypatia-findings.json
90+
panic-attack-findings.json
91+
retention-days: 90
92+
93+
- name: Check for critical issues
94+
if: steps.scan.outputs.critical > 0
95+
run: |
96+
echo "Critical self-scan issues found in the standards repo!"
97+
echo "The repo that defines standards has compliance gaps."
98+
echo "Review hypatia-findings.json for details."
99+
# Warn but don't fail — fix forward

.meta/REQUIRED-FILES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ When updating these files:
5050

5151
- [RSR (Rhodium Standard Repositories)](https://github.com/hyperpolymath/rhodium-standard-repositories)
5252
- [Mustfile Specification](https://github.com/hyperpolymath/mustfile)
53-
- [SCM Format Family](https://github.com/hyperpolymath/meta-scm)
53+
- [A2ML Format Family](https://github.com/hyperpolymath/standards/tree/main/meta-a2ml)

.verisimdb/config.toml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# VeriSimDB instance configuration for the standards monorepo
3+
# See: https://github.com/hyperpolymath/verisimdb
4+
5+
[instance]
6+
name = "standards"
7+
port = 8097
8+
volume = "standards-verisimdb-data"
9+
base_image = "cgr.dev/chainguard/wolfi-base:latest"
10+
11+
[instance.health]
12+
endpoint = "/health"
13+
interval_seconds = 30
14+
15+
# ─────────────────────────────────────────────────────────────
16+
# Octad Schemas — what this instance stores
17+
# ─────────────────────────────────────────────────────────────
18+
19+
# CRG grade tracking — component readiness grades with evidence
20+
[[octad_schema]]
21+
entity = "crg-grade"
22+
description = "Component Readiness Grade assessment with evidence chain"
23+
24+
[octad_schema.modalities]
25+
semantic = ["component", "grade", "evidence_summary", "reviewer", "repo"]
26+
temporal = ["graded_at", "promoted_from", "next_review"]
27+
provenance = ["graded_by", "basis_commit", "ci_run_id", "methodology"]
28+
vector = ["component_embedding"]
29+
30+
# Proof status — formal verification evidence
31+
[[octad_schema]]
32+
entity = "proof-status"
33+
description = "Formal proof verification result from ECHIDNA"
34+
35+
[octad_schema.modalities]
36+
semantic = ["file_path", "prover", "theorem_name", "axioms_used", "trust_level"]
37+
temporal = ["verified_at", "last_source_changed", "proof_age_days"]
38+
provenance = ["echidna_version", "backend", "ci_run_id"]
39+
document = ["proof_term_cbor", "type_signature"]
40+
41+
# Compliance scan results — Hypatia findings
42+
[[octad_schema]]
43+
entity = "compliance-scan"
44+
description = "Hypatia/panic-attack scan finding"
45+
46+
[octad_schema.modalities]
47+
semantic = ["repo", "finding_type", "severity", "rule_id", "message"]
48+
temporal = ["scanned_at", "resolved_at", "age_days"]
49+
provenance = ["scanner", "scanner_version", "recipe_applied"]
50+
graph = ["related_repos", "caused_by_commit"]
51+
52+
# Ecosystem relationships — derived from actual imports/usage
53+
[[octad_schema]]
54+
entity = "ecosystem-link"
55+
description = "Relationship between repos/components derived from code"
56+
57+
[octad_schema.modalities]
58+
semantic = ["source_repo", "target_repo", "link_type", "strength"]
59+
temporal = ["first_seen", "last_confirmed", "stale_after_days"]
60+
graph = ["dependency_chain", "transitive_consumers"]
61+
provenance = ["detection_method", "evidence_file", "evidence_line"]
62+
63+
# Inline annotations — @trust/@contract/@grade from code
64+
[[octad_schema]]
65+
entity = "inline-annotation"
66+
description = "Machine-readable annotation extracted from source code"
67+
68+
[octad_schema.modalities]
69+
semantic = ["file_path", "line", "annotation_type", "value", "function_name"]
70+
temporal = ["extracted_at", "source_last_modified"]
71+
provenance = ["commit_sha", "extractor_version"]
72+
vector = ["function_embedding"]
73+
74+
# ─────────────────────────────────────────────────────────────
75+
# Groove Integration
76+
# ─────────────────────────────────────────────────────────────
77+
78+
[groove]
79+
enabled = true
80+
service_name = "standards-verisimdb"
81+
capabilities = ["octad-store", "vql-query", "annotation-index"]
82+
83+
[groove.signals]
84+
# Afferent: what this instance emits
85+
emit = [
86+
"crg.grade.changed",
87+
"proof.verified",
88+
"proof.stale",
89+
"compliance.finding.new",
90+
"compliance.finding.resolved",
91+
"ecosystem.link.discovered",
92+
"ecosystem.link.stale",
93+
"annotation.extracted",
94+
]
95+
96+
# Efferent: what this instance responds to
97+
respond_to = [
98+
"commit.pushed", # re-index annotations
99+
"ci.completed", # ingest scan results
100+
"echidna.proof.verified", # store proof certificate
101+
"hypatia.scan.completed", # store findings
102+
]

0 commit comments

Comments
 (0)