Skip to content

Add bootstrap agent, smtpAgent stack, and chain-of-command pipeline#4

Merged
sindoc merged 3 commits intomainfrom
claude/bootstrap-agent-edge-cap-2f2SM
Mar 17, 2026
Merged

Add bootstrap agent, smtpAgent stack, and chain-of-command pipeline#4
sindoc merged 3 commits intomainfrom
claude/bootstrap-agent-edge-cap-2f2SM

Conversation

@sindoc
Copy link
Owner

@sindoc sindoc commented Mar 17, 2026

Summary

  • uniWork/bootstrapAgent: CLI governance agent extending Collibra make/shell toolchain with edge cap investment maturity model
  • singine/smtpAgent: multi-layer SMTP stack (C TCP server + Clojure JVM processor + Python web interface)
  • .github/workflows/chain_of_command.yml: 6-phase CI pipeline (build → migrate → analyze → rust-path → clojure-cat → report)
  • Persistence schemas: V001–V003 migrations covering pipeline runs, lineage, LDAP entities, categories, semantic records (FOAF/DOAP/SKOS)
  • Rust id_gen.rs: inode-style ID generator with SQLite-persisted namespace counters

Test plan

  • Run make in uniWork/bootstrapAgent/
  • Verify chain-of-command GitHub Action triggers on push to claude/** branches
  • Verify SQL schema migrations apply cleanly with migrate.py
  • Rust: cargo test in uniWork/persistence/rust/

🤖 Generated with Claude Code

Introduces uniWork/bootstrapAgent — a CLI-driven governance agent that
extends the existing Collibra make/shell toolchain with:

- bootstrap.sh: orchestrated entry point (handshake → assets → snapshot)
- handshake/validate.sh: TCP/UDP probe + HTTP CSRF handshake with structured
  activity log entries for every system-to-system connection
- handshake/log_entry.sh: reusable JSON lineage record writer
- edgeCap/model.json: typed maturity model (L1–L5) with edge cap limits,
  back-snap flags, and gate metrics for investment asset governance
- edgeCap/snapshots/generate_snapshot.sh: back-snap generator for rollback
- assets/investmentMaturityLevel/: five maturity-level asset files
  (L1_Initial → L5_Optimizing) ready for Collibra bulk import
- generate_payload.sh: bulk REST payload builder (mirrors existing pattern)
- lineage/migration_path.json: 5-stage network migration path (IP→UDP→TCP)
  with per-stage maturity gates and control checks
- lineage/control_imperatives.json: seven approved control rules (CI-001–007)
  enforcing handshake logging, lineage completeness, ownership, policy,
  variance gating, back-snap availability, and edge cap limits
- metrics/baseline.json: solid baseline measurements for all KPIs
- metrics/targets.json: target commitments (coverage, latency, variance, RPO)
- Makefile: orchestration targets (bootstrap, validateHandshake, showMetrics,
  showLineage, showEdgeCap, help)

https://claude.ai/code/session_01GL6VkbVySv8uBDg9EKYH3Y
Introduces uniWork/smtpAgent — a three-layer email agent that lets you
compose and send emails from an iPad browser. All code loaded to contact
the outside world is controlled within this repo.

Layer 1 — C (trusted TCP acceptor):
  c/src/accept_tcp.c      Loopback-bound TCP server; only TRUSTED_ORIGIN
                          (127.0.0.1) connections relayed; others dropped
                          and logged. Forks per connection, relays via curl
                          pipe to Clojure service. Zero-warning GCC build.
  c/include/tcp_server.h  Public API + constants (backlog, relay buf, ports)
  c/Makefile              gcc -Wall -Wextra -std=c11 -O2 → c/bin/accept_tcp

Layer 2 — Clojure / JVM (parser + interpreter + JavaMail SMTP):
  clojure/project.clj     Leiningen; postal (JavaMail), Ring/Jetty, Compojure
  clojure/src/smtpagent/parser.clj   EDN meta-config loader + JSON command
                          validator + {{template}} expander
  clojure/src/smtpagent/smtp.clj     SMTP send via postal; creds from env
                          SMTP_USER / SMTP_PASS only (never in files)
  clojure/src/smtpagent/core.clj     Singine interpreter: dispatches :send
                          :ping :status :reload-config; Ring HTTP on :8026
  clojure/resources/logback.xml      Structured log to logs/smtp.log

Layer 3 — Python / Flask (web UI → iPad browser):
  python/server.py        Flask on :8080 (0.0.0.0 → LAN-accessible from iPad)
                          Reads meta/config.edn; bridges POST /send → Clojure
  python/templates/compose.html  iOS-native-look compose form; 16 px inputs
                          (no iOS zoom), safe-area-inset, touch targets, SVG
                          icons, status badges for all three layers

Singine meta-config:
  meta/config.edn         Single EDN source of truth for all layers:
                          :c-tcp :smtp :web :interpreter :trusted-origins
  meta/bootstrap.sh       Idempotent bootstrap: installs lein (if absent),
                          pip packages, builds C binary, fetches Clojure deps

Top-level Makefile:
  make bootstrap          Full install + build
  make start              Launch all three layers (backgrounded with PID files)
  make stop / status / logs / clean

https://claude.ai/code/session_01GL6VkbVySv8uBDg9EKYH3Y
GitHub Action (.github/workflows/chain_of_command.yml):
  6-phase chain of command triggered on push to claude/**, main, master:
  Phase 1  build       — C binary (gcc), Rust engine (cargo release), Python env
  Phase 2  migrate     — SQL schema raw→base via migrate.py; SQLite in CI
  Phase 3  analyze     — commit lineage base→master; FOAF/DOAP/RSS generation
  Phase 4  rust-path   — shortest-path on migration graph (Rust Dijkstra+quicksort)
  Phase 5  clojure-cat — multi-dimensional categories + similarity (JVM)
  Phase 6  report      — Logseq SQLite knowledge graph + GitHub Job Summary

Schema (uniWork/persistence/schema/):
  V001__init.sql       pipeline_runs, env_migrations (inode dir/folder tracking)
  V002__lineage.sql    lineage (raw/base/master phases), ldap_entities (RFC 4512
                       DN tree: dc/ou/cn/uid with structural constraints),
                       rss_feed, db_connections (SQLite/MariaDB/Hive registry)
  V003__categories.sql categories (main/primary/secondary/n_linear/relational/
                       boolean/temporal + Boolean algebra bool_expr),
                       entity_categories, similarity_edges, path_results,
                       semantic_records (FOAF/DOAP/SKOS/RSS/DC)
  schema.xml           UTF-8 XML manifest with namespace/URN map, LDAP root
  urn_map.json         Prefix→URN→base-URL map for all layers + protocol ports

Rust (uniWork/persistence/rust/):
  id_gen.rs            Inode-style gen_id generator (namespace-uuid, monotonic
                       inode counter persisted in SQLite per namespace)
  shortest_path.rs     Quicksort edge Vec<Edge> + Dijkstra adjacency map;
                       loads similarity_edges, persists to path_results
  main.rs              CLI: --mode shortest-path|gen-id|migrate-check|status

Python (uniWork/persistence/python/):
  migrate.py           Multi-driver migration runner (SQLite/MariaDB/Hive);
                       applies V*.sql in version order, records env_migrations
  ldap_tree.py         RFC 4512 LDAP tree builder from ldap_entities table;
                       structural constraint validator (VALID_PARENT matrix);
                       BFS shortest DN path
  foaf_doap.py         FOAF/DOAP Turtle + RSS 2.0 XML + JSON-LD per commit;
                       lutino.io base URI; persists to semantic_records + rss_feed
  db_driver.py         Open.dbc ODB abstraction (SQLiteDriver/MariaDBDriver/
                       HiveDriver); reads config/open.dbc DSN config

Clojure/JVM (uniWork/persistence/clojure/):
  categories.clj       Reification (dimension keyword→Category record) +
                       Deification (spec-validated, URN-addressed, DB-persisted);
                       Boolean algebra evaluator (AND/OR/NOT over category IDs);
                       hierarchical parent constraints; multi-dim scoring
  similarity.clj       Jaccard (categorical), cosine (weighted vector),
                       hierarchical LCA similarity; persists similarity_edges
                       for Rust shortest-path engine
  core.clj             JVM entry point; modes: categorise|similarity|status

Logseq / commit analyzer (uniWork/persistence/logseq/):
  analyze_commit.py    raw→base→master pipeline per commit; captures git diff
                       stats, file inode paths; inserts lineage + env_migrations
                       + rss_feed; writes lineage_id to GITHUB_OUTPUT

Config:
  config/open.dbc      ODBC-style DSN config (SQLite dev/prod, MariaDB, Hive)
  config/connections.edn  EDN connection registry with env-defaults map
  proto/persistence.proto gRPC service defs (EmailService, PersistenceService,
                          CategoryService) with PathRequest/GenIdRequest

iPad access: make -C uniWork/persistence ipad-url  →  http://<LAN-IP>:8080

https://claude.ai/code/session_01GL6VkbVySv8uBDg9EKYH3Y
@sindoc sindoc merged commit db48fac into main Mar 17, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants