aegis-goal
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Standing goal: implement every phase of the AEGIS fork/extend plan (docs/plans/aegis-fork-extend.md) until all are shipped and verified. Shows the phase backlog with file:line anchors and how to work it. Usage: /aegis-goal [phase|item]
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- api-ts/CLAUDE.mdCLAUDE.md
- bot/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- showcase/CLAUDE.mdCLAUDE.md
- webapp/CLAUDE.mdCLAUDE.md
- gitbook/llms.txtllms.txt
- suwappubot-conventionsSkill
- design-iterateSkill
- ethglobal-goalSkill
- evolveSkill
- goalSkill
- handoffSkill
- redesign-existing-projectsSkill
- reflectSkill
- suwappubot-conventionsSkill
- design-taste-frontendSkill
- suwappuSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
When implementation reveals a new gap (like Phase 4's items were found), ADD it here under the right phase.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/aegis-goal — Ship the AEGIS integration, all phases
Standing goal: every phase of docs/plans/aegis-fork-extend.md implemented, verified, and merged. The plan (2026-08-02) adopts gaiarobotics/aegis (MIT, fork-pinned) as Suwappu's agent immune system: Python scanner at the LLM/message choke points, quarantine federated with BlacklistService, a minimal TypeScript port for the api-ts agent surfaces, plus standalone hardening fixes the research surfaced. Upstream reference commit: e3e87b3.
How to use
/aegis-goal— pick the next unchecked item in phase order, re-verify its file:line anchor against current code (the plan is a point-in-time audit; lines drift), implement it, run the phase's verification, check it off, and commit the edit to this file in the same PR as the work./aegis-goal <phase|item>— jump to that phase or item (e.g./aegis-goal 2or/aegis-goal 3.3).- One phase ≈ one PR via
/ship. Don't batch phases. Items within a phase may split into smaller PRs if independently shippable. - When implementation reveals a new gap (like Phase 4's items were found), ADD it here under the right phase.
- Goal is DONE when every box is checked; then archive this skill (delete the directory in a final commit noting completion).
The backlog
Phase 1 — Python scanner at LLM + message choke points (observe mode)
SHIPPED: PR #685 merged to main (58b24f0), CI green, 58 tests, cubic review findings addressed. Deploy to Railway is still pending — auto-deploy is broken (billing) and the CCR session has no Railway credentials; run /deploy prod python-api from a machine with the Railway CLI, then python3 scripts/status.py to verify boot. 1.7b's telemetry clock starts at that deploy.
- 1.1 Pinned
aegis-shieldto immutable upstream commite3e87b3791fb…in requirements.in + pip-compile'd lockfile (minimal diff; all 3 hard deps already present). Verified clean-venv install + scan smoke test. Manual follow-up: session repo-scoping blocked creating the0xsoftboi/aegisfork — fork on GitHub when convenient and repoint the requirements.in URL (same SHA). - 1.2
bot/config/aegis.yaml(observe, scanner-only modules, block_on_threat: false) +bot/config/aegis_signatures/crypto.yaml(14 SW-* signatures) +bot/services/aegis_service.py(fail-open singleton wrapper, WARNING-log mirror for Railway) +AEGIS_ENABLEDsetting. Verified: pack loads (52 sigs total), 14/14 detection cases pass, p50 0.22ms. - 1.3 DONE (commit 3618d9b) — LLM pre-flight:
Shield.scan_input()inparse_trade_intent(bot/services/nl_intent_service.py:404, before the Anthropic call); provenance-delimit untrusted text in_build_user_content(:214-216); sanitize thepending_intentecho (:182-192— injection persistence loop). - 1.4 DONE (commit f8d896b) — WhatsApp seam: scan in
_wa_dispatch(api/main.py:2512-2531) — must cover text, button payloads,nfm_replyJSON, and post-Whisper voice transcripts (:2522-2524). - 1.5 DONE (commit ee4747b, group -1 at top of add_handlers) — Telegram seam: group
-1scanner handler inbot/main.pyadd_handlers(before:740) or wrapPerUserSerializingProcessor.do_process_update(bot/utils/update_processor.py:25). Scan-and-log only — never blocks normal commands. - 1.6 DONE (commit f8d896b, 30/60s per-key limit + scan) — Agent NL API
api/main.py:2163-2183: add scanner + per-key rate limit (today it has neither between the API-key check andhandle_command). - 1.7a Code gate DONE (commit 59a0bc2): 57 tests pass (19 AEGIS + 38 NL incl. 6 new prompt-hardening), p50 scan latency 0.12ms. Suite caught+fixed a real bug (ThreatMatch flat-field access blanked signature_ids telemetry).
- 1.7b Telemetry review: after Phase 1 deploys, review observe-mode detections (Railway logs
AEGIS threat detected+.aegis/telemetry.jsonl) after ~1 week of prod traffic before any enforce flip anywhere.
Phase 2 — Quarantine + token-address broker (federate with existing immune system)
- 2.1 DONE — high-precision verdicts (credential_extraction / SW-04x + validated embedded address) reported via report_scam as 'aegis-scanner'; never add_to_blacklist. NOTE: report_scam is currently log-only upstream (auto-blacklist commented out) — quorum/threshold logic is future work under 2.3. Was: Persist AEGIS threat verdicts into
BlacklistService.report_scam(bot/services/token_security/blacklist_service.py:388) so detections accumulate in the store the bot already hard-blocks on (paste_trade.py:213,swap.py:1101). - 2.2 DONE (MONEY-PATH) — shared check_address_gate (blacklist fail-open + compliance fail-closed) on paste_trade/_render_token_card, /check, snipe receive_contract + /snipe quick-path, and /intel (warning banner). EVM gap: analyzer is Solana-only, so EVM gets blacklist+sanctions but no honeypot sim. Was: Token-address broker at the paste surface: extend
token_analyzer.quick_checkbeyond Solana to EVM in_render_token_card(bot/handlers/paste_trade.py:197; closes "Buy button still shown on EVM" at:207-208); pipe every pasted/embedded address throughblacklist_service.check+compliance.assert_compliantbefore the Buy keyboard is stashed (:223); same for/intel(bot/handlers/intel.py:169,323) and snipereceive_contract(bot/handlers/snipe.py:253). MONEY-PATH. - 2.3 DONE — AegisUserTrust table (DB-backed, replica-safe), record-only trust decay/recovery wired fail-open into scan/ascan; no enforcement yet. Was: Per-user trust adaptation (AEGIS
TrustManagersemantics), DB-backed viadatabase/db.py::_ensure_schema()additive migration — never in-process memory (multi-replica webhook mode). Fold in the PR #685 review note: move the/v1/agent/executeper-key limiter to the same shared store (Redis is already a dep) and add idle-key eviction — today it's in-process like every other limiter in the repo. - 2.4 DONE — Opus money-path review: SHIP WITH FIXES. 3/4 areas cleared (gate mirror faithful+fail-closed, migration idempotent, 0.0-falsy fix confirmed, no injection); one MEDIUM (per-message trust DB read) fixed via negative cache. Noted for future: EVM honeypot gap (analyzer Solana-only), snipe_quick_ dead button must gate if ever wired, recovery needs periodic job when enforcement lands.
Phase 3 — api-ts/src/aegis/: minimal TypeScript port (the genuine "extend")
(Implemented under api-ts/src/aegis/, NOT packages/aegis-ts/ — no workspace linkage between api-ts and packages/* exists yet.)
- 3.1 DONE (db57893, PARTIAL on "one source of truth") — api-ts/src/aegis/ pure sync scanner: YAML loader (bundled + crypto pack, dedup, fail-open), regex matcher (unicode-normalized) + pure semantic heuristics. No ML. Deviation: signature files are COPIES (
api-ts/src/aegis/data/crypto.yamlmirrorsbot/config/aegis_signatures/crypto.yaml), NOT a shared single source — they can silently drift; a CI drift-check is a PENDING follow-up. Was: Scanner core: YAML signature loader consuming the same signature files as Python (one source of truth in-repo) + the pure-string semantic heuristics. No ML. - 3.2 DONE (db57893) — scanForThreatsObserveOnly wired observe-mode/fail-open at agent.ts /execute, a2a.ts userText, mcp.ts after validateToolArgs before chargeAgentForCall. Was: Hono scanner middleware at the three insertion points: REST
api-ts/src/routes/agent.ts:2051(/execute), A2Aroutes/a2a.ts:621(userText), MCProutes/mcp.ts:1519-1522(after arg validation, beforechargeAgentForCallso blocked calls aren't billed). Effect-TS idioms (Context.Tag + Layer;Effect.tryPromiseat boundaries). - 3.3 DONE (639c49e + f5c6ba3) — Drizzle agent_trust table (agents.id unique) + Effect AgentTrustService: atomic upsert (threat -15 floored / clean +1/hr capped, no lost updates), recordVerdict WIRED fire-and-forget at all 3 scanner seams (agent/a2a/mcp), recordVerdict wired THREAT-ONLY at the 3 seams (clean traffic skips the DB; recovery deferred to a periodic job). Read NOT on the auth hot path — getTrust is available for the future consumer to call bounded at point-of-use. Record-only, fail-open. Dual-ORM: separate identity space from Python aegis_user_trust, kept separate by design. Was: (Phase-3 follow-up, not in first PR) Per-agent trust table (Drizzle, keyed
agents.id): trust score w/ decay, threat counters,quarantinedUntil; read inagentBearerAuth(middleware/auth.ts:180) besideapplyEffectiveTier; written from scanner verdicts +incrementAgentStatscall sites. DB-backed — also fixes rate-limit-×-replica multiplication. Dual-ORM check: does Python need to read it? If yes →db-migrateboth stacks. - 3.4 DONE (0d6001c) — MPP directory passthrough Zod-validated (unknown fields stripped, array capped, fail-safe empty on bad upstream) + A2A unknown-command echo scrubbed (controls/ANSI stripped, length-capped). Was: (Phase-3 follow-up, not in first PR) Outbound sanitization: schema-validate/filter the MPP directory passthrough (
mcp.ts:570— currently returned verbatim to agents) and scrub reflected free-text in the A2A unknown-command echo (a2a.ts:338). - 3.5 DONE (db57893) — bun run check clean, 8 scanner tests + full 276-test suite pass. Was: Verification:
bun run check(incremental), vitest for loader + middleware,bash scripts/verify.sh api.
Phase 4 — Standalone hardening quick wins (do regardless of AEGIS; small independent PRs)
- 4.1 DONE (e90a330) — safe_md on token symbol/name (paste_trade), support ticket username/message/admin_reply, Railway admin alert (api/main.py), + predict market question. Was: Apply
safe_md(bot/utils/telegram_safe.py:26) atpaste_trade.py:214-233(external token metadata → Markdown),support.py:196(user ticket text → admin chat),api/main.py:2675-2679(Railway payload → admin chat)./bugclasscandidate: "untrusted text rendered with parse_mode=Markdown". - 4.2 NO-OP (e90a330) — current main ALREADY fails closed when WHATSAPP_APP_SECRET unset (returns False); the research finding was stale. Did NOT loosen to permit unsigned webhooks in dev. Was: WhatsApp signature verification fail-closed in prod when
WHATSAPP_APP_SECRETunset (bot/services/whatsapp_service.py:367-384). - 4.3 DONE (e90a330) — deleted bot/utils/sanitizer.py; InputSanitizer had zero external refs (dead). Was:
bot/utils/sanitizer.pyInputSanitizer— wire it where it earns its keep or delete it (defined, imported nowhere). - 4.4 NO-OP (reassessed — stale premise) — the
agents.api_keycolumn does NOT store the plaintext secret. Every write stores a MASKED display value (suwappu_sk_...+ last 8 chars,AgentService.ts:136,386); the full key is never persisted, and all auth lookups useapi_key_hash(AgentService.ts:266,463). So there is no plaintext credential to drop — a MONEY-PATH migration to "fix" a non-existent leak is unjustified (same verify-the-evidence call as 4.2). A rename toapi_key_displaywould be cosmetic-only; not worth a schema change on a money-path-adjacent table. Was: Drop/backfill the plaintextagents.api_keycolumn, keep hash only.
Phase 5 — Stretch / upstream (start only after 1–4 are shipped & verified)
BLOCKED ON USER — needs infra/access this CCR session does not have:
- 5.1 BLOCKED (needs Railway credentials) — Deploy
aegis-monitoras a Railway service (observe mode; SQLite→Postgres as needed) for fleet visibility over both stacks' scanners. - 5.2 BLOCKED (session repo-scoping blocks forking/PRing gaiarobotics/aegis) — Upstream contributions: crypto signature pack, the TS port, FP/FN calibration harness fed by our observe-mode telemetry. Prep locally is possible; opening the upstream PR needs fork access.
Rules
- Observe first, enforce later — no surface flips to enforce until 1.7's telemetry review is done and FP rate is acceptable for that surface. Scanner failures fail-open for commands; fail-closed only for the paste-surface Buy gate.
- Anything touching swap gating, blacklist blocking, keys, or billing: tag MONEY-PATH →
money-path-reviewerbefore merge. - Routing per CLAUDE.md conductor table:
bot-dev(Phases 1–2, 4.1–4.3),api-ts-dev(Phase 3, 4.4),db-migrate(2.3, 3.3),test-engineerfor suites,deploy-ops(5.1). black --line-length=100on changed Python;bun run checkincrementally for TS; ship each phase via/ship; after deploy verify withpython3 scripts/status.py(CI green ≠ bot boots).- Re-verify every file:line anchor before editing — the plan and this backlog are point-in-time snapshots.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

