[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77JRT8EVYTPPP6M8B1N23EX":3,"skill-same:01M77JRT8EVYTPPP6M8B1N23EX":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M77JRT8EVYTPPP6M8B1N23EX","kpi-contract-builder",null,"Help a human turn a named-but-planned retail KPI into a governed, owner-ready project metric-contract by driving the shipped kpi_contracts engine (spec 124). On first contact, when no approved decisions exist yet, it assesses source answerability, lists the exact Decision Store decisions to get approved via business-knowledge-interview, and renders a preview with per-field provenance -- writing no YAML. Once the approved kpi_definition \u002F policy_ruling decisions, a named eligible owner, and committed source evidence exist, it drives draft_project_metric_contract (a gold-blocked contract) and, after the gold binding is materialized, finalize_project_metric_contract. Use when someone asks to draft, author, or start a metric contract for a planned KPI in the Seshat BI repo. It never invents business meaning, DAX, SQL, gold columns, approvals, owners, a confidence score, or a registry entry; it never promotes a KPI to Seeded and never self-grants an approval.","Kemetra\u002FSeshat-BI","Kemetra","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F206601658?v=4","01M77J5APND9QAJK8XMBH5B1A8","01M77J5AR4TM1GN2G4GS5KH02J",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Fintegrations\u002Fcodex\u002Fseshat-bi\u002Fskills\u002Fkpi-contract-builder\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: kpi-contract-builder\ndescription: >-\n  Help a human turn a named-but-planned retail KPI into a governed, owner-ready\n  project metric-contract by driving the shipped kpi_contracts engine (spec 124).\n  On first contact, when no approved decisions exist yet, it assesses source\n  answerability, lists the exact Decision Store decisions to get approved via\n  business-knowledge-interview, and renders a preview with per-field provenance\n  -- writing no YAML. Once the approved kpi_definition \u002F policy_ruling decisions,\n  a named eligible owner, and committed source evidence exist, it drives\n  draft_project_metric_contract (a gold-blocked contract) and, after the gold\n  binding is materialized, finalize_project_metric_contract. Use when someone\n  asks to draft, author, or start a metric contract for a planned KPI in the\n  Seshat BI repo. It never invents business meaning, DAX, SQL, gold columns,\n  approvals, owners, a confidence score, or a registry entry; it never promotes\n  a KPI to Seeded and never self-grants an approval.\n---\n\n# kpi-contract-builder\n\nThis skill is the agent-facing front door to the shipped `kpi_contracts` stage.\nIt does NOT reimplement contract authoring: the shipped `kpi_contracts` engine and\nits `kpi_answerability` scorecard already exist (spec 124). This skill DRIVES\nthem and adds the first-contact assessment the engine deliberately refuses to do.\n\n## When to use\n\n- Someone asks to draft \u002F author \u002F start a metric contract for a KPI that the\n  registry marks `planned` (no seeded contract yet), or for a user-supplied\n  custom KPI.\n- You are at the `kpi_contracts` flow stage (downstream of\n  `business-knowledge-interview`, upstream of silver\u002Fgold model planning).\n\nDo NOT use it to define DAX (`retail generate`), to check a PBIP model\n(`retail semantic-check`), or to run the interview itself\n(`business-knowledge-interview`).\n\n## The two-trip flow\n\nThe shipped `draft_project_metric_contract` REQUIRES an approved decision, a named\nowner, and committed source evidence; without them it raises\n`ContractDraftRefused`. So the flow has two trips.\n\n### Trip 1 -- Assess & preview (the common first-contact case; writes nothing)\n\n1. Identify the KPI. Registry-known -> resolve its `generic_kpi_ref: KPI-MC-NN`\n   from the `retail-kpi-knowledge` registry (`custom: false`).\n   User-supplied -> `custom: true`, no ref, no suggested id.\n2. Read the source-coverage signal (read-only). NOTE: for a `lifecycle: planned`\n   registry entry -- the primary case for this skill -- `derive_answerability`\n   short-circuits to `Planned` before it inspects source roles, mapped concepts,\n   domain, or evidence, so its status alone CANNOT tell you which fields are\n   present. For a planned KPI, take the coverage signal from the registry entry's\n   own `blockers` and `source_roles` \u002F `required_concepts` metadata (and a\n   committed source profile \u002F source-map, if present) -- that is what surfaces a\n   `binds_to` gap. Use `derive_answerability` \u002F\n   `render_answerability_artifact` only for its designed purpose (a coverage\n   scorecard for SEEDED KPIs); consume it read-only, never persist or re-decide it\n   -- contract authoring is a separate concern.\n3. Check the Decision Store for the required `kpi_definition` + applicable\n   `policy_ruling` decisions. If any is missing\u002Funapproved, do NOT call the\n   engine (it will raise).\n4. Render a PREVIEW: the contract's business body (clean; no provenance inside\n   values) + a `field_provenance` block + the gap list.\n5. Emit the decision-gap list: the exact `kpi_definition` \u002F `policy_ruling`\n   decisions to get approved (route to `business-knowledge-interview`) and the\n   owner to name. STOP. Write no YAML.\n\n### Trip 2 -- Draft & finalize (only when preconditions hold)\n\n6. When an approved `kpi_definition` (+ every applicable approved `policy_ruling`)\n   and a named eligible owner exist, build a `ContractDraftRequest` and call\n   `draft_project_metric_contract`. The result is a contract with\n   `readiness.status: blocked` and the reason `physical gold binding is not\n   materialized` -- this is correct and expected until gold exists.\n7. On explicit human confirmation, write the returned contract to\n   `mappings\u002F\u003Ctable>\u002Fmetrics\u002F\u003CName>.yaml`.\n8. After the gold binding is materialized and validated, call\n   `finalize_project_metric_contract` with a `FinalizationContext` (pass\n   `repo_root` so each referenced decision's approval evidence is re-verified);\n   it promotes to `readiness.status: pass` ONLY when every precondition\n   (binding, decisions scoped to this KPI via `scope.kpis`, fresh evidence, and\n   a `named_human_approval` equal to the eligible approver of a referenced\n   `kpi_definition`) holds. The skill never sets `pass` itself.\n\n## field_provenance (preview only; five-value origin vocabulary)\n\nRendered by this skill in the PREVIEW to show where each field came from. It is\nNOT written into the persisted contract (which uses the engine's `decision_refs`\n\u002F `source_evidence`). It is NEVER inserted inside a business value.\n\n    field_provenance:\n      formula_intent: { origin: knowledge,   ref: \"KPI-MC-02\u002Fnet-sales.md\", resolved: true }\n      binds_to:       { origin: profile,     ref: \"source-profile.md#net_amount\", resolved: false }\n      grain:          { origin: human,       ref: \"interview 2026-07-13\", resolved: true }\n      cost_method:    { origin: gap,         ref: \"\", resolved: false }\n\nOrigin is exactly one of: `knowledge` (transcribed from a generic\nretail-kpi-knowledge contract), `profile` (proposed from the read-only source\nprofile -- never self-justifying), `human` (a recorded answer \u002F approved\ndecision reference), `provisional` (a live unapproved answer shown in preview\nonly), `gap` (un-inferable). `provisional` and `gap` are never `resolved: true`;\neither on a required field means the drafted contract stays `readiness.status:\nblocked`.\n\n## Hard stops\n\n- Never self-grant an approval. The `owner` is REQUIRED at draft time\n  (`draft_project_metric_contract` refuses an empty owner and persists the one you\n  supply) -- so a named eligible owner must be identified before Trip 2; that is a\n  human answer, not an agent invention. What the skill never fills is `approvals`\n  and never sets `readiness.status: pass` -- promotion to `pass` is the named-human\n  step performed by `finalize_project_metric_contract`.\n- Never fabricate a confidence score or percentage.\n- Never write DAX \u002F SQL \u002F a silver or bronze binding into any field.\n- Never mutate `registry.yaml`; never suggest a `KPI-MC` id for a custom KPI;\n  never promote a KPI from Planned to Seeded.\n- For a `planned` KPI, contribute identity \u002F concepts \u002F roles \u002F blockers only --\n  never an invented `formula_intent`.\n","# kpi-contract-builder\n\nThis skill is the agent-facing front door to the shipped `kpi_contracts` stage.\nIt does NOT reimplement contract authoring: the shipped `kpi_contracts` engine and\nits `kpi_answerability` scorecard already exist (spec 124). This skill DRIVES\nthem and adds the first-contact assessment the engine deliberately refuses to do.\n\n## When to use\n\n- Someone asks to draft \u002F author \u002F start a metric contract for a KPI that the\n  registry marks `planned` (no seeded contract yet), or for a user-supplied\n  custom KPI.\n- You are at the `kpi_contracts` flow stage (downstream of\n  `business-knowledge-interview`, upstream of silver\u002Fgold model planning).\n\nDo NOT use it to define DAX (`retail generate`), to check a PBIP model\n(`retail semantic-check`), or to run the interview itself\n(`business-knowledge-interview`).\n\n## The two-trip flow\n\nThe shipped `draft_project_metric_contract` REQUIRES an approved decision, a named\nowner, and committed source evidence; without them it raises\n`ContractDraftRefused`. So the flow has two trips.\n\n### Trip 1 -- Assess & preview (the common first-contact case; writes nothing)\n\n1. Identify the KPI. Registry-known -> resolve its `generic_kpi_ref: KPI-MC-NN`\n   from the `retail-kpi-knowledge` registry (`custom: false`).\n   User-supplied -> `custom: true`, no ref, no suggested id.\n2. Read the source-coverage signal (read-only). NOTE: for a `lifecycle: planned`\n   registry entry -- the primary case for this skill -- `derive_answerability`\n   short-circuits to `Planned` before it inspects source roles, mapped concepts,\n   domain, or evidence, so its status alone CANNOT tell you which fields are\n   present. For a planned KPI, take the coverage signal from the registry entry's\n   own `blockers` and `source_roles` \u002F `required_concepts` metadata (and a\n   committed source profile \u002F source-map, if present) -- that is what surfaces a\n   `binds_to` gap. Use `derive_answerability` \u002F\n   `render_answerability_artifact` only for its designed purpose (a coverage\n   scorecard for SEEDED KPIs); consume it read-only, never persist or re-decide it\n   -- contract authoring is a separate concern.\n3. Check the Decision Store for the required `kpi_definition` + applicable\n   `policy_ruling` decisions. If any is missing\u002Funapproved, do NOT call the\n   engine (it will raise).\n4. Render a PREVIEW: the contract's business body (clean; no provenance inside\n   values) + a `field_provenance` block + the gap list.\n5. Emit the decision-gap list: the exact `kpi_definition` \u002F `policy_ruling`\n   decisions to get approved (route to `business-knowledge-interview`) and the\n   owner to name. STOP. Write no YAML.\n\n### Trip 2 -- Draft & finalize (only when preconditions hold)\n\n6. When an approved `kpi_definition` (+ every applicable approved `policy_ruling`)\n   and a named eligible owner exist, build a `ContractDraftRequest` and call\n   `draft_project_metric_contract`. The result is a contract with\n   `readiness.status: blocked` and the reason `physical gold binding is not\n   materialized` -- this is correct and expected until gold exists.\n7. On explicit human confirmation, write the returned contract to\n   `mappings\u002F\u003Ctable>\u002Fmetrics\u002F\u003CName>.yaml`.\n8. After the gold binding is materialized and validated, call\n   `finalize_project_metric_contract` with a `FinalizationContext` (pass\n   `repo_root` so each referenced decision's approval evidence is re-verified);\n   it promotes to `readiness.status: pass` ONLY when every precondition\n   (binding, decisions scoped to this KPI via `scope.kpis`, fresh evidence, and\n   a `named_human_approval` equal to the eligible approver of a referenced\n   `kpi_definition`) holds. The skill never sets `pass` itself.\n\n## field_provenance (preview only; five-value origin vocabulary)\n\nRendered by this skill in the PREVIEW to show where each field came from. It is\nNOT written into the persisted contract (which uses the engine's `decision_refs`\n\u002F `source_evidence`). It is NEVER inserted inside a business value.\n\n    field_provenance:\n      formula_intent: { origin: knowledge,   ref: \"KPI-MC-02\u002Fnet-sales.md\", resolved: true }\n      binds_to:       { origin: profile,     ref: \"source-profile.md#net_amount\", resolved: false }\n      grain:          { origin: human,       ref: \"interview 2026-07-13\", resolved: true }\n      cost_method:    { origin: gap,         ref: \"\", resolved: false }\n\nOrigin is exactly one of: `knowledge` (transcribed from a generic\nretail-kpi-knowledge contract), `profile` (proposed from the read-only source\nprofile -- never self-justifying), `human` (a recorded answer \u002F approved\ndecision reference), `provisional` (a live unapproved answer shown in preview\nonly), `gap` (un-inferable). `provisional` and `gap` are never `resolved: true`;\neither on a required field means the drafted contract stays `readiness.status:\nblocked`.\n\n## Hard stops\n\n- Never self-grant an approval. The `owner` is REQUIRED at draft time\n  (`draft_project_metric_contract` refuses an empty owner and persists the one you\n  supply) -- so a named eligible owner must be identified before Trip 2; that is a\n  human answer, not an agent invention. What the skill never fills is `approvals`\n  and never sets `readiness.status: pass` -- promotion to `pass` is the named-human\n  step performed by `finalize_project_metric_contract`.\n- Never fabricate a confidence score or percentage.\n- Never write DAX \u002F SQL \u002F a silver or bronze binding into any field.\n- Never mutate `registry.yaml`; never suggest a `KPI-MC` id for a custom KPI;\n  never promote a KPI from Planned to Seeded.\n- For a `planned` KPI, contribute identity \u002F concepts \u002F roles \u002F blockers only --\n  never an invented `formula_intent`.\n",{"name":5,"description":7},"main","6266e304556a72b75d951b9433fd833481c61233","integrations\u002Fcodex\u002Fseshat-bi\u002Fskills\u002Fkpi-contract-builder",0,"https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fseshat-bi\u002F","https:\u002F\u002Fgithub.com\u002FKemetra","2026-11-11 21:44:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Kemetra\u002FSeshat-BI --skill kpi-contract-builder",{"tool":37,"command":38},"bunx","bunx skills add Kemetra\u002FSeshat-BI --skill kpi-contract-builder",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Kemetra\u002FSeshat-BI --skill kpi-contract-builder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Fintegrations\u002Fcodex\u002Fseshat-bi\u002Fskills\u002Fkpi-contract-builder\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"walkthrough.md","REFERENCE","参考文档",3103,"https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Fintegrations\u002Fcodex\u002Fseshat-bi\u002Fskills\u002Fkpi-contract-builder\u002Fwalkthrough.md",[52,59,64,70,75,82],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M77JWCTJ88JWPDD25WZ2NEY8","fake-skill","A fixture skill with declaring frontmatter, used as positive shipped evidence.","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Ftests\u002Funit\u002Ffixtures\u002Fcapability_inventory\u002Funlisted\u002F.claude\u002Fskills\u002Ffake-skill\u002FSKILL.md",[],[],{"skillNo":60,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M77JWA0BTG4JB2HR52Q99216","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Ftests\u002Funit\u002Ffixtures\u002Fcapability_inventory\u002Forphan\u002F.claude\u002Fskills\u002Ffake-skill\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M77JW6VE59XEFHWBTNDYAS2Q","bare-skill-no-frontmatter","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Ftests\u002Funit\u002Ffixtures\u002Fcapability_inventory\u002Forphan\u002F.claude\u002Fskills\u002Fbare-skill-no-frontmatter\u002FSKILL.md",[],[],{"skillNo":71,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M77JW4TD1FNFSBNP5C0WXAA5","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Ftests\u002Funit\u002Ffixtures\u002Fcapability_inventory\u002Fgood\u002F.claude\u002Fskills\u002Ffake-skill\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M77JVWCVE3WZ82ZNFCSFVDCP","retail-kpi-knowledge","Retail KPI \u002F metric-contract reasoning layer for BI agents in the Seshat BI project. Use when an agent must reason about the BUSINESS MEANING of a retail KPI before any implementation — defining a KPI in business terms, classifying additivity (fully\u002Fsemi\u002Fnon-additive), identifying grain, listing required source fields, resolving ambiguity (gross vs net, VAT, returns, cost method, same-store), choosing an MVP KPI pack, reviewing a metric contract for completeness, or preparing a clean handoff to an implementation layer. Also use it to classify KPI sufficiency or prepare an owner policy decision packet. This is a meaning\u002Fdefinition + review layer, not an executor: it does not write DAX\u002FSQL\u002FPython, grant readiness, approve policy, or design dashboards. See INDEX.md for live\u002Fplanned routes; registry.yaml is the authoritative machine-readable inventory.","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Fskills\u002Fretail-kpi-knowledge\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M77JVNDM1NGYGSCPTBW9ZCF5","bi-sql-knowledge","SQL reasoning, validation, reconciliation, transformation, diagnostics, and anti-pattern knowledge layer for Seshat BI agents. Use when a task involves reasoning about source SQL: source profiling, table grain, keys & uniqueness, joins & fan-out amplification, aggregation correctness, COUNT\u002FNULL semantics, deduplication, validation queries, reconciliation queries, silver\u002Fgold transformation logic, window\u002Fdate-time analytics, SQL anti-patterns, or basic SQL performance reasoning, or interpretation of a supplied sanitized PostgreSQL JSON execution plan. The SQL counterpart to bi-dax-knowledge. It is a thinking & validation layer, not a database executor, runtime validator, dbt\u002FDagster project, or automatic tuning service.","https:\u002F\u002Fgithub.com\u002FKemetra\u002FSeshat-BI\u002Fblob\u002Fmain\u002Fskills\u002Fbi-sql-knowledge\u002FSKILL.md",[],[]]