2.3 KiB
2.3 KiB
Claude Guidance Alignment
Key Directives from .claude/ and CLAUDE.md
- Read the docs first – Always consult
DEVELOPMENT-GUIDELINES.md,QUICK-START.md, andCLAUDE.mdbefore coding..claude/README.mdreiterates this and links every critical guide. - Naming & paths – RPCD filename ≡ ubus object string (with
luci.prefix) and menupath≡ view path. Violations lead to-32000RPC errors or HTTP 404s. - Permissions – RPCD scripts/scripts under
/usr/libexecneed 755, web assets 644. UsePKG_FILE_MODESin Makefiles plus./secubox-tools/fix-permissions.sh --local/--remote. - Validation – Mandatory:
./secubox-tools/validate-modules.sh(7 checks). For new modules usevalidate-module-generation.sh, and install pre-push hooks. - Design system – Use
system-hub/common.cssvariables (--sh-*), gradients,.sh-*classes, Inter/JetBrains fonts, and dark-mode selectors. No hardcoded colors or fonts. - Workflow – Deploy via
deploy-module-template.sh(with ROUTER env), fix perms, clear LuCI caches, restartrpcd/uhttpd. Build vialocal-build.shormake package/.... - Prompting –
.claude/module-implementation-guide.mdprovides a template for AI prompts, expecting all files (Makefile, README, RPCD, API, views, menu, ACL) plus validation outputs.
Mapping to Codex Rules
- The Codex prime directive (protect RPC naming, menu paths, permissions, design system, validation) mirrors
.clauderules; no conflicts. - Our
workflows.mdcodifies the same commands Claude expects (fix perms, validate, local-build, deploy scripts). - The
prompting.mdtemplates derive from.claude/module-implementation-guide.mdso Codex and Claude share the same deliverable expectations. - Design constraints (dark mode, gradients, fonts) from
.claude/README.mdandDEVELOPMENT-GUIDELINES.mdappear inconventions.mdandrequirements.md.
Conflict Resolution
If .claude guidance ever diverges from repo truth, follow this priority chain (per instructions):
- Source code & current repo configuration (Makefiles, scripts, actual files)
.claude/rules andCLAUDE.md- Markdown guides (
DEVELOPMENT-GUIDELINES.md,CODE-TEMPLATES.md, etc.) Flag any contradictions as TODOs in the relevant.codexfile when discovered.