Commit Graph

35 Commits

Author SHA1 Message Date
Backtalk6858 6cffad860d docs: CA-P1b — widen fast-path on logged evidence (hook v2.1)
Records why the v2.0 classifier taxed the user 22 prompts and what changed.

Root cause: v2.0 conflated "contains a redirect character" with "writes
something". `2>&1` is file-descriptor plumbing and `>/dev/null` is a discard —
neither writes. That single mistake caused 16 of the 22 prompts. It was found
by reading ca_decisions.jsonl, not by inspection: the bug was the classifier's
reasoning, so re-reading the code only reproduced it.

v2.1 changes (all evidence-driven, none speculative):
- _SAFE_REDIRECT_RE strips fd plumbing + /dev/null discards before the
  redirect check; a redirect to any REAL path still disqualifies, anchored so
  `>/dev/nullx` cannot ride the prefix.
- `cd` added to READONLY_ALLOW (no filesystem effect; every other segment must
  independently qualify anyway).
- `ssh <host> '<cmd>'` classifies the inner command under identical rules,
  depth-limited to one hop.

Verified: 42/42 self-test, e2e ALL PASS, classify() median 0.011ms.
Tier-1 writes deliberately NOT shipped — widen on evidence, not guesses.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 19:33:39 -05:00
Backtalk6858 c101167eb5 docs: constrained-autonomy design approved + fix stale tier-2 guard
- constrained_autonomy_design_decisions.md: D1-D8 locked (hybrid hook
  classifier + Agent-Sudo daemon executor, structural classification with
  unknown->sandbox, fail-closed, Hermes recovery ladder) + EXECUTION ORDER
  with CA-P1a inserted as zero-dependency item 0
- agent_prompts.md shared block: replace "TIER-2 IS BROKEN" with the
  corrected root cause (old primary bridge's NTFY endpoint was unreachable;
  tier-2 works when the bridge reaches ntfy + user is attended)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 17:02:08 -05:00
Backtalk6858 32131ade7e feat: Agent-Sudo P4 — server-01 LIVE (unsigned interim deploy)
- P4 prompt: unsigned-interim override (SUDO_MD_VERIFY_ENFORCE=false,
  non-blocking AppRole/NTFY provisioning)
- server-01 Agent-Sudo swapped live on 8082 (full gate green, 4/4 replay
  match); primary on 8084 shadow, manual swap pending (#146)
- tier-2 root cause found: old primary bridge NTFY endpoint unreachable,
  not NTFY itself (behavior_changes id=3 corrected)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 03:19:50 -05:00
Backtalk6858 6248875e13 docs: add P1-HARDENING prompt (DNS bake, firewall persist+RFC1918 DROP, provisioning fix)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 21:27:21 -05:00
Backtalk6858 d44c9b55e6 docs: expand P0 prompt → P0+pre-flight+groundwork agent (absorbs P1)
- P0 build prompt now does Part A (command_audit schema) + Part B
  (read-only audit of all P1-P5 assumptions) + Part C (remediate safe
  findings = all of P1: Incus install, host inventories, build-sandbox.sh,
  both sandbox mirrors)
- Golden Rule: only remediate read-only or server-01-sandbox findings;
  tier-2/manual-auth or prod-touching → batched, never blocked
- Ends with a BUILD READINESS wrap-up so the focused build starts at P2
- P1 section retained as canonical contract reference, marked folded-in

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 20:19:00 -05:00
Backtalk6858 c50e72e17b docs: agent-sudo grill-me complete — D1-D10, P0-P5 build prompts, comparison
- Close Agent-Sudo (infra id=176) design grill-me; gap #5 cross-cutting locked
- Add P0-P5 phased background-agent build prompts (Opus 4.8 upgrades applied)
- Add agent_sudo_vs_sudo_bridge.md comparison doc
- Update context.md: sprint day 11 session 4, Coolify/N8N/port-8084 corrections

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 14:28:39 -05:00
Backtalk6858 37d1c5d90f docs: sprint day 11 session 3 — agent-sudo design, projects DB, infrastructure migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 16:39:16 -05:00
Backtalk6858 9260cc039f docs: session 2 facts — Phase 2+3 complete, NTFY urgent fix, sudo-bridge-server01 Jenkins job
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 02:42:53 -05:00
Backtalk6858 0860263935 fix: correct PROXY_CALLERS raw key format + session 6 facts
- agent_prompts.md: store raw keys in PROXY_CALLERS (app.py hashes internally);
  pre-hashing caused double-hash → all jenkins auth failed
- context.md: session 6 facts — Phase 1 complete, PROXY_CALLERS bug fixed,
  behavior_changes table created, Jenkinsfile shell operator bug logged (id=1),
  next session: fix Jenkinsfile then launch Phase 2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 00:54:21 -05:00
Backtalk6858 cb7a9def3d feat: write all 11 background agent prompts + update context
- agent_prompts.md: all 11 prompts across 3 phases ready to launch
- context.md: session 5 facts — prompts ready, key server-01 finding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 20:13:40 -05:00
Backtalk6858 436c04edf0 docs: update context.md — sprint day 10 session 4, id=161 design locked, phase plan finalized
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 19:40:40 -05:00
Backtalk6858 82a4892e0d docs: update context.md — sprint day 10 session 3, ids 157-160 complete, blockers logged
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 16:08:21 -05:00
Backtalk6858 7d8c5b76af docs: update context.md — sprint day 10 session 2, id=156 complete, Jenkins expansion logged
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 15:13:12 -05:00
Backtalk6858 6442e7ffd0 docs: add structural wrap-up design principle to both builder playbooks 2026-06-26 13:45:06 -05:00
Backtalk6858 0ebf56c310 docs: update context.md — sprint day 9+10, auth map built, next session tasks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 13:33:00 -05:00
Backtalk6858 b99af3d0aa feat: add required_playbooks fetch + prompt review gate to both builder playbooks
Agent Builder: added Step 2 (fetch required_playbooks from Gitea URLs), added
mandatory claude_agent prompt design rules to Ollama prompt (--max-turns 15,
loop detection, credential map inline, defined output), added Step 6 synchronous
human NTFY gate for claude_agent prompt review before sandbox testing.

N8N Builder: same required_playbooks fetch step, added Step 8 synchronous human
NTFY gate for any workflow containing a claude -p node.

Both changes prevent runaway token loops in built automations by ensuring every
generated claude -p call has hard stops baked in and user-reviewed before deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 01:31:58 -05:00
Backtalk6858 924e7d5e8b docs: add sprint gameplan + Hermes grill-me decisions logged 2026-06-24 23:52:57 -05:00
Backtalk6858 20f6e368b8 docs: Sprint Day 8 facts — Phase 2+3 complete, Coolify retired 2026-06-24 21:54:05 -05:00
Backtalk6858 4b99e9f884 docs: update context.md — sprint day 7, id=147 phase 2 in progress
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 19:37:13 -05:00
Backtalk6858 3c93a15c01 docs: update context.md — sprint day 6, id=147 phase 1 complete, standalone Traefik live
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 18:56:05 -05:00
Backtalk6858 8bbb547041 docs: update context.md — sprint day 5, id=141 Jenkins E2E complete, next=Traefik retirement 2026-06-24 16:37:33 -05:00
Backtalk6858 1edbdc5358 docs: update context.md — sprint day 4, Jenkins E2E blocked on docker binary 2026-06-24 14:25:24 -05:00
Backtalk6858 97a06261b6 note: next session — fix allowlist.json ownership + no-sync policy
allowlist.json must be root-owned so POST /allowlist is the only write
path; direct file edit bypasses audit log and danger veto. No cross-
bridge sync — allowlists grow organically per server.
2026-06-22 20:58:03 -05:00
Backtalk6858 be89611060 note: next session — sync POST /allowlist to sudo-bridge-server01
Bridge was added to primary only; server-01 needs redeploy of latest
image + allowlist.json sync before it can autonomously add entries.
2026-06-22 20:52:59 -05:00
Backtalk6858 23bbcb4a6d note: next session — secrets proxy sandbox precondition scaffolding
Before the shell sandbox dry-run, proxy needs to detect missing state
(files, services, iptables rules) and create it so the test is faithful.
2026-06-22 20:50:20 -05:00
Backtalk6858 5b1eec124e update: context.md — id=51 fully E2E verified, session 4 cont facts
Shell E2E complete. NTFY topic bug, docker-cli fix, DB permissions,
524 Cloudflare limitation documented.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 20:43:11 -05:00
Backtalk6858 3bc28c4905 update: context.md — id=51 fully complete, session 4 facts
E2E tests passed, iptables persisted, POST/GET /allowlist on sudo-bridge.
Key facts: proxy path format, sudo-bridge port, Coolify API internal IP.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 20:07:21 -05:00
Backtalk6858 9ca9f2632a update: context.md — id=51 deployed healthy on primary, session 3 facts + next session order
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:38:48 -05:00
Backtalk6858 e7c6db19d7 update: context.md + session summary — proxy migration to primary, iptables LAN fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:09:56 -05:00
Backtalk6858 8d23962c13 update: context.md — id=51 deployed (partial), pending Cloudflare route + E2E tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 14:51:39 -05:00
Backtalk6858 46ff6b247d update: context.md + playbook — id=51 grill-me complete, session 3/4/5 facts backfilled, N8N API sshTunnel gotcha
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:05:37 -05:00
Backtalk6858 6a90c3bae5 session: June 20 session 2 — sandbox Vault mirror + auto-unseal deployed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 15:16:06 -05:00
Backtalk6858 4c47123270 update: context.md — June 20 session progress (id=57 partial, N8N migrated)
Production N8N on server-01, Vault-backed secrets, rollback tested, root token fixed.
id=57 remaining: sandbox Vault mirroring + Bitwarden audit + sandbox credentials.
id=51 not started — next session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 14:06:31 -05:00
Backtalk6858 e0ed41ffeb update: context.md — backfill complete, readiness verified, priority reorder, June 19/22 schedule
All prereqs confirmed live on server-01. Full automation_ideas priority reorder (p1–p17 non-blocked,
p20–p29 blocked). Added id=67 N8N Builder Agent. id=57 expanded to full production mirror scope.
June 19: manual infrastructure day (id=51 + id=57). June 22: builder agents extended session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 13:09:14 -05:00
Backtalk6858 db6cbbdec1 init: add claude-config and agent-builder context files
Initial commit tracking session context, playbooks, and automation specs
for claude-config and agent-builder Claude Code conversations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 23:08:23 -05:00