@vibe-engineer/adapter-pi 0.1.0 → 0.2.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.
@@ -1,174 +1,28 @@
1
1
  import {
2
2
  getPiAdapterCapabilityMatrix
3
- } from "./chunk-RC3EILIE.js";
3
+ } from "./chunk-BUGDS7N5.js";
4
4
  import {
5
5
  SKILL_IDS,
6
6
  createDownstreamManifestSummary,
7
7
  validateCapabilityMatrix,
8
8
  validateGeneratedFileManifest
9
- } from "./chunk-VXZJPOEE.js";
10
-
11
- // src/generated-file-manifest/index.ts
12
- var PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION = "pi-generated-file-manifest/v1";
13
- var version = (formatName, formatVersion) => ({
14
- formatName,
15
- formatVersion,
16
- schemaVersion: PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION,
17
- adapterCapabilityVersion: "pi-adapter-capability-matrix/v1"
18
- });
19
- var trustSecurity = (overrides) => ({
20
- ...overrides,
21
- evidence: {
22
- state: "known",
23
- source: "DL-06-agentic-harness-integrations.md + DL-22-security-safety-model.md",
24
- notes: "Generated-file family carries explicit trust, sandbox, credential, command, external-integration, and destructive-operation semantics."
25
- }
26
- });
27
- var family = (familyId, description, pathPatterns, producedByLane, consumedByLanes, security, fileVersion, readinessState, reason) => ({
28
- familyId,
29
- description,
30
- pathPatterns,
31
- owner: {
32
- ownerKind: "lane",
33
- ownerId: producedByLane,
34
- writePathScope: pathPatterns,
35
- allowedOperations: ["generate-in-later-lane", "validate"]
36
- },
37
- producedByLane,
38
- consumedByLanes,
39
- trustSecurity: security,
40
- version: fileVersion,
41
- readiness: {
42
- state: readinessState,
43
- reason
44
- }
45
- });
46
- var projectInstructionSecurity = trustSecurity({
47
- classification: "project-instruction",
48
- trustBoundary: "Project-local instructions are loaded by pi after project trust; content must remain domain-neutral and cannot embed secrets.",
49
- projectTrustRequired: true,
50
- executesCode: false,
51
- commandPolicy: "not-applicable",
52
- sandboxCapability: "not_provided",
53
- credentialPolicy: "no-credentials-required",
54
- externalIntegration: "disabled-by-default",
55
- destructiveOperationPolicy: "forbidden"
56
- });
57
- var PI_GENERATED_FILE_MANIFEST = {
58
- schemaVersion: PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION,
59
- adapterId: "pi",
60
- adapterCapabilityVersion: "pi-adapter-capability-matrix/v1",
61
- producedByLane: "I-14A-pi-adapter-capability-generated-file-manifest",
62
- families: [
63
- family(
64
- "pi-skill-files",
65
- "Agent Skills-compatible files for the six locked vibe-engineer skills.",
66
- [".pi/skills/<skill>/SKILL.md", ".agents/skills/<skill>/SKILL.md"],
67
- "I-14B-pi-adapter-runtime-skill-consumption",
68
- ["I-14B-pi-adapter-runtime-skill-consumption", "I-15A-create-import-cli-ux-selected-harness", "I-21-build-skill-orchestration"],
69
- projectInstructionSecurity,
70
- version("Agent Skills SKILL.md", "v1"),
71
- "ready",
72
- "Manifest family is declared and validated by I-14A; actual file generation/runtime proof belongs to I-14B/I-15A."
73
- ),
74
- family(
75
- "pi-prompt-templates",
76
- "Reusable pi slash-command prompt templates for generated skill workflows.",
77
- [".pi/prompts/<name>.md"],
78
- "I-14B-pi-adapter-runtime-skill-consumption",
79
- ["I-14B-pi-adapter-runtime-skill-consumption", "I-15A-create-import-cli-ux-selected-harness"],
80
- projectInstructionSecurity,
81
- version("Pi prompt template markdown", "v1"),
82
- "ready",
83
- "Templates are an allowed family only when downstream lanes validate manifest metadata and avoid silent unsupported behavior."
84
- ),
85
- family(
86
- "pi-extensions",
87
- "Optional TypeScript extensions for commands, tools, hooks, permission/path gates, subagent or plan-mode-like behavior, and dynamic resources.",
88
- [".pi/extensions/<name>.ts", ".pi/extensions/<name>/index.ts"],
89
- "I-14B-pi-adapter-runtime-skill-consumption",
90
- ["I-14B-pi-adapter-runtime-skill-consumption", "I-18-security-safety-hooks-policy", "I-21-build-skill-orchestration"],
91
- trustSecurity({
92
- classification: "executable-extension",
93
- trustBoundary: "TypeScript extension code executes with pi/package permissions after project trust; no sandbox isolation is claimed by I-14A.",
94
- projectTrustRequired: true,
95
- executesCode: true,
96
- commandPolicy: "default-deny",
97
- sandboxCapability: "not_provided",
98
- credentialPolicy: "operator-supplied-only",
99
- externalIntegration: "disabled-by-default",
100
- destructiveOperationPolicy: "approval-required"
101
- }),
102
- version("Pi TypeScript extension", "v1"),
103
- "blocked",
104
- "Executable extension generation and live loading are intentionally blocked until I-14B/I-18 prove the actual runtime/security boundary."
105
- ),
106
- family(
107
- "pi-package-manifest",
108
- "Optional package.json `pi` key for shareable resources.",
109
- ["package.json#pi"],
110
- "I-14B-pi-adapter-runtime-skill-consumption",
111
- ["I-14B-pi-adapter-runtime-skill-consumption", "I-15B-starter-template-harness-consumption"],
112
- trustSecurity({
113
- classification: "package-manifest",
114
- trustBoundary: "Pi package install/update/trust behavior must be explicit before a package manifest is generated or consumed.",
115
- projectTrustRequired: true,
116
- executesCode: true,
117
- commandPolicy: "default-deny",
118
- sandboxCapability: "not_provided",
119
- credentialPolicy: "operator-supplied-only",
120
- externalIntegration: "disabled-by-default",
121
- destructiveOperationPolicy: "approval-required"
122
- }),
123
- version("Pi package manifest key", "v1"),
124
- "deferred",
125
- "Optional package distribution is declared for compatibility but not generated by I-14A."
126
- ),
127
- family(
128
- "context-files",
129
- "Project context/instruction files loaded by pi and optional cross-harness compatibility context.",
130
- ["AGENTS.md", "CLAUDE.md"],
131
- "I-15A-create-import-cli-ux-selected-harness",
132
- ["I-15A-create-import-cli-ux-selected-harness", "I-08-context-graph-index-drift", "I-21-build-skill-orchestration"],
133
- projectInstructionSecurity,
134
- version("Pi context file", "v1"),
135
- "ready",
136
- "Context file family is ready as manifest data; actual starter/create writes belong to I-15A."
137
- ),
138
- family(
139
- "harness-config",
140
- "Generated harness config fields recording `agenticHarness: pi` and adapter capability/version metadata.",
141
- ["generated harness config field: agenticHarness=pi", "generated harness config field: adapterCapabilityVersion", "generated harness config field: generatedFileManifestVersion"],
142
- "I-15A-create-import-cli-ux-selected-harness",
143
- ["I-15A-create-import-cli-ux-selected-harness", "I-15B-starter-template-harness-consumption", "I-21-build-skill-orchestration"],
144
- trustSecurity({
145
- classification: "configuration",
146
- trustBoundary: "Configuration selects the typed pi adapter manifest only; it must not silently enable unsupported non-pi harnesses or runtime claims.",
147
- projectTrustRequired: false,
148
- executesCode: false,
149
- commandPolicy: "not-applicable",
150
- sandboxCapability: "not_provided",
151
- credentialPolicy: "no-credentials-required",
152
- externalIntegration: "disabled-by-default",
153
- destructiveOperationPolicy: "forbidden"
154
- }),
155
- version("vibe-engineer harness adapter config", "v1"),
156
- "ready",
157
- "Config metadata is ready for downstream consumption after this manifest validates; create/import behavior remains I-15A-owned."
158
- )
159
- ]
160
- };
161
- var getPiGeneratedFileManifest = () => structuredClone(PI_GENERATED_FILE_MANIFEST);
162
- var validatePiGeneratedFileManifest = (value) => validateGeneratedFileManifest(value);
163
- var createPiDownstreamManifestSummary = () => createDownstreamManifestSummary(getPiAdapterCapabilityMatrix(), getPiGeneratedFileManifest());
9
+ } from "./chunk-QEXU5LD2.js";
164
10
 
165
11
  // src/create-consumption/index.ts
166
- var CREATE_PI_ASSET_FAMILIES = Object.freeze(["pi-skill-files", "pi-prompt-templates"]);
12
+ var CREATE_PI_ASSET_FAMILIES = Object.freeze([
13
+ "pi-skill-files",
14
+ "pi-prompt-templates"
15
+ ]);
167
16
  var CREATE_CONSUMER_LANE = "I-15A-create-import-cli-ux-selected-harness";
168
17
  var RUNTIME_PRODUCER_LANE = "I-14B-pi-adapter-runtime-skill-consumption";
169
18
  var PI_SKILL_PATTERN = ".pi/skills/<skill>/SKILL.md";
170
19
  var PI_PROMPT_PATTERN = ".pi/prompts/<name>.md";
171
- var EXCLUDED_FAMILY_IDS = Object.freeze(["pi-extensions", "pi-package-manifest", "context-files", "harness-config"]);
20
+ var EXCLUDED_FAMILY_IDS = Object.freeze([
21
+ "pi-extensions",
22
+ "pi-package-manifest",
23
+ "context-files",
24
+ "harness-config"
25
+ ]);
172
26
  var forbiddenDomainMarkers = () => Object.freeze([
173
27
  "ecommerce",
174
28
  "fashion",
@@ -203,38 +57,81 @@ var validateManifestAndMatrix = (manifest, capabilityMatrix, issues) => {
203
57
  const matrixValidation = validateCapabilityMatrix(capabilityMatrix);
204
58
  if (!matrixValidation.valid) {
205
59
  for (const matrixIssue of matrixValidation.issues) {
206
- issue(issues, `capabilityMatrix${matrixIssue.path.slice(1)}`, matrixIssue.code, matrixIssue.message);
60
+ issue(
61
+ issues,
62
+ `capabilityMatrix${matrixIssue.path.slice(1)}`,
63
+ matrixIssue.code,
64
+ matrixIssue.message
65
+ );
207
66
  }
208
67
  }
209
68
  const manifestValidation = validateGeneratedFileManifest(manifest);
210
69
  if (!manifestValidation.valid) {
211
70
  for (const manifestIssue of manifestValidation.issues) {
212
- issue(issues, `generatedFileManifest${manifestIssue.path.slice(1)}`, manifestIssue.code, manifestIssue.message);
71
+ issue(
72
+ issues,
73
+ `generatedFileManifest${manifestIssue.path.slice(1)}`,
74
+ manifestIssue.code,
75
+ manifestIssue.message
76
+ );
213
77
  }
214
78
  }
215
79
  const selectedFamilies = manifest.families.filter((family2) => isCreateFamilyId(family2.familyId));
216
- if (!sameStringSet(selectedFamilies.map((family2) => family2.familyId), [...CREATE_PI_ASSET_FAMILIES])) {
217
- issue(issues, "generatedFileManifest.families", "create_pi_asset_family_set_mismatch", "Create pi asset selector must be exactly pi-skill-files plus pi-prompt-templates.");
80
+ if (!sameStringSet(
81
+ selectedFamilies.map((family2) => family2.familyId),
82
+ [...CREATE_PI_ASSET_FAMILIES]
83
+ )) {
84
+ issue(
85
+ issues,
86
+ "generatedFileManifest.families",
87
+ "create_pi_asset_family_set_mismatch",
88
+ "Create pi asset selector must be exactly pi-skill-files plus pi-prompt-templates."
89
+ );
218
90
  }
219
91
  for (const familyId of CREATE_PI_ASSET_FAMILIES) {
220
92
  const family2 = familyById(manifest, familyId);
221
93
  if (family2 === void 0) {
222
- issue(issues, `generatedFileManifest.families.${familyId}`, "missing_create_pi_asset_family", `Required create pi asset family '${familyId}' is absent.`);
94
+ issue(
95
+ issues,
96
+ `generatedFileManifest.families.${familyId}`,
97
+ "missing_create_pi_asset_family",
98
+ `Required create pi asset family '${familyId}' is absent.`
99
+ );
223
100
  continue;
224
101
  }
225
102
  if (family2.readiness.state !== "ready") {
226
- issue(issues, `generatedFileManifest.families.${familyId}.readiness`, "create_pi_asset_family_not_ready", `Create pi asset family '${familyId}' must be ready.`);
103
+ issue(
104
+ issues,
105
+ `generatedFileManifest.families.${familyId}.readiness`,
106
+ "create_pi_asset_family_not_ready",
107
+ `Create pi asset family '${familyId}' must be ready.`
108
+ );
227
109
  }
228
110
  if (family2.producedByLane !== RUNTIME_PRODUCER_LANE) {
229
- issue(issues, `generatedFileManifest.families.${familyId}.producedByLane`, "create_pi_asset_family_wrong_producer", `Create pi asset family '${familyId}' must be produced by ${RUNTIME_PRODUCER_LANE}.`);
111
+ issue(
112
+ issues,
113
+ `generatedFileManifest.families.${familyId}.producedByLane`,
114
+ "create_pi_asset_family_wrong_producer",
115
+ `Create pi asset family '${familyId}' must be produced by ${RUNTIME_PRODUCER_LANE}.`
116
+ );
230
117
  }
231
118
  if (!family2.consumedByLanes.includes(CREATE_CONSUMER_LANE)) {
232
- issue(issues, `generatedFileManifest.families.${familyId}.consumedByLanes`, "create_pi_asset_family_not_consumed_by_create", `Create pi asset family '${familyId}' must be consumed by ${CREATE_CONSUMER_LANE}.`);
119
+ issue(
120
+ issues,
121
+ `generatedFileManifest.families.${familyId}.consumedByLanes`,
122
+ "create_pi_asset_family_not_consumed_by_create",
123
+ `Create pi asset family '${familyId}' must be consumed by ${CREATE_CONSUMER_LANE}.`
124
+ );
233
125
  }
234
126
  }
235
127
  for (const excludedFamilyId of EXCLUDED_FAMILY_IDS) {
236
128
  if (CREATE_PI_ASSET_FAMILIES.includes(excludedFamilyId)) {
237
- issue(issues, `generatedFileManifest.families.${excludedFamilyId}`, "blocked_or_i15a_family_selected", `Family '${excludedFamilyId}' must never be selected for create pi asset writes.`);
129
+ issue(
130
+ issues,
131
+ `generatedFileManifest.families.${excludedFamilyId}`,
132
+ "blocked_or_i15a_family_selected",
133
+ `Family '${excludedFamilyId}' must never be selected for create pi asset writes.`
134
+ );
238
135
  }
239
136
  }
240
137
  };
@@ -248,31 +145,45 @@ var selectCreatePiAssets = (input) => {
248
145
  const skillFamily = familyById(manifest, "pi-skill-files");
249
146
  const promptFamily = familyById(manifest, "pi-prompt-templates");
250
147
  if (skillFamily !== void 0 && !skillFamily.pathPatterns.includes(PI_SKILL_PATTERN)) {
251
- issue(issues, "generatedFileManifest.families.pi-skill-files.pathPatterns", "missing_pi_skill_path_pattern", "Create pi assets require the .pi skill path pattern, not an alternate only.");
148
+ issue(
149
+ issues,
150
+ "generatedFileManifest.families.pi-skill-files.pathPatterns",
151
+ "missing_pi_skill_path_pattern",
152
+ "Create pi assets require the .pi skill path pattern, not an alternate only."
153
+ );
252
154
  }
253
155
  if (promptFamily !== void 0 && !promptFamily.pathPatterns.includes(PI_PROMPT_PATTERN)) {
254
- issue(issues, "generatedFileManifest.families.pi-prompt-templates.pathPatterns", "missing_pi_prompt_path_pattern", "Create pi assets require the .pi prompt path pattern.");
156
+ issue(
157
+ issues,
158
+ "generatedFileManifest.families.pi-prompt-templates.pathPatterns",
159
+ "missing_pi_prompt_path_pattern",
160
+ "Create pi assets require the .pi prompt path pattern."
161
+ );
255
162
  }
256
163
  if (issues.length > 0) {
257
164
  throw new CreatePiAssetValidationError("Create pi asset family selection failed.", issues);
258
165
  }
259
166
  return Object.freeze([
260
- ...SKILL_IDS.map((skillId) => ({
261
- kind: "skill",
262
- familyId: "pi-skill-files",
263
- skillId,
264
- path: skillPath(skillId),
265
- shippedTemplatePath: `templates/pi/runtime-fixtures/${skillPath(skillId)}`,
266
- manifestPathPattern: PI_SKILL_PATTERN
267
- })),
268
- ...SKILL_IDS.map((skillId) => ({
269
- kind: "prompt-template",
270
- familyId: "pi-prompt-templates",
271
- skillId,
272
- path: promptPath(skillId),
273
- shippedTemplatePath: `templates/pi/runtime-fixtures/${promptPath(skillId)}`,
274
- manifestPathPattern: PI_PROMPT_PATTERN
275
- }))
167
+ ...SKILL_IDS.map(
168
+ (skillId) => ({
169
+ kind: "skill",
170
+ familyId: "pi-skill-files",
171
+ skillId,
172
+ path: skillPath(skillId),
173
+ shippedTemplatePath: `templates/pi/runtime-fixtures/${skillPath(skillId)}`,
174
+ manifestPathPattern: PI_SKILL_PATTERN
175
+ })
176
+ ),
177
+ ...SKILL_IDS.map(
178
+ (skillId) => ({
179
+ kind: "prompt-template",
180
+ familyId: "pi-prompt-templates",
181
+ skillId,
182
+ path: promptPath(skillId),
183
+ shippedTemplatePath: `templates/pi/runtime-fixtures/${promptPath(skillId)}`,
184
+ manifestPathPattern: PI_PROMPT_PATTERN
185
+ })
186
+ )
276
187
  ]);
277
188
  };
278
189
  var CreatePiAssetValidationError = class _CreatePiAssetValidationError extends Error {
@@ -289,17 +200,30 @@ var validateCreatePiAssetWritePlan = (input) => {
289
200
  validateManifestAndMatrix(input.manifest, input.capabilityMatrix, issues);
290
201
  let expectedAssets = [];
291
202
  try {
292
- expectedAssets = selectCreatePiAssets({ manifest: input.manifest, capabilityMatrix: input.capabilityMatrix });
203
+ expectedAssets = selectCreatePiAssets({
204
+ manifest: input.manifest,
205
+ capabilityMatrix: input.capabilityMatrix
206
+ });
293
207
  } catch (error) {
294
208
  if (error instanceof CreatePiAssetValidationError) {
295
209
  issues.push(...error.issues);
296
210
  } else {
297
- issue(issues, "generatedFileManifest", "create_pi_asset_selection_failed", "Create pi asset selector failed unexpectedly.");
211
+ issue(
212
+ issues,
213
+ "generatedFileManifest",
214
+ "create_pi_asset_selection_failed",
215
+ "Create pi asset selector failed unexpectedly."
216
+ );
298
217
  }
299
218
  }
300
219
  const expectedByPath = new Map(expectedAssets.map((asset) => [asset.path, asset]));
301
220
  if (input.writes.length !== expectedAssets.length) {
302
- issue(issues, "writes", "create_pi_asset_write_count_mismatch", "Create pi asset write plan must contain exactly six skill files and six prompt templates.");
221
+ issue(
222
+ issues,
223
+ "writes",
224
+ "create_pi_asset_write_count_mismatch",
225
+ "Create pi asset write plan must contain exactly six skill files and six prompt templates."
226
+ );
303
227
  }
304
228
  const seenPaths = /* @__PURE__ */ new Set();
305
229
  for (let index = 0; index < input.writes.length; index += 1) {
@@ -309,29 +233,64 @@ var validateCreatePiAssetWritePlan = (input) => {
309
233
  continue;
310
234
  }
311
235
  if (!relativePathSafe(write.path)) {
312
- issue(issues, `writes[${index}].path`, "unsafe_write_path", "Create pi asset write path must be relative and non-traversing.");
236
+ issue(
237
+ issues,
238
+ `writes[${index}].path`,
239
+ "unsafe_write_path",
240
+ "Create pi asset write path must be relative and non-traversing."
241
+ );
313
242
  }
314
243
  if (seenPaths.has(write.path)) {
315
- issue(issues, `writes[${index}].path`, "duplicate_write_path", "Create pi asset write paths must be unique.");
244
+ issue(
245
+ issues,
246
+ `writes[${index}].path`,
247
+ "duplicate_write_path",
248
+ "Create pi asset write paths must be unique."
249
+ );
316
250
  }
317
251
  seenPaths.add(write.path);
318
252
  const expected = expectedByPath.get(write.path);
319
253
  if (expected === void 0) {
320
- issue(issues, `writes[${index}].path`, "write_path_not_in_create_pi_asset_manifest", "Write path is not one of the selected create pi asset paths.");
254
+ issue(
255
+ issues,
256
+ `writes[${index}].path`,
257
+ "write_path_not_in_create_pi_asset_manifest",
258
+ "Write path is not one of the selected create pi asset paths."
259
+ );
321
260
  } else if (write.familyId !== expected.familyId || write.kind !== expected.kind || write.skillId !== expected.skillId || write.manifestPathPattern !== expected.manifestPathPattern || write.shippedTemplatePath !== expected.shippedTemplatePath) {
322
- issue(issues, `writes[${index}]`, "write_descriptor_mismatch", "Write descriptor must match the selected create pi asset descriptor exactly.");
261
+ issue(
262
+ issues,
263
+ `writes[${index}]`,
264
+ "write_descriptor_mismatch",
265
+ "Write descriptor must match the selected create pi asset descriptor exactly."
266
+ );
323
267
  }
324
268
  if (write.content.trim().length === 0) {
325
- issue(issues, `writes[${index}].content`, "empty_create_pi_asset_content", "Create pi asset content must be non-empty.");
269
+ issue(
270
+ issues,
271
+ `writes[${index}].content`,
272
+ "empty_create_pi_asset_content",
273
+ "Create pi asset content must be non-empty."
274
+ );
326
275
  }
327
276
  const marker = hasDomainMarker(write.content);
328
277
  if (marker !== null) {
329
- issue(issues, `writes[${index}].content`, "create_pi_asset_domain_marker", `Create pi asset content contains forbidden domain marker '${marker}'.`);
278
+ issue(
279
+ issues,
280
+ `writes[${index}].content`,
281
+ "create_pi_asset_domain_marker",
282
+ `Create pi asset content contains forbidden domain marker '${marker}'.`
283
+ );
330
284
  }
331
285
  }
332
286
  for (const expected of expectedAssets) {
333
287
  if (!seenPaths.has(expected.path)) {
334
- issue(issues, `writes.${expected.path}`, "missing_create_pi_asset_write", `Missing create pi asset write for ${expected.path}.`);
288
+ issue(
289
+ issues,
290
+ `writes.${expected.path}`,
291
+ "missing_create_pi_asset_write",
292
+ `Missing create pi asset write for ${expected.path}.`
293
+ );
335
294
  }
336
295
  }
337
296
  const existingByPath = new Map(input.existingPaths.map((entry) => [entry.path, entry]));
@@ -340,29 +299,60 @@ var validateCreatePiAssetWritePlan = (input) => {
340
299
  for (let segmentCount = 1; segmentCount < pathSegments.length; segmentCount += 1) {
341
300
  const parentPath = pathSegments.slice(0, segmentCount).join("/");
342
301
  const parent = existingByPath.get(parentPath);
343
- if (parent === void 0 || parent.kind === "missing" || parent.kind === "directory") continue;
302
+ if (parent === void 0 || parent.kind === "missing" || parent.kind === "directory")
303
+ continue;
344
304
  if (parent.kind === "symlink") {
345
- issue(issues, `existingPaths.${parentPath}`, "ancestor_symlink_write_escape", "Create pi asset write refuses symlink ancestors because they may escape the project root.");
305
+ issue(
306
+ issues,
307
+ `existingPaths.${parentPath}`,
308
+ "ancestor_symlink_write_escape",
309
+ "Create pi asset write refuses symlink ancestors because they may escape the project root."
310
+ );
346
311
  } else {
347
- issue(issues, `existingPaths.${parentPath}`, "parent_path_not_directory", "Create pi asset write requires every existing parent path to be a directory.");
312
+ issue(
313
+ issues,
314
+ `existingPaths.${parentPath}`,
315
+ "parent_path_not_directory",
316
+ "Create pi asset write requires every existing parent path to be a directory."
317
+ );
348
318
  }
349
319
  }
350
320
  const existing = existingByPath.get(write.path);
351
321
  if (existing === void 0 || existing.kind === "missing") continue;
352
322
  if (existing.kind === "symlink") {
353
- issue(issues, `existingPaths.${write.path}`, "symlink_write_escape", "Create pi asset write refuses symlink targets because they may escape the project root.");
323
+ issue(
324
+ issues,
325
+ `existingPaths.${write.path}`,
326
+ "symlink_write_escape",
327
+ "Create pi asset write refuses symlink targets because they may escape the project root."
328
+ );
354
329
  continue;
355
330
  }
356
331
  if (existing.kind === "directory") {
357
- issue(issues, `existingPaths.${write.path}`, "unsafe_overwrite_conflict", "Create pi asset write refuses to overwrite a directory.");
332
+ issue(
333
+ issues,
334
+ `existingPaths.${write.path}`,
335
+ "unsafe_overwrite_conflict",
336
+ "Create pi asset write refuses to overwrite a directory."
337
+ );
358
338
  continue;
359
339
  }
360
340
  if (input.conflictPolicy === "fail-on-conflict") {
361
- issue(issues, `existingPaths.${write.path}`, "unsafe_overwrite_conflict", "Create pi asset write refuses existing files under fail-on-conflict policy.");
341
+ issue(
342
+ issues,
343
+ `existingPaths.${write.path}`,
344
+ "unsafe_overwrite_conflict",
345
+ "Create pi asset write refuses existing files under fail-on-conflict policy."
346
+ );
362
347
  continue;
363
348
  }
364
349
  if (existing.currentContent !== write.content) {
365
- issue(issues, `existingPaths.${write.path}`, "unsafe_overwrite_conflict", "Create pi asset write only permits identical-content overwrites in import mode.");
350
+ issue(
351
+ issues,
352
+ `existingPaths.${write.path}`,
353
+ "unsafe_overwrite_conflict",
354
+ "Create pi asset write only permits identical-content overwrites in import mode."
355
+ );
366
356
  }
367
357
  }
368
358
  if (issues.length > 0) {
@@ -379,14 +369,188 @@ var validateCreatePiAssetWritePlan = (input) => {
379
369
  };
380
370
  };
381
371
 
372
+ // src/generated-file-manifest/index.ts
373
+ var PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION = "pi-generated-file-manifest/v1";
374
+ var version = (formatName, formatVersion) => ({
375
+ formatName,
376
+ formatVersion,
377
+ schemaVersion: PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION,
378
+ adapterCapabilityVersion: "pi-adapter-capability-matrix/v1"
379
+ });
380
+ var trustSecurity = (overrides) => ({
381
+ ...overrides,
382
+ evidence: {
383
+ state: "known",
384
+ source: "DL-06-agentic-harness-integrations.md + DL-22-security-safety-model.md",
385
+ notes: "Generated-file family carries explicit trust, sandbox, credential, command, external-integration, and destructive-operation semantics."
386
+ }
387
+ });
388
+ var family = (familyId, description, pathPatterns, producedByLane, consumedByLanes, security, fileVersion, readinessState, reason) => ({
389
+ familyId,
390
+ description,
391
+ pathPatterns,
392
+ owner: {
393
+ ownerKind: "lane",
394
+ ownerId: producedByLane,
395
+ writePathScope: pathPatterns,
396
+ allowedOperations: ["generate-in-later-lane", "validate"]
397
+ },
398
+ producedByLane,
399
+ consumedByLanes,
400
+ trustSecurity: security,
401
+ version: fileVersion,
402
+ readiness: {
403
+ state: readinessState,
404
+ reason
405
+ }
406
+ });
407
+ var projectInstructionSecurity = trustSecurity({
408
+ classification: "project-instruction",
409
+ trustBoundary: "Project-local instructions are loaded by pi after project trust; content must remain domain-neutral and cannot embed secrets.",
410
+ projectTrustRequired: true,
411
+ executesCode: false,
412
+ commandPolicy: "not-applicable",
413
+ sandboxCapability: "not_provided",
414
+ credentialPolicy: "no-credentials-required",
415
+ externalIntegration: "disabled-by-default",
416
+ destructiveOperationPolicy: "forbidden"
417
+ });
418
+ var PI_GENERATED_FILE_MANIFEST = {
419
+ schemaVersion: PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION,
420
+ adapterId: "pi",
421
+ adapterCapabilityVersion: "pi-adapter-capability-matrix/v1",
422
+ producedByLane: "I-14A-pi-adapter-capability-generated-file-manifest",
423
+ families: [
424
+ family(
425
+ "pi-skill-files",
426
+ "Agent Skills-compatible files for the six locked vibe-engineer skills.",
427
+ [".pi/skills/<skill>/SKILL.md", ".agents/skills/<skill>/SKILL.md"],
428
+ "I-14B-pi-adapter-runtime-skill-consumption",
429
+ [
430
+ "I-14B-pi-adapter-runtime-skill-consumption",
431
+ "I-15A-create-import-cli-ux-selected-harness",
432
+ "I-21-build-skill-orchestration"
433
+ ],
434
+ projectInstructionSecurity,
435
+ version("Agent Skills SKILL.md", "v1"),
436
+ "ready",
437
+ "Manifest family is declared and validated by I-14A; actual file generation/runtime proof belongs to I-14B/I-15A."
438
+ ),
439
+ family(
440
+ "pi-prompt-templates",
441
+ "Reusable pi slash-command prompt templates for generated skill workflows.",
442
+ [".pi/prompts/<name>.md"],
443
+ "I-14B-pi-adapter-runtime-skill-consumption",
444
+ ["I-14B-pi-adapter-runtime-skill-consumption", "I-15A-create-import-cli-ux-selected-harness"],
445
+ projectInstructionSecurity,
446
+ version("Pi prompt template markdown", "v1"),
447
+ "ready",
448
+ "Templates are an allowed family only when downstream lanes validate manifest metadata and avoid silent unsupported behavior."
449
+ ),
450
+ family(
451
+ "pi-extensions",
452
+ "Optional TypeScript extensions for commands, tools, hooks, permission/path gates, subagent or plan-mode-like behavior, and dynamic resources.",
453
+ [".pi/extensions/<name>.ts", ".pi/extensions/<name>/index.ts"],
454
+ "I-14B-pi-adapter-runtime-skill-consumption",
455
+ [
456
+ "I-14B-pi-adapter-runtime-skill-consumption",
457
+ "I-18-security-safety-hooks-policy",
458
+ "I-21-build-skill-orchestration"
459
+ ],
460
+ trustSecurity({
461
+ classification: "executable-extension",
462
+ trustBoundary: "TypeScript extension code executes with pi/package permissions after project trust; no sandbox isolation is claimed by I-14A.",
463
+ projectTrustRequired: true,
464
+ executesCode: true,
465
+ commandPolicy: "default-deny",
466
+ sandboxCapability: "not_provided",
467
+ credentialPolicy: "operator-supplied-only",
468
+ externalIntegration: "disabled-by-default",
469
+ destructiveOperationPolicy: "approval-required"
470
+ }),
471
+ version("Pi TypeScript extension", "v1"),
472
+ "blocked",
473
+ "Executable extension generation and live loading are intentionally blocked until I-14B/I-18 prove the actual runtime/security boundary."
474
+ ),
475
+ family(
476
+ "pi-package-manifest",
477
+ "Optional package.json `pi` key for shareable resources.",
478
+ ["package.json#pi"],
479
+ "I-14B-pi-adapter-runtime-skill-consumption",
480
+ ["I-14B-pi-adapter-runtime-skill-consumption", "I-15B-starter-template-harness-consumption"],
481
+ trustSecurity({
482
+ classification: "package-manifest",
483
+ trustBoundary: "Pi package install/update/trust behavior must be explicit before a package manifest is generated or consumed.",
484
+ projectTrustRequired: true,
485
+ executesCode: true,
486
+ commandPolicy: "default-deny",
487
+ sandboxCapability: "not_provided",
488
+ credentialPolicy: "operator-supplied-only",
489
+ externalIntegration: "disabled-by-default",
490
+ destructiveOperationPolicy: "approval-required"
491
+ }),
492
+ version("Pi package manifest key", "v1"),
493
+ "deferred",
494
+ "Optional package distribution is declared for compatibility but not generated by I-14A."
495
+ ),
496
+ family(
497
+ "context-files",
498
+ "Project context/instruction files loaded by pi and optional cross-harness compatibility context.",
499
+ ["AGENTS.md", "CLAUDE.md"],
500
+ "I-15A-create-import-cli-ux-selected-harness",
501
+ [
502
+ "I-15A-create-import-cli-ux-selected-harness",
503
+ "I-08-context-graph-index-drift",
504
+ "I-21-build-skill-orchestration"
505
+ ],
506
+ projectInstructionSecurity,
507
+ version("Pi context file", "v1"),
508
+ "ready",
509
+ "Context file family is ready as manifest data; actual starter/create writes belong to I-15A."
510
+ ),
511
+ family(
512
+ "harness-config",
513
+ "Generated harness config fields recording `agenticHarness: pi` and adapter capability/version metadata.",
514
+ [
515
+ "generated harness config field: agenticHarness=pi",
516
+ "generated harness config field: adapterCapabilityVersion",
517
+ "generated harness config field: generatedFileManifestVersion"
518
+ ],
519
+ "I-15A-create-import-cli-ux-selected-harness",
520
+ [
521
+ "I-15A-create-import-cli-ux-selected-harness",
522
+ "I-15B-starter-template-harness-consumption",
523
+ "I-21-build-skill-orchestration"
524
+ ],
525
+ trustSecurity({
526
+ classification: "configuration",
527
+ trustBoundary: "Configuration selects the typed pi adapter manifest only; it must not silently enable unsupported non-pi harnesses or runtime claims.",
528
+ projectTrustRequired: false,
529
+ executesCode: false,
530
+ commandPolicy: "not-applicable",
531
+ sandboxCapability: "not_provided",
532
+ credentialPolicy: "no-credentials-required",
533
+ externalIntegration: "disabled-by-default",
534
+ destructiveOperationPolicy: "forbidden"
535
+ }),
536
+ version("vibe-engineer harness adapter config", "v1"),
537
+ "ready",
538
+ "Config metadata is ready for downstream consumption after this manifest validates; create/import behavior remains I-15A-owned."
539
+ )
540
+ ]
541
+ };
542
+ var getPiGeneratedFileManifest = () => structuredClone(PI_GENERATED_FILE_MANIFEST);
543
+ var validatePiGeneratedFileManifest = (value) => validateGeneratedFileManifest(value);
544
+ var createPiDownstreamManifestSummary = () => createDownstreamManifestSummary(getPiAdapterCapabilityMatrix(), getPiGeneratedFileManifest());
545
+
382
546
  export {
383
- CREATE_PI_ASSET_FAMILIES,
384
- selectCreatePiAssets,
385
- CreatePiAssetValidationError,
386
- validateCreatePiAssetWritePlan,
387
547
  PI_GENERATED_FILE_MANIFEST_SCHEMA_VERSION,
388
548
  PI_GENERATED_FILE_MANIFEST,
389
549
  getPiGeneratedFileManifest,
390
550
  validatePiGeneratedFileManifest,
391
- createPiDownstreamManifestSummary
551
+ createPiDownstreamManifestSummary,
552
+ CREATE_PI_ASSET_FAMILIES,
553
+ selectCreatePiAssets,
554
+ CreatePiAssetValidationError,
555
+ validateCreatePiAssetWritePlan
392
556
  };