secubox-openwrt

SecuBox Codex Field Manual

Version: 1.0.0
Last Updated: 2025-12-28
Status: Active


Context & Scope

SecuBox bundles fifteen+ security and network dashboards for OpenWrt with a unified build/validation toolchain and CI that ships .ipk/.apk artifacts automatically (see README.md for the module catalogue and CI badges, README.md:7-34). The documentation set is intentionally layered—DOCS/DOCUMENTATION-INDEX.md routes newcomers, AI assistants, and maintainers to the right depth, so always start requests there before diving into large guides (DOCS/DOCUMENTATION-INDEX.md:15-31).

Use this file when you need to brief Codex (or any automation agent) quickly about SecuBox expectations: what standards are immutable, how to craft prompts, where to get help, which decisions shaped today’s tree, and what TODOs should stay in sight during automation runs.

Module & Documentation Map


Best-Practice Snapshot

Non-Negotiables (bake into every prompt or PR)

Validation & Toolchain Flow

  1. Permissions Repair (local/remote): ./secubox-tools/fix-permissions.sh --local|--remote for automated chmod sanity (DOCS/QUICK-START.md:55-66, 125-127).
  2. Full Validation: ./secubox-tools/validate-modules.sh (runs seven structural checks including permission scan) (DOCS/QUICK-START.md:122-134,185-189).
  3. Module Builds: ./secubox-tools/local-build.sh build <module> for quick smoke tests or make package/<module>/compile V=s inside SDK (DOCS/QUICK-START.md:135-143).
  4. Deploy/Fix: Copy to router via scp, normalize perms, flush luci caches, restart rpcd/uhttpd (DOCS/QUICK-START.md:144-167).
  5. Debug: Validate ubus objects, inspect LuCI resources, and tail logread immediately after deployment (DOCS/QUICK-START.md:156-167).

Design & UX Reminders


Prompt Playbook

When drafting Codex/LLM prompts, supply enough structure so the assistant can reuse existing patterns instead of inventing them. Reuse this outline:

Context:
- Target module + file(s) + desired change.
- Any relevant excerpts from CODE-TEMPLATES or existing JS/RPCD files.

Requirements:
- Restate non-negotiables (RPCD naming, menu path, permissions, design tokens).
- Mention validation commands Codex should run or assume.
- Call out API endpoints, ubus objects, or metrics to surface.

Deliverables:
- Files to touch (path + rationale).
- Expected tests/validations (e.g., run ./secubox-tools/validate-modules.sh).
- UX cues (colors, grid sizes, component classes) referencing QUICK-START.

Guardrails:
- Note TODO items or documentation standards (version headers, cross-links, etc.).
- Remind Codex where to log changes (README, module changelog, etc.).

Pair the template with module-specific prompts from DOCS/FEATURE-REGENERATION-PROMPTS.md and the workflow from DOCS/MODULE-IMPLEMENTATION-GUIDE.md (DOCS/DOCUMENTATION-INDEX.md:102-149). That combination lets Codex inherit existing layout structures, RPCD shells, and API modules without brittle guesswork.


Help & Troubleshooting


History


TODO Radar (keep Codex aligned)

  1. Standardize version headers & dates – ensure every .md shows Version/Last Updated/Status with consistent YYYY-MM-DD formatting; DOCUMENTATION-INDEX must describe the policy once updates land (TODO-ANALYSE.md:24-68).
  2. Add “See Also” cross-links – wire QUICK-START, PERMISSIONS-GUIDE, VALIDATION-GUIDE, and other quick refs back to their parent guides and vice-versa so AI/users don’t get orphaned instructions (TODO-ANALYSE.md:71-116).
  3. Archive historical docs – create docs/archive/, move outdated references (COMPLETION_REPORT, MODULE-ENABLE-DISABLE-DESIGN, BUILD_ISSUES, etc.), and drop an archive README describing contents (TODO-ANALYSE.md:120-153).
  4. Future work (Monthly/Quarterly) – new diagrams, TESTING/SECURITY/PERFORMANCE guides, automation for doc freshness, and i18n decisions are queued later in TODO-ANALYSE.md; mention them when prompts may impact scope or format downstream.

Codex should treat the TODOs above as guardrails: if a task touches documentation, prefer solutions that inch us toward these goals (e.g., add version headers while editing a doc, or cross-link when touching quick references).


Quick Reference Checklist for Codex Runs

Use this living manual as both a pre-flight briefing and a debrief log for automation work. Update it whenever the standards above evolve so every future Codex session starts with the correct mental model.