How edward-playground/aidefense-framework works
Purpose and delivery model
AIDEFEND is a static, browser-delivered knowledge base of actionable AI-defense controls, organized for exploration and machine consumption. The main application starts at index.html, with client behavior in main.js; no application server or package-installed runtime is required. A separate simplified experience starts at kids.html and kids/kids-main.js.
Authoritative framework content
The seven tactic modules are the authored source of truth, partitioning controls by security function: tactics/model.js, tactics/harden.js, tactics/detect.js, tactics/isolate.js, tactics/deceive.js, tactics/evict.js, and tactics/restore.js. They define the control hierarchy, guidance, scope boundaries, and external-framework mappings. Parent families are navigational aggregations; actionable standalone and leaf controls are the assessment unit.
Dataset build boundary
Node.js generation converts authored tactic modules into public, intentionally reduced datasets. scripts/generate-dataset.js validates hierarchy and keyword constraints, then writes data/data.json and data/tactics-index.json; source-only guidance and warning fields are excluded by design. data/framework-migrations.json is an additive registry for framework editions and semantic successors, not a mechanism to inherit mappings.
Main browser application
main.js loads local framework data and drives the Tactics, Pillars, Phases, and Frameworks views. js/atlas-matrix-navigation.js provides ATLAS-oriented navigation behavior. Presentation is static HTML/CSS with local browser dependencies under css/main.css, css/themes.css, and js/tailwindcss.js; all primary browsing remains functional without optional third parties.
External-framework integration
The Frameworks view performs reverse lookup from external threats or risks to AIDEFEND controls. Cisco v2 taxonomy and provenance are represented by cisco-framework.js, transformed/publicly available as data/cisco-framework.json. Migration resolution logic is isolated in framework-migrations.js, preserving edition boundaries and rejecting ambiguous, retired, or unsupported identifiers rather than silently remapping them.
Optional programmatic browser access
webmcp-tools.js registers read-only lookup tools only if the browser exposes document.modelContext.registerTool; webmcp-query.js implements query/resolution behavior. The optional runtime is loaded from unpkg with a pinned integrity hash, while compatible native browser implementations bypass it. Its absence must not affect normal data browsing or public JSON use.
Release and operational controls
The project runs as static assets under any HTTP server; external requests are limited to hosted fonts, Google Analytics, and optional WebMCP runtime. Release automation in .github/workflows/release-tag.yml validates generated outputs and creates immutable annotated version tags from main. Version/tag policy is implemented by scripts/release-tag.mjs; generated content and version metadata must be committed together.
Main entry points: main.js Main application · generate-dataset.js Dataset generator · data.json Public controls dataset · webmcp-tools.js WebMCP tool registration
Components 18
Framework authoring
- Seven tactic modules · Authoritative control hierarchy, guidance, boundaries, and mappings.
- Migration registry · Additive edition and semantic-successor registry.
data/framework-migrations.json
Dataset build
- Dataset generator · Validates authored hierarchy and keywords while reducing public fields.
scripts/generate-dataset.js - Public controls dataset · Reduced machine-consumable control data.
data/data.json - Tactics index
data/tactics-index.json
Static browser app
- Main entry
index.html - Main application · Drives Tactics, Pillars, Phases, and Frameworks views.
main.js - ATLAS navigation
js/atlas-matrix-navigation.js - Static presentation · Local dependencies keep primary browsing available offline from third parties.
- Kids entry · Separate simplified experience.
kids.html - Kids application
kids/kids-main.js
Framework integration
- Cisco v2 taxonomy · Cisco taxonomy and provenance representation.
cisco-framework.js - Cisco public dataset
data/cisco-framework.json - Migration resolver · Rejects ambiguous, retired, and unsupported framework identifiers.
framework-migrations.js - WebMCP tool registration · Registers read-only tools only when browser support exists.
webmcp-tools.js - WebMCP query engine
webmcp-query.js
Release controls
- Release workflow · Validates generated outputs and creates immutable annotated tags from main.
.github/workflows/release-tag.yml - Version/tag policy · Requires generated content and version metadata to be committed together.
scripts/release-tag.mjs
Connections 18
- Seven tactic modules → Dataset generator: validates and reduces
- Dataset generator → Public controls dataset: writes
- Dataset generator → Tactics index: writes
- Main entry → Main application: loads
- Main application → Public controls dataset: loads
- Main application → Tactics index: loads
- Main application → ATLAS navigation: uses
- Static presentation → Main entry: presents
- Kids entry → Kids application: loads
- Cisco v2 taxonomy → Cisco public dataset: published as
- Main application → Cisco public dataset: reverse lookup
- Main application → Migration resolver: resolves editions
- Migration registry → Migration resolver: supplies successors
- WebMCP tool registration → WebMCP query engine: registers
- WebMCP query engine → Public controls dataset: queries
- WebMCP tool registration → Main application: optional alongside
- Release workflow → Dataset generator: validates outputs
- Release workflow → Version/tag policy: applies