@zosmaai/pi-llm-wiki 0.4.0 → 0.5.0

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/AGENTS.md DELETED
@@ -1,57 +0,0 @@
1
- # AGENTS.md
2
-
3
- Instructions for AI agents working on this codebase.
4
-
5
- ## Project
6
-
7
- `@zosmaai/pi-llm-wiki` — A pi package that implements Andrej Karpathy's LLM Wiki pattern as a self-maintaining knowledge base.
8
-
9
- ## Tech Stack
10
-
11
- - TypeScript (ES2022, ESM)
12
- - Vitest for testing
13
- - Biome for linting/formatting
14
- - GitHub Actions for CI
15
- - npm for publishing
16
-
17
- ## File Layout
18
-
19
- ```
20
- ├── extensions/llm-wiki/ # TypeScript extension (10 tools + guardrails)
21
- │ ├── index.ts # Entry point
22
- │ └── lib/ # tools.ts, metadata.ts, guardrails.ts, utils.ts, source-packet.ts
23
- ├── skills/llm-wiki/ # SKILL.md + templates
24
- ├── prompts/ # 8 slash command templates
25
- ├── test/ # Vitest tests
26
- ├── docs/ # Documentation
27
- └── scripts/ # release.js
28
- ```
29
-
30
- ## Conventions
31
-
32
- - Use `node:fs/promises` for async file I/O, not sync
33
- - Prefer small, pure functions in `lib/`
34
- - Extension tools must have: name, label, description, promptSnippet, promptGuidelines, parameters (TypeBox), execute
35
- - Guardrails block `raw/**` and `meta/**` edits at the tool_call hook level
36
- - Metadata auto-rebuilds on `turn_end` after `wiki/**` edits
37
- - Source IDs: `SRC-YYYY-MM-DD-NNN`
38
- - Page filenames: `kebab-case.md`
39
- - Wikilinks: folder-qualified, e.g. `[[concepts/retrieval-augmented-generation]]`
40
-
41
- ## Testing
42
-
43
- ```bash
44
- npm test # run tests
45
- npm run test:coverage # run with coverage
46
- npm run typecheck # TypeScript check
47
- npm run lint # biome check
48
- ```
49
-
50
- ## Release
51
-
52
- ```bash
53
- npm run release:patch # or minor/major
54
- npm run release:push # push tags
55
- ```
56
-
57
- Never edit `package.json` version manually — use the release script.
package/CONTRIBUTING.md DELETED
@@ -1,43 +0,0 @@
1
- # Contributing
2
-
3
- ## Local Setup
4
-
5
- ```bash
6
- git clone https://github.com/zosmaai/pi-llm-wiki.git
7
- cd pi-llm-wiki
8
- npm install
9
- pi install ./
10
- ```
11
-
12
- ## Development
13
-
14
- ```bash
15
- npm run test # run tests
16
- npm run test:coverage # run tests with coverage report
17
- npm run typecheck # TypeScript type check
18
- npm run lint # biome lint check
19
- npm run lint:fix # auto-fix lint issues
20
- ```
21
-
22
- ## Release Process
23
-
24
- ```bash
25
- npm run release:patch # bump patch version
26
- npm run release:minor # bump minor version
27
- npm run release:major # bump major version
28
- npm run release:push # push to origin with tags
29
- ```
30
-
31
- The release script:
32
-
33
- 1. Verifies clean git tree and `main` branch
34
- 2. Runs typecheck, lint, and tests
35
- 3. Bumps version in `package.json`
36
- 4. Updates `CHANGELOG.md`
37
- 5. Commits and tags
38
-
39
- CI handles npm publish on tag push.
40
-
41
- ## License
42
-
43
- MIT
package/biome.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3
- "files": {
4
- "ignore": ["coverage", "dist", "node_modules"]
5
- },
6
- "organizeImports": {
7
- "enabled": true
8
- },
9
- "linter": {
10
- "enabled": true,
11
- "rules": {
12
- "recommended": true,
13
- "style": {
14
- "noNonNullAssertion": "off"
15
- }
16
- }
17
- },
18
- "formatter": {
19
- "enabled": true,
20
- "indentStyle": "space",
21
- "indentWidth": 2,
22
- "lineWidth": 100
23
- },
24
- "javascript": {
25
- "formatter": {
26
- "quoteStyle": "double",
27
- "semicolons": "always"
28
- }
29
- }
30
- }
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Semantic version release script.
4
- * Usage: node scripts/release.js [patch|minor|major]
5
- */
6
-
7
- const { execSync } = require("node:child_process");
8
- const fs = require("node:fs");
9
- const path = require("node:path");
10
-
11
- const bump = process.argv[2];
12
- if (!["patch", "minor", "major"].includes(bump)) {
13
- console.error("Usage: node scripts/release.js [patch|minor|major]");
14
- process.exit(1);
15
- }
16
-
17
- // Verify clean tree
18
- const status = execSync("git status --porcelain", { encoding: "utf-8" }).trim();
19
- if (status) {
20
- console.error("Error: working tree is not clean");
21
- process.exit(1);
22
- }
23
-
24
- // Verify main branch
25
- const branch = execSync("git branch --show-current", { encoding: "utf-8" }).trim();
26
- if (branch !== "main") {
27
- console.error("Error: not on main branch");
28
- process.exit(1);
29
- }
30
-
31
- // Run checks
32
- execSync("npm run typecheck", { stdio: "inherit" });
33
- execSync("npm run lint", { stdio: "inherit" });
34
- execSync("npm test", { stdio: "inherit" });
35
-
36
- // Read current version
37
- const pkgPath = path.join(__dirname, "..", "package.json");
38
- const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
39
- const current = pkg.version;
40
- const [major, minor, patch] = current.split(".").map(Number);
41
-
42
- let next;
43
- if (bump === "major") next = `${major + 1}.0.0`;
44
- else if (bump === "minor") next = `${major}.${minor + 1}.0`;
45
- else next = `${major}.${minor}.${patch + 1}`;
46
-
47
- // Update package.json
48
- pkg.version = next;
49
- fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, "utf-8");
50
-
51
- // Update CHANGELOG
52
- const changelogPath = path.join(__dirname, "..", "CHANGELOG.md");
53
- let changelog = "";
54
- if (fs.existsSync(changelogPath)) {
55
- changelog = fs.readFileSync(changelogPath, "utf-8");
56
- }
57
- const today = new Date().toISOString().split("T")[0];
58
- const newSection = `## [${next}] - ${today}\n\n### Added\n- Release ${next}\n`;
59
- if (changelog.includes("## [Unreleased]")) {
60
- changelog = changelog.replace("## [Unreleased]", `## [Unreleased]\n\n${newSection}`);
61
- } else {
62
- changelog = `# Changelog\n\n## [Unreleased]\n\n${newSection}\n${changelog.replace("# Changelog\n\n", "")}`;
63
- }
64
- fs.writeFileSync(changelogPath, changelog, "utf-8");
65
-
66
- // Commit and tag
67
- execSync("git add package.json CHANGELOG.md", { stdio: "inherit" });
68
- execSync(`git commit -m "chore(release): v${next}"`, { stdio: "inherit" });
69
- execSync(`git tag v${next}`, { stdio: "inherit" });
70
-
71
- console.log(`\n✅ Released v${next}`);
72
- console.log(`Run "npm run release:push" to publish.`);