CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

code

The workflow directs ATLAS development from project and skill review through scoped implementation, API research, PlatformIO builds, and a final diff audit. It emphasizes ESP32-S3 constraints, OTA and data safety, minimal changes, and distinguishing successful compilation from physical hardware validation. It also specifies how to report modified files, decisions, results, and remaining limitations.

Quality

65%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Failed to scan

The risk profile of this skill

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/code/SKILL.md
SKILL.md
Quality
Evals
Security

/code — ATLAS Engineering Implementation Workflow

Use this orchestrator for general development, feature implementation, and code modifications in the ATLAS project (D:\Atlas).

This workflow coordinates exactly eight specialist skills to produce disciplined, minimal, and hardware-verified embedded code.


1. Skill Activation Manifest

Exactly Activated Skills (8)

You MUST load and apply the following eight specialist skills before implementing changes. Inspect their instructions at their project-local paths:

  1. codebase-design: Deep modules (small interface, substantial implementation), Michael Feathers seams, testable leverage, and locality.
  2. domain-modeling: Precise domain language, architectural boundary definitions, and alignment with architecture specifications.
  3. improve-codebase-architecture: Detection and elimination of shallow wrappers, boundary leaks, and architectural friction.
  4. karpathy-guidelines: Think before coding, simplicity first, surgical changes (touch only what is necessary), and verifiable success criteria.
  5. ponytail: Senior developer laziness (YAGNI, standard library and ESP-IDF native features first, minimal code, avoid speculative abstractions).
  6. ponytail-audit: Diff and module scanning for bloat, dead code, single-caller abstractions, and complexity creep.
  7. slopmonster: Elimination of AI boilerplate, excessive commentary, defensive over-engineering, and generated-code slop.
  8. context7: Authoritative documentation lookup via ctx7 library and ctx7 docs:
    • Looking up unfamiliar APIs before implementation.
    • Checking version-specific usage (ESP-IDF v6.0.1, FreeRTOS 1000Hz).
    • Verifying configuration options.
    • Avoiding outdated or hallucinated API usage.
    • Checking migration and compatibility requirements.
    • Strictly research-only; cross-check against ATLAS codebase. Never introduces unrequested dependencies or architectural modifications.

Explicitly Excluded Skills

  • diagnosing-bugs: DO NOT ACTIVATE. Bug diagnosis belongs exclusively to /debug.
  • setup-matt-pocock-skills: DO NOT ACTIVATE. Repository setup is dormant.

2. ATLAS Embedded Architecture Context & Constraints

Every code change must adhere to the physical realities of the ATLAS hardware platform:

  • Target Silicon: ESP32-S3 (Xtensa Dual-Core 240MHz, 512KB SRAM, 8MB Octal PSRAM, 16MB SPI Flash).
  • Runtime Stack: ESP-IDF v6.0.1, FreeRTOS (1000Hz tick rate), PlatformIO build environment.
  • Subsystems:
    • boot/: Staged boot manager (atlas_boot.c/.h).
    • core/: Event bus (atlas_event.c/.h), centralized logger (atlas_log.h), service registry (atlas_service.c/.h), sysinfo (atlas_sysinfo.c/.h).
    • drivers/: ILI9341 LCD via SPI DMA (atlas_display), ADC1 + GPIO joystick/buttons (atlas_input), MAX98357A & INMP441 I2S audio (atlas_audio), SDSPI FatFS (atlas_sdcard).
    • system/: Application manager (app_manager.c/.h), OTA update engine (atlas_ota.c/.h), partition safety.
    • ui/: Framebuffer graphics (atlas_gfx.c/.h), home launcher (screen_home.c/.h), recovery UI (screen_recovery.c/.h).
    • APPS/: Community application repository integrated as a Git submodule.

Mandatory Architectural Constraints

  1. Firmware updates and application installations are separate operations: Never conflate flashing an OS image with installing an application package.
  2. OTA partitions must be managed by the OTA subsystem: Never stage or write raw binaries to active or unverified OTA partitions directly from application logic.
  3. Third-party applications must not be described as executable until their runtime is implemented and verified: Never claim an unexecuted bytecode format or binary runs natively on bare metal without an active, verified sandbox.
  4. Manifest permissions are metadata unless actual enforcement exists: Document truthful security posture.
  5. APPS is a community application catalogue and source repository: It is not a dumping ground for arbitrary firmware binaries.
  6. Never format the SD card or destroy user data. Mount safely at /sdcard.
  7. Never assume hardware pin assignments: Always verify against main/include/atlas_pins.h and hardware schematics.
  8. Distinguish successful compilation from physical hardware validation: Clean compilation is a prerequisite, not proof of peripheral timing or DMA stability.
  9. Consider embedded constraints: Internal SRAM is scarce (512KB); use 8MB PSRAM for large framebuffers and allocations via MALLOC_CAP_SPIRAM. Respect FreeRTOS task stack budgets and priority inversion rules.
  10. Do not introduce desktop-OS complexity: No dynamic MMU processes, unnecessary thread pools, or monolithic abstractions without demonstrated embedded need.

3. Step-by-Step /code Execution Workflow

When /code is triggered:

  1. Read ATLAS Project Instructions & Rules: Inspect docs/ARCHITECTURE.md, docs/OTA_AND_LAUNCH_AUDIT.md, AGENTS.md, and applicable ECC rules in .agents/rules/. Apply ECC C++ rules conditionally under PlatformIO and embedded constraints.
  2. Load and Apply Assigned Skills: Explicitly read the 8 assigned skill files and internalize their constraints.
  3. Inspect Existing Implementation: Read the exact files to be modified before proposing or writing code.
  4. Understand Subsystem Boundaries: Identify affected FreeRTOS tasks, event dispatches, memory domains, and driver interfaces.
  5. Context7 Usage Policy & API Lookup: When working with external framework APIs (ESP-IDF v6.0.1, FreeRTOS, LittleFS):
    1. Identify Dependency & Version: Target ESP-IDF v6.0.1 and FreeRTOS 1000Hz tick rate as configured in PlatformIO.
    2. Resolve Context7 Library: Run npx ctx7@latest library <name> "<what to look up>" (e.g. /websites/espressif_projects_esp-idf_en_release-v6_0).
    3. Query API Behavior: Run npx ctx7@latest docs <libraryId> "<function/struct>".
    4. Prefer Exact Project Version: Never copy deprecated ESP-IDF v4/v5 APIs or assume newer v6.x changes without checking release docs.
    5. Cross-Check Against Codebase: Verify retrieved signatures against existing ATLAS driver implementations and pin definitions (atlas_pins.h).
    • Strict Boundary: Context7 is a documentation research tool, not permission to introduce new dependencies or modify architecture.
  6. Follow an Approved Plan: If an approved implementation plan exists in the conversation, strictly follow its scope and order.
  7. Establish Scope (If No Plan Exists): Define the exact minimal change required. Do not expand scope unilaterally.
  8. Implement Focused, Incremental Changes:
    • Apply the Ponytail ladder: YAGNI → reuse existing codebase helper → stdlib/ESP-IDF feature → minimal code.
    • Apply Karpathy surgical editing: change only what is required; do not reformat adjacent lines or touch working code.
    • Apply Codebase Design: keep interfaces narrow and modules deep; avoid shallow pass-through functions.
  9. Avoid Speculative Abstractions: Do not create generic layers, extra configuration flags, or unused extensibility.
  10. Validate Every Change: Ensure memory allocations check for NULL, verify DMA buffers are in DMA-capable memory, and validate FreeRTOS task parameters.
  11. Run Builds and Verification: Execute PlatformIO build (pio run) to confirm clean compilation and zero warnings.
  12. Audit Final Changes (Ponytail-Audit & SlopMonster):
    • Scan diff for dead code, orphan headers, single-caller wrappers, and unnecessary comments.
    • Remove AI slop (e.g. "comprehensive", "seamless", over-commented obvious code).
  13. Report Engineering Results:
    • Modified/created files with clickable paths.
    • Architectural decisions and trade-offs made.
    • Compilation/test results.
    • Remaining limitations and physical validation notes.

4. Conflict Resolution Rules

If instructions or guidelines appear in tension:

  1. Explicit user instructions take first priority.
  2. ATLAS embedded safety constraints take precedence over generic refactoring.
  3. Correctness and memory safety take precedence over brevity.
  4. Ponytail/Karpathy simplicity takes precedence over speculative architecture deepening.
  5. Report and explain any unresolved conflict rather than guessing.
Repository

Reyansh-Niranjan/Atlas

Path

.agents/skills/code/SKILL.md

Last updated
First committed
Purpose
DevelopmentTesting and QASecurity and complianceCode review
Form
WorkflowAgenticRulesBest practicesReference
Commands
npxnpx ctx7@latestnpx ctx7@latest librarynpx ctx7@latest docspiopio run
Tools
Context7PlatformIO

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.