[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74GJSZQBHH1T0T53MZEGWSV":3,"skill-same:01M74GJSZQBHH1T0T53MZEGWSV":50},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M74GJSZQBHH1T0T53MZEGWSV","demand-forecast",null,"Model capacity demand — growth (linear\u002Fcompound\u002Fseasonal), translate to resource needs + headroom, and flag the lead time before a saturation breach.","MohammadBafkar\u002Fpolymath","MohammadBafkar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34940462?v=4","01M74G540TQFZWK6KVAPKFVGNR","Mohammad Bafkar","01M74G541HG19QP9V5DQCJVKYE",0,"MIT","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fdemand-forecast\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: demand-forecast\ndescription: Model capacity demand — growth (linear\u002Fcompound\u002Fseasonal), translate to resource needs + headroom, and flag the lead time before a saturation breach.\n---\n\n# demand-forecast\n\n> Capacity planning fails on lead time, not math: you saw the trend but couldn't provision before the wall. Forecast far enough ahead to act, and state the date you run out.\n\n**Mode:** analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked `[TBD]` or `[VERIFY]`, never filled in.\n\n## When to use\n\n- Projecting whether current capacity survives expected growth or a known event (launch, sale, season).\n- Turning a usage trend into a provisioning decision with a deadline.\n- A workflow invokes `polymath-sre:demand-forecast`.\n\nNot this when: you are setting reliability targets (`polymath-sre:slo-design`) or turning the forecast into scaling triggers and a cost plan (`polymath-sre:capacity-plan`, which consumes this output). This skill projects demand forward in time.\n\n## Inputs\n\n- Historical usage of the driving metric(s) (RPS, storage, connections), and the resource each consumes.\n- Known future events and their expected multiplier; the provisioning lead time.\n\n## Procedure\n\n1. **Pick the driver metric(s)** that actually gate capacity (often RPS, concurrent users, data volume, queue depth) — forecast the driver, then map to resources, not the other way around.\n2. **Choose a growth model from the data**: linear (steady adds), compound\u002Fexponential (% growth — the one teams underestimate), or seasonal\u002Fcyclical (day-of-week, holidays, campaigns). Fit with the bundled script — it compares linear vs compound by R² and never assumes linear because it's easy (seasonality: fit on de-seasonalized or same-period-last-year data, and say so):\n\n   ```bash\n   python3 \"${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fcapacity-plan\u002Fscripts\u002Fheadroom.py\" \\\n     --history \u003Cper-period values, oldest first> --period month \\\n     --capacity \u003Cmax> --ceiling 0.7 --lead-time-days \u003Cn> --as-of \u003CYYYY-MM-DD> [--event DATE:MULT]\n   ```\n3. **Overlay known events**: launches, marketing, seasonal peaks — apply explicit multipliers on top of the baseline trend.\n4. **Translate demand → resources**: use the measured resource-per-unit (from `capacity-plan` \u002F load tests) to convert forecasted driver units into CPU\u002Fmemory\u002Fstorage\u002Finstances. State the conversion.\n5. **Apply a headroom target**: provision to a utilization ceiling (e.g. 60–70% at peak) so you have burst room and time to react — not 100%.\n6. **Lead-time-to-breach**: the script's `Must act by:` line — the trend (or event) breach minus provisioning lead time. This is the output that matters; quote it, don't recompute it.\n7. **State assumptions + confidence + refresh cadence**: forecasts decay — say when to re-run and what would invalidate it (a step-change in growth).\n\n## Output\n\n`docs\u002Fcapacity\u002F\u003Cslug>-forecast.md`, in this shape:\n\n```text\nDemand forecast: refund-service — requests\u002Fs at peak\n\nDriver:      peak RPS (gates DB connections at 1.6 conns\u002FRPS, measured in load test 2026-09)\nScript:      \u003Cthe headroom.py block, verbatim>\nResources:   peak 320 RPS → 512 conns; ceiling 700 conns ≈ 437 RPS\nHeadroom:    provision to ≤ 70% at peak\nMust act by: 2027-04-18   confidence: medium (6 months of history, no seasonality yet)\nAssumptions: growth stays compound ~4.5%\u002Fmonth; Black Friday ×1.3 (last year's ratio)\nRefresh:     monthly, or immediately on a step change > 20% month-over-month\n```\n\n## Quality bar\n\n- The growth model is fit to history, not assumed linear; compounding is checked.\n- Demand is converted to resources via a measured per-unit cost, with headroom.\n- The output names a concrete must-act-by date accounting for provisioning lead time.\n- Assumptions, confidence, and a refresh cadence are stated.\n","# demand-forecast\n\n> Capacity planning fails on lead time, not math: you saw the trend but couldn't provision before the wall. Forecast far enough ahead to act, and state the date you run out.\n\n**Mode:** analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked `[TBD]` or `[VERIFY]`, never filled in.\n\n## When to use\n\n- Projecting whether current capacity survives expected growth or a known event (launch, sale, season).\n- Turning a usage trend into a provisioning decision with a deadline.\n- A workflow invokes `polymath-sre:demand-forecast`.\n\nNot this when: you are setting reliability targets (`polymath-sre:slo-design`) or turning the forecast into scaling triggers and a cost plan (`polymath-sre:capacity-plan`, which consumes this output). This skill projects demand forward in time.\n\n## Inputs\n\n- Historical usage of the driving metric(s) (RPS, storage, connections), and the resource each consumes.\n- Known future events and their expected multiplier; the provisioning lead time.\n\n## Procedure\n\n1. **Pick the driver metric(s)** that actually gate capacity (often RPS, concurrent users, data volume, queue depth) — forecast the driver, then map to resources, not the other way around.\n2. **Choose a growth model from the data**: linear (steady adds), compound\u002Fexponential (% growth — the one teams underestimate), or seasonal\u002Fcyclical (day-of-week, holidays, campaigns). Fit with the bundled script — it compares linear vs compound by R² and never assumes linear because it's easy (seasonality: fit on de-seasonalized or same-period-last-year data, and say so):\n\n   ```bash\n   python3 \"${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fcapacity-plan\u002Fscripts\u002Fheadroom.py\" \\\n     --history \u003Cper-period values, oldest first> --period month \\\n     --capacity \u003Cmax> --ceiling 0.7 --lead-time-days \u003Cn> --as-of \u003CYYYY-MM-DD> [--event DATE:MULT]\n   ```\n3. **Overlay known events**: launches, marketing, seasonal peaks — apply explicit multipliers on top of the baseline trend.\n4. **Translate demand → resources**: use the measured resource-per-unit (from `capacity-plan` \u002F load tests) to convert forecasted driver units into CPU\u002Fmemory\u002Fstorage\u002Finstances. State the conversion.\n5. **Apply a headroom target**: provision to a utilization ceiling (e.g. 60–70% at peak) so you have burst room and time to react — not 100%.\n6. **Lead-time-to-breach**: the script's `Must act by:` line — the trend (or event) breach minus provisioning lead time. This is the output that matters; quote it, don't recompute it.\n7. **State assumptions + confidence + refresh cadence**: forecasts decay — say when to re-run and what would invalidate it (a step-change in growth).\n\n## Output\n\n`docs\u002Fcapacity\u002F\u003Cslug>-forecast.md`, in this shape:\n\n```text\nDemand forecast: refund-service — requests\u002Fs at peak\n\nDriver:      peak RPS (gates DB connections at 1.6 conns\u002FRPS, measured in load test 2026-09)\nScript:      \u003Cthe headroom.py block, verbatim>\nResources:   peak 320 RPS → 512 conns; ceiling 700 conns ≈ 437 RPS\nHeadroom:    provision to ≤ 70% at peak\nMust act by: 2027-04-18   confidence: medium (6 months of history, no seasonality yet)\nAssumptions: growth stays compound ~4.5%\u002Fmonth; Black Friday ×1.3 (last year's ratio)\nRefresh:     monthly, or immediately on a step change > 20% month-over-month\n```\n\n## Quality bar\n\n- The growth model is fit to history, not assumed linear; compounding is checked.\n- Demand is converted to resources via a measured per-unit cost, with headroom.\n- The output names a concrete must-act-by date accounting for provisioning lead time.\n- Assumptions, confidence, and a refresh cadence are stated.\n",{"name":5,"description":7},"main","23f6e21841a39580c9da2b5ec941f39dda17cd86","plugins\u002Fpolymath-sre\u002Fskills\u002Fdemand-forecast","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath","https:\u002F\u002Fgithub.com\u002FMohammadBafkar","2026-10-29 18:34:59",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add MohammadBafkar\u002Fpolymath --skill demand-forecast",{"tool":36,"command":37},"bunx","bunx skills add MohammadBafkar\u002Fpolymath --skill demand-forecast",{"tool":39,"command":40},"pnpm","pnpm dlx skills add MohammadBafkar\u002Fpolymath --skill demand-forecast","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fdemand-forecast\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"routing.yaml","REFERENCE","参考文档",422,"https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fdemand-forecast\u002Frouting.yaml",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M74GN87EBRHM9N87M7AP1HDD","runbook","Write or refresh an operational runbook for an alert\u002Fsymptom; structured as TL;DR + Pre-checks + Steps + Verification + Rollback + Escalation.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frunbook\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M74GN5GPKEC1JEKP2DFQNEQJ","rfc","Draft a lightweight design RFC to docs\u002Frfcs\u002F\u003Cslug>.md; Summary, Motivation, Detailed design, Drawbacks, Alternatives, Unresolved questions. A proposal to debate, not a recorded decision (adr).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frfc\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M74GN2F4CWPMV4X09TG4E304","editorial-pass","Review and tighten prose in a Markdown artifact for a target tone (terse, formal, friendly) without dropping information; preserve quotations and load-bearing constraints.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Feditorial-pass\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M74GMZWGYMZ37C4DYGT6P23G","architecture-review-facilitation","Run an architecture review as a process — entry criteria, reviewer checklist, decision log, and follow-up actions — pairing the design artifact with a red-team pass.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-review-facilitation\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74GMXVX0YX3ETDXS527XDGM","architecture-doc","Write a C4-style architecture document; System Context + Containers (+ Components when interesting) with mermaid diagrams. Describes structure, not a decision (adr) or proposal (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-doc\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M74GMVG1WSMCK066S3KE6V5K","adr","Write an Architecture Decision Record (Michael Nygard format) to docs\u002Fadrs\u002FNNNN-\u003Cslug>.md; frontmatter validated by the ADR artifact schema. Records a made decision, not a proposal to debate (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Fadr\u002FSKILL.md",[],[]]