nuedc-code-planner
Skill4 starsChanged 6 months agoMITView on GitHub
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.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyze-nuedc-taskSkill
- diansai-collabSkill
- nuedc-full-runnerSkill
- planning-with-files-zhSkill
- stm32cubemxSkill
- stm32-keilSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when a contest task is ready to become code.
- Distinctive: line 14
Do not start by writing isolated feature code.
- Distinctive: line 25
If the scoring path or key hardware interface is unclear, stop and ask.
- Distinctive: line 61
Keep names and layout consistent with the existing project.
- Distinctive: line 68
Update rate or call timing.
- Distinctive: line 96
Do not bury the hard point inside a generic helper.
- Distinctive: line 135
No advanced task is started if this gate fails.
- Distinctive: line 140
Add advanced scoring tasks in dependency order.
- Distinctive: line 151
All selected tasks build and can be run independently.
- Distinctive: line 154
If the project is small, merge Cycle 2 and Cycle 3.
- Distinctive: line 158
Before editing code, output:
- Very specific: line 175
Prefer explicit structs/enums/state machines over scattered globals.
- Distinctive: line 176
Add configuration constants only when used by current code.
- Distinctive: line 177
Add logs for raw input, processed state, control output, state transitions, and failure reasons.
- Distinctive: line 178
Keep placeholder functions small and clearly marked as not yet implemented.
- Distinctive: line 179
Do not optimize parameters without measurements.
- Distinctive: line 187
Update the next cycle only from evidence, not wishful feature expansion.
- Distinctive: line 188
Keep a short remaining-task list ordered by scoring dependency.
- Distinctive: line 190
Use this completion format:
- Distinctive: line 203
Stop and ask, or produce only a verification task, when:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NUEDC Code Planner
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.
Core Rule
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.
Required Assumptions
Before coding, state:
- Contest goal: the final code goal, usually "finish all scoring tasks that software can support."
- Known inputs: problem statement, scoring rules, hardware, sensors, actuators, current code, and confirmed constraints.
- Reasonable defaults: only for parameters that can be safely changed later.
- Unknowns that block code: sensor interface, actuator driver, pin map, timing, protocol, physical behavior, or acceptance criteria.
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.
Step 1: Score Task Ladder
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.
Step 2: Framework Before Features
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 placeholdersKeep 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:
- Responsibility: one sentence.
- Inputs: data it consumes.
- Outputs: data or commands it produces.
- Update rate or call timing.
- Failure signal: what it reports when it cannot be trusted.
Step 3: Main Contradiction Code Design
Identify one or two hard points that decide whether scoring is possible. For code implementation, a main contradiction is usually where two concerns meet:
- raw sensing to reliable state
- state estimate to control output
- single loop to multi-stage task switching
- fast response to stability
- calibration to runtime robustness
- safety/protection to performance
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.
Step 4: Two Or Three Cycles
Break implementation into 2 to 3 cycles. Each cycle must produce runnable code.
Cycle 1: Framework + Basic Function
Goal:
- Build the module skeleton and interfaces.
- Make hardware or simulated IO observable.
- Implement the simplest runnable behavior.
Typical output:
- drivers compile and expose stable APIs
- state machine has idle/test/basic states
- logs show raw sensor values, commands, and task state
- one actuator or one sensor loop works
Gate:
- Code builds.
- Basic IO works or simulated data can drive the framework.
- Logs can locate the first failing link.
Cycle 2: Basic Score Loop
Goal:
- Implement the easiest complete scoring loop.
- Use conservative parameters.
- Prove the shared prerequisite.
Typical output:
- estimator/controller/task logic connected
- one full task path can start, run, finish, timeout, or fail safely
- main contradiction has explicit logs and a first-pass algorithm
Gate:
- The basic score task runs end to end under controlled conditions.
- Failure reason is visible in logs.
- No advanced task is started if this gate fails.
Cycle 3: Advanced Tasks + Integration
Goal:
- Add advanced scoring tasks in dependency order.
- Integrate multi-stage flow.
- Improve robustness only where logs show need.
Typical output:
- task state machine covers all selected scoring tasks
- shared modules reused, not duplicated
- calibration and fallback paths are explicit
- final logs are concise enough for competition debugging
Gate:
- All selected tasks build and can be run independently.
- Integrated flow has clear start, transition, finish, timeout, and recovery behavior.
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.
Step 5: Implementation Contract
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:
- Touch only files needed for the current cycle.
- Preserve existing style and hardware abstractions.
- Prefer explicit structs/enums/state machines over scattered globals.
- Add configuration constants only when used by current code.
- Add logs for raw input, processed state, control output, state transitions, and failure reasons.
- Keep placeholder functions small and clearly marked as not yet implemented.
- Do not optimize parameters without measurements.
Step 6: Verification And Next Cycle
After each cycle:
- Build or run the strongest available verification.
- Summarize what passed, what failed, and the first failing link.
- Update the next cycle only from evidence, not wishful feature expansion.
- Keep a short remaining-task list ordered by scoring dependency.
Use this completion format:
Cycle completed:
Implemented:
Verified:
Observed risk:
Next cycle:
Blocked by:Stop Conditions
Stop and ask, or produce only a verification task, when:
- Hardware interface or pin map is unknown.
- The task requires final thresholds, PID, filters, timing, or protection values without measurements.
- The main contradiction has no observable variables.
- A requested advanced task depends on an unverified basic loop.
- The failure is likely mechanical, power, sensor placement, or signal integrity rather than code.
- The user asks to implement all tasks at once without a buildable intermediate cycle.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

