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,7 @@
|
|
|
1
|
+
export declare function hasFlag(args: string[], flag: string): boolean;
|
|
2
|
+
export declare function flagValue(args: string[], flag: string): string | undefined;
|
|
3
|
+
export type FlagSpec = {
|
|
4
|
+
value?: readonly string[];
|
|
5
|
+
boolean?: readonly string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function surplusArgs(args: string[], spec: FlagSpec): string[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// argv parsing foo repeats everywhere: a boolean `--flag`, and a `--flag value`
|
|
2
|
+
// whose value is the token immediately after it. Every command module reached
|
|
3
|
+
// for its own `args.indexOf("--flag")` / `args[idx + 1]` inline (and one even
|
|
4
|
+
// re-declared a private `flag` helper); these name the idiom once so call sites
|
|
5
|
+
// read as intent.
|
|
6
|
+
// Is a bare boolean flag present?
|
|
7
|
+
export function hasFlag(args, flag) {
|
|
8
|
+
return args.includes(flag);
|
|
9
|
+
}
|
|
10
|
+
// The token immediately after `flag`, or undefined when the flag is absent (or
|
|
11
|
+
// is the last token with no value following it).
|
|
12
|
+
export function flagValue(args, flag) {
|
|
13
|
+
const index = args.indexOf(flag);
|
|
14
|
+
if (index === -1)
|
|
15
|
+
return undefined;
|
|
16
|
+
return args[index + 1];
|
|
17
|
+
}
|
|
18
|
+
// The tokens nobody consumed.
|
|
19
|
+
//
|
|
20
|
+
// `flagValue` reads by `indexOf`, so it can answer "what came after --summary?"
|
|
21
|
+
// but never "was there a token here I didn't look at?" — and that blind spot is
|
|
22
|
+
// how `foo asp event <packet> <type> <summary>` silently dropped the summary and
|
|
23
|
+
// committed `data: {}` to an append-only ledger (alpha_tester_fixes_v0 R-001).
|
|
24
|
+
// A command that writes something it cannot take back must be able to see what
|
|
25
|
+
// it did not read, so it can refuse instead of guess.
|
|
26
|
+
//
|
|
27
|
+
// A bare word in the result is a positional the caller meant as an argument; a
|
|
28
|
+
// `--x` in the result is a flag this command does not have. Both are surplus.
|
|
29
|
+
export function surplusArgs(args, spec) {
|
|
30
|
+
const valueFlags = new Set(spec.value ?? []);
|
|
31
|
+
const booleanFlags = new Set(spec.boolean ?? []);
|
|
32
|
+
const surplus = [];
|
|
33
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
34
|
+
const token = args[index];
|
|
35
|
+
if (valueFlags.has(token)) {
|
|
36
|
+
index += 1; // the next token belongs to this flag, whatever it looks like
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (booleanFlags.has(token))
|
|
40
|
+
continue;
|
|
41
|
+
surplus.push(token);
|
|
42
|
+
}
|
|
43
|
+
return surplus;
|
|
44
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type StoryProvenance = "structural-diff" | "agent-inference" | "repo-truth";
|
|
2
|
+
export type ChangeKind = "added" | "modified" | "removed";
|
|
3
|
+
export interface BehaviorStory {
|
|
4
|
+
id: string;
|
|
5
|
+
file: string;
|
|
6
|
+
change_kind: ChangeKind;
|
|
7
|
+
title: string;
|
|
8
|
+
/** The code-derived expectation: what the changed code does. Self-reported. */
|
|
9
|
+
expected_behavior: string;
|
|
10
|
+
/** Concrete code evidence (declaration names) behind the story. */
|
|
11
|
+
evidence: string[];
|
|
12
|
+
added_symbols: string[];
|
|
13
|
+
removed_symbols: string[];
|
|
14
|
+
added_lines: number;
|
|
15
|
+
removed_lines: number;
|
|
16
|
+
provenance: StoryProvenance;
|
|
17
|
+
/** Code-derived expectations are non-authoritative over intent; always true here. */
|
|
18
|
+
self_reported: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SkippedFile {
|
|
21
|
+
file: string;
|
|
22
|
+
reason: string;
|
|
23
|
+
}
|
|
24
|
+
/** R-007: enumeration coverage is reported so a missed feature is a visible gap. */
|
|
25
|
+
export interface ExtractionCoverage {
|
|
26
|
+
scanned_files: number;
|
|
27
|
+
story_files: number;
|
|
28
|
+
stories: number;
|
|
29
|
+
basis: string;
|
|
30
|
+
skipped: SkippedFile[];
|
|
31
|
+
}
|
|
32
|
+
export interface CatalogResult {
|
|
33
|
+
stories: BehaviorStory[];
|
|
34
|
+
coverage: ExtractionCoverage;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Extract one code-derived behavior story per changed source file from a unified
|
|
38
|
+
* diff. Pure and deterministic. Binary and lockfile/generated paths are skipped
|
|
39
|
+
* and listed in coverage (R-007) rather than silently dropped. Never gates.
|
|
40
|
+
*/
|
|
41
|
+
export declare function extractBehaviorStories(diff: string): CatalogResult;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// code-catalog-rip-v0 engine, promoted to an importable module so spec-after
|
|
2
|
+
// can consume it (spec-after-capture-v0 R-003: import the behavior extractor,
|
|
3
|
+
// never fork it — one owner per behavior). Deterministic code->behavior-story
|
|
4
|
+
// extraction from a unified diff.
|
|
5
|
+
//
|
|
6
|
+
// The stories are CODE-DERIVED expectations: tagged `self_reported`, provenance
|
|
7
|
+
// no stronger than the extraction method, and NEVER gating. Code is evidence of
|
|
8
|
+
// behavior, never authority over intent (catalog R-003/R-005). This module reads
|
|
9
|
+
// text only; it never runs a test, applies a fix, or invokes a runner (R-005).
|
|
10
|
+
//
|
|
11
|
+
// V0a uses the deterministic `structural-diff` extractor below. V0b can swap in
|
|
12
|
+
// an LLM-backed extractor that emits the same `BehaviorStory` shape with
|
|
13
|
+
// provenance `agent-inference` — the type is the contract, the extractor is a
|
|
14
|
+
// slope-riding adapter (spec-after R-010).
|
|
15
|
+
const LOCKFILES = new Set([
|
|
16
|
+
"package-lock.json",
|
|
17
|
+
"npm-shrinkwrap.json",
|
|
18
|
+
"yarn.lock",
|
|
19
|
+
"pnpm-lock.yaml",
|
|
20
|
+
"Cargo.lock",
|
|
21
|
+
"poetry.lock",
|
|
22
|
+
"composer.lock",
|
|
23
|
+
"Gemfile.lock",
|
|
24
|
+
"go.sum",
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* productfoo's own bookkeeping — error reports, run caches, event logs it writes into the user's repo.
|
|
28
|
+
*
|
|
29
|
+
* These must never appear as a drift finding. A real run reported `added .foo/reports/err_*.json`
|
|
30
|
+
* as "built but never asked for": foo wrote the file, then told the user they had built something
|
|
31
|
+
* they never asked for. That is the tool littering someone's repo and then billing them for it —
|
|
32
|
+
* and it is the same complaint an alpha tester already filed about files appearing in her checkout.
|
|
33
|
+
*/
|
|
34
|
+
function isFooArtifact(file) {
|
|
35
|
+
return /(^|\/)\.foo\//.test(file);
|
|
36
|
+
}
|
|
37
|
+
function isGeneratedPath(file) {
|
|
38
|
+
const base = file.split("/").pop() ?? file;
|
|
39
|
+
if (isFooArtifact(file))
|
|
40
|
+
return true;
|
|
41
|
+
if (LOCKFILES.has(base))
|
|
42
|
+
return true;
|
|
43
|
+
return /\.(min\.js|map|snap)$/.test(base);
|
|
44
|
+
}
|
|
45
|
+
// Deterministic declaration detection on added/removed lines. Intentionally
|
|
46
|
+
// conservative: it names symbols, it does not claim to understand them. Exported
|
|
47
|
+
// declarations count at any depth; bare (non-exported) declarations only count
|
|
48
|
+
// at top level so nested locals (loop vars, helpers' internals) stay out of the
|
|
49
|
+
// story.
|
|
50
|
+
const DECL_PATTERNS = [
|
|
51
|
+
{ re: /\bexport\s+(?:default\s+)?(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/, exported: true },
|
|
52
|
+
{ re: /\bexport\s+(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/, exported: true },
|
|
53
|
+
{ re: /\bexport\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)/, exported: true },
|
|
54
|
+
{ re: /\bexport\s+(?:interface|type|enum)\s+([A-Za-z_$][\w$]*)/, exported: true },
|
|
55
|
+
{ re: /\b(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/, exported: false },
|
|
56
|
+
{ re: /\bclass\s+([A-Za-z_$][\w$]*)/, exported: false },
|
|
57
|
+
{ re: /\b(?:const|let)\s+([A-Za-z_$][\w$]*)\s*=/, exported: false },
|
|
58
|
+
{ re: /\bdef\s+([A-Za-z_$][\w$]*)/, exported: false },
|
|
59
|
+
];
|
|
60
|
+
function symbolsFrom(lines) {
|
|
61
|
+
const found = new Set();
|
|
62
|
+
for (const line of lines) {
|
|
63
|
+
const topLevel = /^\S/.test(line);
|
|
64
|
+
for (const { re, exported } of DECL_PATTERNS) {
|
|
65
|
+
if (!exported && !topLevel)
|
|
66
|
+
continue;
|
|
67
|
+
const m = re.exec(line);
|
|
68
|
+
if (m && m[1])
|
|
69
|
+
found.add(m[1]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return [...found];
|
|
73
|
+
}
|
|
74
|
+
function splitFileSections(diff) {
|
|
75
|
+
const sections = [];
|
|
76
|
+
let current = null;
|
|
77
|
+
for (const line of diff.split(/\r?\n/)) {
|
|
78
|
+
if (line.startsWith("diff --git ")) {
|
|
79
|
+
if (current)
|
|
80
|
+
sections.push(current);
|
|
81
|
+
current = { header: line, body: [] };
|
|
82
|
+
}
|
|
83
|
+
else if (current) {
|
|
84
|
+
current.body.push(line);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (current)
|
|
88
|
+
sections.push(current);
|
|
89
|
+
return sections;
|
|
90
|
+
}
|
|
91
|
+
function pathFromSection(header, body) {
|
|
92
|
+
let plus;
|
|
93
|
+
let minus;
|
|
94
|
+
for (const line of body) {
|
|
95
|
+
if (line.startsWith("+++ "))
|
|
96
|
+
plus = line.slice(4).trim();
|
|
97
|
+
else if (line.startsWith("--- "))
|
|
98
|
+
minus = line.slice(4).trim();
|
|
99
|
+
}
|
|
100
|
+
const pick = (value) => value && value !== "/dev/null" ? value.replace(/^[ab]\//, "") : undefined;
|
|
101
|
+
const fromHeader = /a\/(.+) b\/(.+)$/.exec(header);
|
|
102
|
+
return pick(plus) ?? pick(minus) ?? fromHeader?.[2] ?? header.replace("diff --git ", "");
|
|
103
|
+
}
|
|
104
|
+
function changeKind(body) {
|
|
105
|
+
for (const line of body) {
|
|
106
|
+
if (line.startsWith("new file mode"))
|
|
107
|
+
return "added";
|
|
108
|
+
if (line.startsWith("deleted file mode"))
|
|
109
|
+
return "removed";
|
|
110
|
+
}
|
|
111
|
+
return "modified";
|
|
112
|
+
}
|
|
113
|
+
function isBinary(body) {
|
|
114
|
+
return body.some((line) => line.startsWith("Binary files ") || line.startsWith("GIT binary patch"));
|
|
115
|
+
}
|
|
116
|
+
function buildTitle(kind, file, added) {
|
|
117
|
+
if (!added.length)
|
|
118
|
+
return `${kind} ${file}`;
|
|
119
|
+
const head = added.slice(0, 3).join(", ");
|
|
120
|
+
return `${kind} ${file} (+${head}${added.length > 3 ? ", …" : ""})`;
|
|
121
|
+
}
|
|
122
|
+
function listSymbols(symbols, max = 8) {
|
|
123
|
+
const shown = symbols.slice(0, max).map((s) => `\`${s}\``).join(", ");
|
|
124
|
+
return symbols.length > max ? `${shown}, +${symbols.length - max} more` : shown;
|
|
125
|
+
}
|
|
126
|
+
function buildExpectedBehavior(kind, file, added, removed, addedLines, removedLines) {
|
|
127
|
+
const parts = [];
|
|
128
|
+
if (kind === "added")
|
|
129
|
+
parts.push(`New file \`${file}\` (+${addedLines})`);
|
|
130
|
+
else if (kind === "removed")
|
|
131
|
+
parts.push(`Removes \`${file}\` (-${removedLines})`);
|
|
132
|
+
else
|
|
133
|
+
parts.push(`Modifies \`${file}\` (+${addedLines}/-${removedLines})`);
|
|
134
|
+
if (added.length)
|
|
135
|
+
parts.push(`adds ${listSymbols(added)}`);
|
|
136
|
+
if (removed.length)
|
|
137
|
+
parts.push(`removes ${listSymbols(removed)}`);
|
|
138
|
+
return `${parts.join("; ")}.`;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Extract one code-derived behavior story per changed source file from a unified
|
|
142
|
+
* diff. Pure and deterministic. Binary and lockfile/generated paths are skipped
|
|
143
|
+
* and listed in coverage (R-007) rather than silently dropped. Never gates.
|
|
144
|
+
*/
|
|
145
|
+
export function extractBehaviorStories(diff) {
|
|
146
|
+
const sections = splitFileSections(diff);
|
|
147
|
+
const stories = [];
|
|
148
|
+
const skipped = [];
|
|
149
|
+
let seq = 0;
|
|
150
|
+
for (const section of sections) {
|
|
151
|
+
const file = pathFromSection(section.header, section.body);
|
|
152
|
+
// productfoo's own bookkeeping is dropped outright, not "skipped". The skipped list exists so no
|
|
153
|
+
// file of YOURS is silently ignored (R-007) — but these are not your files, they are productfoo's,
|
|
154
|
+
// and reporting them back to you is the tool making its own litter your problem.
|
|
155
|
+
if (isFooArtifact(file))
|
|
156
|
+
continue;
|
|
157
|
+
if (isBinary(section.body)) {
|
|
158
|
+
skipped.push({ file, reason: "binary" });
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (isGeneratedPath(file)) {
|
|
162
|
+
skipped.push({ file, reason: "generated/lockfile" });
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
const added = section.body.filter((line) => line.startsWith("+") && !line.startsWith("+++"));
|
|
166
|
+
const removed = section.body.filter((line) => line.startsWith("-") && !line.startsWith("---"));
|
|
167
|
+
const addedSymbols = symbolsFrom(added.map((line) => line.slice(1)));
|
|
168
|
+
const removedSymbols = symbolsFrom(removed.map((line) => line.slice(1))).filter((symbol) => !addedSymbols.includes(symbol));
|
|
169
|
+
const kind = changeKind(section.body);
|
|
170
|
+
seq += 1;
|
|
171
|
+
stories.push({
|
|
172
|
+
id: `bs-${String(seq).padStart(3, "0")}`,
|
|
173
|
+
file,
|
|
174
|
+
change_kind: kind,
|
|
175
|
+
title: buildTitle(kind, file, addedSymbols),
|
|
176
|
+
expected_behavior: buildExpectedBehavior(kind, file, addedSymbols, removedSymbols, added.length, removed.length),
|
|
177
|
+
evidence: [...addedSymbols.map((s) => `+${s}`), ...removedSymbols.map((s) => `-${s}`)].slice(0, 12),
|
|
178
|
+
added_symbols: addedSymbols,
|
|
179
|
+
removed_symbols: removedSymbols,
|
|
180
|
+
added_lines: added.length,
|
|
181
|
+
removed_lines: removed.length,
|
|
182
|
+
provenance: "structural-diff",
|
|
183
|
+
self_reported: true,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
stories,
|
|
188
|
+
coverage: {
|
|
189
|
+
scanned_files: sections.length,
|
|
190
|
+
story_files: stories.length,
|
|
191
|
+
stories: stories.length,
|
|
192
|
+
basis: "unified diff: one behavior story per changed source file; symbols via declaration regex. " +
|
|
193
|
+
"Code-derived and self-reported (catalog R-001/R-003); binary and lockfile/generated paths skipped and listed.",
|
|
194
|
+
skipped,
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare const COMMAND_CONTRACT_SCHEMA_VERSION = "0.1";
|
|
2
|
+
export interface FooCommandContract {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
/** Human argument hint; empty string when the command takes no arguments. */
|
|
7
|
+
argument_hint: string;
|
|
8
|
+
/** Repo-relative path to the reviewed human-readable command doc (R-002). */
|
|
9
|
+
docs_path: string;
|
|
10
|
+
/** Runtime-safe invocation shape: what a thin launcher actually calls (R-003). */
|
|
11
|
+
invocation: string;
|
|
12
|
+
/**
|
|
13
|
+
* What the launcher tells the agent to ask for when the user typed the
|
|
14
|
+
* command bare. The one instruction that cannot move into the handoff: the
|
|
15
|
+
* command has nothing to run on until it is answered. Empty for commands that
|
|
16
|
+
* take no argument.
|
|
17
|
+
*/
|
|
18
|
+
missing_argument_ask: string;
|
|
19
|
+
/**
|
|
20
|
+
* How the agent must run the command AFTER invoking it. These normally ship
|
|
21
|
+
* in the CLI's handoff output rather than the launcher
|
|
22
|
+
* (thin-harness-launchers-v0):
|
|
23
|
+
* a harness that renders an expanded command — OpenCode, Cursor, Codex —
|
|
24
|
+
* publishes the launcher verbatim into the user's chat, so anything living
|
|
25
|
+
* there is productfoo's machinery on display. Handoff text arrives as tool output
|
|
26
|
+
* the harness collapses, and it ships with the CLI, so a wording fix reaches
|
|
27
|
+
* every user on upgrade instead of only those who rerun `foo agent setup`.
|
|
28
|
+
*
|
|
29
|
+
* The bug launcher is the narrow exception: agent-safe collection uses
|
|
30
|
+
* `--json`, which intentionally emits no handoff, and its consent boundary
|
|
31
|
+
* governs later show/send calls. Its same contract-owned steps are therefore
|
|
32
|
+
* rendered into every launcher and descriptor rather than copied elsewhere.
|
|
33
|
+
*
|
|
34
|
+
* Write these as instructions to the agent holding the runtime contract.
|
|
35
|
+
*/
|
|
36
|
+
agent_steps: readonly string[];
|
|
37
|
+
}
|
|
38
|
+
export declare const COMMAND_HANDOFF_ALWAYS: readonly string[];
|
|
39
|
+
export declare const FOO_COMMAND_CONTRACT: readonly FooCommandContract[];
|
|
40
|
+
export declare function listCommandContract(): {
|
|
41
|
+
schema_version: string;
|
|
42
|
+
commands: readonly FooCommandContract[];
|
|
43
|
+
};
|
|
44
|
+
export declare function showCommandContract(id: string): FooCommandContract;
|
|
45
|
+
export interface CommandDocDrift {
|
|
46
|
+
id: string;
|
|
47
|
+
field: "doc" | "description" | "argument_hint" | "contract" | "agent_step";
|
|
48
|
+
contract: string | null;
|
|
49
|
+
doc: string | null;
|
|
50
|
+
}
|
|
51
|
+
export declare function validateCommandDocs(root: string): {
|
|
52
|
+
ok: boolean;
|
|
53
|
+
drift: CommandDocDrift[];
|
|
54
|
+
};
|
|
55
|
+
export interface LauncherDrift {
|
|
56
|
+
file: string;
|
|
57
|
+
id: string;
|
|
58
|
+
field: "description" | "argument_hint";
|
|
59
|
+
contract: string;
|
|
60
|
+
launcher: string | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Compare committed, foo-managed launcher files against the contract.
|
|
64
|
+
* `files` are repo-relative paths (typically `git ls-files`); anything that is
|
|
65
|
+
* not a foo-managed launcher is ignored, so passing the whole tracked list is fine.
|
|
66
|
+
*/
|
|
67
|
+
export declare function validateCommittedLaunchers(root: string, files: readonly string[]): {
|
|
68
|
+
ok: boolean;
|
|
69
|
+
drift: LauncherDrift[];
|
|
70
|
+
};
|
|
71
|
+
export declare function renderCommandHandoff(entry: FooCommandContract, extraSteps?: readonly string[]): string;
|
|
72
|
+
export declare function harnessMarkerPresent(env: NodeJS.ProcessEnv): boolean;
|
|
73
|
+
export declare function handoffEnabled(io: {
|
|
74
|
+
isTTY: boolean;
|
|
75
|
+
env: NodeJS.ProcessEnv;
|
|
76
|
+
}): boolean;
|
|
77
|
+
export declare function withCommandHandoff(id: string, output: string, args: readonly string[], extraSteps?: readonly string[], io?: {
|
|
78
|
+
isTTY: boolean;
|
|
79
|
+
env: NodeJS.ProcessEnv;
|
|
80
|
+
}): string;
|
|
81
|
+
export declare const FOO_COMMAND_MARKER = "<!-- foo-managed-command:";
|
|
82
|
+
export declare function renderLauncher(entry: FooCommandContract, opts?: {
|
|
83
|
+
grokFooFirst?: boolean;
|
|
84
|
+
}): string;
|