@pikku/skills 0.12.34 → 0.12.37

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 (43) hide show
  1. package/README.md +9 -4
  2. package/dist/index.d.ts +7 -4
  3. package/dist/index.js +9 -5
  4. package/dist/skills.gen.d.ts +1 -0
  5. package/dist/skills.gen.js +5 -3
  6. package/dist/snippets.d.ts +26 -0
  7. package/dist/snippets.js +148 -0
  8. package/package.json +2 -2
  9. package/skills/pikku-addon/SKILL.md +41 -30
  10. package/skills/pikku-addon/references/addon-package-manifest.md +9 -4
  11. package/skills/pikku-addon/references/openapi.md +99 -0
  12. package/skills/pikku-agent/references/agents.md +3 -1
  13. package/skills/pikku-architect/SKILL.md +12 -0
  14. package/skills/pikku-auth/references/better-auth.md +16 -0
  15. package/skills/pikku-build/SKILL.md +29 -0
  16. package/skills/pikku-build/references/app.md +52 -4
  17. package/skills/pikku-build/references/feature.md +23 -96
  18. package/skills/pikku-build/references/quick.md +12 -3
  19. package/skills/pikku-changes/SKILL.md +172 -0
  20. package/skills/pikku-concepts/SKILL.md +33 -138
  21. package/skills/pikku-concepts/references/bootstrap.md +58 -0
  22. package/skills/pikku-concepts/references/concept-mapping.md +16 -0
  23. package/skills/pikku-concepts/references/language.md +87 -0
  24. package/skills/pikku-deploy/SKILL.md +1 -1
  25. package/skills/pikku-fabric/SKILL.md +26 -13
  26. package/skills/pikku-guide/SKILL.md +264 -0
  27. package/skills/pikku-knowledge/SKILL.md +10 -0
  28. package/skills/pikku-kysely/SKILL.md +1 -1
  29. package/skills/pikku-mantine/SKILL.md +80 -0
  30. package/skills/pikku-n8n-import/SKILL.md +4 -3
  31. package/skills/pikku-react/references/client.md +12 -0
  32. package/skills/pikku-realtime/SKILL.md +6 -6
  33. package/skills/pikku-report/SKILL.md +143 -0
  34. package/skills/pikku-scenario/SKILL.md +71 -563
  35. package/skills/pikku-scenario/references/browser.md +59 -0
  36. package/skills/pikku-scenario/references/coverage.md +70 -0
  37. package/skills/pikku-scenario/references/personas.md +87 -0
  38. package/skills/pikku-scenario/references/steps.md +366 -0
  39. package/skills/pikku-service-backends/SKILL.md +1 -1
  40. package/skills/pikku-wiring/SKILL.md +1 -1
  41. package/skills/pikku-wiring/references/http.md +8 -0
  42. package/skills/pikku-wiring/references/mcp.md +59 -0
  43. package/skills/pikku-workflow/SKILL.md +7 -8
package/README.md CHANGED
@@ -32,7 +32,12 @@ for (const name of await listSkillNames()) {
32
32
  ```
33
33
 
34
34
  Reads prefer the `skills/` directory on disk, so editing a `SKILL.md` is live
35
- immediately. `SKILL_FILES` is the same content as an embedded path → contents map,
36
- which is what makes the skills available inside the `bun --compile` CLI binaries
37
- where no filesystem copy exists. Regenerate it with `bun run embed` after changing
38
- anything under `skills/`.
35
+ immediately. A fence marked ```` ```ts snippet:<region> ```` is expanded at read
36
+ time from the embedded snippet map, so an installed copy shows the compiled code
37
+ even though the source keeps the placeholder. `SKILL_FILES` is the same content
38
+ as an embedded path → contents map (already expanded), which is what makes the
39
+ skills available inside the `bun --compile` CLI binaries where no filesystem copy
40
+ exists. Regenerate it with `bun run embed` after changing anything under
41
+ `skills/` — that is also when snippets are collected from
42
+ `examples/online-shop`, and a fence naming a region that does not exist fails
43
+ the embed.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { SKILL_FILES } from './skills.gen.js';
2
- export { SKILL_FILES };
1
+ import { SKILL_FILES, SKILL_SNIPPETS } from './skills.gen.js';
2
+ export { SKILL_FILES, SKILL_SNIPPETS };
3
+ export { collectSnippets, expandSkillMarkdown, snippetRegionsIn, DuplicateSnippetError, MissingSnippetError, UnclosedSnippetError, } from './snippets.js';
3
4
  /**
4
5
  * Absolute path to the `skills/` directory shipped beside this module, or `null`
5
6
  * when there is no filesystem copy to read.
@@ -12,8 +13,10 @@ export { SKILL_FILES };
12
13
  export declare const skillsDir: string | null;
13
14
  /**
14
15
  * Reading prefers the filesystem so that editing a SKILL.md is immediately live
15
- * for `pikku skills install` without re-running `yarn embed`; the manifest is the
16
- * fallback for bundled contexts. The two are identical after a build.
16
+ * for `pikku skills install` without re-running `bun run embed`; the manifest is
17
+ * the fallback for bundled contexts. A filesystem read expands `snippet:` fences
18
+ * from the embedded snippet map, so the installed text matches the manifest
19
+ * even though the source keeps placeholders.
17
20
  */
18
21
  export declare const listSkillNames: () => Promise<string[]>;
19
22
  /** Every file belonging to one skill, as paths relative to the skills root. */
package/dist/index.js CHANGED
@@ -2,8 +2,10 @@ import { existsSync } from 'fs';
2
2
  import { readdir, readFile } from 'fs/promises';
3
3
  import { dirname, join, relative, sep } from 'path';
4
4
  import { fileURLToPath } from 'url';
5
- import { SKILL_FILES } from './skills.gen.js';
6
- export { SKILL_FILES };
5
+ import { SKILL_FILES, SKILL_SNIPPETS } from './skills.gen.js';
6
+ import { expandSkillMarkdown } from './snippets.js';
7
+ export { SKILL_FILES, SKILL_SNIPPETS };
8
+ export { collectSnippets, expandSkillMarkdown, snippetRegionsIn, DuplicateSnippetError, MissingSnippetError, UnclosedSnippetError, } from './snippets.js';
7
9
  /**
8
10
  * Absolute path to the `skills/` directory shipped beside this module, or `null`
9
11
  * when there is no filesystem copy to read.
@@ -20,8 +22,10 @@ export const skillsDir = (() => {
20
22
  const toPosix = (path) => path.split(sep).join('/');
21
23
  /**
22
24
  * Reading prefers the filesystem so that editing a SKILL.md is immediately live
23
- * for `pikku skills install` without re-running `yarn embed`; the manifest is the
24
- * fallback for bundled contexts. The two are identical after a build.
25
+ * for `pikku skills install` without re-running `bun run embed`; the manifest is
26
+ * the fallback for bundled contexts. A filesystem read expands `snippet:` fences
27
+ * from the embedded snippet map, so the installed text matches the manifest
28
+ * even though the source keeps placeholders.
25
29
  */
26
30
  export const listSkillNames = async () => {
27
31
  if (skillsDir) {
@@ -68,7 +72,7 @@ export const readSkillFile = async (path) => {
68
72
  const full = join(skillsDir, ...path.split('/'));
69
73
  if (!existsSync(full))
70
74
  return null;
71
- return readFile(full, 'utf-8');
75
+ return expandSkillMarkdown(await readFile(full, 'utf-8'), SKILL_SNIPPETS, path);
72
76
  }
73
77
  return SKILL_FILES[path] ?? null;
74
78
  };
@@ -1 +1,2 @@
1
1
  export declare const SKILL_FILES: Record<string, string>;
2
+ export declare const SKILL_SNIPPETS: Record<string, string>;