[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FDM9DD3GFE8S25Z9XP7SWP":3,"skill-same:01M7FDM9DD3GFE8S25Z9XP7SWP":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7FDM9DD3GFE8S25Z9XP7SWP","dse-loop",null,"Autonomous design space exploration loop for computer architecture and EDA. Runs a program, analyzes results, tunes parameters, and iterates until objective is met or timeout. Use when user says \\\"DSE\\\", \\\"design space exploration\\\", \\\"sweep parameters\\\", \\\"optimize\\\", \\\"find best config\\\", or wants iterative parameter tuning.","CZX-LBJ\u002Fdeepseek-science","CZX-LBJ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F204594689?v=4","01M7FC59WQ9PFXT04MKGJDCFFT","czx","01M7FC59XB2GW0BKWN9JTDBQS7",1,"MIT","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex\u002Fdse-loop\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: \"dse-loop\"\ndescription: \"Autonomous design space exploration loop for computer architecture and EDA. Runs a program, analyzes results, tunes parameters, and iterates until objective is met or timeout. Use when user says \\\\\\\"DSE\\\\\\\", \\\\\\\"design space exploration\\\\\\\", \\\\\\\"sweep parameters\\\\\\\", \\\\\\\"optimize\\\\\\\", \\\\\\\"find best config\\\\\\\", or wants iterative parameter tuning.\"\n---\n\n# DSE Loop: Autonomous Design Space Exploration\n\nAutonomously explore a design space: run → analyze → pick next parameters → repeat, until the objective is met or timeout is reached. Designed for computer architecture and EDA problems.\n\n## Context: $ARGUMENTS\n\n## Safety Rules — READ FIRST\n\n**NEVER do any of the following:**\n- `sudo` anything\n- `rm -rf`, `rm -r`, or any recursive deletion\n- `rm` any file you did not create in this session\n- Overwrite existing source files without reading them first\n- `git push`, `git reset --hard`, or any destructive git operation\n- Kill processes you did not start\n\n**If a step requires any of the above, STOP and report to the user.**\n\n## Constants (override via $ARGUMENTS)\n\n| Constant | Default | Description |\n|----------|---------|-------------|\n| `TIMEOUT` | 2h | Total wall-clock budget. Stop exploring after this. |\n| `MAX_ITERATIONS` | 50 | Hard cap on number of design points evaluated. |\n| `PATIENCE` | 10 | Stop early if no improvement for this many consecutive iterations. |\n| `OBJECTIVE` | minimize | `minimize` or `maximize` the target metric. |\n\nOverride inline: `\u002Fdse-loop \"task desc — timeout: 4h, max_iterations: 100, patience: 15\"`\n\n## Typical Use Cases\n\n| Problem | Program | Parameters | Objective |\n|---------|---------|-----------|-----------|\n| Microarch DSE | gem5 simulation | cache size, assoc, pipeline width, ROB size, branch predictor | maximize IPC or minimize area×delay |\n| Synthesis tuning | yosys\u002FDC script | optimization passes, target freq, effort level | minimize area at timing closure |\n| RTL parameterization | verilator sim | data width, FIFO depth, pipeline stages, buffer sizes | meet throughput target at min area |\n| Compiler flags | gcc\u002Fllvm build + benchmark | -O levels, unroll factor, vectorization, scheduling | minimize runtime or code size |\n| Placement\u002Frouting | openroad\u002Finnovus | utilization, aspect ratio, layer config | minimize wirelength \u002F timing |\n| Formal verification | abc\u002Fsby | bound depth, engine, timeout per property | maximize coverage in time budget |\n| Memory subsystem | cacti \u002F ramulator | bank count, row buffer policy, scheduling | optimize bandwidth\u002Fenergy |\n\n## Workflow\n\n### Phase 0: Parse Task & Setup\n\n1. **Parse $ARGUMENTS** to extract:\n   - **Program**: what to run (command, script, or Makefile target)\n   - **Parameter space**: which knobs to tune and their ranges\u002Foptions (may be incomplete — see step 2)\n   - **Objective metric**: what to optimize (and how to extract it from output)\n   - **Constraints**: hard limits that must not be violated (e.g., timing must close)\n   - **Timeout**: wall-clock budget\n   - **Success criteria**: when is the result \"good enough\" to stop early?\n\n2. **Infer missing parameter ranges** — If the user provides parameter names but NOT ranges\u002Foptions, you MUST infer them before exploring:\n\n   a. **Read the source code** — search for the parameter names in the codebase:\n      - Look for argparse\u002Fclick definitions, config files, Makefile variables, module parameters, `#define`, `parameter` (SystemVerilog), `localparam`, etc.\n      - Extract defaults, types, and any comments hinting at valid values\n\n   b. **Apply domain knowledge** to set reasonable ranges:\n      | Parameter type | Inference strategy |\n      |---------------|-------------------|\n      | Cache\u002Fmemory sizes | Powers of 2, typically 1KB–16MB |\n      | Associativity | Powers of 2: 1, 2, 4, 8, 16 |\n      | Pipeline width \u002F issue width | Small integers: 1, 2, 4, 8 |\n      | Buffer\u002Fqueue\u002FFIFO depth | Powers of 2: 4, 8, 16, 32, 64 |\n      | Clock period \u002F frequency | Based on technology node; try ±50% from default |\n      | Bound depth (BMC\u002Fformal) | Geometric: 5, 10, 20, 50, 100 |\n      | Timeout values | Geometric: 10s, 30s, 60s, 120s, 300s |\n      | Boolean\u002Fenum flags | Enumerate all options found in source |\n      | Continuous (learning rate, threshold) | Log-scale sweep: 5 points spanning 2 orders of magnitude around default |\n      | Integer counts (threads, cores) | Linear: from 1 to hardware max |\n\n   c. **Start conservative** — begin with 3-5 values per parameter. Expand range later if the best result is at a boundary.\n\n   d. **Log inferred ranges** — write the inferred parameter space to `dse_results\u002Finferred_params.md` so the user can review:\n      ```markdown\n      # Inferred Parameter Space\n\n      | Parameter | Source | Default | Inferred Range | Reasoning |\n      |-----------|--------|---------|---------------|-----------|\n      | CACHE_SIZE | config.py:42 | 32768 | [8192, 16384, 32768, 65536, 131072] | powers of 2, ±2x from default |\n      | ASSOC | config.py:43 | 4 | [1, 2, 4, 8] | standard associativities |\n      | BMC_DEPTH | run_bmc.py:15 | 10 | [5, 10, 20, 50] | geometric, common BMC depths |\n      ```\n\n   e. **Boundary expansion** — during the search, if the best result is at the min or max of a range, automatically extend that range by one step in that direction (but log the extension).\n\n3. **Read the project** to understand:\n   - How to run the program\n   - Where results are produced (stdout, log files, reports)\n   - How to parse the objective metric from output\n   - Current\u002Fbaseline configuration (if any)\n\n4. **Create working directory**: `dse_results\u002F` in project root\n   - `dse_results\u002Fdse_log.csv` — one row per design point\n   - `dse_results\u002FDSE_REPORT.md` — final report\n   - `dse_results\u002FDSE_STATE.json` — state for recovery\n   - `dse_results\u002Finferred_params.md` — inferred parameter space (if ranges were not provided)\n   - `dse_results\u002Fconfigs\u002F` — config files for each run\n   - `dse_results\u002Foutputs\u002F` — raw output for each run\n\n5. **Write a parameter extraction script** (`dse_results\u002Fparse_result.py` or similar) that takes a run's output and returns the objective metric as a number. Test it on a baseline run first.\n\n6. **Run baseline** (iteration 0): run the program with default\u002Fcurrent parameters. Record the baseline metric. This is the point to beat.\n\n### Phase 1: Initial Exploration\n\n**Goal**: Quickly survey the space to understand which parameters matter most.\n\n**Strategy**: Latin Hypercube Sampling or structured sweep of key parameters.\n\n1. Pick 5-10 diverse design points that span the parameter ranges\n2. Run them (in parallel if independent, via background processes or sequential)\n3. Record all results in `dse_log.csv`:\n   ```\n   iteration,param1,param2,...,metric,constraint_met,timestamp,notes\n   0,default,default,...,baseline_val,yes,2026-03-13T10:00:00,baseline\n   1,val1a,val2a,...,result1,yes,2026-03-13T10:05:00,initial sweep\n   ...\n   ```\n4. Analyze: which parameters have the most impact on the objective?\n5. Narrow the search to the most sensitive parameters\n\n### Phase 2: Directed Search\n\n**Goal**: Converge toward the optimum by making informed choices.\n\n**Strategy**: Adaptive — pick the approach that fits the problem:\n\n- **Few parameters (≤3)**: Fine-grained grid search around the best region from Phase 1\n- **Many parameters (>3)**: Coordinate descent — optimize one parameter at a time, holding others at current best\n- **Binary\u002Fcategorical params**: Enumerate promising combinations\n- **Continuous params**: Binary search or golden section between best neighbors\n- **Multi-objective**: Track Pareto frontier, explore along the front\n\nFor each iteration:\n\n1. **Select next design point** based on results so far:\n   - Look at the trend: which direction improves the metric?\n   - Avoid re-running configurations already evaluated\n   - Balance exploration (untested regions) vs exploitation (near current best)\n\n2. **Modify parameters**: edit config file, command-line args, or source constants\n\n3. **Run the program**: execute and capture output\n\n4. **Parse results**: extract the objective metric and check constraints\n\n5. **Log to `dse_log.csv`**: append the new row\n\n6. **Check stopping conditions**:\n   - Timeout reached? → stop\n   - Max iterations reached? → stop\n   - Patience exhausted (no improvement in N iterations)? → stop\n   - Success criteria met (metric is \"good enough\")? → stop\n   - Constraint violation pattern detected? → adjust search bounds\n\n7. **Update `DSE_STATE.json`**:\n   ```json\n   {\n     \"iteration\": 15,\n     \"status\": \"in_progress\",\n     \"best_metric\": 1.23,\n     \"best_params\": {\"cache_size\": 32768, \"assoc\": 4, \"pipeline_width\": 2},\n     \"total_iterations\": 15,\n     \"start_time\": \"2026-03-13T10:00:00\",\n     \"timeout\": \"2h\",\n     \"patience_counter\": 3\n   }\n   ```\n\n8. **Decide next step** → back to step 1\n\n### Phase 3: Refinement (if time allows)\n\nIf the search converged and there's still time budget:\n\n1. **Local perturbation**: try ±1 step on each parameter from the best point\n2. **Sensitivity analysis**: which parameters can be relaxed without hurting the metric?\n3. **Constraint boundary**: if a constraint is nearly binding, explore near-feasible points\n\n### Phase 4: Report\n\nWrite `dse_results\u002FDSE_REPORT.md`:\n\n```markdown\n# Design Space Exploration Report\n\n**Task**: [description]\n**Date**: [start] → [end]\n**Total iterations**: N\n**Wall-clock time**: X hours Y minutes\n\n## Objective\n- **Metric**: [what was optimized]\n- **Direction**: minimize \u002F maximize\n- **Baseline**: [value]\n- **Best found**: [value] ([improvement]% better than baseline)\n\n## Best Configuration\n| Parameter | Baseline | Best |\n|-----------|----------|------|\n| param1    | default  | best_val |\n| param2    | default  | best_val |\n| ...       | ...      | ... |\n\n## Search Trajectory\n| Iteration | param1 | param2 | ... | Metric | Notes |\n|-----------|--------|--------|-----|--------|-------|\n| 0 (baseline) | ... | ... | ... | ... | baseline |\n| 1 | ... | ... | ... | ... | initial sweep |\n| ... | ... | ... | ... | ... | ... |\n| N (best) | ... | ... | ... | ... | ★ best |\n\n## Parameter Sensitivity\n- **param1**: [high\u002Fmedium\u002Flow impact] — [brief explanation]\n- **param2**: [high\u002Fmedium\u002Flow impact] — [brief explanation]\n\n## Pareto Frontier (if multi-objective)\n[Table or description of non-dominated points]\n\n## Stopping Reason\n[timeout \u002F max_iterations \u002F patience \u002F success_criteria_met]\n\n## Recommendations\n- [actionable insights from the exploration]\n- [which parameters matter most]\n- [suggested follow-up explorations]\n```\n\nAlso generate a summary plot if matplotlib is available:\n- Convergence curve (metric vs iteration)\n- Parameter sensitivity bar chart\n- Pareto frontier scatter (if multi-objective)\n\n## State Recovery\n\nIf the context window compacts mid-run, the loop recovers from `DSE_STATE.json` + `dse_log.csv`:\n\n1. Read `DSE_STATE.json` for current iteration, best params, patience counter\n2. Read `dse_log.csv` for full history\n3. Resume from next iteration\n\n## Key Rules\n\n- Work AUTONOMOUSLY — do not ask the user for permission at each iteration\n- **Every run must be logged** — even failed runs, constraint violations, errors. The log is the ground truth.\n- **Never re-run an identical configuration** — check `dse_log.csv` before each run\n- **Respect the timeout** — check elapsed time before starting a new iteration. If the next run is likely to exceed the timeout, stop and report.\n- **Parse metrics programmatically** — write a parsing script, don't eyeball logs\n- **Keep raw outputs** — save each run's full output in `dse_results\u002Foutputs\u002Fiter_N\u002F`\n- **Constraint violations are not improvements** — a design point that violates constraints is never \"best\", regardless of the metric\n- If a run crashes, log the error, skip that point, and continue with the next\n- If the same crash repeats 3 times with different configs, the harness code itself is\n  the suspect — **discard and reimplement the run\u002Fparse script cleanly from the spec**\n  (a peer move to another patch; delete only the script, never `dse_log.csv` \u002F\n  `dse_results\u002F`; per [`external-cadence.md`](..\u002Fshared-references\u002Fexternal-cadence.md), \"Let a broken attempt restart, not\n  just patch\"). **Before resuming the sweep, re-validate metric comparability**: re-parse\n  one COMPLETED iteration's raw output from `dse_results\u002Foutputs\u002Fiter_N\u002F` with the new\n  parser and confirm it reproduces that row of `dse_log.csv`; on mismatch, fix the parser\n  or re-parse and flag all affected rows — never mix two parsing semantics in one log. If\n  a clean reimplement crashes the same way, stop and report — the spec or the environment\n  is then in question, which is what needs the human\n\n## Example Invocations\n\n```\n# Minimal — just name the parameters, let the agent figure out ranges\n\u002Fdse-loop \"Run gem5 mcf benchmark. Tune: L1D_SIZE, L2_SIZE, ROB_ENTRIES. Objective: maximize IPC. Timeout: 3h\"\n\n# Partial — some ranges given, some not\n\u002Fdse-loop \"Run make synth. Tune: CLOCK_PERIOD [5ns, 4ns, 3ns, 2ns], FLATTEN, ABC_SCRIPT. Objective: minimize area at timing closure. Timeout: 1h\"\n\n# Fully specified — explicit ranges for everything\n\u002Fdse-loop \"Simulate processor with FIFO_DEPTH [4,8,16,32], ISSUE_WIDTH [1,2,4], PREFETCH [on,off]. Run: make sim. Objective: max throughput\u002Farea. Timeout: 2h\"\n\n# Real-world: PDAG-SFA formal verification tuning\n\u002Fdse-loop \"Run python run_bmc.py. Tune: BMC_DEPTH, ENGINE, TIMEOUT_PER_PROP. Objective: maximize properties proved. Timeout: 2h\"\n```\n","# DSE Loop: Autonomous Design Space Exploration\n\nAutonomously explore a design space: run → analyze → pick next parameters → repeat, until the objective is met or timeout is reached. Designed for computer architecture and EDA problems.\n\n## Context: $ARGUMENTS\n\n## Safety Rules — READ FIRST\n\n**NEVER do any of the following:**\n- `sudo` anything\n- `rm -rf`, `rm -r`, or any recursive deletion\n- `rm` any file you did not create in this session\n- Overwrite existing source files without reading them first\n- `git push`, `git reset --hard`, or any destructive git operation\n- Kill processes you did not start\n\n**If a step requires any of the above, STOP and report to the user.**\n\n## Constants (override via $ARGUMENTS)\n\n| Constant | Default | Description |\n|----------|---------|-------------|\n| `TIMEOUT` | 2h | Total wall-clock budget. Stop exploring after this. |\n| `MAX_ITERATIONS` | 50 | Hard cap on number of design points evaluated. |\n| `PATIENCE` | 10 | Stop early if no improvement for this many consecutive iterations. |\n| `OBJECTIVE` | minimize | `minimize` or `maximize` the target metric. |\n\nOverride inline: `\u002Fdse-loop \"task desc — timeout: 4h, max_iterations: 100, patience: 15\"`\n\n## Typical Use Cases\n\n| Problem | Program | Parameters | Objective |\n|---------|---------|-----------|-----------|\n| Microarch DSE | gem5 simulation | cache size, assoc, pipeline width, ROB size, branch predictor | maximize IPC or minimize area×delay |\n| Synthesis tuning | yosys\u002FDC script | optimization passes, target freq, effort level | minimize area at timing closure |\n| RTL parameterization | verilator sim | data width, FIFO depth, pipeline stages, buffer sizes | meet throughput target at min area |\n| Compiler flags | gcc\u002Fllvm build + benchmark | -O levels, unroll factor, vectorization, scheduling | minimize runtime or code size |\n| Placement\u002Frouting | openroad\u002Finnovus | utilization, aspect ratio, layer config | minimize wirelength \u002F timing |\n| Formal verification | abc\u002Fsby | bound depth, engine, timeout per property | maximize coverage in time budget |\n| Memory subsystem | cacti \u002F ramulator | bank count, row buffer policy, scheduling | optimize bandwidth\u002Fenergy |\n\n## Workflow\n\n### Phase 0: Parse Task & Setup\n\n1. **Parse $ARGUMENTS** to extract:\n   - **Program**: what to run (command, script, or Makefile target)\n   - **Parameter space**: which knobs to tune and their ranges\u002Foptions (may be incomplete — see step 2)\n   - **Objective metric**: what to optimize (and how to extract it from output)\n   - **Constraints**: hard limits that must not be violated (e.g., timing must close)\n   - **Timeout**: wall-clock budget\n   - **Success criteria**: when is the result \"good enough\" to stop early?\n\n2. **Infer missing parameter ranges** — If the user provides parameter names but NOT ranges\u002Foptions, you MUST infer them before exploring:\n\n   a. **Read the source code** — search for the parameter names in the codebase:\n      - Look for argparse\u002Fclick definitions, config files, Makefile variables, module parameters, `#define`, `parameter` (SystemVerilog), `localparam`, etc.\n      - Extract defaults, types, and any comments hinting at valid values\n\n   b. **Apply domain knowledge** to set reasonable ranges:\n      | Parameter type | Inference strategy |\n      |---------------|-------------------|\n      | Cache\u002Fmemory sizes | Powers of 2, typically 1KB–16MB |\n      | Associativity | Powers of 2: 1, 2, 4, 8, 16 |\n      | Pipeline width \u002F issue width | Small integers: 1, 2, 4, 8 |\n      | Buffer\u002Fqueue\u002FFIFO depth | Powers of 2: 4, 8, 16, 32, 64 |\n      | Clock period \u002F frequency | Based on technology node; try ±50% from default |\n      | Bound depth (BMC\u002Fformal) | Geometric: 5, 10, 20, 50, 100 |\n      | Timeout values | Geometric: 10s, 30s, 60s, 120s, 300s |\n      | Boolean\u002Fenum flags | Enumerate all options found in source |\n      | Continuous (learning rate, threshold) | Log-scale sweep: 5 points spanning 2 orders of magnitude around default |\n      | Integer counts (threads, cores) | Linear: from 1 to hardware max |\n\n   c. **Start conservative** — begin with 3-5 values per parameter. Expand range later if the best result is at a boundary.\n\n   d. **Log inferred ranges** — write the inferred parameter space to `dse_results\u002Finferred_params.md` so the user can review:\n      ```markdown\n      # Inferred Parameter Space\n\n      | Parameter | Source | Default | Inferred Range | Reasoning |\n      |-----------|--------|---------|---------------|-----------|\n      | CACHE_SIZE | config.py:42 | 32768 | [8192, 16384, 32768, 65536, 131072] | powers of 2, ±2x from default |\n      | ASSOC | config.py:43 | 4 | [1, 2, 4, 8] | standard associativities |\n      | BMC_DEPTH | run_bmc.py:15 | 10 | [5, 10, 20, 50] | geometric, common BMC depths |\n      ```\n\n   e. **Boundary expansion** — during the search, if the best result is at the min or max of a range, automatically extend that range by one step in that direction (but log the extension).\n\n3. **Read the project** to understand:\n   - How to run the program\n   - Where results are produced (stdout, log files, reports)\n   - How to parse the objective metric from output\n   - Current\u002Fbaseline configuration (if any)\n\n4. **Create working directory**: `dse_results\u002F` in project root\n   - `dse_results\u002Fdse_log.csv` — one row per design point\n   - `dse_results\u002FDSE_REPORT.md` — final report\n   - `dse_results\u002FDSE_STATE.json` — state for recovery\n   - `dse_results\u002Finferred_params.md` — inferred parameter space (if ranges were not provided)\n   - `dse_results\u002Fconfigs\u002F` — config files for each run\n   - `dse_results\u002Foutputs\u002F` — raw output for each run\n\n5. **Write a parameter extraction script** (`dse_results\u002Fparse_result.py` or similar) that takes a run's output and returns the objective metric as a number. Test it on a baseline run first.\n\n6. **Run baseline** (iteration 0): run the program with default\u002Fcurrent parameters. Record the baseline metric. This is the point to beat.\n\n### Phase 1: Initial Exploration\n\n**Goal**: Quickly survey the space to understand which parameters matter most.\n\n**Strategy**: Latin Hypercube Sampling or structured sweep of key parameters.\n\n1. Pick 5-10 diverse design points that span the parameter ranges\n2. Run them (in parallel if independent, via background processes or sequential)\n3. Record all results in `dse_log.csv`:\n   ```\n   iteration,param1,param2,...,metric,constraint_met,timestamp,notes\n   0,default,default,...,baseline_val,yes,2026-03-13T10:00:00,baseline\n   1,val1a,val2a,...,result1,yes,2026-03-13T10:05:00,initial sweep\n   ...\n   ```\n4. Analyze: which parameters have the most impact on the objective?\n5. Narrow the search to the most sensitive parameters\n\n### Phase 2: Directed Search\n\n**Goal**: Converge toward the optimum by making informed choices.\n\n**Strategy**: Adaptive — pick the approach that fits the problem:\n\n- **Few parameters (≤3)**: Fine-grained grid search around the best region from Phase 1\n- **Many parameters (>3)**: Coordinate descent — optimize one parameter at a time, holding others at current best\n- **Binary\u002Fcategorical params**: Enumerate promising combinations\n- **Continuous params**: Binary search or golden section between best neighbors\n- **Multi-objective**: Track Pareto frontier, explore along the front\n\nFor each iteration:\n\n1. **Select next design point** based on results so far:\n   - Look at the trend: which direction improves the metric?\n   - Avoid re-running configurations already evaluated\n   - Balance exploration (untested regions) vs exploitation (near current best)\n\n2. **Modify parameters**: edit config file, command-line args, or source constants\n\n3. **Run the program**: execute and capture output\n\n4. **Parse results**: extract the objective metric and check constraints\n\n5. **Log to `dse_log.csv`**: append the new row\n\n6. **Check stopping conditions**:\n   - Timeout reached? → stop\n   - Max iterations reached? → stop\n   - Patience exhausted (no improvement in N iterations)? → stop\n   - Success criteria met (metric is \"good enough\")? → stop\n   - Constraint violation pattern detected? → adjust search bounds\n\n7. **Update `DSE_STATE.json`**:\n   ```json\n   {\n     \"iteration\": 15,\n     \"status\": \"in_progress\",\n     \"best_metric\": 1.23,\n     \"best_params\": {\"cache_size\": 32768, \"assoc\": 4, \"pipeline_width\": 2},\n     \"total_iterations\": 15,\n     \"start_time\": \"2026-03-13T10:00:00\",\n     \"timeout\": \"2h\",\n     \"patience_counter\": 3\n   }\n   ```\n\n8. **Decide next step** → back to step 1\n\n### Phase 3: Refinement (if time allows)\n\nIf the search converged and there's still time budget:\n\n1. **Local perturbation**: try ±1 step on each parameter from the best point\n2. **Sensitivity analysis**: which parameters can be relaxed without hurting the metric?\n3. **Constraint boundary**: if a constraint is nearly binding, explore near-feasible points\n\n### Phase 4: Report\n\nWrite `dse_results\u002FDSE_REPORT.md`:\n\n```markdown\n# Design Space Exploration Report\n\n**Task**: [description]\n**Date**: [start] → [end]\n**Total iterations**: N\n**Wall-clock time**: X hours Y minutes\n\n## Objective\n- **Metric**: [what was optimized]\n- **Direction**: minimize \u002F maximize\n- **Baseline**: [value]\n- **Best found**: [value] ([improvement]% better than baseline)\n\n## Best Configuration\n| Parameter | Baseline | Best |\n|-----------|----------|------|\n| param1    | default  | best_val |\n| param2    | default  | best_val |\n| ...       | ...      | ... |\n\n## Search Trajectory\n| Iteration | param1 | param2 | ... | Metric | Notes |\n|-----------|--------|--------|-----|--------|-------|\n| 0 (baseline) | ... | ... | ... | ... | baseline |\n| 1 | ... | ... | ... | ... | initial sweep |\n| ... | ... | ... | ... | ... | ... |\n| N (best) | ... | ... | ... | ... | ★ best |\n\n## Parameter Sensitivity\n- **param1**: [high\u002Fmedium\u002Flow impact] — [brief explanation]\n- **param2**: [high\u002Fmedium\u002Flow impact] — [brief explanation]\n\n## Pareto Frontier (if multi-objective)\n[Table or description of non-dominated points]\n\n## Stopping Reason\n[timeout \u002F max_iterations \u002F patience \u002F success_criteria_met]\n\n## Recommendations\n- [actionable insights from the exploration]\n- [which parameters matter most]\n- [suggested follow-up explorations]\n```\n\nAlso generate a summary plot if matplotlib is available:\n- Convergence curve (metric vs iteration)\n- Parameter sensitivity bar chart\n- Pareto frontier scatter (if multi-objective)\n\n## State Recovery\n\nIf the context window compacts mid-run, the loop recovers from `DSE_STATE.json` + `dse_log.csv`:\n\n1. Read `DSE_STATE.json` for current iteration, best params, patience counter\n2. Read `dse_log.csv` for full history\n3. Resume from next iteration\n\n## Key Rules\n\n- Work AUTONOMOUSLY — do not ask the user for permission at each iteration\n- **Every run must be logged** — even failed runs, constraint violations, errors. The log is the ground truth.\n- **Never re-run an identical configuration** — check `dse_log.csv` before each run\n- **Respect the timeout** — check elapsed time before starting a new iteration. If the next run is likely to exceed the timeout, stop and report.\n- **Parse metrics programmatically** — write a parsing script, don't eyeball logs\n- **Keep raw outputs** — save each run's full output in `dse_results\u002Foutputs\u002Fiter_N\u002F`\n- **Constraint violations are not improvements** — a design point that violates constraints is never \"best\", regardless of the metric\n- If a run crashes, log the error, skip that point, and continue with the next\n- If the same crash repeats 3 times with different configs, the harness code itself is\n  the suspect — **discard and reimplement the run\u002Fparse script cleanly from the spec**\n  (a peer move to another patch; delete only the script, never `dse_log.csv` \u002F\n  `dse_results\u002F`; per [`external-cadence.md`](..\u002Fshared-references\u002Fexternal-cadence.md), \"Let a broken attempt restart, not\n  just patch\"). **Before resuming the sweep, re-validate metric comparability**: re-parse\n  one COMPLETED iteration's raw output from `dse_results\u002Foutputs\u002Fiter_N\u002F` with the new\n  parser and confirm it reproduces that row of `dse_log.csv`; on mismatch, fix the parser\n  or re-parse and flag all affected rows — never mix two parsing semantics in one log. If\n  a clean reimplement crashes the same way, stop and report — the spec or the environment\n  is then in question, which is what needs the human\n\n## Example Invocations\n\n```\n# Minimal — just name the parameters, let the agent figure out ranges\n\u002Fdse-loop \"Run gem5 mcf benchmark. Tune: L1D_SIZE, L2_SIZE, ROB_ENTRIES. Objective: maximize IPC. Timeout: 3h\"\n\n# Partial — some ranges given, some not\n\u002Fdse-loop \"Run make synth. Tune: CLOCK_PERIOD [5ns, 4ns, 3ns, 2ns], FLATTEN, ABC_SCRIPT. Objective: minimize area at timing closure. Timeout: 1h\"\n\n# Fully specified — explicit ranges for everything\n\u002Fdse-loop \"Simulate processor with FIFO_DEPTH [4,8,16,32], ISSUE_WIDTH [1,2,4], PREFETCH [on,off]. Run: make sim. Objective: max throughput\u002Farea. Timeout: 2h\"\n\n# Real-world: PDAG-SFA formal verification tuning\n\u002Fdse-loop \"Run python run_bmc.py. Tune: BMC_DEPTH, ENGINE, TIMEOUT_PER_PROP. Objective: maximize properties proved. Timeout: 2h\"\n```\n",{"name":5,"description":7},"main","18193d71ea3441d7c033dbf195b8a7c75ac96f75","packages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex\u002Fdse-loop",0,"https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science","https:\u002F\u002Fgithub.com\u002FCZX-LBJ","一个没事喜欢随便写点代码的小菜鸡\r\n","2026-10-22 09:48:04",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add CZX-LBJ\u002Fdeepseek-science --skill dse-loop",{"tool":38,"command":39},"bunx","bunx skills add CZX-LBJ\u002Fdeepseek-science --skill dse-loop",{"tool":41,"command":42},"pnpm","pnpm dlx skills add CZX-LBJ\u002Fdeepseek-science --skill dse-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex\u002Fdse-loop\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7FEEKSNMRMKW6JEK93PFDFY","bio-free-energy-calculations","Performs alchemical free-energy calculations including relative binding free energy (RBFE \u002F FEP+) and absolute binding free energy (ABFE) via OpenFE, FEP+, GROMACS, AMBER pmemd, and OpenMM with explicit lambda scheduling, soft-core potentials, MBAR\u002FBAR analysis, cycle-closure validation, and protocol-appropriate enhanced sampling. Compares ML alternatives (Boltz-2 affinity, DeepDock). Use when ranking analogs by binding affinity beyond docking accuracy, performing prospective lead optimization, or validating SAR predictions.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Ffree-energy-calculations\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7FEE5CTE5QK55CEMXNNVWY9","bio-conformer-generation","Generates 3D conformer ensembles using RDKit ETKDGv3 with knowledge-enhanced distance geometry, MMFF94\u002FUFF force-field optimization, CREST + GFN2-xTB semi-empirical refinement, and macrocycle-aware torsion preferences. Provides explicit decision rules for single vs ensemble conformer use, RMSD pruning, energy windows, conformer count, and force-field choice. Use when preparing 3D ligands for docking, generating descriptor input for 3D QSAR, or sampling macrocycle\u002Fpeptide conformational ensembles.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Fconformer-generation\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7FEDNGFEMFWD1MSEDR5H7CY","bio-admet-prediction","Predicts ADMET properties using ADMETlab 3.0 (119 platform features, including 77 prediction models with modeled-endpoint uncertainty), ADMET-AI, DeepChem MolNet, and chemprop D-MPNN with explicit handling of OECD QSAR principles, applicability domain assessment, calibration, hERG\u002FCYP\u002FAMES endpoints, and PAINS \u002F Lipinski \u002F Ro5 \u002F Veber \u002F BBB druglikeness filters. Use when filtering compounds for drug-likeness, prioritizing leads by predicted safety, or building an in-house ADMET QSAR model.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Fadmet-prediction\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7FED69GFB54FRF7AV5066DN","writing-systems-papers","Paragraph-level structural blueprint for 10-12 page systems papers targeting OSDI, SOSP, ASPLOS, NSDI, and EuroSys. Provides page allocation, paragraph templates, and writing patterns. Use when user says \"写系统论文\", \"systems paper structure\", \"OSDI paper\", \"SOSP paper\", or wants fine-grained structural guidance for a systems conference submission.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fwriting-systems-papers\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7FECVVDWZ0X0VEDTCE4B4DZ","wiki-enrich","Fill in the per-paper TODO sections of research-wiki\u002Fpapers\u002F\u003Cslug>.md pages that literature-ingest skills leave as bare scaffolds. Use when user says 'enrich wiki', 'fill paper TODOs', 'wiki body 補完', '把 paper 摘要寫進 wiki', 'research-wiki 自動填', or after a batch ingest that left papers\u002F as TODO scaffolds.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fwiki-enrich\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7FECD4BCJ2MTSBDDSE3ZAJ5","web-debug-search","Search GitHub, Stack Exchange, Chinese technical communities, official documentation, and general developer web sources for software errors, compatibility problems, API usage questions, and real-world workarounds. Use for debugging and discovery only; results are not paper-citation evidence.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fweb-debug-search\u002FSKILL.md",[],[]]