@shrkcrft/inspector 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
Files changed (82) hide show
  1. package/dist/agent-brief.d.ts.map +1 -1
  2. package/dist/agent-brief.js +59 -10
  3. package/dist/agent-task-prep.d.ts.map +1 -1
  4. package/dist/agent-task-prep.js +1 -3
  5. package/dist/ai-readiness.d.ts +84 -9
  6. package/dist/ai-readiness.d.ts.map +1 -1
  7. package/dist/ai-readiness.js +161 -30
  8. package/dist/apply-dispatch-trace.d.ts +1 -2
  9. package/dist/apply-dispatch-trace.d.ts.map +1 -1
  10. package/dist/apply-dispatch-trace.js +0 -9
  11. package/dist/area-explore.d.ts.map +1 -1
  12. package/dist/area-explore.js +1 -5
  13. package/dist/area-map.d.ts +0 -5
  14. package/dist/area-map.d.ts.map +1 -1
  15. package/dist/area-map.js +0 -10
  16. package/dist/compliance-profiles.js +1 -1
  17. package/dist/construct-adoption.d.ts.map +1 -1
  18. package/dist/construct-adoption.js +8 -1
  19. package/dist/demo-script.d.ts +0 -1
  20. package/dist/demo-script.d.ts.map +1 -1
  21. package/dist/demo-script.js +0 -43
  22. package/dist/docs-check.js +1 -1
  23. package/dist/drift-baseline.d.ts.map +1 -1
  24. package/dist/drift-baseline.js +5 -2
  25. package/dist/feedback-ingestion.d.ts.map +1 -1
  26. package/dist/feedback-ingestion.js +0 -6
  27. package/dist/helper-registry.d.ts +27 -54
  28. package/dist/helper-registry.d.ts.map +1 -1
  29. package/dist/helper-registry.js +16 -517
  30. package/dist/impact-analysis.d.ts.map +1 -1
  31. package/dist/impact-analysis.js +4 -5
  32. package/dist/index.d.ts +1 -2
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +1 -2
  35. package/dist/monorepo-onboarding.js +2 -2
  36. package/dist/onboarding-report.d.ts.map +1 -1
  37. package/dist/onboarding-report.js +5 -1
  38. package/dist/onboarding.d.ts +1 -1
  39. package/dist/onboarding.d.ts.map +1 -1
  40. package/dist/onboarding.js +5 -64
  41. package/dist/pack-contributions-inventory.d.ts +0 -1
  42. package/dist/pack-contributions-inventory.d.ts.map +1 -1
  43. package/dist/pack-contributions-inventory.js +0 -24
  44. package/dist/pack-release-check.js +1 -1
  45. package/dist/pack-signature-status.d.ts.map +1 -1
  46. package/dist/pack-signature-status.js +0 -1
  47. package/dist/plan-simulation.d.ts.map +1 -1
  48. package/dist/plan-simulation.js +3 -20
  49. package/dist/profile-registry.d.ts +0 -1
  50. package/dist/profile-registry.d.ts.map +1 -1
  51. package/dist/profile-registry.js +4 -32
  52. package/dist/quality-baseline.d.ts.map +1 -1
  53. package/dist/quality-baseline.js +3 -1
  54. package/dist/ranker-explainability.d.ts.map +1 -1
  55. package/dist/ranker-explainability.js +3 -9
  56. package/dist/release-readiness.js +3 -3
  57. package/dist/reposet.js +1 -1
  58. package/dist/repository-knowledge-model.d.ts +1 -1
  59. package/dist/repository-knowledge-model.d.ts.map +1 -1
  60. package/dist/self-config-doctor-v2.d.ts +1 -1
  61. package/dist/self-config-doctor-v2.d.ts.map +1 -1
  62. package/dist/self-config-doctor-v2.js +6 -10
  63. package/dist/self-config-doctor.d.ts.map +1 -1
  64. package/dist/self-config-doctor.js +7 -13
  65. package/dist/start-here.d.ts +1 -1
  66. package/dist/start-here.js +1 -1
  67. package/dist/synthesize-from-onboarding.d.ts +68 -0
  68. package/dist/synthesize-from-onboarding.d.ts.map +1 -0
  69. package/dist/synthesize-from-onboarding.js +508 -0
  70. package/dist/task-ranker.d.ts.map +1 -1
  71. package/dist/task-ranker.js +1 -31
  72. package/dist/test-runner.js +5 -5
  73. package/dist/universal-search.d.ts +0 -1
  74. package/dist/universal-search.d.ts.map +1 -1
  75. package/dist/universal-search.js +0 -12
  76. package/package.json +17 -17
  77. package/dist/plugin-lifecycle-profile-registry.d.ts +0 -52
  78. package/dist/plugin-lifecycle-profile-registry.d.ts.map +0 -1
  79. package/dist/plugin-lifecycle-profile-registry.js +0 -194
  80. package/dist/plugin-lifecycle.d.ts +0 -132
  81. package/dist/plugin-lifecycle.d.ts.map +0 -1
  82. package/dist/plugin-lifecycle.js +0 -477
@@ -0,0 +1,508 @@
1
+ /**
2
+ * Convert an {@link IOnboardingPlan} into populated `sharkcraft/*.ts`
3
+ * file contents — the engine behind `shrk init --infer --write`.
4
+ *
5
+ * Design goals:
6
+ *
7
+ * - **Populated, not advisory.** The existing `writeOnboardingDrafts`
8
+ * emits files into `sharkcraft/onboarding/` and asks the user to
9
+ * adopt by hand. This module emits directly to `sharkcraft/`-root
10
+ * files so a `shrk init --infer --write` user gets a working
11
+ * project on day 1.
12
+ *
13
+ * - **Honest about confidence.** Inferred entries are tagged with
14
+ * their source signal and confidence; medium-confidence rows get a
15
+ * `// TODO: review` marker on the emitted line. The user can see
16
+ * exactly what was inferred vs hand-curated. Low-confidence rows
17
+ * are dropped from the populated file and reported in the
18
+ * companion `.inferred-report.md` so the user can find them.
19
+ *
20
+ * - **Self-contained output.** Generated files declare their own
21
+ * `defineKnowledgeEntry` / `definePathConvention` stubs — no
22
+ * `@shrkcrft/*` imports, matching the local-mirror pattern from
23
+ * `packages/presets/src/emit/synthesize-files.ts`.
24
+ *
25
+ * - **Deterministic.** Same input → same output, byte-for-byte.
26
+ * Sort lists by id where they're rendered together.
27
+ *
28
+ * - **Idempotent at the file level.** The caller decides write vs
29
+ * dry-run + force; this module only produces strings.
30
+ */
31
+ // ─── Local-mirror preambles (match presets' synthesize-files.ts) ─────────────
32
+ const KNOWLEDGE_HELPERS = `// Local helpers — keep this file self-contained (no @shrkcrft/* imports).
33
+ // Generated by \`shrk init --infer\`. Edit freely.
34
+
35
+ const KnowledgePriority = {
36
+ Critical: 'critical',
37
+ High: 'high',
38
+ Medium: 'medium',
39
+ Low: 'low',
40
+ } as const;
41
+
42
+ const KnowledgeType = {
43
+ Rule: 'rule',
44
+ Path: 'path',
45
+ Template: 'template',
46
+ Architecture: 'architecture',
47
+ Technical: 'technical',
48
+ Convention: 'convention',
49
+ Workflow: 'workflow',
50
+ Warning: 'warning',
51
+ } as const;
52
+
53
+ function defineKnowledgeEntry<T>(entry: T): T {
54
+ return entry;
55
+ }
56
+ `;
57
+ const PIPELINE_HELPERS = `// Local helpers — keep this file self-contained (no @shrkcrft/* imports).
58
+ // Generated by \`shrk init --infer\`. Edit freely.
59
+
60
+ function definePipeline<T>(pipeline: T): T {
61
+ return pipeline;
62
+ }
63
+ `;
64
+ // ─── Confidence triage ───────────────────────────────────────────────────────
65
+ const HIGH_CONFIDENCE_RULE_IDS = new Set([
66
+ 'typescript.strict-mode',
67
+ 'project.package-manager',
68
+ ]);
69
+ /** Map an inferred-rule priority to a {high|medium|low} adoption tier. */
70
+ function ruleTier(rule) {
71
+ // Promote known-canonical rules.
72
+ if (HIGH_CONFIDENCE_RULE_IDS.has(rule.id))
73
+ return 'high';
74
+ const p = rule.priority.toLowerCase();
75
+ if (p === 'critical' || p === 'high')
76
+ return 'high';
77
+ if (p === 'medium')
78
+ return 'medium';
79
+ return 'low';
80
+ }
81
+ function pathTier(path) {
82
+ // Path conventions are inferred from disk presence — if we found the
83
+ // directory, the convention is real. The only "low" case is when the
84
+ // patterns list is empty (couldn't pin a concrete location).
85
+ if (path.patterns.length === 0)
86
+ return 'low';
87
+ return 'high';
88
+ }
89
+ function boundaryTier(rule) {
90
+ // Boundary rules require BOTH a from-pattern AND a forbidden list to
91
+ // be enforceable. Without forbidden imports, the rule is a label,
92
+ // not a gate.
93
+ if (rule.from.length === 0)
94
+ return 'low';
95
+ if (!rule.forbiddenImports || rule.forbiddenImports.length === 0)
96
+ return 'medium';
97
+ return 'high';
98
+ }
99
+ function pipelineTier(pipeline) {
100
+ // Pipelines with concrete steps that map to verification commands
101
+ // are higher-confidence than generic feature-dev outlines.
102
+ if (pipeline.steps.length === 0)
103
+ return 'low';
104
+ if (pipeline.steps.length <= 2)
105
+ return 'medium';
106
+ return 'high';
107
+ }
108
+ // ─── Renderers ──────────────────────────────────────────────────────────────
109
+ function renderPath(p, tier) {
110
+ const todo = tier === 'medium' ? '// TODO: review — confidence: medium\n ' : '';
111
+ const primaryPath = p.patterns[0]?.replace(/\/\*\*.*$/, '').replace(/\/\*$/, '') ?? '';
112
+ return ` ${todo}defineKnowledgeEntry({
113
+ id: ${JSON.stringify(p.id)},
114
+ title: ${JSON.stringify(p.title)},
115
+ type: KnowledgeType.Path,
116
+ priority: KnowledgePriority.High,
117
+ tags: ['paths', 'inferred'],
118
+ scope: ['inferred'],
119
+ appliesWhen: ['generate-code'],
120
+ content: ${JSON.stringify(p.content)},
121
+ metadata: {
122
+ path: ${JSON.stringify(primaryPath)},
123
+ patterns: ${JSON.stringify(p.patterns)},
124
+ inferredFrom: ${JSON.stringify(p.reason)},
125
+ },
126
+ })`;
127
+ }
128
+ function renderRule(r, tier) {
129
+ const todo = tier === 'medium' ? '// TODO: review — confidence: medium\n ' : '';
130
+ const priority = r.priority === 'critical' ? 'KnowledgePriority.Critical'
131
+ : r.priority === 'high' ? 'KnowledgePriority.High'
132
+ : r.priority === 'medium' ? 'KnowledgePriority.Medium'
133
+ : 'KnowledgePriority.Low';
134
+ return ` ${todo}defineKnowledgeEntry({
135
+ id: ${JSON.stringify(r.id)},
136
+ title: ${JSON.stringify(r.title)},
137
+ type: KnowledgeType.Rule,
138
+ priority: ${priority},
139
+ tags: ['inferred', ${JSON.stringify(r.source)}],
140
+ scope: ['inferred'],
141
+ appliesWhen: ['generate-code', 'review'],
142
+ content: ${JSON.stringify(r.content)},
143
+ metadata: {
144
+ inferredFrom: ${JSON.stringify(r.reason)},
145
+ source: ${JSON.stringify(r.source)},
146
+ },
147
+ })`;
148
+ }
149
+ function renderBoundary(b, tier) {
150
+ const todo = tier === 'medium' ? '// TODO: review — confidence: medium\n ' : '';
151
+ const forbidden = b.forbiddenImports && b.forbiddenImports.length > 0
152
+ ? `\n forbiddenImports: ${JSON.stringify(b.forbiddenImports)},`
153
+ : '';
154
+ const allowed = b.allowedImports && b.allowedImports.length > 0
155
+ ? `\n allowedImports: ${JSON.stringify(b.allowedImports)},`
156
+ : '';
157
+ return ` ${todo}{
158
+ id: ${JSON.stringify(b.id)},
159
+ title: ${JSON.stringify(b.title)},
160
+ severity: ${JSON.stringify(b.severity)},
161
+ from: ${JSON.stringify(b.from)},${forbidden}${allowed}
162
+ suggestedFix: ${JSON.stringify(b.suggestedFix)},
163
+ inferredFrom: ${JSON.stringify(b.reason)},
164
+ }`;
165
+ }
166
+ function renderPipeline(p, tier) {
167
+ const todo = tier === 'medium' ? '// TODO: review — confidence: medium\n ' : '';
168
+ const stepLines = p.steps
169
+ .map((s) => ` { id: ${JSON.stringify(s)}, type: 'command', description: ${JSON.stringify(s)} }`)
170
+ .join(',\n');
171
+ return ` ${todo}definePipeline({
172
+ id: ${JSON.stringify(p.id)},
173
+ title: ${JSON.stringify(p.title)},
174
+ description: ${JSON.stringify(p.description)},
175
+ tags: ['inferred'],
176
+ steps: [
177
+ ${stepLines}
178
+ ],
179
+ metadata: {
180
+ inferredFrom: ${JSON.stringify(p.reason)},
181
+ },
182
+ })`;
183
+ }
184
+ // ─── File builders ──────────────────────────────────────────────────────────
185
+ function buildConfigFile(opts) {
186
+ return (`// Generated by \`shrk init --infer\`. Edit freely; SharkCraft will not\n` +
187
+ `// regenerate this file. Re-run \`shrk init --infer --force\` to overwrite.\n\n` +
188
+ `const config = {\n` +
189
+ ` projectName: ${JSON.stringify(opts.projectName)},\n` +
190
+ ` description: ${JSON.stringify(opts.description)},\n` +
191
+ ` pathFiles: ${JSON.stringify(opts.includePaths ? ['paths.ts'] : [])},\n` +
192
+ ` ruleFiles: ${JSON.stringify(opts.includeRules ? ['rules.ts'] : [])},\n` +
193
+ ` boundaryFiles: ${JSON.stringify(opts.includeBoundaries ? ['boundaries.ts'] : [])},\n` +
194
+ ` pipelineFiles: ${JSON.stringify(opts.includePipelines ? ['pipelines.ts'] : [])},\n` +
195
+ ` knowledgeFiles: ${JSON.stringify(['knowledge.ts'])},\n` +
196
+ ` templateFiles: ${JSON.stringify([])},\n` +
197
+ ` docsFiles: ${JSON.stringify([])},\n` +
198
+ ` defaultMaxTokens: 3500,\n` +
199
+ `};\n\nexport default config;\n`);
200
+ }
201
+ function buildPathsFile(rendered) {
202
+ return (KNOWLEDGE_HELPERS +
203
+ '\nconst paths = [\n' +
204
+ rendered.join(',\n') +
205
+ (rendered.length > 0 ? ',\n' : '') +
206
+ '];\n\nexport default paths;\n');
207
+ }
208
+ function buildRulesFile(rendered) {
209
+ return (KNOWLEDGE_HELPERS +
210
+ '\nconst rules = [\n' +
211
+ rendered.join(',\n') +
212
+ (rendered.length > 0 ? ',\n' : '') +
213
+ '];\n\nexport default rules;\n');
214
+ }
215
+ function buildBoundariesFile(rendered) {
216
+ return ('// Generated by `shrk init --infer`. Plain default-export array — the\n' +
217
+ '// boundaries loader accepts any object with id/title/severity/from.\n\n' +
218
+ 'export default [\n' +
219
+ rendered.join(',\n') +
220
+ (rendered.length > 0 ? ',\n' : '') +
221
+ '];\n');
222
+ }
223
+ function buildPipelinesFile(rendered) {
224
+ return (PIPELINE_HELPERS +
225
+ '\nconst pipelines = [\n' +
226
+ rendered.join(',\n') +
227
+ (rendered.length > 0 ? ',\n' : '') +
228
+ '];\n\nexport default pipelines;\n');
229
+ }
230
+ function buildKnowledgeSeed(projectName, description) {
231
+ // Minimal but useful knowledge seed — these aren't really inferable,
232
+ // but every repo benefits from the agent-briefing + safety baseline.
233
+ return (KNOWLEDGE_HELPERS +
234
+ '\n' +
235
+ `export const projectOverview = defineKnowledgeEntry({
236
+ id: 'project.overview',
237
+ title: ${JSON.stringify(projectName + ' — project overview')},
238
+ type: KnowledgeType.Architecture,
239
+ priority: KnowledgePriority.High,
240
+ tags: ['overview', 'inferred'],
241
+ scope: ['inferred'],
242
+ appliesWhen: ['onboard', 'plan-work'],
243
+ summary: ${JSON.stringify(description || 'High-level overview of this project.')},
244
+ content: ${JSON.stringify(description || 'High-level overview of this project. Generated by shrk init --infer; replace with project-specific context.')},
245
+ });
246
+
247
+ export const agentBriefing = defineKnowledgeEntry({
248
+ id: 'agent.briefing',
249
+ title: 'AI agent briefing',
250
+ type: KnowledgeType.Convention,
251
+ priority: KnowledgePriority.Critical,
252
+ tags: ['agent', 'safety'],
253
+ scope: ['agent'],
254
+ appliesWhen: ['agent-start', 'agent-plan'],
255
+ content: \`When working in this repo as an AI agent:
256
+ 1. Read \\\`shrk brief\\\` for the focused project context (rules + paths + verification).
257
+ 2. Use \\\`shrk task "<task>"\\\` to get a per-task packet (relevant rules + templates + commands).
258
+ 3. Generate code via \\\`shrk gen <template> <name> --dry-run --save-plan plan.json\\\`, then apply with \\\`shrk apply plan.json --verify-signature --validate\\\`.
259
+ 4. Never bypass \\\`shrk check boundaries\\\` — it gates architecture violations.\`,
260
+ });
261
+
262
+ export const generationSafety = defineKnowledgeEntry({
263
+ id: 'safety.generation',
264
+ title: 'Generation safety',
265
+ type: KnowledgeType.Warning,
266
+ priority: KnowledgePriority.Critical,
267
+ tags: ['safety', 'generation'],
268
+ scope: ['generation'],
269
+ appliesWhen: ['generate-code', 'overwrite-file'],
270
+ content: \`shrk gen defaults to dry-run. A real write requires --write AND a clean plan (no conflicts). AI agents must call create_generation_plan via MCP first — never write files directly through MCP.\`,
271
+ });
272
+
273
+ export default [projectOverview, agentBriefing, generationSafety];
274
+ `);
275
+ }
276
+ // ─── Confidence report renderers ─────────────────────────────────────────────
277
+ function buildReportMarkdown(report, projectName) {
278
+ const lines = [];
279
+ lines.push(`# Inferred from your codebase`);
280
+ lines.push('');
281
+ lines.push(`\`shrk init --infer\` scanned ${projectName} and produced the populated ` +
282
+ `\`sharkcraft/*.ts\` files alongside this report. Re-run with \`--force\` to regenerate.`);
283
+ lines.push('');
284
+ lines.push(`## ✅ Adopted directly (${report.adoptedHigh.length} entries — high confidence)`);
285
+ lines.push('');
286
+ if (report.adoptedHigh.length === 0) {
287
+ lines.push('_None._');
288
+ }
289
+ else {
290
+ for (const line of report.adoptedHigh) {
291
+ lines.push(`- **[${line.kind}] \`${line.id}\`** — ${line.title} _(${line.reason})_`);
292
+ }
293
+ }
294
+ lines.push('');
295
+ lines.push(`## 🟡 Adopted with review marker (${report.adoptedMedium.length} entries — medium confidence)`);
296
+ lines.push('');
297
+ lines.push('These entries were included in the populated files with a `// TODO: review` ' +
298
+ 'comment. Read them, confirm they match your team\'s actual practice, then remove the marker.');
299
+ lines.push('');
300
+ if (report.adoptedMedium.length === 0) {
301
+ lines.push('_None._');
302
+ }
303
+ else {
304
+ for (const line of report.adoptedMedium) {
305
+ lines.push(`- **[${line.kind}] \`${line.id}\`** — ${line.title} _(${line.reason})_`);
306
+ }
307
+ }
308
+ lines.push('');
309
+ lines.push(`## ⚠️ Not adopted (${report.dropped.length} entries — low confidence)`);
310
+ lines.push('');
311
+ lines.push('These entries had weak signals — either incomplete data or generic patterns that ' +
312
+ 'might not reflect your real conventions. Review the draft versions under ' +
313
+ '`sharkcraft/onboarding/` (after running `shrk onboard --write-drafts`) and adopt any that apply.');
314
+ lines.push('');
315
+ if (report.dropped.length === 0) {
316
+ lines.push('_None — all signals were strong enough to adopt._');
317
+ }
318
+ else {
319
+ for (const line of report.dropped) {
320
+ lines.push(`- **[${line.kind}] \`${line.id}\`** — ${line.title} _(${line.reason})_`);
321
+ }
322
+ }
323
+ lines.push('');
324
+ lines.push(`## ✍️ What shrk can't infer (author these by hand)`);
325
+ lines.push('');
326
+ lines.push('These categories rely on team knowledge that\'s not visible in code or config. ' +
327
+ 'Add them to `sharkcraft/knowledge.ts` to make Claude aware:');
328
+ lines.push('');
329
+ for (const item of report.notInferable)
330
+ lines.push(`- ${item}`);
331
+ lines.push('');
332
+ lines.push('---');
333
+ lines.push('');
334
+ lines.push(`_Generated by \`shrk init --infer\`. This report is regenerated each ` +
335
+ `time you re-run with \`--force\`._`);
336
+ return lines.join('\n') + '\n';
337
+ }
338
+ const NOT_INFERABLE_DEFAULTS = [
339
+ 'Project-specific architectural decisions ("we chose X over Y because…").',
340
+ 'Deprecated paths / legacy code to avoid ("don\'t add new code to legacy/").',
341
+ 'Non-obvious conventions ("our pagination uses cursor, not offset").',
342
+ 'Cross-cutting concerns ("all writes go through the audit-log middleware").',
343
+ 'Recently-changed patterns ("DTOs migrated to class-validator last month — old code uses Zod").',
344
+ 'Team workflow conventions ("review with two approvals before merge to main").',
345
+ ];
346
+ // ─── Public entry point ─────────────────────────────────────────────────────
347
+ /**
348
+ * Convert an {@link IOnboardingPlan} into a populated set of
349
+ * `sharkcraft/*.ts` files plus a companion confidence report.
350
+ *
351
+ * The caller is responsible for actually writing the files; this
352
+ * function is pure (input plan → output strings).
353
+ */
354
+ export function synthesizeFromOnboarding(plan) {
355
+ const report = { adoptedHigh: [], adoptedMedium: [], dropped: [] };
356
+ // ── Triage paths ────────────────────────────────────────────────────
357
+ const renderedPaths = [];
358
+ for (const p of [...plan.inferredPathConventions].sort((a, b) => a.id.localeCompare(b.id))) {
359
+ const tier = pathTier(p);
360
+ if (tier === 'low') {
361
+ report.dropped.push({ kind: 'path', id: p.id, title: p.title, reason: p.reason });
362
+ continue;
363
+ }
364
+ renderedPaths.push(renderPath(p, tier));
365
+ (tier === 'high' ? report.adoptedHigh : report.adoptedMedium).push({
366
+ kind: 'path',
367
+ id: p.id,
368
+ title: p.title,
369
+ reason: p.reason,
370
+ });
371
+ }
372
+ // ── Triage rules ────────────────────────────────────────────────────
373
+ const renderedRules = [];
374
+ for (const r of [...plan.inferredRules].sort((a, b) => a.id.localeCompare(b.id))) {
375
+ const tier = ruleTier(r);
376
+ if (tier === 'low') {
377
+ report.dropped.push({ kind: 'rule', id: r.id, title: r.title, reason: r.reason });
378
+ continue;
379
+ }
380
+ renderedRules.push(renderRule(r, tier));
381
+ (tier === 'high' ? report.adoptedHigh : report.adoptedMedium).push({
382
+ kind: 'rule',
383
+ id: r.id,
384
+ title: r.title,
385
+ reason: r.reason,
386
+ });
387
+ }
388
+ // ── Triage boundaries ──────────────────────────────────────────────
389
+ const renderedBoundaries = [];
390
+ for (const b of [...plan.inferredBoundaryRules].sort((a, b2) => a.id.localeCompare(b2.id))) {
391
+ const tier = boundaryTier(b);
392
+ if (tier === 'low') {
393
+ report.dropped.push({ kind: 'boundary', id: b.id, title: b.title, reason: b.reason });
394
+ continue;
395
+ }
396
+ renderedBoundaries.push(renderBoundary(b, tier));
397
+ (tier === 'high' ? report.adoptedHigh : report.adoptedMedium).push({
398
+ kind: 'boundary',
399
+ id: b.id,
400
+ title: b.title,
401
+ reason: b.reason,
402
+ });
403
+ }
404
+ // ── Triage pipelines ───────────────────────────────────────────────
405
+ const renderedPipelines = [];
406
+ for (const p of [...plan.inferredPipelines].sort((a, b) => a.id.localeCompare(b.id))) {
407
+ const tier = pipelineTier(p);
408
+ if (tier === 'low') {
409
+ report.dropped.push({ kind: 'pipeline', id: p.id, title: p.title, reason: p.reason });
410
+ continue;
411
+ }
412
+ renderedPipelines.push(renderPipeline(p, tier));
413
+ (tier === 'high' ? report.adoptedHigh : report.adoptedMedium).push({
414
+ kind: 'pipeline',
415
+ id: p.id,
416
+ title: p.title,
417
+ reason: p.reason,
418
+ });
419
+ }
420
+ // ── Templates are dropped wholesale into the report — emitting a
421
+ // runnable template from inference is too speculative to populate
422
+ // automatically. The user gets them as drafts via `shrk onboard
423
+ // --write-drafts`.
424
+ for (const t of plan.inferredTemplateCandidates) {
425
+ report.dropped.push({
426
+ kind: 'template',
427
+ id: t.id,
428
+ title: t.name,
429
+ reason: `${t.reason} (templates require manual review; see sharkcraft/onboarding/inferred-templates.draft.ts after \`shrk onboard --write-drafts\`)`,
430
+ });
431
+ }
432
+ // ── Verification commands surface in the report only (consumed via
433
+ // sharkcraft.config.ts verificationCommands[]; not emitted as
434
+ // `sharkcraft/*.ts` here to avoid duplicating config shape).
435
+ for (const v of plan.inferredVerificationCommands) {
436
+ report.adoptedHigh.push({
437
+ kind: 'verification',
438
+ id: v.id,
439
+ title: `${v.label}: \`${v.command}\``,
440
+ reason: v.reason,
441
+ });
442
+ }
443
+ const projectName = plan.projectSummary.projectName ?? 'project';
444
+ const description = plan.projectSummary.description ?? '';
445
+ const files = [];
446
+ files.push({
447
+ path: 'sharkcraft.config.ts',
448
+ kind: 'config',
449
+ content: buildConfigFile({
450
+ projectName,
451
+ description,
452
+ includePaths: renderedPaths.length > 0,
453
+ includeRules: renderedRules.length > 0,
454
+ includeBoundaries: renderedBoundaries.length > 0,
455
+ includePipelines: renderedPipelines.length > 0,
456
+ }),
457
+ });
458
+ files.push({
459
+ path: 'knowledge.ts',
460
+ kind: 'knowledge',
461
+ content: buildKnowledgeSeed(projectName, description),
462
+ });
463
+ if (renderedPaths.length > 0) {
464
+ files.push({ path: 'paths.ts', kind: 'paths', content: buildPathsFile(renderedPaths) });
465
+ }
466
+ if (renderedRules.length > 0) {
467
+ files.push({ path: 'rules.ts', kind: 'rules', content: buildRulesFile(renderedRules) });
468
+ }
469
+ if (renderedBoundaries.length > 0) {
470
+ files.push({
471
+ path: 'boundaries.ts',
472
+ kind: 'boundaries',
473
+ content: buildBoundariesFile(renderedBoundaries),
474
+ });
475
+ }
476
+ if (renderedPipelines.length > 0) {
477
+ files.push({
478
+ path: 'pipelines.ts',
479
+ kind: 'pipelines',
480
+ content: buildPipelinesFile(renderedPipelines),
481
+ });
482
+ }
483
+ const fullReport = {
484
+ adoptedHigh: report.adoptedHigh,
485
+ adoptedMedium: report.adoptedMedium,
486
+ dropped: report.dropped,
487
+ notInferable: NOT_INFERABLE_DEFAULTS,
488
+ };
489
+ files.push({
490
+ path: '.inferred-report.md',
491
+ kind: 'report-md',
492
+ content: buildReportMarkdown(fullReport, projectName),
493
+ });
494
+ files.push({
495
+ path: '.inferred-report.json',
496
+ kind: 'report-json',
497
+ content: JSON.stringify({
498
+ schema: 'sharkcraft.inferred-report/v1',
499
+ generatedAt: new Date().toISOString().slice(0, 10),
500
+ projectName,
501
+ adoptedHigh: fullReport.adoptedHigh,
502
+ adoptedMedium: fullReport.adoptedMedium,
503
+ dropped: fullReport.dropped,
504
+ notInferable: fullReport.notInferable,
505
+ }, null, 2) + '\n',
506
+ });
507
+ return { files, report: fullReport };
508
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"task-ranker.d.ts","sourceRoot":"","sources":["../src/task-ranker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;;;;GAQG;AAEH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAiQD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,IAAI,EAAE,MAAM,GACX,WAAW,CAAC,eAAe,CAAC,EAAE,CAqBhC;AAGD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,SAAS,mBAAmB,EAAE,EACzC,IAAI,EAAE,MAAM,GACX,WAAW,CAAC,mBAAmB,CAAC,EAAE,CAiBpC;AAGD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,IAAI,EAAE,MAAM,GACX,WAAW,CAAC,eAAe,CAAC,EAAE,CAEhC;AAGD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,SAAS,mBAAmB,EAAE,EACzC,IAAI,EAAE,MAAM,GACX,WAAW,CAAC,mBAAmB,CAAC,EAAE,CAkCpC;AAGD,wBAAgB,WAAW,CACzB,OAAO,EAAE,SAAS,OAAO,EAAE,EAC3B,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,SAAS,MAAM,EAAE,GAClC,WAAW,CAAC,OAAO,CAAC,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IAC9C,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9C,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CACjC;AAED,wBAAgB,OAAO,CACrB,UAAU,EAAE;IACV,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC1C,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC1C,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,SAAS,OAAO,EAAE,CAAA;KAAE,CAAC;IACnD,SAAS,EAAE;QAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAC3C,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,SAAS,eAAe,EAAE,CAAA;KAAE,CAAC;IACxD,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,SAAS,eAAe,EAAE,CAAA;KAAE,CAAC;CACzD,EACD,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,MAAW,GACjB,cAAc,CAiEhB;AAGD,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,EAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,EAC7B,KAAK,GAAE,MAAU,GAChB,MAAM,CAKR;AAED,uFAAuF;AACvF,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -29,33 +29,8 @@ const VERB_HINTS = [
29
29
  // ── Domain hints (what *kind of thing* is being worked on) ──────────────
30
30
  // These boost rules/templates/pipelines whose own `appliesWhen` or `tags`
31
31
  // declare the same domain — much higher signal than verb hints alone for
32
- // "create a user profile *plugin*" vs "add pagination *capability*".
32
+ // "create a *service*" vs "add a *utility*".
33
33
  const DOMAIN_HINTS = [
34
- {
35
- token: 'plugin',
36
- appliesWhen: ['create-plugin', 'generate-plugin', 'plugin-dev', 'register-plugin'],
37
- tags: ['plugin'],
38
- },
39
- {
40
- token: 'defaults',
41
- appliesWhen: ['register-defaults', 'create-defaults', 'plugin-defaults'],
42
- tags: ['defaults'],
43
- },
44
- {
45
- token: 'capability',
46
- appliesWhen: ['create-capability', 'generate-capability'],
47
- tags: ['capability'],
48
- },
49
- {
50
- token: 'policy',
51
- appliesWhen: ['create-policy', 'generate-policy'],
52
- tags: ['policy'],
53
- },
54
- {
55
- token: 'adapter',
56
- appliesWhen: ['create-adapter', 'generate-adapter'],
57
- tags: ['adapter'],
58
- },
59
34
  {
60
35
  token: 'service',
61
36
  appliesWhen: ['generate-service'],
@@ -81,11 +56,6 @@ const DOMAIN_HINTS = [
81
56
  appliesWhen: ['generate-route'],
82
57
  tags: ['http', 'routes', 'api'],
83
58
  },
84
- {
85
- token: 'kernel',
86
- appliesWhen: ['create-kernel-service'],
87
- tags: ['kernel'],
88
- },
89
59
  ];
90
60
  function tokenize(s) {
91
61
  return s
@@ -144,8 +144,8 @@ function buildMissingIncludeSuggestions(id, existsInRegistry, task) {
144
144
  }
145
145
  return [
146
146
  `Entry "${id}" exists but did not make the context for task "${task}".`,
147
- `Try adding domain-aligned appliesWhen values (create-plugin / generate-service / register-defaults / …).`,
148
- `Add task-relevant tags (plugin / capability / adapter / …).`,
147
+ `Try adding domain-aligned appliesWhen values (generate-service / generate-utility / create-pipeline / …).`,
148
+ `Add task-relevant tags (service / utility / route / …).`,
149
149
  `Reference the entry from a preset's includes.knowledgeIds / ruleIds so it ranks higher.`,
150
150
  `Or raise its priority / shorten the title to include task-relevant tokens.`,
151
151
  ];
@@ -219,7 +219,7 @@ export function runAgentContractTest(inspection, test, registries) {
219
219
  suggestions: exists
220
220
  ? [
221
221
  `Template "${id}" exists but the ranker did not place it in the top results.`,
222
- 'Add task-aligned tags/appliesWhen to the template (e.g. tags:["plugin"], appliesWhen:["create-plugin"]).',
222
+ 'Add task-aligned tags/appliesWhen to the template (e.g. tags:["service"], appliesWhen:["generate-service"]).',
223
223
  'Reference the template from a preset that matches the task profile (includes.templateIds).',
224
224
  'Reference it from a pipeline step (`step.references`).',
225
225
  ]
@@ -237,8 +237,8 @@ export function runAgentContractTest(inspection, test, registries) {
237
237
  suggestions: exists
238
238
  ? [
239
239
  `Rule "${id}" exists but the ranker did not surface it for "${test.task}".`,
240
- 'Align its appliesWhen with the domain (e.g. create-plugin / register-defaults / generate-service).',
241
- 'Add domain tags (plugin / capability / adapter / defaults).',
240
+ 'Align its appliesWhen with the domain (e.g. generate-service / generate-utility / create-pipeline).',
241
+ 'Add domain tags (service / utility / route / pipeline).',
242
242
  'Reference it from actionHints.relatedTemplates on a rule that *is* ranking, or include it in a preset.',
243
243
  ]
244
244
  : [
@@ -17,7 +17,6 @@ export declare enum SearchResultKind {
17
17
  ScaffoldPattern = "scaffold-pattern",
18
18
  ContractTemplate = "contract-template",
19
19
  MigrationProfile = "migration-profile",
20
- PluginLifecycleProfile = "plugin-lifecycle-profile",
21
20
  FeedbackRule = "feedback-rule",
22
21
  TaskRoutingHint = "task-routing-hint",
23
22
  Docs = "docs",
@@ -1 +1 @@
1
- {"version":3,"file":"universal-search.d.ts","sourceRoot":"","sources":["../src/universal-search.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAgC,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGhG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,OAAO,aAAa;IACpB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,eAAe,qBAAqB;IACpC,gBAAgB,sBAAsB;IACtC,gBAAgB,sBAAsB;IACtC,sBAAsB,6BAA6B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AE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AA+CD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,qBAAqB,EACjC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CA4NjC;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAmDhF;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CA8BpF"}
@@ -17,7 +17,6 @@ import { buildPackContributionsInventory } from "./pack-contributions-inventory.
17
17
  import { listConventions } from "./convention-registry.js";
18
18
  import { listPackHelpers } from "./pack-helper-registry.js";
19
19
  import { explainTaskRouting } from "./task-routing-hint-registry.js";
20
- import { listPluginLifecycleProfiles } from "./plugin-lifecycle-profile-registry.js";
21
20
  import { uncertaintyReportFromSummary } from "./uncertainty-report.js";
22
21
  import { buildUncertaintySummary } from "./uncertainty.js";
23
22
  import { buildTaskPacket } from "./task-packet.js";
@@ -39,7 +38,6 @@ export var SearchResultKind;
39
38
  SearchResultKind["ScaffoldPattern"] = "scaffold-pattern";
40
39
  SearchResultKind["ContractTemplate"] = "contract-template";
41
40
  SearchResultKind["MigrationProfile"] = "migration-profile";
42
- SearchResultKind["PluginLifecycleProfile"] = "plugin-lifecycle-profile";
43
41
  SearchResultKind["FeedbackRule"] = "feedback-rule";
44
42
  SearchResultKind["TaskRoutingHint"] = "task-routing-hint";
45
43
  SearchResultKind["Docs"] = "docs";
@@ -89,7 +87,6 @@ export async function buildUniversalSearch(inspection, query, options = {}) {
89
87
  const conventions = await listConventions(inspection);
90
88
  const helpers = await listPackHelpers(inspection);
91
89
  const routing = await explainTaskRouting(inspection, q);
92
- const lifecycle = await listPluginLifecycleProfiles(inspection);
93
90
  const knowledgeEntries = inspection.knowledgeEntries;
94
91
  const allHits = [];
95
92
  // Knowledge
@@ -113,13 +110,6 @@ export async function buildUniversalSearch(inspection, query, options = {}) {
113
110
  allHits.push(makeHit(SearchResultKind.Helper, h.helper.id, h.helper.title, h.source === 'pack' ? 'pack' : 'local', h.packageName, s, `shrk helper plan ${h.helper.id}`));
114
111
  }
115
112
  }
116
- // Plugin lifecycle profiles
117
- for (const p of lifecycle) {
118
- const s = score(`${p.profile.id} ${p.profile.title} ${(p.profile.tags ?? []).join(' ')}`, q);
119
- if (s.score > 0) {
120
- allHits.push(makeHit(SearchResultKind.PluginLifecycleProfile, p.profile.id, p.profile.title, p.source === 'pack' ? 'pack' : 'local', p.packageName, s, `shrk plugin lifecycle profile ${p.profile.id}`));
121
- }
122
- }
123
113
  // Pack contributions (catch-all for kinds we didn't iterate above)
124
114
  for (const e of inv.entries) {
125
115
  if (allHits.find((h) => h.id === e.id && String(h.kind) === e.kind))
@@ -140,7 +130,6 @@ export async function buildUniversalSearch(inspection, query, options = {}) {
140
130
  decision: SearchResultKind.Decision,
141
131
  'contract-template': SearchResultKind.ContractTemplate,
142
132
  'migration-profile': SearchResultKind.MigrationProfile,
143
- 'plugin-lifecycle-profile': SearchResultKind.PluginLifecycleProfile,
144
133
  'feedback-rule': SearchResultKind.FeedbackRule,
145
134
  'task-routing-hint': SearchResultKind.TaskRoutingHint,
146
135
  helper: SearchResultKind.Helper,
@@ -184,7 +173,6 @@ export async function buildUniversalSearch(inspection, query, options = {}) {
184
173
  SearchResultKind.Policy,
185
174
  SearchResultKind.ContractTemplate,
186
175
  SearchResultKind.MigrationProfile,
187
- SearchResultKind.PluginLifecycleProfile,
188
176
  SearchResultKind.ScaffoldPattern,
189
177
  SearchResultKind.FeedbackRule,
190
178
  SearchResultKind.TaskRoutingHint,