@punks/cli 3.2.2 → 3.3.0
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/AGENTS.md +1 -1
- package/dist/BASELINE_CHANGELOG.md +43 -0
- package/dist/CHANGELOG.md +24 -0
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +5 -2
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +24 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/AGENTS.md +1 -1
- package/dist/index.js +10 -10
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
- package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
- package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
- package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
- package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
- package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
- package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
- package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
- package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
- package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
- package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
- package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
- package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
- package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
- package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
- package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
- package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
- package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
- package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
- package/dist/skills/phases/review-phase/references/targets.md +2 -1
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
- package/package.json +52 -9
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
- package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
|
|
3
|
-
import * as EffectVitest from "@effect/vitest";
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
|
|
6
|
-
import type { CompileContextPlanInput } from "../../../../scaffold/models";
|
|
7
|
-
import { compileContextPlan } from "../../../../features/context-planning";
|
|
8
|
-
import { testHarnessProjectionContract } from "../contract";
|
|
9
|
-
import { project } from "../core.mjs";
|
|
10
|
-
import { claudeAdapter } from "./claude.mjs";
|
|
11
|
-
import { codexAdapter } from "./codex.mjs";
|
|
12
|
-
import { cursorAdapter, cursorCapabilityMatrix } from "./cursor.mjs";
|
|
13
|
-
import { openCodeAdapter } from "./opencode.mjs";
|
|
14
|
-
|
|
15
|
-
const { describe, expect, it } = EffectVitest;
|
|
16
|
-
|
|
17
|
-
const fixture = async <Value>(name: string): Promise<Value> =>
|
|
18
|
-
JSON.parse(
|
|
19
|
-
await readFile(new URL(`../test-fixtures/cursor/${name}.json`, import.meta.url), "utf-8"),
|
|
20
|
-
) as Value;
|
|
21
|
-
|
|
22
|
-
const contextFixture = await fixture<Parameters<typeof project>[0]["contextPlan"]>("context-plan");
|
|
23
|
-
const contextPlan = await Effect.runPromise(
|
|
24
|
-
compileContextPlan(await fixture<CompileContextPlanInput>("compiler-input")),
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
testHarnessProjectionContract({ adapter: cursorAdapter, contextPlan, name: "cursor" });
|
|
28
|
-
|
|
29
|
-
describe("Cursor harness projection", () => {
|
|
30
|
-
it("matches the production compiler's canonical contribution identities", () => {
|
|
31
|
-
expect(contextPlan).toStrictEqual(contextFixture);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it("projects the canonical .agents prompt from one production plan across all adapters", () => {
|
|
35
|
-
const sharedPromptId = ".agents:shared-agents";
|
|
36
|
-
const targets = Object.fromEntries(
|
|
37
|
-
[claudeAdapter, codexAdapter, cursorAdapter, openCodeAdapter].map((adapter) => {
|
|
38
|
-
const result = project({ adapter, contextPlan });
|
|
39
|
-
const action = result.actions.find(({ trace }) => trace.contribution.id === sharedPromptId);
|
|
40
|
-
|
|
41
|
-
if (result.summary._tag !== "HarnessProjectionPartial") {
|
|
42
|
-
throw new Error(`${adapter.matrix.adapter.id} did not preserve typed omissions`);
|
|
43
|
-
}
|
|
44
|
-
expect(result.summary.omissions.map(({ trace }) => trace.contribution.id)).toEqual([
|
|
45
|
-
...(adapter.matrix.adapter.id === "opencode" ? ["scaffold-update-check"] : []),
|
|
46
|
-
"agent-browser",
|
|
47
|
-
"opensrc",
|
|
48
|
-
"portless",
|
|
49
|
-
"skills",
|
|
50
|
-
]);
|
|
51
|
-
expect(action).toMatchObject({
|
|
52
|
-
source: ".agents/AGENTS.md",
|
|
53
|
-
trace: { contribution: { id: sharedPromptId }, scopeId: ".agents" },
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
return [adapter.matrix.adapter.id, action?.target];
|
|
57
|
-
}),
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
expect(targets).toStrictEqual({
|
|
61
|
-
claude: ".claude/CLAUDE.md",
|
|
62
|
-
codex: ".codex/AGENTS.md",
|
|
63
|
-
cursor: ".agents/AGENTS.md",
|
|
64
|
-
opencode: ".opencode/AGENTS.md",
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it("publishes the exact versioned five-family capability matrix", async () => {
|
|
69
|
-
expect(cursorCapabilityMatrix).toStrictEqual(await fixture("matrix"));
|
|
70
|
-
expect(JSON.stringify(cursorCapabilityMatrix)).toBe(JSON.stringify(await fixture("matrix")));
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it("projects supported bytes and records narrower support without losing canonical identity", async () => {
|
|
74
|
-
const result = project({ adapter: cursorAdapter, contextPlan });
|
|
75
|
-
const actions = result.actions.map(({ trace: _trace, ...action }) => action);
|
|
76
|
-
|
|
77
|
-
expect(actions).toStrictEqual(await fixture("projection"));
|
|
78
|
-
expect(JSON.stringify(actions)).toBe(JSON.stringify(await fixture("projection")));
|
|
79
|
-
expect(result.summary._tag).toBe("HarnessProjectionPartial");
|
|
80
|
-
expect(
|
|
81
|
-
result.actions.every(({ contributionId, trace }) => contributionId === trace.contribution.id),
|
|
82
|
-
).toBe(true);
|
|
83
|
-
expect(result.actions).toEqual(
|
|
84
|
-
expect.arrayContaining([
|
|
85
|
-
expect.objectContaining({
|
|
86
|
-
contributionId: "effect-authoring",
|
|
87
|
-
operation: "native",
|
|
88
|
-
source: ".agents/skills/effect-authoring/SKILL.md",
|
|
89
|
-
}),
|
|
90
|
-
expect.objectContaining({
|
|
91
|
-
contributionId: ".agents:shared-agents",
|
|
92
|
-
operation: "native",
|
|
93
|
-
source: ".agents/AGENTS.md",
|
|
94
|
-
target: ".agents/AGENTS.md",
|
|
95
|
-
}),
|
|
96
|
-
]),
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it("omits an unknown degraded lifecycle hook while preserving known projections", () => {
|
|
101
|
-
const unknownHook = {
|
|
102
|
-
compatibility: [],
|
|
103
|
-
identity: { id: "unknown-hook", version: "2026.07.28" },
|
|
104
|
-
kind: "lifecycle-hook" as const,
|
|
105
|
-
order: 99,
|
|
106
|
-
provenance: { revision: "2026.07.28", source: "bundled" as const },
|
|
107
|
-
references: [],
|
|
108
|
-
};
|
|
109
|
-
const plan = {
|
|
110
|
-
...contextPlan,
|
|
111
|
-
scopes: contextPlan.scopes.map((scope) =>
|
|
112
|
-
scope.id === "root"
|
|
113
|
-
? { ...scope, contributions: [...scope.contributions, unknownHook] }
|
|
114
|
-
: scope,
|
|
115
|
-
),
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const result = project({ adapter: cursorAdapter, contextPlan: plan });
|
|
119
|
-
|
|
120
|
-
expect(result.actions.map(({ contributionId }) => contributionId)).toEqual(
|
|
121
|
-
expect.arrayContaining(["format-edited-file", "scaffold-update-check"]),
|
|
122
|
-
);
|
|
123
|
-
expect(result.summary._tag).toBe("HarnessProjectionPartial");
|
|
124
|
-
if (result.summary._tag === "HarnessProjectionPartial") {
|
|
125
|
-
expect(
|
|
126
|
-
result.summary.omissions.find(({ trace }) => trace.contribution.id === "unknown-hook"),
|
|
127
|
-
).toMatchObject({
|
|
128
|
-
_tag: "HarnessProjectionOmission",
|
|
129
|
-
support: "unsupported",
|
|
130
|
-
warning: {
|
|
131
|
-
_tag: "UnsupportedHarnessCapabilityWarning",
|
|
132
|
-
family: "lifecycle-hook",
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
expect(result.summary).not.toHaveProperty("errors");
|
|
137
|
-
});
|
|
138
|
-
});
|
package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
|
|
3
|
-
import * as EffectVitest from "@effect/vitest";
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
|
|
6
|
-
import type { CompileContextPlanInput } from "../../../../scaffold/models";
|
|
7
|
-
import { compileContextPlan } from "../../../../features/context-planning";
|
|
8
|
-
import { testHarnessProjectionContract } from "../contract";
|
|
9
|
-
import { project } from "../core.mjs";
|
|
10
|
-
import { openCodeAdapter, openCodeCapabilityMatrix } from "./opencode.mjs";
|
|
11
|
-
|
|
12
|
-
const { describe, expect, it } = EffectVitest;
|
|
13
|
-
|
|
14
|
-
const fixture = async <Value>(name: string): Promise<Value> =>
|
|
15
|
-
JSON.parse(
|
|
16
|
-
await readFile(new URL(`../test-fixtures/opencode/${name}.json`, import.meta.url), "utf-8"),
|
|
17
|
-
) as Value;
|
|
18
|
-
|
|
19
|
-
const contextFixture = await fixture<Parameters<typeof project>[0]["contextPlan"]>("context-plan");
|
|
20
|
-
const contextPlan = await Effect.runPromise(
|
|
21
|
-
compileContextPlan(await fixture<CompileContextPlanInput>("compiler-input")),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
testHarnessProjectionContract({ adapter: openCodeAdapter, contextPlan, name: "OpenCode" });
|
|
25
|
-
|
|
26
|
-
describe("OpenCode harness projection", () => {
|
|
27
|
-
it("matches the production compiler's canonical contribution identities", () => {
|
|
28
|
-
expect(contextPlan).toStrictEqual(contextFixture);
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it("publishes the exact versioned five-family capability matrix", async () => {
|
|
32
|
-
expect(openCodeCapabilityMatrix).toStrictEqual(await fixture("matrix"));
|
|
33
|
-
expect(JSON.stringify(openCodeCapabilityMatrix)).toBe(JSON.stringify(await fixture("matrix")));
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("projects supported bytes and records narrower support without losing canonical identity", async () => {
|
|
37
|
-
const result = project({ adapter: openCodeAdapter, contextPlan });
|
|
38
|
-
const actions = result.actions.map(({ trace: _trace, ...action }) => action);
|
|
39
|
-
|
|
40
|
-
expect(actions).toStrictEqual(await fixture("projection"));
|
|
41
|
-
expect(JSON.stringify(actions)).toBe(JSON.stringify(await fixture("projection")));
|
|
42
|
-
expect(result.summary._tag).toBe("HarnessProjectionPartial");
|
|
43
|
-
expect(
|
|
44
|
-
result.actions.every(({ contributionId, trace }) => contributionId === trace.contribution.id),
|
|
45
|
-
).toBe(true);
|
|
46
|
-
expect(result.actions).toEqual(
|
|
47
|
-
expect.arrayContaining([
|
|
48
|
-
expect.objectContaining({
|
|
49
|
-
contributionId: "effect-authoring",
|
|
50
|
-
operation: "native",
|
|
51
|
-
source: ".agents/skills/effect-authoring/SKILL.md",
|
|
52
|
-
}),
|
|
53
|
-
expect.objectContaining({
|
|
54
|
-
contributionId: ".agents:shared-agents",
|
|
55
|
-
operation: "mirror",
|
|
56
|
-
source: ".agents/AGENTS.md",
|
|
57
|
-
target: ".opencode/AGENTS.md",
|
|
58
|
-
}),
|
|
59
|
-
]),
|
|
60
|
-
);
|
|
61
|
-
expect(result.summary).toMatchObject({
|
|
62
|
-
_tag: "HarnessProjectionPartial",
|
|
63
|
-
omissions: [
|
|
64
|
-
{
|
|
65
|
-
trace: { contribution: { id: "scaffold-update-check" } },
|
|
66
|
-
warning: {
|
|
67
|
-
family: "lifecycle-hook",
|
|
68
|
-
reason: "OpenCode lifecycle hook scaffold-update-check has no native projection",
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
...["agent-browser", "opensrc", "portless", "skills"].map((id) => ({
|
|
72
|
-
trace: { contribution: { id } },
|
|
73
|
-
warning: { family: "tool-configuration" },
|
|
74
|
-
})),
|
|
75
|
-
],
|
|
76
|
-
});
|
|
77
|
-
expect(
|
|
78
|
-
result.actions.filter(({ id }) =>
|
|
79
|
-
id.startsWith("opencode:lifecycle-hook:root:format-edited-file:"),
|
|
80
|
-
),
|
|
81
|
-
).toMatchObject([
|
|
82
|
-
{
|
|
83
|
-
contributionId: "format-edited-file",
|
|
84
|
-
operation: "mirror",
|
|
85
|
-
source: ".agents/hooks/format-edited-file.mjs",
|
|
86
|
-
target: ".opencode/plugins/format-edited-file.mjs",
|
|
87
|
-
},
|
|
88
|
-
]);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it("returns unsupported for lifecycle hooks without a native projection", () => {
|
|
92
|
-
const capability = openCodeAdapter.matrix.capabilities.find(
|
|
93
|
-
({ family }) => family === "lifecycle-hook",
|
|
94
|
-
);
|
|
95
|
-
const hooks = contextPlan.scopes
|
|
96
|
-
.flatMap(({ contributions }) => contributions)
|
|
97
|
-
.filter(({ kind }) => kind === "lifecycle-hook");
|
|
98
|
-
if (capability === undefined) {
|
|
99
|
-
throw new Error("OpenCode lifecycle-hook capability is missing");
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const formatter = hooks.find(({ identity }) => identity.id === "format-edited-file");
|
|
103
|
-
const updateCheck = hooks.find(({ identity }) => identity.id === "scaffold-update-check");
|
|
104
|
-
if (formatter === undefined || updateCheck === undefined) {
|
|
105
|
-
throw new Error("Canonical lifecycle hooks are missing");
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
expect(
|
|
109
|
-
openCodeAdapter.project({ capability, contribution: formatter, scopeId: "root" }),
|
|
110
|
-
).toBeInstanceOf(Array);
|
|
111
|
-
expect(
|
|
112
|
-
openCodeAdapter.project({ capability, contribution: updateCheck, scopeId: "root" }),
|
|
113
|
-
).toEqual({
|
|
114
|
-
_tag: "HarnessProjectionUnsupported",
|
|
115
|
-
reason: "OpenCode lifecycle hook scaffold-update-check has no native projection",
|
|
116
|
-
});
|
|
117
|
-
expect(
|
|
118
|
-
openCodeAdapter.project({
|
|
119
|
-
capability,
|
|
120
|
-
contribution: {
|
|
121
|
-
compatibility: [],
|
|
122
|
-
identity: { id: "unknown-hook", version: "2026.07.28" },
|
|
123
|
-
kind: "lifecycle-hook",
|
|
124
|
-
order: 99,
|
|
125
|
-
provenance: { revision: "2026.07.28", source: "bundled" },
|
|
126
|
-
references: [],
|
|
127
|
-
},
|
|
128
|
-
scopeId: "root",
|
|
129
|
-
}),
|
|
130
|
-
).toEqual({
|
|
131
|
-
_tag: "HarnessProjectionUnsupported",
|
|
132
|
-
reason: "OpenCode lifecycle hook unknown-hook has no native projection",
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
});
|