@contractspec/module.product-intent-core 3.7.6 → 3.7.7

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/README.md CHANGED
@@ -1,17 +1,61 @@
1
1
  # @contractspec/module.product-intent-core
2
2
 
3
- Website: https://contractspec.io/
3
+ Website: https://contractspec.io
4
4
 
5
- Core orchestration logic for the product-intent workflow. This module wires evidence retrieval, prompt execution, and validators into a deterministic discovery pipeline.
5
+ **Core product intent orchestration and adapters.**
6
6
 
7
- ## What it provides
7
+ ## What It Provides
8
8
 
9
- - A `ProductIntentOrchestrator` that runs the discovery loop end-to-end.
10
- - A keyword-based evidence fetcher for deterministic retrieval.
11
- - Type-safe interfaces for model runners and orchestration options.
9
+ - **Layer**: module.
10
+ - **Consumers**: bundles (contractspec-studio), apps (web-landing).
11
+ - Related ContractSpec packages include `@contractspec/lib.contracts-spec`, `@contractspec/lib.product-intent-utils`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
12
+ - Related ContractSpec packages include `@contractspec/lib.contracts-spec`, `@contractspec/lib.product-intent-utils`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
12
13
 
13
14
  ## Installation
14
15
 
15
- ```bash
16
- bun add @contractspec/module.product-intent-core
17
- ```
16
+ `npm install @contractspec/module.product-intent-core`
17
+
18
+ or
19
+
20
+ `bun add @contractspec/module.product-intent-core`
21
+
22
+ ## Usage
23
+
24
+ Import the root entrypoint from `@contractspec/module.product-intent-core`, or choose a documented subpath when you only need one part of the package surface.
25
+
26
+ ## Architecture
27
+
28
+ - `src/evidence/` contains evidence ingestion and normalization helpers.
29
+ - `src/index.ts` is the root public barrel and package entrypoint.
30
+ - `src/orchestrator` is part of the package's public or composition surface.
31
+ - `src/types.ts` is shared public type definitions.
32
+
33
+ ## Public Entry Points
34
+
35
+ - Export `.` resolves through `./src/index.ts`.
36
+
37
+ ## Local Commands
38
+
39
+ - `bun run dev` — contractspec-bun-build dev
40
+ - `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
41
+ - `bun run test` — bun test
42
+ - `bun run lint` — bun lint:fix
43
+ - `bun run lint:check` — biome check .
44
+ - `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
45
+ - `bun run typecheck` — tsc --noEmit
46
+ - `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
47
+ - `bun run publish:pkg:canary` — bun publish:pkg --tag canary
48
+ - `bun run clean` — rimraf dist .turbo
49
+ - `bun run build:bundle` — contractspec-bun-build transpile
50
+ - `bun run build:types` — contractspec-bun-build types
51
+ - `bun run prebuild` — contractspec-bun-build prebuild
52
+
53
+ ## Recent Updates
54
+
55
+ - Replace eslint+prettier by biomejs to optimize speed.
56
+
57
+ ## Notes
58
+
59
+ - Depends on `lib.product-intent-utils` for shared utilities -- keep orchestration logic here, primitives in the lib.
60
+ - Intent resolution must be idempotent; re-processing the same input should yield the same spec output.
61
+ - Adapter interfaces are the extension point; new integrations go through the adapter pattern.
@@ -22,10 +22,10 @@ var createKeywordEvidenceFetcher = (chunks, options = {}) => async ({
22
22
  return maxChunks ? results.slice(0, maxChunks) : results;
23
23
  };
24
24
  // src/orchestrator/product-intent-orchestrator.ts
25
+ import { ProductIntentRegistry } from "@contractspec/lib.contracts-spec/product-intent/registry";
25
26
  import {
26
27
  ContractSpecPatchModel
27
28
  } from "@contractspec/lib.contracts-spec/product-intent/types";
28
- import { ProductIntentRegistry } from "@contractspec/lib.contracts-spec/product-intent/registry";
29
29
  import {
30
30
  formatEvidenceForModel,
31
31
  impactEngine,
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './types';
2
1
  export * from './evidence/keyword-retriever';
3
2
  export * from './orchestrator/product-intent-orchestrator';
3
+ export * from './types';
package/dist/index.js CHANGED
@@ -23,10 +23,10 @@ var createKeywordEvidenceFetcher = (chunks, options = {}) => async ({
23
23
  return maxChunks ? results.slice(0, maxChunks) : results;
24
24
  };
25
25
  // src/orchestrator/product-intent-orchestrator.ts
26
+ import { ProductIntentRegistry } from "@contractspec/lib.contracts-spec/product-intent/registry";
26
27
  import {
27
28
  ContractSpecPatchModel
28
29
  } from "@contractspec/lib.contracts-spec/product-intent/types";
29
- import { ProductIntentRegistry } from "@contractspec/lib.contracts-spec/product-intent/registry";
30
30
  import {
31
31
  formatEvidenceForModel,
32
32
  impactEngine,
@@ -22,10 +22,10 @@ var createKeywordEvidenceFetcher = (chunks, options = {}) => async ({
22
22
  return maxChunks ? results.slice(0, maxChunks) : results;
23
23
  };
24
24
  // src/orchestrator/product-intent-orchestrator.ts
25
+ import { ProductIntentRegistry } from "@contractspec/lib.contracts-spec/product-intent/registry";
25
26
  import {
26
27
  ContractSpecPatchModel
27
28
  } from "@contractspec/lib.contracts-spec/product-intent/types";
28
- import { ProductIntentRegistry } from "@contractspec/lib.contracts-spec/product-intent/registry";
29
29
  import {
30
30
  formatEvidenceForModel,
31
31
  impactEngine,
@@ -1,6 +1,6 @@
1
- import { type ContractPatchIntent, type ContractSpecPatch, type EvidenceChunk, type ImpactReport, type InsightExtraction, type OpportunityBrief, type TaskPack } from '@contractspec/lib.contracts-spec/product-intent/types';
2
- import type { ProductIntentSpec } from '@contractspec/lib.contracts-spec/product-intent/spec';
3
1
  import { ProductIntentRegistry } from '@contractspec/lib.contracts-spec/product-intent/registry';
2
+ import type { ProductIntentSpec } from '@contractspec/lib.contracts-spec/product-intent/spec';
3
+ import { type ContractPatchIntent, type ContractSpecPatch, type EvidenceChunk, type ImpactReport, type InsightExtraction, type OpportunityBrief, type TaskPack } from '@contractspec/lib.contracts-spec/product-intent/types';
4
4
  import type { ProductIntentOrchestratorOptions, ProductIntentOrchestratorParams } from '../types';
5
5
  export declare class ProductIntentOrchestrator<Context = unknown> {
6
6
  private options;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import type { EvidenceChunk } from '@contractspec/lib.contracts-spec/product-intent/types';
2
1
  import type { ProductIntentMeta } from '@contractspec/lib.contracts-spec/product-intent/spec';
3
- import type { ContractPatchIntent, ContractSpecPatch, ImpactReport, InsightExtraction, OpportunityBrief, TaskPack } from '@contractspec/lib.contracts-spec/product-intent/types';
2
+ import type { ContractPatchIntent, ContractSpecPatch, EvidenceChunk, ImpactReport, InsightExtraction, OpportunityBrief, TaskPack } from '@contractspec/lib.contracts-spec/product-intent/types';
4
3
  export interface ProductIntentModelRunner {
5
4
  generateJson: (prompt: string) => Promise<string>;
6
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/module.product-intent-core",
3
- "version": "3.7.6",
3
+ "version": "3.7.7",
4
4
  "description": "Core product intent orchestration and adapters",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -25,15 +25,15 @@
25
25
  "dev": "contractspec-bun-build dev",
26
26
  "clean": "rimraf dist .turbo",
27
27
  "lint": "bun lint:fix",
28
- "lint:fix": "eslint src --fix",
29
- "lint:check": "eslint src",
28
+ "lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
29
+ "lint:check": "biome check .",
30
30
  "test": "bun test",
31
31
  "prebuild": "contractspec-bun-build prebuild",
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@contractspec/lib.contracts-spec": "3.7.6",
36
- "@contractspec/lib.product-intent-utils": "3.7.6"
35
+ "@contractspec/lib.contracts-spec": "4.0.0",
36
+ "@contractspec/lib.product-intent-utils": "3.7.7"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@contractspec/tool.typescript": "3.7.6",