[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FJVA4SDP9D4VJZVCYA69CV":3,"skill-same:01M6FJVA4SDP9D4VJZVCYA69CV":47},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M6FJVA4SDP9D4VJZVCYA69CV","dse-loop",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fwanshuiyin\u002FAuto-claude-code-research-in-sleep\u002Fdse-loop\u002FSKILL.md",[],[18,19],"loop","dse loop","2026-11-10 10:12:30",false,"# 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, stop and report the issue\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",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fwanshuiyin\u002FAuto-claude-code-research-in-sleep\u002Fdse-loop",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill dse-loop",{"tool":39,"command":40},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill dse-loop",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill dse-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fwanshuiyin\u002FAuto-claude-code-research-in-sleep\u002Fdse-loop\u002FSKILL.md",true,[],[48,62,72,81,87,94],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":58,"publishedAt":20},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[53],{"categoryNo":54,"categoryName":55,"taxonomyType":56,"taxonomyTypeDesc":57},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[59,60,61],"model","model hierarchy","model hierarchy skill",{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":68,"publishedAt":20},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[67],{"categoryNo":54,"categoryName":55,"taxonomyType":56,"taxonomyTypeDesc":57},[69,70,71],"MCP","zoom","zoom mcp",{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":20},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[78,79,80,70],"sdk","zoom apps sdk","apps",{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":20},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[83],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":93,"publishedAt":20},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[92],{"categoryNo":54,"categoryName":55,"taxonomyType":56,"taxonomyTypeDesc":57},[89],{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[96]]