算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
nuedc-code-planner【设计与创意】Use when Codex needs to plan or implement code for NUEDC/electronic-design-contest projects with multiple scoring tasks, staged goals, maintainable architecture, task cycles, MVP/basic functions first, module interfaces, main contradiction analysis, hard-part code design, verification gates, and iterative implementation from simple to difficult.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a contest task is ready to become code. It turns a multi-score-task NUEDC project into a staged implementation plan and then guides code changes cycle by cycle.
This skill complements analyze-nuedc-task: use that skill to compile a raw problem statement into an engineering task package; use this skill when the next step is framework design, code implementation, and staged verification.
Do not start by writing isolated feature code. First design the code framework, module responsibilities, module interfaces, shared state, logs, and verification gates. Then implement the easiest scoring loop and grow toward the full goal in 2 to 3 cycles.
Before coding, state:
If the scoring path or key hardware interface is unclear, stop and ask. Do not invent pins, protocols, units, thresholds, or final PID/filter parameters.
Convert the scoring tasks into an implementation ladder:
| Level | Meaning |
|---|---|
| Basic function | The smallest runnable behavior that proves hardware and framework are alive. |
| Basic score task | The easiest complete scoring loop. |
| Shared prerequisite | Code capability needed by many tasks, such as sensing, motion, state machine, logging, or calibration. |
| Advanced score task | Adds accuracy, speed, autonomy, or multi-stage behavior. |
| Final integration | Runs all required task phases with robust state transitions and logs. |
Implementation order must follow dependencies, not the problem statement order. If an advanced task depends on a shared prerequisite, implement and verify the prerequisite first.
Design a minimal maintainable architecture before writing task logic:
app/
task_state_machine owns contest stages and transitions
scheduler_or_main_loop owns timing and periodic execution
telemetry_or_log prints key observability data
drivers/
sensor drivers expose raw data and health
actuator drivers expose safe low-level commands
modules/
estimator converts raw data into state
controller converts target + state into output
task_logic owns scoring task decisions
config/
pin map, constants, calibration placeholders
Keep names and layout consistent with the existing project. If the repo already has a structure, adapt to it instead of forcing this tree.
Each module must have:
Identify one or two hard points that decide whether scoring is possible. For code implementation, a main contradiction is usually where two concerns meet:
For each main contradiction, design the code deliberately:
Hard point:
Why it controls the score:
Data needed:
State variables:
Algorithm skeleton:
Logs:
Verification gate:
Fallback or degradation:
Do not implement yet:
Do not bury the hard point inside a generic helper. Put the important logic where it can be inspected, logged, tuned, and tested.
Break implementation into 2 to 3 cycles. Each cycle must produce runnable code.
Goal:
Typical output:
Gate:
Goal:
Typical output:
Gate:
Goal:
Typical output:
Gate:
If the project is small, merge Cycle 2 and Cycle 3. If the project is large, do not create more than three high-level cycles; split subtasks inside a cycle instead.
Before editing code, output:
Goal:
Cycle:
Files/modules to touch:
Interfaces to add or change:
Behavior to implement:
Logs to add:
Verification command:
Stop conditions:
During implementation:
After each cycle:
Use this completion format:
Cycle completed:
Implemented:
Verified:
Observed risk:
Next cycle:
Blocked by:
Stop and ask, or produce only a verification task, when: