{"_id":"@davehardy20/pi-mulch","_rev":"2-74d10ebed135e5441493a9a7a970b6be","name":"@davehardy20/pi-mulch","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@davehardy20/pi-mulch","version":"0.1.0","keywords":["pi-package","pi-extension","mulch"],"license":"MIT","_id":"@davehardy20/pi-mulch@0.1.0","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-mulch#readme","bugs":{"url":"https://github.com/davehardy20/pi-mulch/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"c99a3cf6e06189e2adfe2b1d9a4392088b923e85","tarball":"https://registry.npmjs.org/@davehardy20/pi-mulch/-/pi-mulch-0.1.0.tgz","fileCount":14,"integrity":"sha512-ZFs3Zesvbbtw79xnQRTMtV4aPFMpzwaK9cWoDfkgRyK6man75KPD09qOXh/HPyDImvD/Sa0z8nyVPMPq2EXHaw==","signatures":[{"sig":"MEQCIG5WZU/9jv8RMUgCnhCUCh2AipQ9RrdK1O3UBwyLQeYNAiAKdroaLZmDIOS31X/cbl/s0BPqzqXE+9dYhVxJTQnOtg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69512},"type":"module","gitHead":"ad91018fd20d5489b66b0211f788ae1ea7654883","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-mulch.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package that integrates Mulch priming, search, draft review, and session-aware learning workflows.","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-coding-agent":"^0.74.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-mulch_0.1.0_1778677528274_0.3729722745304085","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@davehardy20/pi-mulch","version":"0.1.1","description":"Pi package that integrates Mulch priming, search, draft review, and session-aware learning workflows.","type":"module","keywords":["pi-package","pi-extension","mulch"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/davehardy20/pi-mulch.git"},"bugs":{"url":"https://github.com/davehardy20/pi-mulch/issues"},"homepage":"https://github.com/davehardy20/pi-mulch#readme","publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","typebox":"*"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":false}},"devDependencies":{"@earendil-works/pi-coding-agent":"^0.74.0","@types/node":"^24.7.2","typescript":"^5.9.3","vitest":"^3.2.4"},"pi":{"extensions":["./src/index.ts"]},"gitHead":"4f2ffe856b2dc89d5634a30086f0612e439d3eae","_id":"@davehardy20/pi-mulch@0.1.1","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-zkCnUmLONrpL/ja4POHJPAfnHVpfgAwsHD4umYizVT1s6ykJ3AJRElUag6xgfdfqQlwmNKtCnRx7j0n1h6d9Eg==","shasum":"342f8c15c01493bdb35926ffda9f0ef5a2f50594","tarball":"https://registry.npmjs.org/@davehardy20/pi-mulch/-/pi-mulch-0.1.1.tgz","fileCount":14,"unpackedSize":68905,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCpDY4oc0wcLUXsKB4z8yhfMF34hE1zXiCyVhQAOgjvjwIgX+3REptOyF/FTsYJJ4IdbOusD8gaps5vkj5PxWRUhVw="}]},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"directories":{},"maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-mulch_0.1.1_1779359926008_0.8726935781681511"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-13T13:05:28.162Z","modified":"2026-05-21T10:38:46.260Z","0.1.0":"2026-05-13T13:05:28.409Z","0.1.1":"2026-05-21T10:38:46.154Z"},"bugs":{"url":"https://github.com/davehardy20/pi-mulch/issues"},"license":"MIT","homepage":"https://github.com/davehardy20/pi-mulch#readme","keywords":["pi-package","pi-extension","mulch"],"repository":{"type":"git","url":"git+https://github.com/davehardy20/pi-mulch.git"},"description":"Pi package that integrates Mulch priming, search, draft review, and session-aware learning workflows.","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"readme":"# @davehardy20/pi-mulch\n\nPi package for Mulch-aware priming, search, status, and draft review workflows.\n\n## What it adds\n\n- session-start Mulch detection (`mulch` or `ml`)\n- one-time repo-local prompt to run `mulch init` when `.mulch/` is missing\n- hidden `before_agent_start` priming via `mulch prime`\n- touched-file tracking from common Pi tool activity\n- LLM-callable tools:\n  - `mulch_prime`\n  - `mulch_search`\n  - `mulch_query`\n  - `mulch_learn`\n  - `mulch_status`\n- user commands:\n  - `/mulch-init`\n  - `/mulch-prime`\n  - `/mulch-search`\n  - `/mulch-query`\n  - `/mulch-learn`\n  - `/mulch-status`\n  - `/mulch-review`\n  - `/mulch-apply`\n- session-end draft generation gated on clean post-turn-linter status\n\n## Install\n\nFrom npm:\n\n```bash\npi install npm:@davehardy20/pi-mulch\n```\n\nFor one run only:\n\n```bash\npi -e npm:@davehardy20/pi-mulch\n```\n\nFrom a local checkout during development:\n\n```bash\npi install /absolute/path/to/pi-mulch\n```\n\n## Settings\n\nConfigure in `~/.pi/agent/settings.json`:\n\n```json\n{\n  \"mulch\": {\n    \"enabled\": true,\n    \"command\": null,\n    \"cliCandidates\": [\"mulch\", \"ml\"],\n    \"injectionMode\": \"manifest\",\n    \"primeBudget\": 4000,\n    \"promptOnMissingInit\": true,\n    \"persistInitDecline\": true,\n    \"draftMode\": \"session-end\",\n    \"draftDir\": \".mulch/drafts\",\n    \"initStateFile\": \".pi/mulch-integration.json\",\n    \"maxTrackedFiles\": 24,\n    \"llmTools\": [\n      \"mulch_prime\",\n      \"mulch_search\",\n      \"mulch_query\",\n      \"mulch_learn\",\n      \"mulch_status\"\n    ]\n  }\n}\n```\n\nUse top-level `mulch` settings. Do **not** put this config under Pi's top-level\n`extensions` key, because Pi reserves `extensions` for extension file paths and\npackage sources, not per-extension config.\n\nIf `~/.pi/agent/settings.json` is missing, invalid, or does not contain Mulch\nsettings, pi-mulch uses its built-in defaults. Repo-local `.pi/settings.json`\nfiles are ignored for Mulch configuration.\n\nFor safety:\n\n- `command` and `cliCandidates` are only honored from global Pi settings\n- `draftDir` and `initStateFile` are always confined to the current repo root,\n  even if configured otherwise\n\n## Draft workflow\n\nThe extension is designed to create **draft Mulch learnings at\nsession end**. You should not need to run `ml learn` and `ml record\n...` just to get draft records created when `draftMode` is set to\n`\"session-end\"`.\n\n### Normal flow\n\n1. Pi session runs with the extension enabled.\n2. The extension injects Mulch context at `before_agent_start`.\n3. When `draftMode` is `\"session-end\"`, relevant files were touched,\n   and the post-turn-linter finished **cleanly**, the extension can\n   generate draft records at session end.\n4. Drafts are written to `.mulch/drafts/`.\n5. You review drafts with `/mulch-review`.\n6. You apply drafts with `/mulch-apply`.\n7. After applying drafts to real Mulch records, run `ml sync` to\n   validate and commit `.mulch/` changes.\n\n### Important distinction\n\n- **Automatic when enabled:** session-end draft generation into\n  `.mulch/drafts/`\n- **Manual review step:** `/mulch-review` and `/mulch-apply`\n- **Manual persistence/sync step:** `ml sync`\n\n### When to use `ml learn` and `ml record`\n\nUse `ml learn` and `ml record ...` when you want to create or curate\nMulch records directly yourself, outside the extension's automatic\ndraft workflow.\n\n## Build and test\n\n```bash\nnpm run typecheck\nnpm run test\nnpm run build\n```\n","readmeFilename":"README.md"}