@contractspec/lib.lifecycle 3.7.5 → 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 +42 -58
- package/dist/browser/index.js +179 -179
- package/dist/i18n/catalogs/index.d.ts +1 -1
- package/dist/i18n/index.d.ts +7 -7
- package/dist/i18n/locale.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +179 -179
- package/dist/node/index.js +179 -179
- package/dist/types/milestones.d.ts +2 -2
- package/dist/types/signals.d.ts +1 -1
- package/dist/utils/formatters.d.ts +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,79 +1,63 @@
|
|
|
1
1
|
# @contractspec/lib.lifecycle
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Canonical lifecycle vocabulary for ContractSpec. This package exposes stage enums, axis types, signal contracts, milestone/action shapes, and formatting helpers used by the lifecycle modules, bundles, and Studio apps.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install @contractspec/lib.lifecycle
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
```ts
|
|
17
|
-
import {
|
|
18
|
-
LifecycleStage,
|
|
19
|
-
LIFECYCLE_STAGE_META,
|
|
20
|
-
LifecycleAssessment,
|
|
21
|
-
formatStageSummary,
|
|
22
|
-
} from '@contractspec/lib.lifecycle';
|
|
23
|
-
|
|
24
|
-
const assessment: LifecycleAssessment = {
|
|
25
|
-
stage: LifecycleStage.MvpEarlyTraction,
|
|
26
|
-
confidence: 0.72,
|
|
27
|
-
axes: {
|
|
28
|
-
product: 'MVP',
|
|
29
|
-
company: 'TinyTeam',
|
|
30
|
-
capital: 'Seed',
|
|
31
|
-
},
|
|
32
|
-
signals: [],
|
|
33
|
-
gaps: ['Retention', 'Onboarding'],
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const summary = formatStageSummary(assessment.stage, assessment);
|
|
37
|
-
console.log(summary.title); // "Stage 2 · MVP & Early Traction"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Contents
|
|
41
|
-
|
|
42
|
-
- `LifecycleStage` enum and metadata map (`LIFECYCLE_STAGE_META`)
|
|
43
|
-
- 3-axis definitions: `ProductPhase`, `CompanyPhase`, `CapitalPhase`
|
|
44
|
-
- Signal + metric contracts (sources, quality, payloads)
|
|
45
|
-
- Milestone + action data shapes
|
|
46
|
-
- Formatting helpers (`formatStageSummary`, `summarizeAxes`, `rankStageCandidates`)
|
|
47
|
-
|
|
48
|
-
This library intentionally ships no IO logic so it can run in browsers, Node runtimes, and design tools.*** End Patch
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
3
|
+
Website: https://contractspec.io
|
|
61
4
|
|
|
5
|
+
**Contract lifecycle management primitives.**
|
|
62
6
|
|
|
7
|
+
## What It Provides
|
|
63
8
|
|
|
9
|
+
- **Layer**: lib.
|
|
10
|
+
- **Consumers**: analytics, evolution, observability, bundles.
|
|
11
|
+
- Related ContractSpec packages include `@contractspec/lib.contracts-spec`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
12
|
+
- Related ContractSpec packages include `@contractspec/lib.contracts-spec`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
64
13
|
|
|
14
|
+
## Installation
|
|
65
15
|
|
|
16
|
+
`npm install @contractspec/lib.lifecycle`
|
|
66
17
|
|
|
18
|
+
or
|
|
67
19
|
|
|
20
|
+
`bun add @contractspec/lib.lifecycle`
|
|
68
21
|
|
|
22
|
+
## Usage
|
|
69
23
|
|
|
24
|
+
Import the root entrypoint from `@contractspec/lib.lifecycle`, or choose a documented subpath when you only need one part of the package surface.
|
|
70
25
|
|
|
26
|
+
## Architecture
|
|
71
27
|
|
|
28
|
+
- `src/i18n` is part of the package's public or composition surface.
|
|
29
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
30
|
+
- `src/types` is part of the package's public or composition surface.
|
|
31
|
+
- `src/utils/` contains internal utility functions.
|
|
72
32
|
|
|
33
|
+
## Public Entry Points
|
|
73
34
|
|
|
35
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
74
36
|
|
|
37
|
+
## Local Commands
|
|
75
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 --pass-with-no-tests
|
|
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
|
|
76
52
|
|
|
53
|
+
## Recent Updates
|
|
77
54
|
|
|
55
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
56
|
+
- Fix small issues.
|
|
57
|
+
- Add full i18n support across all 10 packages (en/fr/es, 460 keys).
|
|
78
58
|
|
|
59
|
+
## Notes
|
|
79
60
|
|
|
61
|
+
- Lifecycle stage definitions are shared across the platform — changes are high-impact.
|
|
62
|
+
- Stage transitions must be deterministic; no side effects in transition logic.
|
|
63
|
+
- Consumed by analytics and observability — schema changes affect downstream telemetry.
|