productfoo 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +338 -2
- package/bin/foo +3 -0
- package/bin/foo.mjs +42 -0
- package/commands/bug.md +31 -0
- package/commands/discovery.md +28 -0
- package/commands/ideate.md +27 -0
- package/commands/init.md +28 -0
- package/commands/pitch.md +27 -0
- package/commands/preview.md +25 -0
- package/commands/research.md +31 -0
- package/commands/roast.md +27 -0
- package/commands/spec.md +30 -0
- package/config/pricing.yaml +198 -0
- package/config/routing-policy.yaml +171 -0
- package/dist-public/src/activeModel.d.ts +83 -0
- package/dist-public/src/activeModel.js +331 -0
- package/dist-public/src/agentAdapters.d.ts +122 -0
- package/dist-public/src/agentAdapters.js +178 -0
- package/dist-public/src/agentState.d.ts +43 -0
- package/dist-public/src/agentState.js +177 -0
- package/dist-public/src/bugCapsule.d.ts +94 -0
- package/dist-public/src/bugCapsule.js +227 -0
- package/dist-public/src/bugCapture.d.ts +26 -0
- package/dist-public/src/bugCapture.js +251 -0
- package/dist-public/src/bugOwnerLog.d.ts +93 -0
- package/dist-public/src/bugOwnerLog.js +304 -0
- package/dist-public/src/bugReportStore.d.ts +48 -0
- package/dist-public/src/bugReportStore.js +860 -0
- package/dist-public/src/bugSpecContext.d.ts +7 -0
- package/dist-public/src/bugSpecContext.js +129 -0
- package/dist-public/src/channelFreshness.d.ts +25 -0
- package/dist-public/src/channelFreshness.js +194 -0
- package/dist-public/src/cli.d.ts +30 -0
- package/dist-public/src/cli.js +1667 -0
- package/dist-public/src/cliArgs.d.ts +7 -0
- package/dist-public/src/cliArgs.js +44 -0
- package/dist-public/src/codeCatalog.d.ts +41 -0
- package/dist-public/src/codeCatalog.js +197 -0
- package/dist-public/src/commandContract.d.ts +84 -0
- package/dist-public/src/commandContract.js +390 -0
- package/dist-public/src/commandUsage.d.ts +3 -0
- package/dist-public/src/commandUsage.js +30 -0
- package/dist-public/src/commands/agent.d.ts +60 -0
- package/dist-public/src/commands/agent.js +1353 -0
- package/dist-public/src/commands/asp.d.ts +8 -0
- package/dist-public/src/commands/asp.js +669 -0
- package/dist-public/src/commands/evalCmd.d.ts +4 -0
- package/dist-public/src/commands/evalCmd.js +405 -0
- package/dist-public/src/commands/login.d.ts +25 -0
- package/dist-public/src/commands/login.js +94 -0
- package/dist-public/src/commands/loop.d.ts +16 -0
- package/dist-public/src/commands/loop.js +619 -0
- package/dist-public/src/commands/reconcile.d.ts +41 -0
- package/dist-public/src/commands/reconcile.js +292 -0
- package/dist-public/src/commands/runtime.d.ts +1 -0
- package/dist-public/src/commands/runtime.js +36 -0
- package/dist-public/src/commands/scanRedact.d.ts +8 -0
- package/dist-public/src/commands/scanRedact.js +266 -0
- package/dist-public/src/commands/setup.d.ts +28 -0
- package/dist-public/src/commands/setup.js +398 -0
- package/dist-public/src/commands/shared.d.ts +17 -0
- package/dist-public/src/commands/shared.js +147 -0
- package/dist-public/src/commands/source.d.ts +1 -0
- package/dist-public/src/commands/source.js +134 -0
- package/dist-public/src/commands/specCmd.d.ts +24 -0
- package/dist-public/src/commands/specCmd.js +794 -0
- package/dist-public/src/commands/update.d.ts +61 -0
- package/dist-public/src/commands/update.js +244 -0
- package/dist-public/src/comprehensionSignal.d.ts +20 -0
- package/dist-public/src/comprehensionSignal.js +166 -0
- package/dist-public/src/conductor/diversity.d.ts +48 -0
- package/dist-public/src/conductor/diversity.js +423 -0
- package/dist-public/src/conductor/engine.d.ts +7 -0
- package/dist-public/src/conductor/engine.js +295 -0
- package/dist-public/src/conductor/families/ideate.d.ts +2 -0
- package/dist-public/src/conductor/families/ideate.js +255 -0
- package/dist-public/src/conductor/families/interview.d.ts +2 -0
- package/dist-public/src/conductor/families/interview.js +39 -0
- package/dist-public/src/conductor/families/specSwarm.d.ts +2 -0
- package/dist-public/src/conductor/families/specSwarm.js +146 -0
- package/dist-public/src/conductor/familyDelivery.d.ts +6 -0
- package/dist-public/src/conductor/familyDelivery.js +37 -0
- package/dist-public/src/conductor/familyPackArtifact.d.ts +4 -0
- package/dist-public/src/conductor/familyPackArtifact.js +260 -0
- package/dist-public/src/conductor/ideateDecision.d.ts +6 -0
- package/dist-public/src/conductor/ideateDecision.js +237 -0
- package/dist-public/src/conductor/pack.d.ts +26 -0
- package/dist-public/src/conductor/pack.js +75 -0
- package/dist-public/src/conductor/types.d.ts +111 -0
- package/dist-public/src/conductor/types.js +7 -0
- package/dist-public/src/configPath.d.ts +2 -0
- package/dist-public/src/configPath.js +7 -0
- package/dist-public/src/discoveryArtifacts.d.ts +54 -0
- package/dist-public/src/discoveryArtifacts.js +467 -0
- package/dist-public/src/discoveryCommand.d.ts +127 -0
- package/dist-public/src/discoveryCommand.js +2148 -0
- package/dist-public/src/discoveryConnections.d.ts +339 -0
- package/dist-public/src/discoveryConnections.js +613 -0
- package/dist-public/src/discoveryDocs.d.ts +129 -0
- package/dist-public/src/discoveryDocs.js +577 -0
- package/dist-public/src/discoveryEvidence.d.ts +59 -0
- package/dist-public/src/discoveryEvidence.js +198 -0
- package/dist-public/src/discoveryFireflies.d.ts +25 -0
- package/dist-public/src/discoveryFireflies.js +551 -0
- package/dist-public/src/discoveryGmail.d.ts +12 -0
- package/dist-public/src/discoveryGmail.js +466 -0
- package/dist-public/src/discoveryGong.d.ts +12 -0
- package/dist-public/src/discoveryGong.js +491 -0
- package/dist-public/src/discoveryLearningRouting.d.ts +90 -0
- package/dist-public/src/discoveryLearningRouting.js +405 -0
- package/dist-public/src/discoveryMatching.d.ts +26 -0
- package/dist-public/src/discoveryMatching.js +73 -0
- package/dist-public/src/discoveryOutlook.d.ts +12 -0
- package/dist-public/src/discoveryOutlook.js +492 -0
- package/dist-public/src/discoveryProcess.d.ts +221 -0
- package/dist-public/src/discoveryProcess.js +703 -0
- package/dist-public/src/discoveryProof.d.ts +143 -0
- package/dist-public/src/discoveryProof.js +529 -0
- package/dist-public/src/discoveryProviders.d.ts +152 -0
- package/dist-public/src/discoveryProviders.js +756 -0
- package/dist-public/src/discoveryReadiness.d.ts +219 -0
- package/dist-public/src/discoveryReadiness.js +672 -0
- package/dist-public/src/discoveryReconcile.d.ts +57 -0
- package/dist-public/src/discoveryReconcile.js +424 -0
- package/dist-public/src/discoverySlack.d.ts +12 -0
- package/dist-public/src/discoverySlack.js +452 -0
- package/dist-public/src/discoverySources.d.ts +56 -0
- package/dist-public/src/discoverySources.js +322 -0
- package/dist-public/src/discoverySync.d.ts +52 -0
- package/dist-public/src/discoverySync.js +151 -0
- package/dist-public/src/discoverySynthesis.d.ts +57 -0
- package/dist-public/src/discoverySynthesis.js +215 -0
- package/dist-public/src/discoveryTeams.d.ts +12 -0
- package/dist-public/src/discoveryTeams.js +516 -0
- package/dist-public/src/discoveryZoom.d.ts +12 -0
- package/dist-public/src/discoveryZoom.js +523 -0
- package/dist-public/src/elicitationSurface.d.ts +13 -0
- package/dist-public/src/elicitationSurface.js +77 -0
- package/dist-public/src/errorReport.d.ts +99 -0
- package/dist-public/src/errorReport.js +443 -0
- package/dist-public/src/errorTaxonomy.d.ts +84 -0
- package/dist-public/src/errorTaxonomy.js +189 -0
- package/dist-public/src/evalCalibration.d.ts +82 -0
- package/dist-public/src/evalCalibration.js +169 -0
- package/dist-public/src/evalChecks.d.ts +21 -0
- package/dist-public/src/evalChecks.js +295 -0
- package/dist-public/src/evalCompile.d.ts +56 -0
- package/dist-public/src/evalCompile.js +58 -0
- package/dist-public/src/evalImprove.d.ts +60 -0
- package/dist-public/src/evalImprove.js +175 -0
- package/dist-public/src/evalJudge.d.ts +47 -0
- package/dist-public/src/evalJudge.js +143 -0
- package/dist-public/src/evalLabels.d.ts +100 -0
- package/dist-public/src/evalLabels.js +287 -0
- package/dist-public/src/evalRecord.d.ts +68 -0
- package/dist-public/src/evalRecord.js +165 -0
- package/dist-public/src/evalRoast.d.ts +88 -0
- package/dist-public/src/evalRoast.js +249 -0
- package/dist-public/src/evidenceIntake.d.ts +66 -0
- package/dist-public/src/evidenceIntake.js +356 -0
- package/dist-public/src/feedback.d.ts +78 -0
- package/dist-public/src/feedback.js +294 -0
- package/dist-public/src/firefliesClient.d.ts +106 -0
- package/dist-public/src/firefliesClient.js +258 -0
- package/dist-public/src/firstMoveTensions.d.ts +10 -0
- package/dist-public/src/firstMoveTensions.js +93 -0
- package/dist-public/src/gitRun.d.ts +21 -0
- package/dist-public/src/gitRun.js +50 -0
- package/dist-public/src/githubReconcile.d.ts +94 -0
- package/dist-public/src/githubReconcile.js +205 -0
- package/dist-public/src/gmailNango.d.ts +131 -0
- package/dist-public/src/gmailNango.js +329 -0
- package/dist-public/src/gongNango.d.ts +118 -0
- package/dist-public/src/gongNango.js +308 -0
- package/dist-public/src/grammarGate.d.ts +13 -0
- package/dist-public/src/grammarGate.js +72 -0
- package/dist-public/src/harnessGates.d.ts +65 -0
- package/dist-public/src/harnessGates.js +168 -0
- package/dist-public/src/humanSurfaceEval.d.ts +19 -0
- package/dist-public/src/humanSurfaceEval.js +156 -0
- package/dist-public/src/ideate.d.ts +43 -0
- package/dist-public/src/ideate.js +255 -0
- package/dist-public/src/ideateContext.d.ts +11 -0
- package/dist-public/src/ideateContext.js +83 -0
- package/dist-public/src/index.d.ts +2 -0
- package/dist-public/src/index.js +4 -0
- package/dist-public/src/initCommand.d.ts +25 -0
- package/dist-public/src/initCommand.js +558 -0
- package/dist-public/src/interviewGate.d.ts +25 -0
- package/dist-public/src/interviewGate.js +126 -0
- package/dist-public/src/jsonFile.d.ts +2 -0
- package/dist-public/src/jsonFile.js +22 -0
- package/dist-public/src/loopBudget.d.ts +182 -0
- package/dist-public/src/loopBudget.js +494 -0
- package/dist-public/src/loopContracts.d.ts +35 -0
- package/dist-public/src/loopContracts.js +364 -0
- package/dist-public/src/machineState.d.ts +1 -0
- package/dist-public/src/machineState.js +9 -0
- package/dist-public/src/notionNango.d.ts +93 -0
- package/dist-public/src/notionNango.js +279 -0
- package/dist-public/src/orchestrationResult.d.ts +11 -0
- package/dist-public/src/orchestrationResult.js +73 -0
- package/dist-public/src/outlookNango.d.ts +124 -0
- package/dist-public/src/outlookNango.js +327 -0
- package/dist-public/src/packetCorrections.d.ts +40 -0
- package/dist-public/src/packetCorrections.js +172 -0
- package/dist-public/src/packetGlossary.d.ts +6 -0
- package/dist-public/src/packetGlossary.js +42 -0
- package/dist-public/src/packetIndex.d.ts +54 -0
- package/dist-public/src/packetIndex.js +744 -0
- package/dist-public/src/packetIndexEntry.d.ts +3 -0
- package/dist-public/src/packetIndexEntry.js +128 -0
- package/dist-public/src/packetIndexServe.d.ts +13 -0
- package/dist-public/src/packetIndexServe.js +113 -0
- package/dist-public/src/packetIndexWorker.d.ts +7 -0
- package/dist-public/src/packetIndexWorker.js +45 -0
- package/dist-public/src/packetLifecycle.d.ts +30 -0
- package/dist-public/src/packetLifecycle.js +127 -0
- package/dist-public/src/packetReconcile.d.ts +73 -0
- package/dist-public/src/packetReconcile.js +386 -0
- package/dist-public/src/packetStatus.d.ts +125 -0
- package/dist-public/src/packetStatus.js +770 -0
- package/dist-public/src/packetValidation.d.ts +17 -0
- package/dist-public/src/packetValidation.js +333 -0
- package/dist-public/src/packetVerify.d.ts +73 -0
- package/dist-public/src/packetVerify.js +303 -0
- package/dist-public/src/packetWrite.d.ts +52 -0
- package/dist-public/src/packetWrite.js +448 -0
- package/dist-public/src/pitch.d.ts +38 -0
- package/dist-public/src/pitch.js +154 -0
- package/dist-public/src/processMemo.d.ts +8 -0
- package/dist-public/src/processMemo.js +23 -0
- package/dist-public/src/productDetect.d.ts +30 -0
- package/dist-public/src/productDetect.js +376 -0
- package/dist-public/src/profile.d.ts +62 -0
- package/dist-public/src/profile.js +334 -0
- package/dist-public/src/questionModel.d.ts +46 -0
- package/dist-public/src/questionModel.js +74 -0
- package/dist-public/src/questionText.d.ts +7 -0
- package/dist-public/src/questionText.js +38 -0
- package/dist-public/src/redactConfig.d.ts +2 -0
- package/dist-public/src/redactConfig.js +11 -0
- package/dist-public/src/redactEngine.d.ts +59 -0
- package/dist-public/src/redactEngine.js +509 -0
- package/dist-public/src/redactGate.d.ts +63 -0
- package/dist-public/src/redactGate.js +209 -0
- package/dist-public/src/repoRead.d.ts +29 -0
- package/dist-public/src/repoRead.js +160 -0
- package/dist-public/src/research.d.ts +242 -0
- package/dist-public/src/research.js +1314 -0
- package/dist-public/src/researchCompletion.d.ts +34 -0
- package/dist-public/src/researchCompletion.js +123 -0
- package/dist-public/src/researchExecution.d.ts +47 -0
- package/dist-public/src/researchExecution.js +309 -0
- package/dist-public/src/researchFormat.d.ts +21 -0
- package/dist-public/src/researchFormat.js +77 -0
- package/dist-public/src/researchGate.d.ts +86 -0
- package/dist-public/src/researchGate.js +1036 -0
- package/dist-public/src/researchReceipt.d.ts +76 -0
- package/dist-public/src/researchReceipt.js +148 -0
- package/dist-public/src/researchRender.d.ts +2 -0
- package/dist-public/src/researchRender.js +267 -0
- package/dist-public/src/researchSigningKey.d.ts +19 -0
- package/dist-public/src/researchSigningKey.js +95 -0
- package/dist-public/src/riskClassify.d.ts +42 -0
- package/dist-public/src/riskClassify.js +149 -0
- package/dist-public/src/routines.d.ts +42 -0
- package/dist-public/src/routines.js +269 -0
- package/dist-public/src/routingPolicy.d.ts +172 -0
- package/dist-public/src/routingPolicy.js +646 -0
- package/dist-public/src/secretInput.d.ts +8 -0
- package/dist-public/src/secretInput.js +89 -0
- package/dist-public/src/selfCheck.d.ts +7 -0
- package/dist-public/src/selfCheck.js +473 -0
- package/dist-public/src/selfCheckCache.d.ts +29 -0
- package/dist-public/src/selfCheckCache.js +147 -0
- package/dist-public/src/severityClass.d.ts +15 -0
- package/dist-public/src/severityClass.js +22 -0
- package/dist-public/src/skillClientPolicy.d.ts +8 -0
- package/dist-public/src/skillClientPolicy.js +16 -0
- package/dist-public/src/skillLocal.d.ts +98 -0
- package/dist-public/src/skillLocal.js +463 -0
- package/dist-public/src/skillTreeDigest.d.ts +9 -0
- package/dist-public/src/skillTreeDigest.js +64 -0
- package/dist-public/src/slackNango.d.ts +62 -0
- package/dist-public/src/slackNango.js +208 -0
- package/dist-public/src/social/arxiv.d.ts +19 -0
- package/dist-public/src/social/arxiv.js +96 -0
- package/dist-public/src/social/github.d.ts +2 -0
- package/dist-public/src/social/github.js +78 -0
- package/dist-public/src/social/hackernews.d.ts +2 -0
- package/dist-public/src/social/hackernews.js +67 -0
- package/dist-public/src/social/index.d.ts +10 -0
- package/dist-public/src/social/index.js +79 -0
- package/dist-public/src/social/reddit.d.ts +2 -0
- package/dist-public/src/social/reddit.js +125 -0
- package/dist-public/src/social/types.d.ts +73 -0
- package/dist-public/src/social/types.js +61 -0
- package/dist-public/src/social/xml.d.ts +10 -0
- package/dist-public/src/social/xml.js +49 -0
- package/dist-public/src/social/youtube.d.ts +7 -0
- package/dist-public/src/social/youtube.js +217 -0
- package/dist-public/src/sourceIngress.d.ts +488 -0
- package/dist-public/src/sourceIngress.js +1651 -0
- package/dist-public/src/specAfter.d.ts +187 -0
- package/dist-public/src/specAfter.js +814 -0
- package/dist-public/src/specBudget.d.ts +124 -0
- package/dist-public/src/specBudget.js +424 -0
- package/dist-public/src/specDecisionSignals.d.ts +38 -0
- package/dist-public/src/specDecisionSignals.js +121 -0
- package/dist-public/src/specLinkedCommits.d.ts +7 -0
- package/dist-public/src/specLinkedCommits.js +107 -0
- package/dist-public/src/specSections.d.ts +105 -0
- package/dist-public/src/specSections.js +718 -0
- package/dist-public/src/statusGlyphs.d.ts +18 -0
- package/dist-public/src/statusGlyphs.js +75 -0
- package/dist-public/src/swarmCommand.d.ts +10 -0
- package/dist-public/src/swarmCommand.js +96 -0
- package/dist-public/src/teamsNango.d.ts +114 -0
- package/dist-public/src/teamsNango.js +301 -0
- package/dist-public/src/tokenStore.d.ts +10 -0
- package/dist-public/src/tokenStore.js +77 -0
- package/dist-public/src/trustEnvelope.d.ts +78 -0
- package/dist-public/src/trustEnvelope.js +392 -0
- package/dist-public/src/untrustedText.d.ts +6 -0
- package/dist-public/src/untrustedText.js +20 -0
- package/dist-public/src/updateNotice.d.ts +41 -0
- package/dist-public/src/updateNotice.js +290 -0
- package/dist-public/src/vendorYaml.d.ts +1 -0
- package/dist-public/src/vendorYaml.js +7374 -0
- package/dist-public/src/workflowRunActuals.d.ts +67 -0
- package/dist-public/src/workflowRunActuals.js +184 -0
- package/dist-public/src/zendeskDiscovery.d.ts +12 -0
- package/dist-public/src/zendeskDiscovery.js +513 -0
- package/dist-public/src/zendeskNango.d.ts +131 -0
- package/dist-public/src/zendeskNango.js +344 -0
- package/dist-public/src/zoomNango.d.ts +106 -0
- package/dist-public/src/zoomNango.js +351 -0
- package/docs/CHANGELOG.md +32 -0
- package/docs/THIRD_PARTY_NOTICES.md +36 -0
- package/package.json +71 -4
- package/schemas/bug-capsule-receipt.schema.json +54 -0
- package/schemas/bug-capsule.schema.json +189 -0
- package/schemas/discovery-evidence-envelope.schema.json +79 -0
- package/schemas/discovery-processing-receipt.schema.json +71 -0
- package/schemas/discovery-service-contract.schema.json +189 -0
- package/skills/AGENTS.md +32 -0
- package/skills/README.md +287 -0
- package/skills/bug/SKILL.md +49 -0
- package/skills/build-preview-spec/SKILL.md +103 -0
- package/skills/capture-external-artifact/SKILL.md +23 -0
- package/skills/capture-external-artifact/agents/openai.yaml +4 -0
- package/skills/capture-external-artifact/references/extractor-libraries.md +27 -0
- package/skills/check-spec-health/SKILL.md +45 -0
- package/skills/check-spec-health/agents/openai.yaml +4 -0
- package/skills/competitive-positioning/SKILL.md +86 -0
- package/skills/competitive-positioning/agents/openai.yaml +4 -0
- package/skills/cpo-lens/SKILL.md +398 -0
- package/skills/cpo-lens/agents/openai.yaml +4 -0
- package/skills/create-prd/SKILL.md +26 -0
- package/skills/create-prd/agents/openai.yaml +4 -0
- package/skills/customer-discovery/SKILL.md +192 -0
- package/skills/design-system/SKILL.md +49 -0
- package/skills/design-system/agents/openai.yaml +4 -0
- package/skills/discussion-guide/SKILL.md +75 -0
- package/skills/discussion-guide/agents/openai.yaml +4 -0
- package/skills/firecrawl-research-papers/SKILL.md +96 -0
- package/skills/firecrawl-research-papers/agents/openai.yaml +4 -0
- package/skills/foo-roast/SKILL.md +325 -0
- package/skills/generate-gtm-brief/SKILL.md +41 -0
- package/skills/generate-gtm-brief/agents/openai.yaml +4 -0
- package/skills/generate-gtm-brief/references/gtm-brief-template.md +56 -0
- package/skills/gong-quotes/SKILL.md +43 -0
- package/skills/gong-quotes/agents/openai.yaml +4 -0
- package/skills/grill-me/SKILL.md +27 -0
- package/skills/grill-me/agents/openai.yaml +4 -0
- package/skills/ideate/SKILL.md +180 -0
- package/skills/ideate/references/family-packs.md +5 -0
- package/skills/initiative-tracker/SKILL.md +23 -0
- package/skills/initiative-tracker/agents/openai.yaml +4 -0
- package/skills/interop-review/SKILL.md +25 -0
- package/skills/interop-review/agents/openai.yaml +4 -0
- package/skills/interview-me/SKILL.md +404 -0
- package/skills/interview-me/agents/openai.yaml +4 -0
- package/skills/loop-library-audit/SKILL.md +123 -0
- package/skills/pitch/SKILL.md +110 -0
- package/skills/pitch/references/opportunity-assessment.md +136 -0
- package/skills/pitch/references/prfaq-template.md +54 -0
- package/skills/pmm-release-briefing/SKILL.md +27 -0
- package/skills/pmm-release-briefing/agents/openai.yaml +4 -0
- package/skills/pmm-release-briefing/references/variant-generalized.md +16 -0
- package/skills/positioning-messaging/SKILL.md +70 -0
- package/skills/positioning-messaging/agents/openai.yaml +4 -0
- package/skills/positioning-messaging/references/guest-insights.md +1400 -0
- package/skills/preview-swarm/SKILL.md +418 -0
- package/skills/preview-swarm/agents/openai.yaml +4 -0
- package/skills/preview-swarm/references/html-effectiveness-build-previews.md +168 -0
- package/skills/product-copywriting/SKILL.md +127 -0
- package/skills/product-copywriting/agents/openai.yaml +4 -0
- package/skills/product-copywriting/references/foo-voice.md +26 -0
- package/skills/product-shape-interview/SKILL.md +219 -0
- package/skills/product-shape-interview/agents/openai.yaml +4 -0
- package/skills/ready-for-release/SKILL.md +39 -0
- package/skills/ready-for-release/agents/openai.yaml +4 -0
- package/skills/redact-transcripts/SKILL.md +23 -0
- package/skills/redact-transcripts/agents/openai.yaml +4 -0
- package/skills/research-brief/SKILL.md +48 -0
- package/skills/research-brief/agents/openai.yaml +4 -0
- package/skills/research-refresh/SKILL.md +63 -0
- package/skills/research-refresh/references/worked-cases.md +44 -0
- package/skills/review-loop/SKILL.md +200 -0
- package/skills/review-spec/SKILL.md +32 -0
- package/skills/review-spec/agents/openai.yaml +4 -0
- package/skills/rfc-from-research/SKILL.md +42 -0
- package/skills/rfc-from-research/agents/openai.yaml +4 -0
- package/skills/rfc-from-research/references/rfc-pattern.md +69 -0
- package/skills/skill-registry.yaml +810 -0
- package/skills/spec-cleanup/SKILL.md +103 -0
- package/skills/spec-cleanup/agents/openai.yaml +4 -0
- package/skills/spec-swarm/SKILL.md +87 -0
- package/skills/spec-swarm/agents/openai.yaml +4 -0
- package/skills/spec-swarm/template/SKILL.template.md +94 -0
- package/skills/spec-swarm/template/personas/accessibility-inclusion.md +40 -0
- package/skills/spec-swarm/template/personas/ai-technical-pm.md +69 -0
- package/skills/spec-swarm/template/personas/analytics-engineering.md +39 -0
- package/skills/spec-swarm/template/personas/applied-ai-eval.md +64 -0
- package/skills/spec-swarm/template/personas/business-gm-pm.md +67 -0
- package/skills/spec-swarm/template/personas/consumer-craft-pm.md +68 -0
- package/skills/spec-swarm/template/personas/content-design.md +40 -0
- package/skills/spec-swarm/template/personas/cpo.md +42 -0
- package/skills/spec-swarm/template/personas/data-science.md +42 -0
- package/skills/spec-swarm/template/personas/developer-experience.md +65 -0
- package/skills/spec-swarm/template/personas/dx-product.md +70 -0
- package/skills/spec-swarm/template/personas/field.md +43 -0
- package/skills/spec-swarm/template/personas/finance-cfo.md +40 -0
- package/skills/spec-swarm/template/personas/growth-pm.md +67 -0
- package/skills/spec-swarm/template/personas/platform-pm.md +67 -0
- package/skills/spec-swarm/template/personas/pmm.md +43 -0
- package/skills/spec-swarm/template/personas/principal-product-designer.md +42 -0
- package/skills/spec-swarm/template/personas/product-ops-program.md +41 -0
- package/skills/spec-swarm/template/personas/qa-release.md +41 -0
- package/skills/spec-swarm/template/personas/responsible-ai-safety.md +64 -0
- package/skills/spec-swarm/template/personas/security-privacy-legal.md +40 -0
- package/skills/spec-swarm/template/personas/strategy-competitive.md +41 -0
- package/skills/spec-swarm/template/personas/technical-architect.md +42 -0
- package/skills/spec-swarm/template/personas/technical-lead.md +43 -0
- package/skills/spec-swarm/template/personas/user-research.md +41 -0
- package/skills/spec-swarm-accessibility-inclusion/SKILL.md +95 -0
- package/skills/spec-swarm-accessibility-inclusion/agents/openai.yaml +4 -0
- package/skills/spec-swarm-ai-technical-pm/SKILL.md +124 -0
- package/skills/spec-swarm-analytics-engineering/SKILL.md +94 -0
- package/skills/spec-swarm-analytics-engineering/agents/openai.yaml +4 -0
- package/skills/spec-swarm-applied-ai-eval/SKILL.md +120 -0
- package/skills/spec-swarm-business-gm-pm/SKILL.md +122 -0
- package/skills/spec-swarm-consumer-craft-pm/SKILL.md +122 -0
- package/skills/spec-swarm-content-design/SKILL.md +95 -0
- package/skills/spec-swarm-content-design/agents/openai.yaml +4 -0
- package/skills/spec-swarm-cpo/SKILL.md +94 -0
- package/skills/spec-swarm-cpo/agents/openai.yaml +4 -0
- package/skills/spec-swarm-data-science/SKILL.md +95 -0
- package/skills/spec-swarm-data-science/agents/openai.yaml +4 -0
- package/skills/spec-swarm-developer-experience/SKILL.md +121 -0
- package/skills/spec-swarm-dx-product/SKILL.md +126 -0
- package/skills/spec-swarm-field/SKILL.md +96 -0
- package/skills/spec-swarm-field/agents/openai.yaml +4 -0
- package/skills/spec-swarm-finance-cfo/SKILL.md +95 -0
- package/skills/spec-swarm-finance-cfo/agents/openai.yaml +4 -0
- package/skills/spec-swarm-growth-pm/SKILL.md +122 -0
- package/skills/spec-swarm-platform-pm/SKILL.md +122 -0
- package/skills/spec-swarm-pmm/SKILL.md +96 -0
- package/skills/spec-swarm-pmm/agents/openai.yaml +4 -0
- package/skills/spec-swarm-principal-product-designer/SKILL.md +95 -0
- package/skills/spec-swarm-principal-product-designer/agents/openai.yaml +4 -0
- package/skills/spec-swarm-product-ops-program/SKILL.md +96 -0
- package/skills/spec-swarm-product-ops-program/agents/openai.yaml +4 -0
- package/skills/spec-swarm-qa-release/SKILL.md +96 -0
- package/skills/spec-swarm-qa-release/agents/openai.yaml +4 -0
- package/skills/spec-swarm-responsible-ai-safety/SKILL.md +120 -0
- package/skills/spec-swarm-security-privacy-legal/SKILL.md +95 -0
- package/skills/spec-swarm-security-privacy-legal/agents/openai.yaml +4 -0
- package/skills/spec-swarm-strategy-competitive/SKILL.md +96 -0
- package/skills/spec-swarm-strategy-competitive/agents/openai.yaml +4 -0
- package/skills/spec-swarm-technical-architect/SKILL.md +95 -0
- package/skills/spec-swarm-technical-architect/agents/openai.yaml +4 -0
- package/skills/spec-swarm-technical-lead/SKILL.md +96 -0
- package/skills/spec-swarm-technical-lead/agents/openai.yaml +4 -0
- package/skills/spec-swarm-user-research/SKILL.md +95 -0
- package/skills/spec-swarm-user-research/agents/openai.yaml +4 -0
- package/skills/strategy-check/SKILL.md +170 -0
- package/skills/strategy-check/agents/openai.yaml +4 -0
- package/skills/study-digest/SKILL.md +41 -0
- package/skills/synthetic-customer/SKILL.md +68 -0
- package/skills/update-cli-spec/SKILL.md +69 -0
- package/skills/update-cli-spec/agents/openai.yaml +4 -0
- package/skills/voc-researcher/SKILL.md +45 -0
- package/skills/voc-researcher/agents/openai.yaml +4 -0
- package/skills-lock.json +35 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Interview gate — route a real interview through `interview-me`, and let a single
|
|
2
|
+
// clarifying question through.
|
|
3
|
+
//
|
|
4
|
+
// Why this exists: the first version of this gate was an unconditional deny wired inline
|
|
5
|
+
// into `.claude/settings.json` — every AskUserQuestion in this repo was refused, always,
|
|
6
|
+
// with a message telling the agent to run `interview-me` instead. It fired on an agent
|
|
7
|
+
// that had found the three lines it was asked to edit and wanted to settle ONE thing
|
|
8
|
+
// before editing. There was nothing to interview about. The gate had matched the tool,
|
|
9
|
+
// not the behaviour.
|
|
10
|
+
//
|
|
11
|
+
// That is the same failure this repo already learned from twice in the research gate (B5):
|
|
12
|
+
// a gate that fires on the mention of a risk rather than the risk itself is one people
|
|
13
|
+
// learn to override on sight, and an override reached for on sight protects nothing. The
|
|
14
|
+
// repair is the same one: gate the BEHAVIOUR.
|
|
15
|
+
//
|
|
16
|
+
// An interview has a shape a clarification does not:
|
|
17
|
+
//
|
|
18
|
+
// THE BATCH. Several questions handed over at once is a questionnaire — the exact thing
|
|
19
|
+
// `interview-me` forbids ("ask one question at a time"). One question is a clarification.
|
|
20
|
+
//
|
|
21
|
+
// THE ACCRETION. Question after question after question IS an interview, however each
|
|
22
|
+
// one was phrased and whatever anyone called it. So the Nth ask in a few minutes trips
|
|
23
|
+
// the gate: one or two are a clarification and stay free; the third is a run.
|
|
24
|
+
//
|
|
25
|
+
// Both tells are structural. Neither reads the wording of the question, because a gate that
|
|
26
|
+
// guesses at phrasing loses to phrasing it did not guess — that is how the research gate was
|
|
27
|
+
// walked through, and it is not a mistake worth making a third time.
|
|
28
|
+
//
|
|
29
|
+
// The policy lives here, in foo, so any harness can enforce it. Harness configs carry only
|
|
30
|
+
// a thin shim (`.githooks/guard-interview.sh` -> `foo interview gate`).
|
|
31
|
+
//
|
|
32
|
+
// FAILS OPEN on any error. Escape hatch: FOO_ALLOW_VANILLA_INTERVIEW=1.
|
|
33
|
+
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
34
|
+
import path from "node:path";
|
|
35
|
+
/** Harnesses disagree on the name of the ask-the-human tool. Accept the ones that exist. */
|
|
36
|
+
const ASK_TOOLS = new Set(["askuserquestion", "ask_user_question", "askuser"]);
|
|
37
|
+
/** Asks older than this stop counting — a question this morning is not this conversation. */
|
|
38
|
+
const ASK_WINDOW_SECONDS = 600;
|
|
39
|
+
/** Single questions that stay free before the counter calls it an interview. */
|
|
40
|
+
const ASK_ALLOWANCE = 2;
|
|
41
|
+
const asksPath = (root) => path.join(root, ".foo", "interview-asks.json");
|
|
42
|
+
const windowMs = () => (Number(process.env.FOO_INTERVIEW_WINDOW_SECONDS ?? ASK_WINDOW_SECONDS) || ASK_WINDOW_SECONDS) * 1000;
|
|
43
|
+
const allowance = () => Number(process.env.FOO_INTERVIEW_ALLOWANCE ?? ASK_ALLOWANCE) || ASK_ALLOWANCE;
|
|
44
|
+
const recentAsks = (root, now) => {
|
|
45
|
+
const file = asksPath(root);
|
|
46
|
+
if (!existsSync(file))
|
|
47
|
+
return [];
|
|
48
|
+
try {
|
|
49
|
+
const raw = JSON.parse(readFileSync(file, "utf8"));
|
|
50
|
+
return (Array.isArray(raw.asks) ? raw.asks : [])
|
|
51
|
+
.map(Number)
|
|
52
|
+
.filter((t) => Number.isFinite(t) && now - t < windowMs());
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
// A corrupt counter must not deny anyone's question.
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
/** Record one question we let through. The accretion trip is only as good as its counter. */
|
|
60
|
+
export function recordInterviewAsk(root, now = Date.now()) {
|
|
61
|
+
const kept = recentAsks(root, now);
|
|
62
|
+
kept.push(now);
|
|
63
|
+
const file = asksPath(root);
|
|
64
|
+
mkdirSync(path.dirname(file), { recursive: true });
|
|
65
|
+
writeFileSync(file, `${JSON.stringify({ asks: kept }, null, 2)}\n`);
|
|
66
|
+
}
|
|
67
|
+
/** Cleared when a governed interview starts — a real one must not trip its own gate. */
|
|
68
|
+
export function clearInterviewAsks(root) {
|
|
69
|
+
const file = asksPath(root);
|
|
70
|
+
if (existsSync(file))
|
|
71
|
+
rmSync(file, { force: true });
|
|
72
|
+
}
|
|
73
|
+
/** Has the agent asked enough times that this is plainly an interview, unnamed? */
|
|
74
|
+
export function asksLookLikeInterview(root, now = Date.now()) {
|
|
75
|
+
return recentAsks(root, now).length >= allowance();
|
|
76
|
+
}
|
|
77
|
+
/** How many questions this call hands over at once. A batch is a questionnaire. */
|
|
78
|
+
export function questionCount(call) {
|
|
79
|
+
const questions = (call.tool_input ?? {}).questions;
|
|
80
|
+
return Array.isArray(questions) ? questions.length : 1;
|
|
81
|
+
}
|
|
82
|
+
export function evaluateInterviewGate(call, root, env = process.env, now = Date.now()) {
|
|
83
|
+
if (env.FOO_ALLOW_VANILLA_INTERVIEW)
|
|
84
|
+
return { allow: true, note: "override" };
|
|
85
|
+
const tool = (call.tool_name ?? "").trim().toLowerCase();
|
|
86
|
+
if (!ASK_TOOLS.has(tool))
|
|
87
|
+
return { allow: true, note: "not-an-ask" };
|
|
88
|
+
// The batch. Handing over several questions at once is the questionnaire shape, and it is
|
|
89
|
+
// the one thing interview-me names outright: ask one question at a time.
|
|
90
|
+
if (questionCount(call) > 1)
|
|
91
|
+
return { allow: false, reason: BATCH_REASON, note: "batch" };
|
|
92
|
+
// The accretion. Nobody called this an interview — and it is one. The agent has already
|
|
93
|
+
// asked its allowance of questions in the last few minutes and is reaching for another.
|
|
94
|
+
// One question is a clarification; this is a run.
|
|
95
|
+
if (asksLookLikeInterview(root, now))
|
|
96
|
+
return { allow: false, reason: ACCRETION_REASON, note: "accretion" };
|
|
97
|
+
// One question, asked once, to settle something the repo cannot answer. That is not an
|
|
98
|
+
// interview. It is the thing an agent should do more of, not less.
|
|
99
|
+
return { allow: true, note: "clarification" };
|
|
100
|
+
}
|
|
101
|
+
const HANDOFF = " bin/foo spec start <work-item> --request \"<the user's request>\"\n\n" +
|
|
102
|
+
"then run the interview-me skill (skills/interview-me/SKILL.md) with the Compound Engineering " +
|
|
103
|
+
"posture: repo-first discovery, explicit scope boundaries, task/validation traceability. Ask one " +
|
|
104
|
+
"question at a time as numbered text, highest-leverage question first, recommendation marked.";
|
|
105
|
+
// The user's line is not a shorter version of the agent's. It is a different sentence for a
|
|
106
|
+
// different reader: it says what took over and what happens next, in their words. It carries
|
|
107
|
+
// no path, no command and no env var, because none of those are theirs to run — the agent is
|
|
108
|
+
// about to run them. It does not apologise, and it does not read like a crash, because
|
|
109
|
+
// nothing broke: this is foo doing the one thing it is for.
|
|
110
|
+
const BATCH_REASON = {
|
|
111
|
+
user: "productfoo runs interviews — asking one question at a time instead of all at once.",
|
|
112
|
+
agent: "this is a questionnaire, not a question: you are handing over several questions at once. " +
|
|
113
|
+
"productfoo is installed, so an interview runs through foo:\n\n" +
|
|
114
|
+
HANDOFF +
|
|
115
|
+
"\n\nAsking one thing you genuinely cannot answer from the repo is fine and is not gated — ask it " +
|
|
116
|
+
"as a single question. Deliberately going around foo? Set FOO_ALLOW_VANILLA_INTERVIEW=1.",
|
|
117
|
+
};
|
|
118
|
+
const ACCRETION_REASON = {
|
|
119
|
+
user: "That's a few questions in a row — productfoo is taking the interview from here.",
|
|
120
|
+
agent: "nobody called this an interview, and it is one: you have already asked the user several questions " +
|
|
121
|
+
"in the last few minutes and are reaching for another. One question is a clarification; this is a " +
|
|
122
|
+
"run, and it goes through foo:\n\n" +
|
|
123
|
+
HANDOFF +
|
|
124
|
+
"\n\nThis fires on BEHAVIOUR, not on wording — a gate that reads phrasing loses to phrasing it did " +
|
|
125
|
+
"not anticipate. Deliberately going around foo? Set FOO_ALLOW_VANILLA_INTERVIEW=1.",
|
|
126
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Reading JSON off disk is one of productfoo's most repeated idioms — the same
|
|
2
|
+
// `JSON.parse(readFileSync(file, "utf8"))`, often wrapped in a try/catch that
|
|
3
|
+
// falls back to a default when the file is missing or corrupt. These two
|
|
4
|
+
// helpers name that idiom once so call sites read as intent, not plumbing.
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
// Read and parse a JSON file. Throws (ENOENT, or a SyntaxError on malformed
|
|
7
|
+
// content) exactly as the inlined `JSON.parse(readFileSync(...))` did — use
|
|
8
|
+
// this where the caller wants the failure to propagate.
|
|
9
|
+
export function readJson(file) {
|
|
10
|
+
return JSON.parse(readFileSync(file, "utf8"));
|
|
11
|
+
}
|
|
12
|
+
// Read and parse a JSON file, returning `fallback` if it is missing or its
|
|
13
|
+
// contents cannot be parsed. The no-throw counterpart for reads that must never
|
|
14
|
+
// break over an absent or corrupt file.
|
|
15
|
+
export function readJsonSafe(file, fallback) {
|
|
16
|
+
try {
|
|
17
|
+
return readJson(file);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return fallback;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { type ActiveModel } from "./activeModel.js";
|
|
2
|
+
export type BudgetUnit = "usd" | "tokens";
|
|
3
|
+
export type EstimateBasis = "heuristic" | "ledger" | "probed";
|
|
4
|
+
export type Confidence = "low" | "medium" | "high";
|
|
5
|
+
export type OnExceed = "ask" | "stop" | "checkpoint";
|
|
6
|
+
export type PerPassTokens = {
|
|
7
|
+
observe: number;
|
|
8
|
+
act: number;
|
|
9
|
+
verify: number;
|
|
10
|
+
};
|
|
11
|
+
export type ModelMix = {
|
|
12
|
+
worker: string;
|
|
13
|
+
verifier: string;
|
|
14
|
+
};
|
|
15
|
+
export type BudgetEstimate = {
|
|
16
|
+
expected: number;
|
|
17
|
+
ceiling: number;
|
|
18
|
+
basis: EstimateBasis;
|
|
19
|
+
confidence: Confidence;
|
|
20
|
+
per_pass_tokens: PerPassTokens;
|
|
21
|
+
model_mix: ModelMix;
|
|
22
|
+
priced_with: string;
|
|
23
|
+
};
|
|
24
|
+
export type BudgetAgreed = {
|
|
25
|
+
by: string;
|
|
26
|
+
at: string;
|
|
27
|
+
event: string;
|
|
28
|
+
};
|
|
29
|
+
export type BudgetBlock = {
|
|
30
|
+
unit: BudgetUnit;
|
|
31
|
+
limit: number;
|
|
32
|
+
estimate?: BudgetEstimate;
|
|
33
|
+
agreed?: BudgetAgreed;
|
|
34
|
+
max_iterations?: number;
|
|
35
|
+
no_progress_after?: number;
|
|
36
|
+
on_exceed?: OnExceed;
|
|
37
|
+
warn_at?: number;
|
|
38
|
+
};
|
|
39
|
+
export type ModelPrice = {
|
|
40
|
+
input_per_mtok: number;
|
|
41
|
+
output_per_mtok: number;
|
|
42
|
+
/**
|
|
43
|
+
* Assumed effective agent throughput (tokens/sec, incl. tool turns). Optional:
|
|
44
|
+
* a model with no declared rate yields NO time estimate rather than a made-up
|
|
45
|
+
* one. Labeled assumption, same status as build_passes (spec-budget-v0 R-008).
|
|
46
|
+
*/
|
|
47
|
+
tokens_per_sec?: number;
|
|
48
|
+
/** Model family (claude | gpt | gemini | glm …). Lets a surface ask whether
|
|
49
|
+
* foo default-denies autonomy on this model before offering it as an option. */
|
|
50
|
+
family?: string;
|
|
51
|
+
};
|
|
52
|
+
export type TokenUsage = {
|
|
53
|
+
fresh_input?: number;
|
|
54
|
+
cache_write?: number;
|
|
55
|
+
cache_read?: number;
|
|
56
|
+
output?: number;
|
|
57
|
+
};
|
|
58
|
+
export type PricingTable = {
|
|
59
|
+
source: string;
|
|
60
|
+
date: string;
|
|
61
|
+
staleAfterDays: number;
|
|
62
|
+
currency: string;
|
|
63
|
+
models: Record<string, ModelPrice>;
|
|
64
|
+
/**
|
|
65
|
+
* False when the table file is missing — dollar estimates degrade to
|
|
66
|
+
* token-only instead of throwing (model-roster-data-v0 R-002). Absent means
|
|
67
|
+
* available (so hand-built fixtures stay valid).
|
|
68
|
+
*/
|
|
69
|
+
available?: boolean;
|
|
70
|
+
/** Worded degradation findings carried into every estimate priced on this table. */
|
|
71
|
+
findings?: string[];
|
|
72
|
+
};
|
|
73
|
+
export declare function parseBudget(raw: unknown, label: string): BudgetBlock;
|
|
74
|
+
export declare function loadPricing(root: string): PricingTable;
|
|
75
|
+
export declare function pricedWith(table: PricingTable): string;
|
|
76
|
+
/** Convert observed token categories with one model's declared dated rates. */
|
|
77
|
+
export declare function priceTokenUsage(table: PricingTable, model: string, usage: TokenUsage): {
|
|
78
|
+
usd: number;
|
|
79
|
+
priced_with: string;
|
|
80
|
+
} | null;
|
|
81
|
+
export declare function pricingAgeDays(table: PricingTable, now?: Date): number;
|
|
82
|
+
export declare function pricingIsStale(table: PricingTable, now?: Date): boolean;
|
|
83
|
+
export type MeasureMethod = "count_tokens" | "structural" | "structural_egress_gated";
|
|
84
|
+
/**
|
|
85
|
+
* `external` = the source is not a local file (a URL, a leaderboard, "arXiv cs.SE").
|
|
86
|
+
* Its size CANNOT be measured offline, so it is priced with a conservative floor
|
|
87
|
+
* rather than counted as zero — see EXTERNAL_SOURCE_TOKENS.
|
|
88
|
+
*/
|
|
89
|
+
export type SourceMeasurement = {
|
|
90
|
+
source: string;
|
|
91
|
+
found: boolean;
|
|
92
|
+
tokens: number;
|
|
93
|
+
external?: boolean;
|
|
94
|
+
};
|
|
95
|
+
export type MeasuredSources = {
|
|
96
|
+
total: number;
|
|
97
|
+
measured: SourceMeasurement[];
|
|
98
|
+
method: MeasureMethod;
|
|
99
|
+
};
|
|
100
|
+
export declare function structuralTokens(text: string): number;
|
|
101
|
+
export declare function measureSources(packetDir: string, sources: string[]): {
|
|
102
|
+
total: number;
|
|
103
|
+
measured: SourceMeasurement[];
|
|
104
|
+
};
|
|
105
|
+
/** Does this measurement contain a source whose size we could not actually determine? */
|
|
106
|
+
export declare function hasExternalSources(measured: SourceMeasurement[]): boolean;
|
|
107
|
+
export declare function countTokensViaApi(model: string, text: string, apiKey: string, url?: string): Promise<number>;
|
|
108
|
+
export declare function isLocalOnly(repoCwd: string, source: string, sourcePath: string): boolean;
|
|
109
|
+
export declare function guardSourceForEgress(text: string, localOnly: boolean): {
|
|
110
|
+
egress: false;
|
|
111
|
+
reason: string;
|
|
112
|
+
} | {
|
|
113
|
+
egress: true;
|
|
114
|
+
text: string;
|
|
115
|
+
};
|
|
116
|
+
export declare function measureSourcesCounted(packetDir: string, sources: string[], opts: {
|
|
117
|
+
model: string;
|
|
118
|
+
apiKey?: string;
|
|
119
|
+
preferApi: boolean;
|
|
120
|
+
countTokensUrl?: string;
|
|
121
|
+
routedNonNative?: boolean;
|
|
122
|
+
}): Promise<MeasuredSources>;
|
|
123
|
+
export type EstimateResult = {
|
|
124
|
+
unit: BudgetUnit;
|
|
125
|
+
usd: {
|
|
126
|
+
expected: number;
|
|
127
|
+
ceiling: number;
|
|
128
|
+
};
|
|
129
|
+
tokens: {
|
|
130
|
+
expected: number;
|
|
131
|
+
ceiling: number;
|
|
132
|
+
};
|
|
133
|
+
expected_iterations: number;
|
|
134
|
+
ceiling_iterations: number;
|
|
135
|
+
per_pass_tokens: PerPassTokens;
|
|
136
|
+
model_mix: ModelMix;
|
|
137
|
+
model_provenance: {
|
|
138
|
+
provider: string;
|
|
139
|
+
family: string;
|
|
140
|
+
confidence: "confirmed" | "assumed";
|
|
141
|
+
};
|
|
142
|
+
basis: EstimateBasis;
|
|
143
|
+
confidence: Confidence;
|
|
144
|
+
priced_with: string;
|
|
145
|
+
measured: SourceMeasurement[];
|
|
146
|
+
measured_method: MeasureMethod;
|
|
147
|
+
stale: boolean;
|
|
148
|
+
stale_age_days: number;
|
|
149
|
+
/**
|
|
150
|
+
* False when dollars could not be priced (missing pricing data or an unknown
|
|
151
|
+
* model): the usd range is zeroed and MUST NOT be trusted — token numbers are
|
|
152
|
+
* the estimate (model-roster-data-v0 R-002/R-003). Fail-closed consumers
|
|
153
|
+
* (loop check auto-approval) treat unpriced as at/above the handshake floor.
|
|
154
|
+
*/
|
|
155
|
+
priced: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* True when at least one observation source could not be sized offline (the web).
|
|
158
|
+
* The token and dollar ranges below then rest on an UNKNOWN and must not be shown
|
|
159
|
+
* as a prediction — no fabricated "expected .. ceiling". A human may still
|
|
160
|
+
* authorise the loop, but by setting an explicit spend cap, not by agreeing to a
|
|
161
|
+
* number foo invented.
|
|
162
|
+
*/
|
|
163
|
+
unmeasurable: boolean;
|
|
164
|
+
/** Worded degradation/unknown-model findings. Always worded; a field in --json; glyphs are the caller's job. */
|
|
165
|
+
findings: string[];
|
|
166
|
+
};
|
|
167
|
+
export declare function estimateLoopBudget(args: {
|
|
168
|
+
packetDir: string;
|
|
169
|
+
sources: string[];
|
|
170
|
+
pricing: PricingTable;
|
|
171
|
+
unit?: BudgetUnit;
|
|
172
|
+
budget?: BudgetBlock;
|
|
173
|
+
now?: Date;
|
|
174
|
+
measured?: MeasuredSources;
|
|
175
|
+
active?: ActiveModel;
|
|
176
|
+
}): EstimateResult;
|
|
177
|
+
export declare function buildAgreedBudget(result: EstimateResult, opts: {
|
|
178
|
+
by: string;
|
|
179
|
+
at: string;
|
|
180
|
+
limit?: number;
|
|
181
|
+
}): BudgetBlock;
|
|
182
|
+
export declare function handshakeFloorUsd(): number;
|