@shrkcrft/inspector 0.1.0-alpha.6 → 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.
- package/dist/agent-brief.d.ts.map +1 -1
- package/dist/agent-brief.js +59 -10
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +1 -3
- package/dist/ai-readiness.d.ts +84 -9
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +161 -30
- package/dist/apply-dispatch-trace.d.ts +1 -2
- package/dist/apply-dispatch-trace.d.ts.map +1 -1
- package/dist/apply-dispatch-trace.js +0 -9
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +1 -5
- package/dist/area-map.d.ts +0 -5
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +0 -10
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-adoption.d.ts.map +1 -1
- package/dist/construct-adoption.js +10 -11
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +2 -10
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +2 -10
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +2 -10
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +2 -9
- package/dist/demo-script.d.ts +0 -1
- package/dist/demo-script.d.ts.map +1 -1
- package/dist/demo-script.js +0 -43
- package/dist/docs-check.js +1 -1
- package/dist/drift-baseline.d.ts.map +1 -1
- package/dist/drift-baseline.js +5 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +2 -16
- package/dist/helper-registry.d.ts +27 -54
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +16 -517
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +4 -5
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +2 -10
- package/dist/monorepo-onboarding.js +2 -2
- package/dist/onboarding-report.d.ts.map +1 -1
- package/dist/onboarding-report.js +5 -1
- package/dist/onboarding.d.ts +1 -1
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +5 -64
- package/dist/ownership.js +2 -10
- package/dist/pack-contributions-inventory.d.ts +0 -1
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +0 -24
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +2 -10
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +4 -11
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +0 -1
- package/dist/pack-test-runner.js +2 -10
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +3 -20
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +2 -10
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +3 -11
- package/dist/policy-test.js +3 -11
- package/dist/profile-registry.d.ts +0 -1
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +4 -32
- package/dist/quality-baseline.d.ts.map +1 -1
- package/dist/quality-baseline.js +3 -1
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +3 -9
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +2 -10
- package/dist/release-readiness.js +3 -3
- package/dist/reposet.js +1 -1
- package/dist/repository-knowledge-model.d.ts +1 -1
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/scaffold-patterns.js +2 -10
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +2 -10
- package/dist/self-config-doctor-v2.d.ts +1 -1
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +6 -10
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +7 -13
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +1 -0
- package/dist/start-here.d.ts +1 -1
- package/dist/start-here.js +1 -1
- package/dist/synthesize-from-onboarding.d.ts +68 -0
- package/dist/synthesize-from-onboarding.d.ts.map +1 -0
- package/dist/synthesize-from-onboarding.js +508 -0
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +1 -31
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +2 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +8 -16
- package/dist/universal-search.d.ts +0 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +0 -12
- package/package.json +17 -17
- package/dist/plugin-lifecycle-profile-registry.d.ts +0 -52
- package/dist/plugin-lifecycle-profile-registry.d.ts.map +0 -1
- package/dist/plugin-lifecycle-profile-registry.js +0 -202
- package/dist/plugin-lifecycle.d.ts +0 -132
- package/dist/plugin-lifecycle.d.ts.map +0 -1
- package/dist/plugin-lifecycle.js +0 -477
|
@@ -14,7 +14,6 @@ import { existsSync } from 'node:fs';
|
|
|
14
14
|
import * as nodePath from 'node:path';
|
|
15
15
|
import { buildPackContributionsInventory } from "./pack-contributions-inventory.js";
|
|
16
16
|
import { listConventions } from "./convention-registry.js";
|
|
17
|
-
import { listPluginLifecycleProfiles } from "./plugin-lifecycle-profile-registry.js";
|
|
18
17
|
import { loadAllContractTemplates } from "./contract-template-registry.js";
|
|
19
18
|
import { listMigrationProfilesFromPacks } from "./migration-profile-registry.js";
|
|
20
19
|
import { listPackHelpers } from "./pack-helper-registry.js";
|
|
@@ -35,7 +34,6 @@ async function buildLookups(inspection) {
|
|
|
35
34
|
const pipelines = new Set(inspection.pipelineRegistry?.list?.().map((p) => p.id) ?? []);
|
|
36
35
|
// Convention/profile/contract registries return entries asynchronously.
|
|
37
36
|
const conventions = new Set((await listConventions(inspection)).map((e) => e.convention.id));
|
|
38
|
-
const lifecycleProfiles = new Set((await listPluginLifecycleProfiles(inspection)).map((e) => e.profile.id));
|
|
39
37
|
const contractTemplatesPair = await loadAllContractTemplates(inspection);
|
|
40
38
|
const contractTemplates = new Set(contractTemplatesPair.entries.map((e) => e.template.id));
|
|
41
39
|
const migrationProfiles = new Set((await listMigrationProfilesFromPacks(inspection)).map((p) => p.id));
|
|
@@ -56,7 +54,6 @@ async function buildLookups(inspection) {
|
|
|
56
54
|
conventions,
|
|
57
55
|
contractTemplates,
|
|
58
56
|
migrationProfiles,
|
|
59
|
-
pluginLifecycleProfiles: lifecycleProfiles,
|
|
60
57
|
helpers,
|
|
61
58
|
routingHints,
|
|
62
59
|
registrationHints,
|
|
@@ -108,7 +105,6 @@ async function checkSearchTuningTargets(inspection, lookups, findings) {
|
|
|
108
105
|
lookups.templates.has(targetId) ||
|
|
109
106
|
lookups.pipelines.has(targetId) ||
|
|
110
107
|
lookups.contractTemplates.has(targetId) ||
|
|
111
|
-
lookups.pluginLifecycleProfiles.has(targetId) ||
|
|
112
108
|
lookups.conventions.has(targetId);
|
|
113
109
|
if (!exists) {
|
|
114
110
|
findings.push({
|
|
@@ -183,7 +179,7 @@ async function checkPackContributionConflicts(inspection, findings) {
|
|
|
183
179
|
* - `metadata.requiredConventionIds` → conventions registry
|
|
184
180
|
* - `metadata.requiredHelperIds` → helpers registry
|
|
185
181
|
* - `metadata.registrationHintIds` → registration-hints registry
|
|
186
|
-
* - `metadata.requiredProfileIds` →
|
|
182
|
+
* - `metadata.requiredProfileIds` → profile registry
|
|
187
183
|
*/
|
|
188
184
|
async function checkTemplateMetadataReferences(inspection, lookups, findings) {
|
|
189
185
|
const templates = (inspection.templates ?? []);
|
|
@@ -218,15 +214,15 @@ async function checkTemplateMetadataReferences(inspection, lookups, findings) {
|
|
|
218
214
|
}
|
|
219
215
|
}
|
|
220
216
|
for (const id of m.requiredProfileIds ?? []) {
|
|
221
|
-
if (!lookups.
|
|
217
|
+
if (!lookups.migrationProfiles.has(id)) {
|
|
222
218
|
findings.push({
|
|
223
219
|
severity: SelfConfigSeverity.Warning,
|
|
224
220
|
code: 'template-profile-missing',
|
|
225
|
-
message: `Template "${t.id}" requires
|
|
221
|
+
message: `Template "${t.id}" requires profile "${id}" but it is not registered.`,
|
|
226
222
|
referencingId: t.id,
|
|
227
223
|
referencedId: id,
|
|
228
|
-
referencedKind: '
|
|
229
|
-
nextCommand: `shrk
|
|
224
|
+
referencedKind: 'profile',
|
|
225
|
+
nextCommand: `shrk profiles list`,
|
|
230
226
|
});
|
|
231
227
|
}
|
|
232
228
|
}
|
|
@@ -289,14 +285,14 @@ async function checkRoutingHintTargets(inspection, lookups, findings) {
|
|
|
289
285
|
}
|
|
290
286
|
}
|
|
291
287
|
for (const id of rec.profiles ?? []) {
|
|
292
|
-
if (!lookups.
|
|
288
|
+
if (!lookups.migrationProfiles.has(id)) {
|
|
293
289
|
findings.push({
|
|
294
290
|
severity: SelfConfigSeverity.Info,
|
|
295
291
|
code: 'routing-hint-profile-missing',
|
|
296
292
|
message: `Routing hint "${e.hint.id}" recommends profile "${id}" but it is not registered.`,
|
|
297
293
|
referencingId: e.hint.id,
|
|
298
294
|
referencedId: id,
|
|
299
|
-
referencedKind: '
|
|
295
|
+
referencedKind: 'profile',
|
|
300
296
|
});
|
|
301
297
|
}
|
|
302
298
|
}
|
|
@@ -353,8 +349,6 @@ export async function buildSelfConfigGraph(inspection) {
|
|
|
353
349
|
nodes.push({ id, kind: 'convention' });
|
|
354
350
|
for (const id of lookups.contractTemplates)
|
|
355
351
|
nodes.push({ id, kind: 'contract-template' });
|
|
356
|
-
for (const id of lookups.pluginLifecycleProfiles)
|
|
357
|
-
nodes.push({ id, kind: 'plugin-lifecycle-profile' });
|
|
358
352
|
for (const id of lookups.migrationProfiles)
|
|
359
353
|
nodes.push({ id, kind: 'migration-profile' });
|
|
360
354
|
// Edges from knowledge → refer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AClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACrD;AAoJD,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAgYpG;AAED,wBAAgB,SAAS,CAAC,UAAU,EAAE,qBAAqB,GAAG,aAAa,CA2N1E"}
|
|
@@ -697,6 +697,7 @@ export function runDoctor(inspection) {
|
|
|
697
697
|
id: `actionhints-${i.code}-${i.entryId}`,
|
|
698
698
|
title: `Action-hint quality (${i.code})`,
|
|
699
699
|
severity: DoctorSeverity.Warning,
|
|
700
|
+
advisory: true,
|
|
700
701
|
message: i.message,
|
|
701
702
|
fix: i.suggestion,
|
|
702
703
|
category: 'action-hint-quality',
|
package/dist/start-here.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `shrk start-here` — the human entry point.
|
|
3
3
|
*
|
|
4
|
-
* SharkCraft ships 200+ commands. New
|
|
4
|
+
* SharkCraft ships 200+ commands. New consumers need a 30-second answer to
|
|
5
5
|
* "what should I run first?". This module is the deterministic source of
|
|
6
6
|
* that answer. It does not call any external system, does not read the
|
|
7
7
|
* project state, and never writes — it's a curated list.
|
package/dist/start-here.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `shrk start-here` — the human entry point.
|
|
3
3
|
*
|
|
4
|
-
* SharkCraft ships 200+ commands. New
|
|
4
|
+
* SharkCraft ships 200+ commands. New consumers need a 30-second answer to
|
|
5
5
|
* "what should I run first?". This module is the deterministic source of
|
|
6
6
|
* that answer. It does not call any external system, does not read the
|
|
7
7
|
* project state, and never writes — it's a curated list.
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
import type { IOnboardingPlan } from './onboarding.js';
|
|
32
|
+
export interface IInferredFile {
|
|
33
|
+
/** Path relative to sharkcraft/. */
|
|
34
|
+
path: string;
|
|
35
|
+
content: string;
|
|
36
|
+
/** Which kind of file this is — drives default naming in the report. */
|
|
37
|
+
kind: 'config' | 'paths' | 'rules' | 'boundaries' | 'pipelines' | 'knowledge' | 'report-md' | 'report-json';
|
|
38
|
+
}
|
|
39
|
+
export interface IInferenceConfidenceReport {
|
|
40
|
+
/** Entries adopted directly into the populated files (high confidence). */
|
|
41
|
+
adoptedHigh: readonly IConfidenceLine[];
|
|
42
|
+
/** Entries adopted with a `// TODO: review` marker (medium confidence). */
|
|
43
|
+
adoptedMedium: readonly IConfidenceLine[];
|
|
44
|
+
/** Entries left out of the populated files (low confidence / no signal). */
|
|
45
|
+
dropped: readonly IConfidenceLine[];
|
|
46
|
+
/** Author-by-hand suggestions — things shrk can't infer. */
|
|
47
|
+
notInferable: readonly string[];
|
|
48
|
+
}
|
|
49
|
+
export interface IConfidenceLine {
|
|
50
|
+
kind: 'rule' | 'path' | 'boundary' | 'pipeline' | 'template' | 'verification';
|
|
51
|
+
id: string;
|
|
52
|
+
title: string;
|
|
53
|
+
/** Why this signal fired (from the onboarding plan). */
|
|
54
|
+
reason: string;
|
|
55
|
+
}
|
|
56
|
+
export interface IInferenceResult {
|
|
57
|
+
files: readonly IInferredFile[];
|
|
58
|
+
report: IInferenceConfidenceReport;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Convert an {@link IOnboardingPlan} into a populated set of
|
|
62
|
+
* `sharkcraft/*.ts` files plus a companion confidence report.
|
|
63
|
+
*
|
|
64
|
+
* The caller is responsible for actually writing the files; this
|
|
65
|
+
* function is pure (input plan → output strings).
|
|
66
|
+
*/
|
|
67
|
+
export declare function synthesizeFromOnboarding(plan: IOnboardingPlan): IInferenceResult;
|
|
68
|
+
//# sourceMappingURL=synthesize-from-onboarding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthesize-from-onboarding.d.ts","sourceRoot":"","sources":["../src/synthesize-from-onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;CAC7G;AAED,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;IACxC,2EAA2E;IAC3E,aAAa,EAAE,SAAS,eAAe,EAAE,CAAC;IAC1C,4EAA4E;IAC5E,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IACpC,4DAA4D;IAC5D,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAC;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAChC,MAAM,EAAE,0BAA0B,CAAC;CACpC;AAkXD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,eAAe,GACpB,gBAAgB,CA6KlB"}
|