@patronage/software-factory 1.0.0-alpha.7 → 1.0.0-alpha.9
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/CONTEXT.md +10 -0
- package/README.md +3 -1
- package/dist/index.d.ts +17 -16
- package/dist/index.js +1004 -72
- package/dist/schemas.d.ts +4 -2
- package/dist/schemas.js +5 -4
- package/package.json +2 -2
package/CONTEXT.md
CHANGED
|
@@ -6,12 +6,22 @@ The shared Patronage software factory: typed lifecycle state, proof gates, and o
|
|
|
6
6
|
|
|
7
7
|
## Language
|
|
8
8
|
|
|
9
|
+
### Admission
|
|
10
|
+
|
|
11
|
+
**Candidate**: The exact patch under admission — the `headSha` / `patchId` / `mergeBaseSha` identity every piece of evidence binds to. A GitHub draft pull request is not a Candidate; GitHub's draft boolean is the machine lifecycle authority, and ready-for-review is the Candidate state. Experiment and interactive describe human intent only and create no machine states.
|
|
12
|
+
|
|
13
|
+
**Promotion**: The one transition from a draft pull request into a Candidate. `pr:publish` is the promotion verb. Its composed handoff finishes proof while draft, promotes, then evaluates Candidate demands at the unchanged head. Draft open and synchronize events run no substantive hosted Verify battery; `ready_for_review` starts the complete applicable Candidate pass.
|
|
14
|
+
|
|
9
15
|
### Proof reuse
|
|
10
16
|
|
|
11
17
|
**Proof gate**: A command that emits a typed proof — the self-timed set is `pr:verify`, `pr:review`, `pr:ready`, `boundary:check`, and `factory:closeout`; one execution is a **gate run**. Typed proof files are the source of readiness truth; prose never substitutes.
|
|
12
18
|
|
|
13
19
|
**Proof-reuse gate**: The decision that consumes trusted verification proof and determines whether hosted CI may skip work already performed. Refusing reuse runs the hosted suite; it does not fail the candidate. Defined by ADR 0022. _Avoid_: proof gate (that produces readiness proof rather than reusing it).
|
|
14
20
|
|
|
21
|
+
### Impact
|
|
22
|
+
|
|
23
|
+
**Impact**: The candidate-bound classification of which declared product targets a changed path or lockfile graph can reach. Path impact is opt-in: a target is affected if and only if a valid changed path matches one of its declared globs. A valid path matched by no target is **unsubscribed** and demands no target-scoped work, while remaining explicit in the stamp basis and human summary. Shared paths affect every target that subscribes to them. Invalid paths and unreadable or malformed required inputs still fail closed. Impact may withdraw target-scoped work; it never certifies a merge target, whose push-triggered verification stays full. Defined by ADR 0027. _Avoid_: affectedness; ownership (the declaration is a subscription, not an implicit filesystem owner).
|
|
24
|
+
|
|
15
25
|
### Planning intake
|
|
16
26
|
|
|
17
27
|
**Spec**: The single through-line planning artifact — a technical, non-technical, or blended description of the work to be built, produced by `to-spec`. The term supersedes "PRD"; older artifacts titled "PRD:" (e.g. #232) are specs by another name. _Avoid_: PRD (retired), requirements doc.
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ A stacked release train has one terminal release-owning slice. Interior slices d
|
|
|
37
37
|
A stable cut has two phases. Phase 1 is the verified package candidate: steps 1 through 4 below, ending in the attended npm publish, tag, and GitHub release. Phase 2 is post-publication stable-doc convergence: steps 5 and 6, a normal admitted docs PR followed by the read-only convergence assertion from a clean `main`. Stable docs must never claim an unpublished version, so they cannot land in the phase-1 change. Prerelease behavior is unchanged: prerelease notes may land before publish while stable docs keep naming the prior stable version.
|
|
38
38
|
|
|
39
39
|
1. Bump `package.json` to valid SemVer. The assertion derives its expected stable or prerelease channel from the version; it accepts no channel flag.
|
|
40
|
-
2.
|
|
40
|
+
2. Build and review one pnpm tarball, then publish that exact tarball per the [repository operations runbook](../docs/repository-operations.md#publishing) (attended and hand-cut). Publishing the workspace directory is not allowed because it rebuilds during `prepack` after the artifact review. **Always pass `--tag` explicitly, on every publish, prerelease or stable**: `pnpm publish "$SOFTWARE_FACTORY_TARBALL" --tag next --access public` for a prerelease, `--tag latest` for a stable cut. A filtered directory publish takes pnpm's recursive path, which passes its own `--tag` (defaulting to `latest`) to npm and therefore ignores the `publishConfig.tag: next` pin both factory packages carry; that is how 1.0.0-alpha.6 briefly took `latest` (#658). The pins stay as belt and braces, but they are not the control. Omitting the flag is not a safe failure: it moves `latest`, which the convergence assertion can only report after the fact. The attended token path does not promise an npm provenance attestation; the source SHA and reviewed tarball SRI are its operational provenance.
|
|
41
41
|
3. Cut the `software-factory-vX.Y.Z` tag and push it.
|
|
42
42
|
4. Cut the GitHub release for that tag, with notes covering features, deletions, breaking changes, and closed issues. Mark it as a prerelease exactly when its SemVer version has a prerelease component. When the release changes the profile `schemaVersion`, state it in the notes — the profile schema version is a separate axis from the package version.
|
|
43
43
|
5. Converge the stable docs after publication. Update affected `software-factory-docs/` pages through a normal admitted docs PR. Stable docs must state the current stable version. Prerelease docs may record the candidate and its migration notes, but must not represent it as the current stable release.
|
|
@@ -60,6 +60,8 @@ pnpm exec patronage-factory --help # or: psf --help
|
|
|
60
60
|
|
|
61
61
|
The repository profile declares its admission policy. Operator-local settings and HQ credentials are documented separately, so they do not become committed project configuration.
|
|
62
62
|
|
|
63
|
+
Generated production workflows may call `psf production:impact --before <sha> --after <sha> --github-output <path>`. The command recomputes the profile's opt-in impact subscriptions from those exact real commits and emits stable demanded/withdrawn target outputs, the changed-file decision basis, and unsubscribed paths. It only withdraws work: missing, zero, malformed, unreachable, non-ancestral, or otherwise unclassifiable identities leave every known target demanded. The factory owns this decision seam; each consumer owns its deploy jobs, commands, credentials, topology, and post-deploy convergence/no-op proof. Merge-target Verify remains full and does not consult this command.
|
|
64
|
+
|
|
63
65
|
For factory workflow, install the four canonical skills from the repository:
|
|
64
66
|
|
|
65
67
|
```bash
|
package/dist/index.d.ts
CHANGED
|
@@ -1224,8 +1224,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1224
1224
|
"run-interior-cycle": "run-interior-cycle";
|
|
1225
1225
|
}>;
|
|
1226
1226
|
stage: z.ZodEnum<{
|
|
1227
|
-
interior: "interior";
|
|
1228
1227
|
gate: "gate";
|
|
1228
|
+
interior: "interior";
|
|
1229
1229
|
"interior-complete": "interior-complete";
|
|
1230
1230
|
}>;
|
|
1231
1231
|
}, z.core.$strip>>;
|
|
@@ -1241,8 +1241,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1241
1241
|
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1242
1242
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1243
1243
|
status: z.ZodEnum<{
|
|
1244
|
-
"not-required": "not-required";
|
|
1245
1244
|
blocked: "blocked";
|
|
1245
|
+
"not-required": "not-required";
|
|
1246
1246
|
current: "current";
|
|
1247
1247
|
stale: "stale";
|
|
1248
1248
|
missing: "missing";
|
|
@@ -1253,8 +1253,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1253
1253
|
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1254
1254
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1255
1255
|
status: z.ZodEnum<{
|
|
1256
|
-
"not-required": "not-required";
|
|
1257
1256
|
blocked: "blocked";
|
|
1257
|
+
"not-required": "not-required";
|
|
1258
1258
|
current: "current";
|
|
1259
1259
|
stale: "stale";
|
|
1260
1260
|
missing: "missing";
|
|
@@ -1517,7 +1517,7 @@ declare const impactStampSchema: z.ZodObject<{
|
|
|
1517
1517
|
conservative: "conservative";
|
|
1518
1518
|
}>;
|
|
1519
1519
|
reasons: z.ZodArray<z.ZodString>;
|
|
1520
|
-
stampVersion: z.ZodLiteral<
|
|
1520
|
+
stampVersion: z.ZodLiteral<3>;
|
|
1521
1521
|
targets: z.ZodArray<z.ZodObject<{
|
|
1522
1522
|
basis: z.ZodString;
|
|
1523
1523
|
impact: z.ZodEnum<{
|
|
@@ -1526,6 +1526,7 @@ declare const impactStampSchema: z.ZodObject<{
|
|
|
1526
1526
|
}>;
|
|
1527
1527
|
name: z.ZodString;
|
|
1528
1528
|
}, z.core.$strip>>;
|
|
1529
|
+
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
1529
1530
|
}, z.core.$strip>;
|
|
1530
1531
|
type ImpactStamp = z.infer<typeof impactStampSchema>;
|
|
1531
1532
|
/**
|
|
@@ -1768,8 +1769,8 @@ declare const loadEvidenceEnvelopes: (cwd: string) => LoadedEvidenceEnvelope[];
|
|
|
1768
1769
|
//#region src/review-proof-applicability.d.ts
|
|
1769
1770
|
declare const REVIEW_STATUS_VALUES: readonly ["not-required", "current", "stale", "missing", "blocked"];
|
|
1770
1771
|
declare const reviewStatusSchema: z.ZodEnum<{
|
|
1771
|
-
"not-required": "not-required";
|
|
1772
1772
|
blocked: "blocked";
|
|
1773
|
+
"not-required": "not-required";
|
|
1773
1774
|
current: "current";
|
|
1774
1775
|
stale: "stale";
|
|
1775
1776
|
missing: "missing";
|
|
@@ -2939,8 +2940,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
2939
2940
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2940
2941
|
}, z.core.$strict>>;
|
|
2941
2942
|
stage: z.ZodEnum<{
|
|
2942
|
-
interior: "interior";
|
|
2943
2943
|
gate: "gate";
|
|
2944
|
+
interior: "interior";
|
|
2944
2945
|
}>;
|
|
2945
2946
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2946
2947
|
estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2992,8 +2993,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
2992
2993
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2993
2994
|
}, z.core.$strict>>;
|
|
2994
2995
|
stage: z.ZodEnum<{
|
|
2995
|
-
interior: "interior";
|
|
2996
2996
|
gate: "gate";
|
|
2997
|
+
interior: "interior";
|
|
2997
2998
|
}>;
|
|
2998
2999
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2999
3000
|
estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3036,8 +3037,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3036
3037
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
3037
3038
|
}, z.core.$strict>>;
|
|
3038
3039
|
stage: z.ZodEnum<{
|
|
3039
|
-
interior: "interior";
|
|
3040
3040
|
gate: "gate";
|
|
3041
|
+
interior: "interior";
|
|
3041
3042
|
}>;
|
|
3042
3043
|
usage: z.ZodOptional<z.ZodObject<{
|
|
3043
3044
|
estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3067,7 +3068,7 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3067
3068
|
staleRepeats: number;
|
|
3068
3069
|
};
|
|
3069
3070
|
observedAt: string;
|
|
3070
|
-
stage: "
|
|
3071
|
+
stage: "gate" | "interior";
|
|
3071
3072
|
issue?: number | undefined;
|
|
3072
3073
|
pr?: number | undefined;
|
|
3073
3074
|
threadId?: string | undefined;
|
|
@@ -3323,8 +3324,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3323
3324
|
interiorCycle: z.ZodOptional<z.ZodNumber>;
|
|
3324
3325
|
observedAt: z.ZodString;
|
|
3325
3326
|
purpose: z.ZodEnum<{
|
|
3326
|
-
review: "review";
|
|
3327
3327
|
code: "code";
|
|
3328
|
+
review: "review";
|
|
3328
3329
|
}>;
|
|
3329
3330
|
slotResolution: z.ZodObject<{
|
|
3330
3331
|
effort: z.ZodEnum<{
|
|
@@ -3402,8 +3403,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3402
3403
|
interiorCycle: z.ZodOptional<z.ZodNumber>;
|
|
3403
3404
|
observedAt: z.ZodString;
|
|
3404
3405
|
purpose: z.ZodEnum<{
|
|
3405
|
-
review: "review";
|
|
3406
3406
|
code: "code";
|
|
3407
|
+
review: "review";
|
|
3407
3408
|
}>;
|
|
3408
3409
|
slotResolution: z.ZodObject<{
|
|
3409
3410
|
effort: z.ZodEnum<{
|
|
@@ -3472,8 +3473,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3472
3473
|
interiorCycle: z.ZodOptional<z.ZodNumber>;
|
|
3473
3474
|
observedAt: z.ZodString;
|
|
3474
3475
|
purpose: z.ZodEnum<{
|
|
3475
|
-
review: "review";
|
|
3476
3476
|
code: "code";
|
|
3477
|
+
review: "review";
|
|
3477
3478
|
}>;
|
|
3478
3479
|
slotResolution: z.ZodObject<{
|
|
3479
3480
|
effort: z.ZodEnum<{
|
|
@@ -3545,7 +3546,7 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3545
3546
|
exitCode: number | null;
|
|
3546
3547
|
harness: string;
|
|
3547
3548
|
observedAt: string;
|
|
3548
|
-
purpose: "
|
|
3549
|
+
purpose: "code" | "review";
|
|
3549
3550
|
slotResolution: {
|
|
3550
3551
|
effort: "high" | "low" | "medium" | "xhigh";
|
|
3551
3552
|
engine: string;
|
|
@@ -4066,13 +4067,13 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4066
4067
|
reviews: {
|
|
4067
4068
|
correctness: {
|
|
4068
4069
|
required: boolean;
|
|
4069
|
-
status: "
|
|
4070
|
+
status: "blocked" | "not-required" | "current" | "stale" | "missing";
|
|
4070
4071
|
reviewedHeadSha?: string | undefined;
|
|
4071
4072
|
reviewedPatchId?: string | undefined;
|
|
4072
4073
|
};
|
|
4073
4074
|
security?: {
|
|
4074
4075
|
required: boolean;
|
|
4075
|
-
status: "
|
|
4076
|
+
status: "blocked" | "not-required" | "current" | "stale" | "missing";
|
|
4076
4077
|
reviewedHeadSha?: string | undefined;
|
|
4077
4078
|
reviewedPatchId?: string | undefined;
|
|
4078
4079
|
} | undefined;
|
|
@@ -4123,7 +4124,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4123
4124
|
interior: number;
|
|
4124
4125
|
};
|
|
4125
4126
|
nextAction: "run-gate-cycle" | "accept-nonblocking-findings" | "escalate-to-triage" | "ready-for-human" | "advance-to-gate" | "run-interior-cycle";
|
|
4126
|
-
stage: "
|
|
4127
|
+
stage: "gate" | "interior" | "interior-complete";
|
|
4127
4128
|
forcedTransition?: "gate-cap-exhausted" | "interior-cap-reached" | undefined;
|
|
4128
4129
|
} | undefined;
|
|
4129
4130
|
reviewRuns?: PrReviewResult[] | undefined;
|