.claude/skills/code-expert/SKILL.md
WF7 Initial Code Generator. Strictly follows project_map.json and Implementation_Roadmap.md to generate all project code in one pass. Used only for initial code generation; subsequent modifications use code-debug.
npx skillsauth add linzhe001/Harness-Research code-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Inputs (all must be read before generating any code):
project_map.json — Architectural blueprint defining file structure and each file's responsibilitiesdocs/Implementation_Roadmap.md — Execution plan containing module pseudocode and dependency order../../shared/code-style.md — Code style guidelinesOutput: All code files defined in project_map.json.
On success → WF8 (iterate).
If WF8 returns DEBUG → use /code-debug (not this skill).
CRITICAL: After generating any file, you MUST update project_map.json. For language behavior, see ../../shared/language-policy.md. </context>
<instructions> 1. **Read architectural blueprint and execution plan**You must read the following files first — code generation is not allowed without reading them:
project_map.json: File locations, responsibilities, input/output shapes, dependenciesdocs/Implementation_Roadmap.md: Module pseudocode and generation orderGenerate all code in dependency order
Strictly follow the dependency order from the Roadmap:
a. src/utils/ — Base utilities, must include git_snapshot.py
git_snapshot.py: Pre-training auto-commit + push + return version info (see Roadmap pseudocode)registry.py, config.py, etc.
b. src/models/ — Model definitions (backbone, neck, head)
c. src/data/ — Data pipeline (dataset, transforms)
d. src/losses/ — Loss functions
e. scripts/ — Training and evaluation scripts
f. tests/ — Unit testsFor each file, verify against the project_map.json definition before generating:
Code quality
Follow ../../shared/code-style.md, core requirements:
Per-file verification
After generating each file:
python -m py_compile <file_path>
ruff check --select=E,F,I <file_path>
Update project_map.json
After generating each new file, confirm that the corresponding node's exports, io, and dependencies in project_map.json match the actual code.
Update project state
After all generation is complete, update PROJECT_STATE.json:
artifacts.code_modules → list of file pathsartifacts.project_map → "project_map.json"current_stage.status → "completed"history append recordUser-facing progress notes and summaries should follow ../../shared/language-policy.md, while paths, commands, schema keys, and code identifiers remain in English. </instructions>
<constraints> - NEVER generate code without reading project_map.json and Implementation_Roadmap.md first - NEVER make architectural decisions — follow project_map.json exactly - NEVER create files not defined in project_map.json without first updating it - ALWAYS run py_compile after generating each file - ALWAYS update project_map.json after creating any file </constraints>development
WF7.5 training pipeline validation. Before entering WF8 iteration, first use Codex to review code for baseline equivalence, then run a 100-step smoke test to verify end-to-end pipeline functionality.
business
WF1 Inspiration survey and gap analysis. Takes the user's research idea, performs literature search, gap analysis, competitor analysis, and feasibility scoring, then outputs Feasibility_Report.md. Use when the user has a new CV research idea that needs a feasibility assessment.
tools
WF10 Submission/Release Tool. Multi-scene training, result packaging, filename validation, dry-run submission checks. Used after ablation experiments are complete and before competition submission.
development
WF2 Architecture refinement and MVP design. Reads the feasibility report, analyzes the base codebase architecture, designs plug-and-play new modules, defines the MVP, provides A/B/C alternative plans, and outputs Technical_Spec.md. Use when a research idea needs to be translated into a concrete technical architecture design.