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,237 @@
|
|
|
1
|
+
// Deterministic coverage and consistency checks, not a factual truth oracle.
|
|
2
|
+
// The harness performs the research/critique; productfoo keeps unknowns visible and
|
|
3
|
+
// prevents refuted premises from silently returning in a polished decision.
|
|
4
|
+
import { ideateContractVersion, ideateFrontmatter, parseIdeaObjects } from "./diversity.js";
|
|
5
|
+
import { renderOrchestrationResult } from "../orchestrationResult.js";
|
|
6
|
+
export const DECISION_CONTRACT = "decisions-v2";
|
|
7
|
+
const object = (v) => Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
8
|
+
const text = (v) => typeof v === "string" && v.trim().length > 0 && !/^(TODO|null)$/i.test(v.trim());
|
|
9
|
+
const strings = (v) => Array.isArray(v) && v.every(text);
|
|
10
|
+
const normalized = (v) => v.trim().replace(/\s+/g, " ").toLowerCase();
|
|
11
|
+
export function hasDecisionContract(record) {
|
|
12
|
+
return ideateContractVersion(record) === DECISION_CONTRACT;
|
|
13
|
+
}
|
|
14
|
+
function block(record, name, errors) {
|
|
15
|
+
const matches = [...record.matchAll(new RegExp("^```json " + name + "\\s*\\r?\\n([\\s\\S]*?)^```[ \\t]*$", "gm"))];
|
|
16
|
+
if (matches.length !== 1) {
|
|
17
|
+
errors.push(`store exactly one json ${name} block (found ${matches.length})`);
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const value = JSON.parse(matches[0][1]);
|
|
22
|
+
if (object(value))
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
catch { /* The field name is sufficient; never echo arbitrary source text. */ }
|
|
26
|
+
errors.push(`${name} must be a JSON object`);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
function fields(value, names, label, errors) {
|
|
30
|
+
for (const name of names)
|
|
31
|
+
if (!text(value[name]))
|
|
32
|
+
errors.push(`${label}.${name} must contain text`);
|
|
33
|
+
}
|
|
34
|
+
function readFalsification(record, errors) {
|
|
35
|
+
const value = block(record, "falsification", errors);
|
|
36
|
+
if (!value)
|
|
37
|
+
return null;
|
|
38
|
+
const start = errors.length;
|
|
39
|
+
if (!Array.isArray(value.claims))
|
|
40
|
+
errors.push("falsification.claims must be an array");
|
|
41
|
+
else
|
|
42
|
+
for (const [index, entry] of value.claims.entries()) {
|
|
43
|
+
const at = `falsification.claims[${index}]`;
|
|
44
|
+
if (!object(entry)) {
|
|
45
|
+
errors.push(`${at} must be an object`);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
fields(entry, ["claim", "consequence"], at, errors);
|
|
49
|
+
if (typeof entry.verdict !== "string" || !["supported", "refuted", "unknown"].includes(entry.verdict))
|
|
50
|
+
errors.push(`${at}.verdict must be supported, refuted, or unknown`);
|
|
51
|
+
if (!Array.isArray(entry.evidence))
|
|
52
|
+
errors.push(`${at}.evidence must be an array`);
|
|
53
|
+
else {
|
|
54
|
+
if (entry.verdict !== "unknown" && entry.evidence.length === 0)
|
|
55
|
+
errors.push(`${at}: ${entry.verdict} requires a cited observation`);
|
|
56
|
+
for (const observation of entry.evidence) {
|
|
57
|
+
if (!object(observation))
|
|
58
|
+
errors.push(`${at}.evidence must contain source/observation objects`);
|
|
59
|
+
else
|
|
60
|
+
fields(observation, ["source", "observation"], `${at}.evidence`, errors);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!strings(value.excluded_ideas))
|
|
65
|
+
errors.push("falsification.excluded_ideas must be an array of idea IDs");
|
|
66
|
+
return errors.length === start ? value : null;
|
|
67
|
+
}
|
|
68
|
+
export function checkFalsification(record) {
|
|
69
|
+
if (!hasDecisionContract(record))
|
|
70
|
+
return ["early falsification requires a decisions-v2 record; older records cannot prove this check"];
|
|
71
|
+
const errors = [];
|
|
72
|
+
if ([...record.matchAll(/```json ideas\s*\n/g)].length !== 1)
|
|
73
|
+
errors.push("store exactly one json ideas block before checking claims");
|
|
74
|
+
const review = readFalsification(record, errors);
|
|
75
|
+
const parsed = parseIdeaObjects(record);
|
|
76
|
+
if (!parsed.present || !parsed.ideas.length)
|
|
77
|
+
errors.push("store the idea pool before checking its claims");
|
|
78
|
+
errors.push(...parsed.errors);
|
|
79
|
+
if (!review)
|
|
80
|
+
return errors;
|
|
81
|
+
const claims = new Map();
|
|
82
|
+
for (const claim of review.claims) {
|
|
83
|
+
const key = normalized(claim.claim);
|
|
84
|
+
if (claims.has(key))
|
|
85
|
+
errors.push(`duplicate claim review: ${claim.claim}`);
|
|
86
|
+
claims.set(key, claim);
|
|
87
|
+
}
|
|
88
|
+
const ids = new Set(parsed.ideas.map((idea) => idea.id));
|
|
89
|
+
for (const id of review.excluded_ideas)
|
|
90
|
+
if (!ids.has(id))
|
|
91
|
+
errors.push(`excluded idea does not exist: ${id}`);
|
|
92
|
+
const used = new Set();
|
|
93
|
+
for (const idea of parsed.ideas) {
|
|
94
|
+
for (const claim of idea.claims_relied_on) {
|
|
95
|
+
const key = normalized(claim);
|
|
96
|
+
used.add(key);
|
|
97
|
+
if (!text(claim)) {
|
|
98
|
+
errors.push(`${idea.id}: claims_relied_on contains an empty claim`);
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const reviewed = claims.get(key);
|
|
102
|
+
if (!reviewed)
|
|
103
|
+
errors.push(`${idea.id}: unreviewed claim: ${claim}`);
|
|
104
|
+
else if (reviewed.verdict === "refuted" && !review.excluded_ideas.includes(idea.id))
|
|
105
|
+
errors.push(`${idea.id}: refuted premise requires exclusion; revise as a new idea with corrected claims`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
for (const [key, claim] of claims)
|
|
109
|
+
if (!used.has(key))
|
|
110
|
+
errors.push(`review names a claim absent from the stored pool: ${claim.claim}`);
|
|
111
|
+
return errors;
|
|
112
|
+
}
|
|
113
|
+
function readGrounding(record, errors) {
|
|
114
|
+
const value = block(record, "grounding", errors);
|
|
115
|
+
if (!value)
|
|
116
|
+
return null;
|
|
117
|
+
const start = errors.length;
|
|
118
|
+
if (!strings(value.searched) || !value.searched.length)
|
|
119
|
+
errors.push("grounding.searched must name the local locations actually searched");
|
|
120
|
+
if (!Array.isArray(value.sources))
|
|
121
|
+
errors.push("grounding.sources must be an array");
|
|
122
|
+
else
|
|
123
|
+
for (const source of value.sources) {
|
|
124
|
+
if (!object(source))
|
|
125
|
+
errors.push("grounding.sources must contain source/takeaway objects");
|
|
126
|
+
else
|
|
127
|
+
fields(source, ["source", "takeaway"], "grounding.sources", errors);
|
|
128
|
+
}
|
|
129
|
+
fields(value, ["gap"], "grounding", errors);
|
|
130
|
+
return errors.length === start ? value : null;
|
|
131
|
+
}
|
|
132
|
+
function readDecision(record, errors) {
|
|
133
|
+
const value = block(record, "decision", errors);
|
|
134
|
+
if (!value)
|
|
135
|
+
return null;
|
|
136
|
+
const start = errors.length;
|
|
137
|
+
fields(value, ["recommendation", "rationale", "new_contribution", "dissent", "next_action"], "decision", errors);
|
|
138
|
+
for (const key of ["idea_ids", "assumptions", "not_doing"]) {
|
|
139
|
+
if (!strings(value[key]))
|
|
140
|
+
errors.push(`decision.${key} must be an array of non-empty strings`);
|
|
141
|
+
}
|
|
142
|
+
if (Array.isArray(value.not_doing) && !value.not_doing.length)
|
|
143
|
+
errors.push("decision.not_doing must name a cut");
|
|
144
|
+
if (!object(value.confidence) || typeof value.confidence.level !== "string" || !["low", "medium", "high"].includes(value.confidence.level) || !text(value.confidence.reason))
|
|
145
|
+
errors.push("decision.confidence requires level (low/medium/high) and reason");
|
|
146
|
+
if (!object(value.experiment))
|
|
147
|
+
errors.push("decision.experiment must be an object");
|
|
148
|
+
else
|
|
149
|
+
fields(value.experiment, ["action", "effort", "pass", "fail"], "decision.experiment", errors);
|
|
150
|
+
if (!Array.isArray(value.alternatives) || value.alternatives.length > 2)
|
|
151
|
+
errors.push("decision.alternatives must contain at most 2 alternatives");
|
|
152
|
+
else
|
|
153
|
+
for (const alt of value.alternatives) {
|
|
154
|
+
if (!object(alt)) {
|
|
155
|
+
errors.push("decision.alternatives must contain objects");
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
fields(alt, ["direction", "choose_when"], "decision.alternatives", errors);
|
|
159
|
+
if (!strings(alt.idea_ids) || !alt.idea_ids.length)
|
|
160
|
+
errors.push("each alternative must identify its source ideas");
|
|
161
|
+
}
|
|
162
|
+
if (!Array.isArray(value.builds_on) || value.builds_on.length > 3)
|
|
163
|
+
errors.push("decision.builds_on must contain at most 3 prior-work references");
|
|
164
|
+
else
|
|
165
|
+
for (const source of value.builds_on) {
|
|
166
|
+
if (!object(source))
|
|
167
|
+
errors.push("decision.builds_on must contain source/delta objects");
|
|
168
|
+
else
|
|
169
|
+
fields(source, ["source", "delta"], "decision.builds_on", errors);
|
|
170
|
+
}
|
|
171
|
+
return errors.length === start ? value : null;
|
|
172
|
+
}
|
|
173
|
+
function resultFrom(decision, review) {
|
|
174
|
+
// The page carries enough to understand the refutation and find its source;
|
|
175
|
+
// raw observations remain complete in the record and never consume its budget.
|
|
176
|
+
const short = (value) => {
|
|
177
|
+
const words = value.trim().split(/\s+/);
|
|
178
|
+
const excerpt = words.slice(0, 35).join(" ").slice(0, 280);
|
|
179
|
+
return excerpt.length < value.trim().length ? `${excerpt}…` : excerpt;
|
|
180
|
+
};
|
|
181
|
+
const refuted = review.claims.filter((claim) => claim.verdict === "refuted");
|
|
182
|
+
return {
|
|
183
|
+
recommendation: [decision.recommendation, decision.rationale, `What this adds: ${decision.new_contribution}`,
|
|
184
|
+
...decision.builds_on.map((s) => `Builds on ${s.source}: ${s.delta}`),
|
|
185
|
+
`Confidence: ${decision.confidence.level} — ${decision.confidence.reason}`,
|
|
186
|
+
`Assumptions: ${decision.assumptions.length ? decision.assumptions.join("; ") : "No unresolved empirical premise recorded."}`].join("\n"),
|
|
187
|
+
alternatives: decision.alternatives.map((a) => `${a.direction} — choose when ${a.choose_when}`),
|
|
188
|
+
falsified: [
|
|
189
|
+
...refuted.slice(0, 3).map((c) => `${short(c.claim)} — ${short(c.evidence[0].observation)} (${c.evidence[0].source}). ${short(c.consequence)}`),
|
|
190
|
+
...(refuted.length ? [`${refuted.length > 3 ? `${refuted.length - 3} further refuted claims; ` : ""}complete observations remain in the backing record.`] : []),
|
|
191
|
+
],
|
|
192
|
+
dissent: decision.dissent,
|
|
193
|
+
what_would_change_our_mind: decision.experiment.fail,
|
|
194
|
+
next_action: [`First test: ${decision.experiment.action}`, `Effort: ${decision.experiment.effort}`, `Pass: ${decision.experiment.pass}`, `Proposed cuts: ${decision.not_doing.join("; ")}`, decision.next_action].join("\n"),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
export function checkDecision(record) {
|
|
198
|
+
const errors = checkFalsification(record);
|
|
199
|
+
const review = readFalsification(record, errors);
|
|
200
|
+
const grounding = readGrounding(record, errors);
|
|
201
|
+
const decision = readDecision(record, errors);
|
|
202
|
+
if (!review || !grounding || !decision)
|
|
203
|
+
return [...new Set(errors)];
|
|
204
|
+
if (ideateFrontmatter(record)?.recommendation !== decision.recommendation)
|
|
205
|
+
errors.push("frontmatter recommendation must match decision.recommendation exactly");
|
|
206
|
+
const ideas = new Map(parseIdeaObjects(record).ideas.map((idea) => [idea.id, idea]));
|
|
207
|
+
const claims = new Map(review.claims.map((c) => [normalized(c.claim), c]));
|
|
208
|
+
const disclosed = new Set(decision.assumptions.map(normalized));
|
|
209
|
+
for (const id of [...decision.idea_ids, ...decision.alternatives.flatMap((a) => a.idea_ids)]) {
|
|
210
|
+
const idea = ideas.get(id);
|
|
211
|
+
if (!idea)
|
|
212
|
+
errors.push(`decision references an unknown idea: ${id}`);
|
|
213
|
+
else {
|
|
214
|
+
if (review.excluded_ideas.includes(id))
|
|
215
|
+
errors.push(`decision revives excluded idea: ${id}`);
|
|
216
|
+
for (const claim of idea.claims_relied_on) {
|
|
217
|
+
if (claims.get(normalized(claim))?.verdict === "unknown" && !disclosed.has(normalized(claim)))
|
|
218
|
+
errors.push(`decision must disclose unresolved assumption: ${claim}`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const sources = new Set(grounding.sources.map((s) => s.source));
|
|
223
|
+
if (sources.size && !decision.builds_on.length)
|
|
224
|
+
errors.push("decision must explain what it adds to the prior work found");
|
|
225
|
+
for (const source of decision.builds_on)
|
|
226
|
+
if (!sources.has(source.source))
|
|
227
|
+
errors.push(`decision cites prior work absent from grounding: ${source.source}`);
|
|
228
|
+
if (renderOrchestrationResult(resultFrom(decision, review)).trim().split(/\s+/).length > 600)
|
|
229
|
+
errors.push("decision exceeds the 600-word result budget; keep the full evidence in the backing record");
|
|
230
|
+
return [...new Set(errors)];
|
|
231
|
+
}
|
|
232
|
+
export function decisionResult(record) {
|
|
233
|
+
const errors = checkDecision(record);
|
|
234
|
+
if (errors.length)
|
|
235
|
+
throw new Error(errors.join("; "));
|
|
236
|
+
return resultFrom(readDecision(record, []), readFalsification(record, []));
|
|
237
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Depth, FamilyDefinition, GateSpec } from "./types.js";
|
|
2
|
+
export interface FamilyPack {
|
|
3
|
+
family: string;
|
|
4
|
+
banner: string;
|
|
5
|
+
tagline: string;
|
|
6
|
+
skillRef: string;
|
|
7
|
+
defaultDepth: Depth;
|
|
8
|
+
phases: readonly string[];
|
|
9
|
+
handoff: string;
|
|
10
|
+
decider: "human";
|
|
11
|
+
depth: Depth;
|
|
12
|
+
lean: boolean;
|
|
13
|
+
depths: FamilyDefinition["depths"];
|
|
14
|
+
cells: FamilyDefinition["cells"];
|
|
15
|
+
recordDir: string | null;
|
|
16
|
+
contract: string[];
|
|
17
|
+
frontmatter: string[] | null;
|
|
18
|
+
body: string[] | null;
|
|
19
|
+
gates: GateSpec[];
|
|
20
|
+
}
|
|
21
|
+
export declare function renderFamilyPack(family: FamilyDefinition, depth: Depth, lean: boolean): FamilyPack;
|
|
22
|
+
export declare function contractFromPack(pack: FamilyPack, target: string, at: string): string[];
|
|
23
|
+
export declare function recordFromPack(pack: FamilyPack, target: string, at: string): {
|
|
24
|
+
frontmatter: string[];
|
|
25
|
+
body: string[];
|
|
26
|
+
} | null;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// methodology-as-data (R-001/R-002): a FamilyPack is a family definition
|
|
2
|
+
// rendered to DATA so the shipped client can run a family it does not hold.
|
|
3
|
+
//
|
|
4
|
+
// The move: everything in a family's emitted contract/record is determined by
|
|
5
|
+
// (family, depth, lean) EXCEPT two values that are the user's alone — the target
|
|
6
|
+
// (their idea / work item) and the run timestamp. So the server renders the
|
|
7
|
+
// contract/record once, with sentinels standing in for those two, using the
|
|
8
|
+
// EXACT same render functions (byte-compat is automatic — no re-expressed
|
|
9
|
+
// template to drift). The client fetches the pack and substitutes the real
|
|
10
|
+
// target + timestamp back in locally. The target never leaves the machine (B1);
|
|
11
|
+
// the wire request carries only {token, family, depth, lean} — enums and a bool.
|
|
12
|
+
//
|
|
13
|
+
// The engine that ships stays generic (cell arithmetic, gate evaluation, this
|
|
14
|
+
// substitution); the methodology PROSE + roster + gates travel in the pack,
|
|
15
|
+
// fetched per run, never written to the tester's disk.
|
|
16
|
+
import { renderContext, slugify } from "./engine.js";
|
|
17
|
+
// Sentinels: alphanumeric and unmistakable, so no methodology prose collides
|
|
18
|
+
// with them and each of the derived forms (raw / slug / JSON) stays distinct.
|
|
19
|
+
const S_TARGET = "Zx9TargetSentinel9xZ";
|
|
20
|
+
const S_TARGET_SLUG = slugify(S_TARGET); // "zx9targetsentinel9xz" — lowercased, alnum-only
|
|
21
|
+
const S_TARGET_JSON = JSON.stringify(S_TARGET); // "\"Zx9TargetSentinel9xZ\""
|
|
22
|
+
const S_AT = "0000-00-00T00:00:00.000Z";
|
|
23
|
+
const S_AT_DATE = S_AT.slice(0, 10); // "0000-00-00" — the only slice of `at` any family uses
|
|
24
|
+
// Server side: render a family to a pack for one (depth, lean). Uses the real
|
|
25
|
+
// render functions with sentinel target + at, so the bytes match a local run.
|
|
26
|
+
export function renderFamilyPack(family, depth, lean) {
|
|
27
|
+
const ctx = { ...renderContext(family, S_TARGET, depth, S_AT, "/"), lean };
|
|
28
|
+
return {
|
|
29
|
+
family: family.family,
|
|
30
|
+
banner: family.banner,
|
|
31
|
+
tagline: family.tagline,
|
|
32
|
+
skillRef: family.skillRef,
|
|
33
|
+
defaultDepth: family.defaultDepth,
|
|
34
|
+
phases: family.phases,
|
|
35
|
+
handoff: family.handoff,
|
|
36
|
+
decider: family.decider,
|
|
37
|
+
depth,
|
|
38
|
+
lean,
|
|
39
|
+
depths: family.depths,
|
|
40
|
+
cells: family.cells,
|
|
41
|
+
recordDir: family.record ? family.record.dir : null,
|
|
42
|
+
contract: family.contract(ctx),
|
|
43
|
+
frontmatter: family.record ? family.record.frontmatter(ctx) : null,
|
|
44
|
+
body: family.record ? family.record.body(ctx) : null,
|
|
45
|
+
gates: family.gates,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Client side: put the user's real target + timestamp back into sentinelised
|
|
49
|
+
// lines. Order is load-bearing: the JSON form is replaced before the raw form
|
|
50
|
+
// (the raw sentinel is a substring of the quoted JSON form), and the slug form
|
|
51
|
+
// is lowercase so it never collides with the mixed-case raw form.
|
|
52
|
+
function substitute(lines, target, at) {
|
|
53
|
+
const slug = slugify(target);
|
|
54
|
+
const json = JSON.stringify(target);
|
|
55
|
+
const atDate = at.slice(0, 10);
|
|
56
|
+
return lines.map((line) => line
|
|
57
|
+
.split(S_TARGET_JSON).join(json)
|
|
58
|
+
.split(S_TARGET).join(target)
|
|
59
|
+
.split(S_TARGET_SLUG).join(slug)
|
|
60
|
+
.split(S_AT_DATE).join(atDate));
|
|
61
|
+
}
|
|
62
|
+
// The client's stand-ins for renderContract / scaffoldRecord bodies, driven by
|
|
63
|
+
// a fetched pack instead of a local family. recordPath falls out of the
|
|
64
|
+
// substitution (it is dir + at-date + slug, all substituted).
|
|
65
|
+
export function contractFromPack(pack, target, at) {
|
|
66
|
+
return substitute(pack.contract, target, at);
|
|
67
|
+
}
|
|
68
|
+
export function recordFromPack(pack, target, at) {
|
|
69
|
+
if (pack.frontmatter === null || pack.body === null)
|
|
70
|
+
return null;
|
|
71
|
+
return {
|
|
72
|
+
frontmatter: substitute(pack.frontmatter, target, at),
|
|
73
|
+
body: substitute(pack.body, target, at),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export type Depth = "fast" | "standard" | "deep";
|
|
2
|
+
export type Tier = Record<string, number | boolean>;
|
|
3
|
+
export interface Cell {
|
|
4
|
+
role: string;
|
|
5
|
+
attrs: Record<string, string | number>;
|
|
6
|
+
}
|
|
7
|
+
export interface CellRule {
|
|
8
|
+
rolePrefix: string;
|
|
9
|
+
countKey: string;
|
|
10
|
+
maxCount?: number;
|
|
11
|
+
pools: Record<string, {
|
|
12
|
+
values: readonly string[];
|
|
13
|
+
cycleKey?: string;
|
|
14
|
+
}>;
|
|
15
|
+
seed?: {
|
|
16
|
+
attr: string;
|
|
17
|
+
base: number;
|
|
18
|
+
step: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type GateSpec = {
|
|
22
|
+
type: "frontmatter-present";
|
|
23
|
+
check: string;
|
|
24
|
+
field: string;
|
|
25
|
+
pattern?: string;
|
|
26
|
+
detail: string;
|
|
27
|
+
failDetail: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: "frontmatter-nonempty";
|
|
30
|
+
check: string;
|
|
31
|
+
field: string;
|
|
32
|
+
detail: string;
|
|
33
|
+
failDetail: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: "frontmatter-equals";
|
|
36
|
+
check: string;
|
|
37
|
+
field: string;
|
|
38
|
+
expect: string;
|
|
39
|
+
detail: string;
|
|
40
|
+
failDetail: string;
|
|
41
|
+
} | {
|
|
42
|
+
type: "diversity-meter";
|
|
43
|
+
check: string;
|
|
44
|
+
floorCap: number;
|
|
45
|
+
floorKey: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: "diversity-provenance";
|
|
48
|
+
check: string;
|
|
49
|
+
} | {
|
|
50
|
+
type: "section-present";
|
|
51
|
+
check: string;
|
|
52
|
+
heading: string;
|
|
53
|
+
detail: string;
|
|
54
|
+
failDetail: string;
|
|
55
|
+
} | {
|
|
56
|
+
type: "ledger-types";
|
|
57
|
+
check: string;
|
|
58
|
+
taxonomy: readonly string[];
|
|
59
|
+
} | {
|
|
60
|
+
type: "frame-reasoning";
|
|
61
|
+
check: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "ideate-falsification" | "ideate-decision";
|
|
64
|
+
check: string;
|
|
65
|
+
} | {
|
|
66
|
+
type: "versioned-keyline";
|
|
67
|
+
check: string;
|
|
68
|
+
field: string;
|
|
69
|
+
detail: string;
|
|
70
|
+
failDetail: string;
|
|
71
|
+
};
|
|
72
|
+
export interface RecordTemplate {
|
|
73
|
+
dir: string;
|
|
74
|
+
frontmatter: (ctx: RenderContext) => string[];
|
|
75
|
+
body: (ctx: RenderContext) => string[];
|
|
76
|
+
}
|
|
77
|
+
export interface FamilyDefinition {
|
|
78
|
+
family: string;
|
|
79
|
+
banner: string;
|
|
80
|
+
tagline: string;
|
|
81
|
+
skillRef: string;
|
|
82
|
+
depths: Record<Depth, Tier>;
|
|
83
|
+
defaultDepth: Depth;
|
|
84
|
+
phases: readonly string[];
|
|
85
|
+
cells: CellRule | null;
|
|
86
|
+
record: RecordTemplate | null;
|
|
87
|
+
contract: (ctx: RenderContext) => string[];
|
|
88
|
+
gates: GateSpec[];
|
|
89
|
+
handoff: string;
|
|
90
|
+
decider: "human";
|
|
91
|
+
}
|
|
92
|
+
export interface RenderContext {
|
|
93
|
+
family: FamilyDefinition;
|
|
94
|
+
target: string;
|
|
95
|
+
depth: Depth;
|
|
96
|
+
tier: Tier;
|
|
97
|
+
cells: Cell[];
|
|
98
|
+
at: string;
|
|
99
|
+
recordPath: string | null;
|
|
100
|
+
root: string;
|
|
101
|
+
lean?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface GateFinding {
|
|
104
|
+
check: string;
|
|
105
|
+
ok: boolean;
|
|
106
|
+
detail: string;
|
|
107
|
+
}
|
|
108
|
+
export interface GateResult {
|
|
109
|
+
ok: boolean;
|
|
110
|
+
findings: GateFinding[];
|
|
111
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// methodology-compiler-v0 (R-001) — the conductor engine's data model.
|
|
2
|
+
// A methodology family is DATA: depth tiers, phases, cell assignment, record
|
|
3
|
+
// scaffold, emitted-contract template, and gate specs. The engine renders
|
|
4
|
+
// contracts and verifies records; it never generates ideas, never calls a
|
|
5
|
+
// model, and never ships to testers. Orchestration expressed here stops
|
|
6
|
+
// existing as servable prose (R-002); only leaf prompts stay servable (R-003).
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
/** Preserve project-root overrides while keeping bundled data in config/. */
|
|
4
|
+
export function configPath(root, name) {
|
|
5
|
+
const override = path.join(root, name);
|
|
6
|
+
return existsSync(override) ? override : path.join(root, "config", name);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const DISCOVERY_SCHEMA_VERSION: "0.1";
|
|
2
|
+
export type DiscoveryLifecycle = "draft" | "awaiting_interview" | "awaiting_match" | "ambiguous_match" | "needs_source_approval" | "needs_provider_access" | "needs_provider_connector" | "needs_research_proof" | "ready_to_synthesize" | "needs_review" | "complete" | "revoked";
|
|
3
|
+
export type DiscoveryActor = {
|
|
4
|
+
type: "human" | "agent";
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
export type DiscoveryWrite = {
|
|
8
|
+
path: string;
|
|
9
|
+
action: "created" | "updated" | "removed";
|
|
10
|
+
};
|
|
11
|
+
export type DiscoveryRun = {
|
|
12
|
+
schema_version: "0.1";
|
|
13
|
+
study_id: string;
|
|
14
|
+
goal: string;
|
|
15
|
+
lane: "study_linked";
|
|
16
|
+
target: {
|
|
17
|
+
name: string;
|
|
18
|
+
organization: string;
|
|
19
|
+
public_url?: string;
|
|
20
|
+
provenance: string;
|
|
21
|
+
};
|
|
22
|
+
match: {
|
|
23
|
+
provider: string;
|
|
24
|
+
connection_alias: string;
|
|
25
|
+
expected_local_date: string | null;
|
|
26
|
+
timezone: string;
|
|
27
|
+
required_participants: string[];
|
|
28
|
+
required_title_tokens: string[];
|
|
29
|
+
};
|
|
30
|
+
source: {
|
|
31
|
+
provider: string;
|
|
32
|
+
connection_alias: string;
|
|
33
|
+
stable_url: string | null;
|
|
34
|
+
};
|
|
35
|
+
state: DiscoveryLifecycle;
|
|
36
|
+
source_state: "excluded" | "approved" | "revoked";
|
|
37
|
+
access_state: "unknown" | "available" | "denied";
|
|
38
|
+
proof_state: "missing" | "ready" | "consumed";
|
|
39
|
+
created_at: string;
|
|
40
|
+
updated_at: string;
|
|
41
|
+
provenance: string;
|
|
42
|
+
};
|
|
43
|
+
export type DiscoveryValidation = {
|
|
44
|
+
ok: boolean;
|
|
45
|
+
errors: string[];
|
|
46
|
+
studies: number;
|
|
47
|
+
inbox: boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare function loadDiscoveryRun(studyDir: string): DiscoveryRun;
|
|
50
|
+
export declare function validateDiscoveryPath(root: string, target?: string): DiscoveryValidation;
|
|
51
|
+
export declare function locateStudy(root: string, studyId: string): string | null;
|
|
52
|
+
export declare function transitionDiscoveryRun(studyDir: string, next: DiscoveryLifecycle, actor: DiscoveryActor, now: string): DiscoveryWrite[];
|
|
53
|
+
export type DiscoveryCandidateClass = "real-study" | "product-spec" | "method-research" | "synthetic-rehearsal" | "not-discovery";
|
|
54
|
+
export declare function classifyDiscoveryCandidate(filePath: string, text: string): DiscoveryCandidateClass;
|