@shrkcrft/inspector 0.1.0-alpha.2 → 0.1.0-alpha.20

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 (192) hide show
  1. package/dist/agent-brief.d.ts.map +1 -1
  2. package/dist/agent-brief.js +59 -10
  3. package/dist/agent-contract-gate.d.ts.map +1 -1
  4. package/dist/agent-contract-gate.js +25 -2
  5. package/dist/agent-instructions.d.ts.map +1 -1
  6. package/dist/agent-instructions.js +11 -0
  7. package/dist/agent-task-prep.d.ts.map +1 -1
  8. package/dist/agent-task-prep.js +1 -3
  9. package/dist/ai-readiness.d.ts +84 -9
  10. package/dist/ai-readiness.d.ts.map +1 -1
  11. package/dist/ai-readiness.js +181 -35
  12. package/dist/apply-dispatch-trace.d.ts +1 -2
  13. package/dist/apply-dispatch-trace.d.ts.map +1 -1
  14. package/dist/apply-dispatch-trace.js +0 -9
  15. package/dist/area-explore.d.ts.map +1 -1
  16. package/dist/area-explore.js +4 -6
  17. package/dist/area-map.d.ts +0 -5
  18. package/dist/area-map.d.ts.map +1 -1
  19. package/dist/area-map.js +0 -10
  20. package/dist/changed-preflight.d.ts +7 -0
  21. package/dist/changed-preflight.d.ts.map +1 -1
  22. package/dist/changed-preflight.js +56 -9
  23. package/dist/changes-summary.d.ts.map +1 -1
  24. package/dist/changes-summary.js +10 -1
  25. package/dist/check-guardrail-globs.d.ts +16 -0
  26. package/dist/check-guardrail-globs.d.ts.map +1 -0
  27. package/dist/check-guardrail-globs.js +38 -0
  28. package/dist/code-intelligence-doctor.d.ts +21 -0
  29. package/dist/code-intelligence-doctor.d.ts.map +1 -0
  30. package/dist/code-intelligence-doctor.js +985 -0
  31. package/dist/command-recommender.d.ts.map +1 -1
  32. package/dist/command-recommender.js +23 -0
  33. package/dist/compliance-profiles.js +1 -1
  34. package/dist/construct-adoption-diff.d.ts.map +1 -1
  35. package/dist/construct-adoption-diff.js +2 -1
  36. package/dist/construct-adoption.d.ts.map +1 -1
  37. package/dist/construct-adoption.js +10 -11
  38. package/dist/construct-inference.d.ts.map +1 -1
  39. package/dist/construct-inference.js +5 -2
  40. package/dist/construct-registry.d.ts.map +1 -1
  41. package/dist/construct-registry.js +2 -10
  42. package/dist/contract-file-rule.d.ts +8 -0
  43. package/dist/contract-file-rule.d.ts.map +1 -1
  44. package/dist/contract-file-rule.js +8 -3
  45. package/dist/contract-template-registry.d.ts.map +1 -1
  46. package/dist/contract-template-registry.js +2 -10
  47. package/dist/contradictions.d.ts +8 -1
  48. package/dist/contradictions.d.ts.map +1 -1
  49. package/dist/contradictions.js +37 -35
  50. package/dist/convention-registry.d.ts.map +1 -1
  51. package/dist/convention-registry.js +2 -10
  52. package/dist/coverage-report.d.ts.map +1 -1
  53. package/dist/coverage-report.js +14 -1
  54. package/dist/dashboard/dashboard-knowledge.d.ts +8 -0
  55. package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -0
  56. package/dist/dashboard/dashboard-knowledge.js +259 -0
  57. package/dist/decision-records.d.ts.map +1 -1
  58. package/dist/decision-records.js +5 -10
  59. package/dist/delegate-catalog.d.ts +45 -0
  60. package/dist/delegate-catalog.d.ts.map +1 -0
  61. package/dist/delegate-catalog.js +50 -0
  62. package/dist/delegate-doctor.d.ts +15 -0
  63. package/dist/delegate-doctor.d.ts.map +1 -0
  64. package/dist/delegate-doctor.js +36 -0
  65. package/dist/delegate-pack-recipes.d.ts +29 -0
  66. package/dist/delegate-pack-recipes.d.ts.map +1 -0
  67. package/dist/delegate-pack-recipes.js +77 -0
  68. package/dist/demo-script.d.ts +0 -1
  69. package/dist/demo-script.d.ts.map +1 -1
  70. package/dist/demo-script.js +0 -43
  71. package/dist/docs-check.js +1 -1
  72. package/dist/drift-baseline.d.ts.map +1 -1
  73. package/dist/drift-baseline.js +5 -2
  74. package/dist/feedback-ingestion.d.ts.map +1 -1
  75. package/dist/feedback-ingestion.js +2 -16
  76. package/dist/git-helpers.d.ts +15 -0
  77. package/dist/git-helpers.d.ts.map +1 -1
  78. package/dist/git-helpers.js +51 -4
  79. package/dist/helper-registry.d.ts +27 -54
  80. package/dist/helper-registry.d.ts.map +1 -1
  81. package/dist/helper-registry.js +16 -517
  82. package/dist/impact-analysis.d.ts.map +1 -1
  83. package/dist/impact-analysis.js +14 -7
  84. package/dist/index.d.ts +8 -2
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +8 -2
  87. package/dist/ingest-drafts.js +8 -4
  88. package/dist/migration-profile-registry.d.ts.map +1 -1
  89. package/dist/migration-profile-registry.js +2 -10
  90. package/dist/monorepo-onboarding.js +2 -2
  91. package/dist/onboarding-report.d.ts.map +1 -1
  92. package/dist/onboarding-report.js +5 -1
  93. package/dist/onboarding.d.ts +1 -1
  94. package/dist/onboarding.d.ts.map +1 -1
  95. package/dist/onboarding.js +9 -66
  96. package/dist/ownership.js +2 -10
  97. package/dist/pack-contributions-inventory.d.ts +0 -1
  98. package/dist/pack-contributions-inventory.d.ts.map +1 -1
  99. package/dist/pack-contributions-inventory.js +17 -29
  100. package/dist/pack-helper-registry.d.ts.map +1 -1
  101. package/dist/pack-helper-registry.js +2 -10
  102. package/dist/pack-release-check.d.ts.map +1 -1
  103. package/dist/pack-release-check.js +4 -11
  104. package/dist/pack-signature-status.d.ts.map +1 -1
  105. package/dist/pack-signature-status.js +18 -2
  106. package/dist/pack-test-runner.js +2 -10
  107. package/dist/plan-review.d.ts.map +1 -1
  108. package/dist/plan-review.js +5 -10
  109. package/dist/plan-simulation.d.ts +13 -0
  110. package/dist/plan-simulation.d.ts.map +1 -1
  111. package/dist/plan-simulation.js +4 -21
  112. package/dist/playbook-registry.d.ts.map +1 -1
  113. package/dist/playbook-registry.js +2 -10
  114. package/dist/policy-engine.d.ts.map +1 -1
  115. package/dist/policy-engine.js +3 -11
  116. package/dist/policy-test.js +3 -11
  117. package/dist/profile-registry.d.ts +0 -1
  118. package/dist/profile-registry.d.ts.map +1 -1
  119. package/dist/profile-registry.js +4 -32
  120. package/dist/propose-knowledge.d.ts +15 -0
  121. package/dist/propose-knowledge.d.ts.map +1 -1
  122. package/dist/propose-knowledge.js +37 -4
  123. package/dist/quality-baseline.d.ts.map +1 -1
  124. package/dist/quality-baseline.js +3 -1
  125. package/dist/ranker-explainability.d.ts.map +1 -1
  126. package/dist/ranker-explainability.js +3 -9
  127. package/dist/registration-hint-registry.d.ts.map +1 -1
  128. package/dist/registration-hint-registry.js +2 -10
  129. package/dist/registry-lifecycle.d.ts +6 -0
  130. package/dist/registry-lifecycle.d.ts.map +1 -1
  131. package/dist/registry-lifecycle.js +137 -10
  132. package/dist/release-readiness.js +3 -3
  133. package/dist/repo-memory.d.ts.map +1 -1
  134. package/dist/repo-memory.js +3 -1
  135. package/dist/reposet.js +1 -1
  136. package/dist/repository-intelligence.d.ts.map +1 -1
  137. package/dist/repository-intelligence.js +7 -2
  138. package/dist/repository-knowledge-model.d.ts +1 -1
  139. package/dist/repository-knowledge-model.d.ts.map +1 -1
  140. package/dist/repository-stats.d.ts.map +1 -1
  141. package/dist/repository-stats.js +3 -1
  142. package/dist/resolve-verification-commands.d.ts +26 -0
  143. package/dist/resolve-verification-commands.d.ts.map +1 -0
  144. package/dist/resolve-verification-commands.js +55 -0
  145. package/dist/review-packet.d.ts.map +1 -1
  146. package/dist/review-packet.js +14 -17
  147. package/dist/rule-drift.d.ts.map +1 -1
  148. package/dist/rule-drift.js +24 -9
  149. package/dist/rule-scaffold.d.ts.map +1 -1
  150. package/dist/rule-scaffold.js +12 -4
  151. package/dist/scaffold-patterns.js +2 -10
  152. package/dist/search-tuning-registry.d.ts.map +1 -1
  153. package/dist/search-tuning-registry.js +2 -10
  154. package/dist/self-config-doctor-v2.d.ts +1 -1
  155. package/dist/self-config-doctor-v2.d.ts.map +1 -1
  156. package/dist/self-config-doctor-v2.js +6 -10
  157. package/dist/self-config-doctor.d.ts.map +1 -1
  158. package/dist/self-config-doctor.js +7 -13
  159. package/dist/sharkcraft-inspector.d.ts +14 -0
  160. package/dist/sharkcraft-inspector.d.ts.map +1 -1
  161. package/dist/sharkcraft-inspector.js +103 -1
  162. package/dist/start-here.d.ts +2 -2
  163. package/dist/start-here.d.ts.map +1 -1
  164. package/dist/start-here.js +16 -1
  165. package/dist/synthesize-from-onboarding.d.ts +68 -0
  166. package/dist/synthesize-from-onboarding.d.ts.map +1 -0
  167. package/dist/synthesize-from-onboarding.js +508 -0
  168. package/dist/task-packet.d.ts +13 -0
  169. package/dist/task-packet.d.ts.map +1 -1
  170. package/dist/task-packet.js +59 -6
  171. package/dist/task-ranker.d.ts.map +1 -1
  172. package/dist/task-ranker.js +1 -31
  173. package/dist/task-routing-hint-registry.d.ts.map +1 -1
  174. package/dist/task-routing-hint-registry.js +2 -10
  175. package/dist/template-drift.d.ts +7 -0
  176. package/dist/template-drift.d.ts.map +1 -1
  177. package/dist/template-drift.js +14 -6
  178. package/dist/test-impact.d.ts.map +1 -1
  179. package/dist/test-impact.js +5 -2
  180. package/dist/test-runner.d.ts.map +1 -1
  181. package/dist/test-runner.js +12 -17
  182. package/dist/universal-search.d.ts +0 -1
  183. package/dist/universal-search.d.ts.map +1 -1
  184. package/dist/universal-search.js +0 -12
  185. package/dist/why-file.js +66 -22
  186. package/package.json +18 -18
  187. package/dist/plugin-lifecycle-profile-registry.d.ts +0 -52
  188. package/dist/plugin-lifecycle-profile-registry.d.ts.map +0 -1
  189. package/dist/plugin-lifecycle-profile-registry.js +0 -202
  190. package/dist/plugin-lifecycle.d.ts +0 -132
  191. package/dist/plugin-lifecycle.d.ts.map +0 -1
  192. package/dist/plugin-lifecycle.js +0 -477
@@ -131,11 +131,19 @@ function buildTsBody(input, defaults) {
131
131
  const advisoryBlock = defaults.advisory ? `\n metadata: { advisory: true },` : '';
132
132
  const verificationLine = verification.length > 0 ? `\n verificationCommands: ${tsArrayLiteral(verification)},` : '';
133
133
  const forbiddenLine = forbidden.length > 0 ? `\n forbiddenActions: ${tsArrayLiteral(forbidden)},` : '';
134
- return `import { defineRule } from '@shrkcrft/rules';
135
- import { KnowledgePriority } from '@shrkcrft/knowledge';
136
-
137
- // Generated by \`shrk rules scaffold --id ${id}\`. Preview-only — review,
134
+ return `// Generated by \`shrk rules scaffold --id ${id}\`. Preview-only — review,
138
135
  // then move into \`sharkcraft/rules.ts\` (or your pack's rules file).
136
+ // Self-contained — no @shrkcrft/* imports required.
137
+
138
+ const KnowledgePriority = {
139
+ Critical: 'critical',
140
+ High: 'high',
141
+ Medium: 'medium',
142
+ Low: 'low',
143
+ } as const;
144
+
145
+ function defineRule<T>(rule: T): T { return rule; }
146
+
139
147
  export const ${idToConst(id)} = defineRule({
140
148
  id: ${JSON.stringify(id)},
141
149
  title: ${JSON.stringify(title)},
@@ -1,11 +1,3 @@
1
- var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
- if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
- return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
- return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
- });
6
- }
7
- return path;
8
- };
9
1
  /**
10
2
  * Scaffold pattern registry + loader.
11
3
  *
@@ -15,13 +7,13 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
15
7
  */
16
8
  import { existsSync } from 'node:fs';
17
9
  import * as nodePath from 'node:path';
18
- import { pathToFileURL } from 'node:url';
10
+ import { importModuleViaLoader } from '@shrkcrft/core';
19
11
  import { isRecognizedScaffoldStrategy, } from '@shrkcrft/plugin-api';
20
12
  export async function loadScaffoldPatternsFromFile(file) {
21
13
  if (!existsSync(file))
22
14
  return { patterns: [], warnings: [`scaffold pattern file missing: ${file}`] };
23
15
  try {
24
- const mod = (await import(__rewriteRelativeImportExtension(pathToFileURL(file).href + '?t=' + Date.now())));
16
+ const mod = await importModuleViaLoader(file);
25
17
  const raw = mod.default ?? mod;
26
18
  if (!Array.isArray(raw)) {
27
19
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"search-tuning-registry.d.ts","sourceRoot":"","sources":["../src/search-tuning-registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,oBAAoB,yCAAyC,CAAC;AAE3E,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA0GD,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC;IAAE,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAA;CAAE,CAAC,CA4DlG;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,kBAAkB,EAAE,CAGjG;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,wBAAwB,EAAE,CAG7G;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,C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C,OAAO,CAAC;IAAE,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAA;CAAE,CAAC,CA4DlG;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,kBAAkB,EAAE,CAGjG;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,wBAAwB,EAAE,CAG7G;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC;IACxB,YAAY,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACnD,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAqBD;;;;;;;iCAOiC;AACjC,wBAAgB,cAAc,CAC5B,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC3E,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,kBAAkB,CAoGpB"}
@@ -1,19 +1,11 @@
1
- var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
- if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
- return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
- return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
- });
6
- }
7
- return path;
8
- };
9
1
  import { existsSync } from 'node:fs';
10
2
  import * as nodePath from 'node:path';
11
- import { pathToFileURL } from 'node:url';
3
+ import { importModuleViaLoader } from '@shrkcrft/core';
12
4
  export const SEARCH_TUNING_SCHEMA = 'sharkcraft.search-tuning-registry/v1';
13
5
  const CACHE = new Map();
14
6
  const MAX_BOOST = 5;
15
7
  async function importDefault(file) {
16
- const mod = (await import(__rewriteRelativeImportExtension(pathToFileURL(file).href)));
8
+ const mod = (await importModuleViaLoader(file));
17
9
  if (Array.isArray(mod.default))
18
10
  return mod.default;
19
11
  if (mod.default && typeof mod.default === 'object')
@@ -9,7 +9,7 @@ export declare enum SelfConfigSeverityV2 {
9
9
  * Source / target kind taxonomy. Open string for forward-compat with
10
10
  * pack-contributed kinds, but the engine emits one of these values.
11
11
  */
12
- export type SelfConfigKind = 'knowledge' | 'command' | 'helper' | 'template' | 'playbook' | 'pipeline' | 'policy' | 'rule' | 'path' | 'convention' | 'registration-hint' | 'routing-hint' | 'agent-test' | 'decision' | 'profile' | 'migration-profile' | 'plugin-lifecycle-profile' | 'contract-template' | 'pack' | 'schema' | 'file' | 'unknown';
12
+ export type SelfConfigKind = 'knowledge' | 'command' | 'helper' | 'template' | 'playbook' | 'pipeline' | 'policy' | 'rule' | 'path' | 'convention' | 'registration-hint' | 'routing-hint' | 'agent-test' | 'decision' | 'profile' | 'migration-profile' | 'contract-template' | 'pack' | 'schema' | 'file' | 'unknown';
13
13
  /**
14
14
  * Edge relation taxonomy. Open string to allow future relations.
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"self-config-doctor-v2.d.ts","sourceRoot":"","sources":["../src/self-config-doctor-v2.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2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AA4B,CAAC;IACrD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAC7C,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAC/C,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KAChD,CAAC,CAAC;IACH,QAAQ,CAAC,OAAO,EAAE,IAAI,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC/C,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAwqBD,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAyCpC;AAsBD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,CA+BtF;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,yBAAyB,GAChC,MAAM,CAqBR"}
@@ -18,7 +18,6 @@
18
18
  import { existsSync } from 'node:fs';
19
19
  import * as nodePath from 'node:path';
20
20
  import { listConventions } from "./convention-registry.js";
21
- import { listPluginLifecycleProfiles } from "./plugin-lifecycle-profile-registry.js";
22
21
  import { loadAllContractTemplates } from "./contract-template-registry.js";
23
22
  import { listMigrationProfilesFromPacks } from "./migration-profile-registry.js";
24
23
  import { listPackHelpers } from "./pack-helper-registry.js";
@@ -42,7 +41,6 @@ async function buildLookupsV2(inspection) {
42
41
  const templates = new Set(inspection.templateRegistry?.list?.().map((t) => t.id) ?? []);
43
42
  const pipelines = new Set(inspection.pipelineRegistry?.list?.().map((p) => p.id) ?? []);
44
43
  const conventions = new Set((await listConventions(inspection)).map((e) => e.convention.id));
45
- const lifecycleProfiles = new Set((await listPluginLifecycleProfiles(inspection)).map((e) => e.profile.id));
46
44
  const contractTemplatesPair = await loadAllContractTemplates(inspection);
47
45
  const contractTemplates = new Set(contractTemplatesPair.entries.map((e) => e.template.id));
48
46
  const migrationProfiles = new Set((await listMigrationProfilesFromPacks(inspection)).map((p) => p.id));
@@ -103,7 +101,6 @@ async function buildLookupsV2(inspection) {
103
101
  conventions,
104
102
  contractTemplates,
105
103
  migrationProfiles,
106
- pluginLifecycleProfiles: lifecycleProfiles,
107
104
  helpers,
108
105
  routingHints,
109
106
  registrationHints,
@@ -177,7 +174,6 @@ async function checkSearchTuning(inspection, lookups, findings) {
177
174
  lookups.templates.has(targetId) ||
178
175
  lookups.pipelines.has(targetId) ||
179
176
  lookups.contractTemplates.has(targetId) ||
180
- lookups.pluginLifecycleProfiles.has(targetId) ||
181
177
  lookups.conventions.has(targetId) ||
182
178
  lookups.playbooks.has(targetId) ||
183
179
  lookups.helpers.has(targetId) ||
@@ -276,18 +272,18 @@ function checkTemplateMetadata(inspection, lookups, findings) {
276
272
  });
277
273
  }
278
274
  for (const id of m.requiredProfileIds ?? []) {
279
- if (lookups.pluginLifecycleProfiles.has(id))
275
+ if (lookups.migrationProfiles.has(id))
280
276
  continue;
281
277
  pushFinding(findings, {
282
278
  severity: SelfConfigSeverityV2.Warning,
283
279
  code: 'template-profile-missing',
284
280
  sourceKind: 'template',
285
281
  sourceId: t.id,
286
- targetKind: 'plugin-lifecycle-profile',
282
+ targetKind: 'profile',
287
283
  targetId: id,
288
284
  relation: 'requires',
289
- message: `Template "${t.id}" requires plugin-lifecycle profile "${id}" but it is not registered.`,
290
- nextCommand: 'shrk plugin lifecycle profiles',
285
+ message: `Template "${t.id}" requires profile "${id}" but it is not registered.`,
286
+ nextCommand: 'shrk profiles list',
291
287
  });
292
288
  }
293
289
  for (const id of m.registrationHintIds ?? []) {
@@ -333,7 +329,7 @@ async function checkRoutingHints(inspection, lookups, findings) {
333
329
  probe(rec.templates, 'template', lookups.templates);
334
330
  probe(rec.helpers, 'helper', lookups.helpers);
335
331
  probe(rec.conventions, 'convention', lookups.conventions);
336
- probe(rec.profiles, 'plugin-lifecycle-profile', lookups.pluginLifecycleProfiles);
332
+ probe(rec.profiles, 'profile', lookups.migrationProfiles);
337
333
  probe(rec.commands, 'command', lookups.commands);
338
334
  probe(rec.playbooks, 'playbook', lookups.playbooks);
339
335
  }
@@ -437,7 +433,7 @@ async function checkRegistrationHints(inspection, lookups, findings) {
437
433
  };
438
434
  probe(h.relatedTemplateIds, 'template', lookups.templates);
439
435
  probe(h.relatedConventionIds, 'convention', lookups.conventions);
440
- probe(h.relatedProfileIds, 'plugin-lifecycle-profile', lookups.pluginLifecycleProfiles);
436
+ probe(h.relatedProfileIds, 'profile', lookups.migrationProfiles);
441
437
  }
442
438
  }
443
439
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"self-config-doctor.d.ts","sourceRoot":"","sources":["../src/self-config-doctor.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAA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,MAAM,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,IAAI,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC/C,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAE,oBAAoB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,iCAAiC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACvD;AA0WD,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAsClC;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAuC3B;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,CAyBlF;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,CAoBtF"}
@@ -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` → plugin-lifecycle-profiles registry
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.pluginLifecycleProfiles.has(id)) {
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 plugin-lifecycle profile "${id}" but it is not registered.`,
221
+ message: `Template "${t.id}" requires profile "${id}" but it is not registered.`,
226
222
  referencingId: t.id,
227
223
  referencedId: id,
228
- referencedKind: 'plugin-lifecycle-profile',
229
- nextCommand: `shrk plugin lifecycle profiles`,
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.pluginLifecycleProfiles.has(id)) {
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: 'plugin-lifecycle-profile',
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 → referenced ids (best-effort).
@@ -10,6 +10,20 @@ import { PresetRegistry } from '@shrkcrft/presets';
10
10
  import { BoundaryRegistry } from '@shrkcrft/boundaries';
11
11
  import { type IDoctorResult } from './doctor-result.js';
12
12
  import { type ILoaderDiagnostic } from './loader-diagnostics.js';
13
+ /**
14
+ * Find SharkCraft packs that live IN the repo but are not discovered (i.e.
15
+ * not linked into node_modules). Discovery scans node_modules; an unlinked
16
+ * in-repo pack is invisible to it, which silently disables every pack
17
+ * contribution. We do a bounded one-level scan of the conventional pack
18
+ * homes rather than a full recursive walk, so this stays cheap on large
19
+ * monorepos. A "pack dir" is one that has a `sharkcraft.plugin.*` manifest
20
+ * (at its root or under `src/`) or a `package.json` with a `sharkcraft`
21
+ * field. Returns only packs whose package name is NOT already discovered.
22
+ */
23
+ export declare function findUnlinkedInRepoPacks(projectRoot: string, discoveredPackNames: ReadonlySet<string>): Array<{
24
+ packageName: string;
25
+ relPath: string;
26
+ }>;
13
27
  export interface ISharkcraftInspection {
14
28
  projectRoot: string;
15
29
  workspace: IWorkspaceSummary;
@@ -1 +1 @@
1
- {"version":3,"file":"sharkcraft-inspector.d.ts","sourceRoot":"","sources":["../src/sharkcraft-inspector.ts"],"names":[],"mappings":"AAOA,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,cAAc,EAIf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,mBAAmB,EAAyB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,KAAK,mBAAmB,EAAyB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAiB,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAwC,cAAc,EAAE,MAAM,mBAAmB,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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,CAiQ1E"}
@@ -1,4 +1,4 @@
1
- import { existsSync, statSync } from 'node:fs';
1
+ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
2
2
  import * as nodePath from 'node:path';
3
3
  import { createImportContext, DEFAULT_SAFE_IMPORT_TIMEOUT_MS, } from '@shrkcrft/core';
4
4
  import { inspectWorkspace } from '@shrkcrft/workspace';
@@ -13,9 +13,75 @@ import { BUILTIN_PRESETS, loadPresetsFromFile, PresetRegistry } from '@shrkcrft/
13
13
  import { BoundaryRegistry, loadBoundaryRulesFromFile } from '@shrkcrft/boundaries';
14
14
  import { DoctorSeverity } from "./doctor-result.js";
15
15
  import { diagnoseActionHints } from "./action-hint-diagnostics.js";
16
+ import { buildCodeIntelligenceChecks } from "./code-intelligence-doctor.js";
17
+ import { buildDelegateRecipeChecks } from "./delegate-doctor.js";
16
18
  import { computeFileFingerprint, createInspectorCache, } from "./inspector-cache.js";
17
19
  import { DEFAULT_SLOW_LOADER_THRESHOLD_MS, LARGE_FILE_THRESHOLD_BYTES, } from "./loader-diagnostics.js";
18
20
  import { suggestSurfaceProfile } from "./surface-profile-detect.js";
21
+ /**
22
+ * Find SharkCraft packs that live IN the repo but are not discovered (i.e.
23
+ * not linked into node_modules). Discovery scans node_modules; an unlinked
24
+ * in-repo pack is invisible to it, which silently disables every pack
25
+ * contribution. We do a bounded one-level scan of the conventional pack
26
+ * homes rather than a full recursive walk, so this stays cheap on large
27
+ * monorepos. A "pack dir" is one that has a `sharkcraft.plugin.*` manifest
28
+ * (at its root or under `src/`) or a `package.json` with a `sharkcraft`
29
+ * field. Returns only packs whose package name is NOT already discovered.
30
+ */
31
+ export function findUnlinkedInRepoPacks(projectRoot, discoveredPackNames) {
32
+ const out = [];
33
+ const seen = new Set();
34
+ const manifestRelCandidates = [
35
+ 'sharkcraft.plugin.ts',
36
+ 'sharkcraft.plugin.mjs',
37
+ 'sharkcraft.plugin.js',
38
+ nodePath.join('src', 'sharkcraft.plugin.ts'),
39
+ nodePath.join('src', 'sharkcraft.plugin.mjs'),
40
+ nodePath.join('src', 'sharkcraft.plugin.js'),
41
+ ];
42
+ for (const parent of ['tools', 'packages', 'libs', '.']) {
43
+ const parentAbs = nodePath.resolve(projectRoot, parent);
44
+ let dirs;
45
+ try {
46
+ dirs = readdirSync(parentAbs, { withFileTypes: true })
47
+ .filter((d) => d.isDirectory() && d.name !== 'node_modules')
48
+ .map((d) => d.name);
49
+ }
50
+ catch {
51
+ continue;
52
+ }
53
+ for (const dir of dirs) {
54
+ const packRoot = nodePath.join(parentAbs, dir);
55
+ const hasManifestFile = manifestRelCandidates.some((c) => existsSync(nodePath.join(packRoot, c)));
56
+ let packageName;
57
+ let hasSharkcraftField = false;
58
+ const pkgJsonPath = nodePath.join(packRoot, 'package.json');
59
+ if (existsSync(pkgJsonPath)) {
60
+ try {
61
+ const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
62
+ if (typeof pkg.name === 'string')
63
+ packageName = pkg.name;
64
+ hasSharkcraftField = pkg.sharkcraft != null;
65
+ }
66
+ catch {
67
+ /* unreadable package.json — ignore */
68
+ }
69
+ }
70
+ if (!hasManifestFile && !hasSharkcraftField)
71
+ continue;
72
+ if (!packageName || seen.has(packageName))
73
+ continue;
74
+ seen.add(packageName);
75
+ if (!discoveredPackNames.has(packageName)) {
76
+ out.push({
77
+ packageName,
78
+ relPath: nodePath.relative(projectRoot, packRoot) || '.',
79
+ });
80
+ }
81
+ }
82
+ }
83
+ return out;
84
+ }
19
85
  function suggestNextCommand(kind, packName) {
20
86
  if (packName)
21
87
  return 'shrk packs doctor --release';
@@ -615,6 +681,28 @@ export function runDoctor(inspection) {
615
681
  : `${v} valid, ${i} invalid pack(s). See \`shrk packs doctor\`.`,
616
682
  });
617
683
  }
684
+ else {
685
+ // Zero packs discovered. The costly silent-failure case: the repo SHIPS
686
+ // a pack (e.g. tools/sharkcraft-pack) but it is not linked into
687
+ // node_modules, where discovery scans. When that happens every
688
+ // contribution — templates, boundaries, knowledge — goes dark and doctor
689
+ // otherwise collapses to "No templates registered / no boundary rules"
690
+ // with no hint about the real cause. Detect it and make it actionable.
691
+ const discoveredNames = new Set(inspection.packs.discoveredPacks.map((p) => p.packageName));
692
+ const unlinked = findUnlinkedInRepoPacks(inspection.projectRoot, discoveredNames);
693
+ const first = unlinked[0];
694
+ if (first) {
695
+ const list = unlinked.map((u) => `${u.packageName} (${u.relPath})`).join(', ');
696
+ const up = first.packageName.startsWith('@') ? '../../' : '../';
697
+ checks.push({
698
+ id: 'packs',
699
+ title: 'packs',
700
+ severity: DoctorSeverity.Warning,
701
+ message: `In-repo pack(s) present but NOT discovered: ${list}. shrk discovers packs by scanning node_modules, so an unlinked in-repo pack loads nothing — templates, boundary rules, and knowledge all go dark even though the assets exist on disk.`,
702
+ fix: `Link it into node_modules so discovery sees it: \`mkdir -p node_modules/$(dirname ${first.packageName}) && ln -sfn ${up}${first.relPath} node_modules/${first.packageName}\` — or add a \`"${first.packageName}": "file:${first.relPath}"\` dependency. Then re-run \`shrk packs list\`.`,
703
+ });
704
+ }
705
+ }
618
706
  if (inspection.pipelines.length === 0) {
619
707
  checks.push({
620
708
  id: 'pipelines',
@@ -697,6 +785,7 @@ export function runDoctor(inspection) {
697
785
  id: `actionhints-${i.code}-${i.entryId}`,
698
786
  title: `Action-hint quality (${i.code})`,
699
787
  severity: DoctorSeverity.Warning,
788
+ advisory: true,
700
789
  message: i.message,
701
790
  fix: i.suggestion,
702
791
  category: 'action-hint-quality',
@@ -706,6 +795,19 @@ export function runDoctor(inspection) {
706
795
  });
707
796
  }
708
797
  }
798
+ // Code-intelligence package health (graph, rule-graph, api-surface,
799
+ // quality-gates, migrations). Each finding reads a stable on-disk
800
+ // state file under `.sharkcraft/` and stays silent when the user has
801
+ // not opted into the relevant feature.
802
+ for (const c of buildCodeIntelligenceChecks(inspection.projectRoot)) {
803
+ checks.push(c);
804
+ }
805
+ // Delegate-worker recipe health: surface any recipe that isn't safely
806
+ // delegatable (unbound / missing verification). Silent when the repo hasn't
807
+ // opted into a `delegation` block.
808
+ for (const c of buildDelegateRecipeChecks(inspection.config)) {
809
+ checks.push(c);
810
+ }
709
811
  const summary = { ok: 0, info: 0, warnings: 0, errors: 0, advisoryCount: 0 };
710
812
  for (const c of checks) {
711
813
  if (c.severity === DoctorSeverity.Ok)
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `shrk start-here` — the human entry point.
3
3
  *
4
- * SharkCraft ships 200+ commands. New adopters need a 30-second answer to
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.
@@ -12,7 +12,7 @@
12
12
  */
13
13
  export declare const START_HERE_SCHEMA = "sharkcraft.start-here/v1";
14
14
  export declare const PRIMARY_COMMANDS_SCHEMA = "sharkcraft.primary-commands/v1";
15
- export type StartHereFlow = 'onboard' | 'brief' | 'dev' | 'review' | 'governance' | 'packs' | 'release';
15
+ export type StartHereFlow = 'onboard' | 'investigate' | 'brief' | 'dev' | 'review' | 'governance' | 'packs' | 'release';
16
16
  export type SafetyLevel = 'read-only' | 'writes-drafts' | 'writes-source';
17
17
  export interface IStartHereFlow {
18
18
  id: StartHereFlow;
@@ -1 +1 @@
1
- {"version":3,"file":"start-here.d.ts","sourceRoot":"","sources":["../src/start-here.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAC5D,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,OAAO,GACP,KAAK,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sBAAsB,CAEnE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAkCpE;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAQhF"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `shrk start-here` — the human entry point.
3
3
  *
4
- * SharkCraft ships 200+ commands. New adopters need a 30-second answer to
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.
@@ -27,6 +27,21 @@ const FLOWS_PRIMARY = [
27
27
  docsLink: 'docs/onboarding.md',
28
28
  nextCommand: 'shrk brief "<first task you want the agent to handle>"',
29
29
  },
30
+ {
31
+ id: 'investigate',
32
+ title: 'Understand existing code (before you edit)',
33
+ whenToUse: 'You need to know who calls a symbol, where it is used (file:line), what breaks if you change a file, whether code A is wired to code B, or who implements an interface — use the graph instead of grep.',
34
+ commands: [
35
+ 'shrk graph index',
36
+ 'shrk graph callers <symbol>',
37
+ 'shrk graph path <from> <to>',
38
+ 'shrk graph context <file-or-symbol>',
39
+ 'shrk graph impact <file-or-symbol> --full',
40
+ ],
41
+ safety: 'read-only',
42
+ docsLink: 'docs/overview.md',
43
+ nextCommand: 'shrk graph callers <symbol>',
44
+ },
30
45
  {
31
46
  id: 'brief',
32
47
  title: 'Prepare an AI agent brief',
@@ -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"}