skillwiki 0.5.0 → 0.5.1

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/cli.js CHANGED
@@ -2741,7 +2741,7 @@ async function runLint(input) {
2741
2741
  const hasOverview = /^## Overview/m.test(body);
2742
2742
  if (!hasOverview) noOverview.push(page.relPath);
2743
2743
  const bodyFirst15 = body.split("\n").slice(0, 15).join("\n");
2744
- if (!/^##\s+TL;\s*DR/m.test(bodyFirst15)) missingTldrFlags.push(page.relPath);
2744
+ if (!/^>\s*\*\*TL;DR:?\*\*/m.test(bodyFirst15) && !/^##\s+TL;\s*DR/m.test(bodyFirst15)) missingTldrFlags.push(page.relPath);
2745
2745
  const fmData = extractFrontmatter(text);
2746
2746
  const pageTags = fmData.ok && Array.isArray(fmData.data.tags) ? fmData.data.tags : [];
2747
2747
  if (pageTags.includes("architecture") && !body.includes("```mermaid")) {
@@ -2986,16 +2986,26 @@ ${trimmedBody}`;
2986
2986
  }
2987
2987
  const body = split.data.body;
2988
2988
  const rawFm = split.data.rawFrontmatter;
2989
- const trimmedBody = body.replace(/^\n+/, "");
2989
+ const lines = body.split("\n");
2990
+ let insertIndex = 0;
2991
+ for (let i = 0; i < lines.length; i++) {
2992
+ if (/^# /.test(lines[i])) {
2993
+ insertIndex = i + 1;
2994
+ while (insertIndex < lines.length && lines[insertIndex].trim() === "") {
2995
+ insertIndex++;
2996
+ }
2997
+ break;
2998
+ }
2999
+ }
3000
+ if (insertIndex === 0) {
3001
+ lines.splice(0, 0, "", "> **TL;DR:** ");
3002
+ } else {
3003
+ lines.splice(insertIndex, 0, "> **TL;DR:** ");
3004
+ }
3005
+ const trimmedFm = rawFm.endsWith("\n") ? rawFm : rawFm + "\n";
2990
3006
  const newContent = `---
2991
- ${rawFm}
2992
- ---
2993
-
2994
- ## TL;DR
2995
-
2996
- - Pending summary.
2997
-
2998
- ${trimmedBody}`;
3007
+ ${trimmedFm}---
3008
+ ${lines.join("\n")}`;
2999
3009
  await writeFile8(absPath, newContent, "utf8");
3000
3010
  fixed.push(relPath);
3001
3011
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 18 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 18 prompt-only skills backed by the deterministic skillwiki CLI.",
5
5
  "author": {
6
6
  "name": "karlorz",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",
@@ -16,7 +16,7 @@ Standard four reads. If cwd is inside `projects/{slug}/`, also read project READ
16
16
  1. Identify type: entity / concept / comparison / query / summary.
17
17
  2. Set `provenance:`. Default `research`. If in project context: `project` with `provenance_projects: ["[[slug]]"]`.
18
18
  3. Compose the page with citations pre-attached. Reuse existing `raw/` sources where possible. Every page MUST include:
19
- - `## TL;DR` as the first section after frontmatter — a 1–3 bullet summary of the page's key takeaway.
19
+ - `> **TL;DR:**` blockquote as the first content after the title heading — a one-sentence summary of the page's key takeaway (under 200 chars). See SCHEMA.md `## TL;DR Convention`.
20
20
  - For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
21
21
  4. `skillwiki validate <page>`. If non-zero, STOP.
22
22
  5. Apply writes: page → `index.md` → `log.md`.
@@ -21,7 +21,7 @@ Run `skillwiki lang` at the start. Generate page-body prose, narrative sections,
21
21
  2. **Fetch.** Use `web_fetch` (or read local file) under Layer 2 controls (the CLI Layer 2 fetcher applies in tests; in skill runtime use `web_fetch` directly and treat any error as STOP).
22
22
  3. **Hash.** Write the raw file (frontmatter + body). Run `skillwiki hash <raw-file>` and embed the result in raw frontmatter `sha256:`.
23
23
  4. **Generate page(s).** Compose typed-knowledge page(s) with citations pre-attached (`^[raw/...]` markers). Every page MUST include:
24
- - `## TL;DR` as the first section after frontmatter — a 1–3 bullet summary of the page's key takeaway.
24
+ - `> **TL;DR:**` blockquote as the first content after the title heading — a one-sentence summary of the page's key takeaway (under 200 chars). See SCHEMA.md `## TL;DR Convention`.
25
25
  - For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
26
26
  5. **Validate.** For each generated page: run `skillwiki validate <page>`. If exit ≠ 0, STOP — do not write index/log.
27
27
  6. **Apply writes in order.** raw → page(s) → `index.md` → `log.md`.