{"_id":"@arsyadal/into-a-pieces","_rev":"2-43fd0f68151e3b36a6e2764fb287e836","name":"@arsyadal/into-a-pieces","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@arsyadal/into-a-pieces","version":"0.1.0","license":"MIT","_id":"@arsyadal/into-a-pieces@0.1.0","maintainers":[{"name":"arsyadal","email":"arsyadal@student.telkomuniversity.ac.id"}],"homepage":"https://github.com/arsyadal/specc#readme","bugs":{"url":"https://github.com/arsyadal/specc/issues"},"bin":{"specc":"bin/specc.js"},"dist":{"shasum":"6998d36f3e83051b708d8a8130172188b0ba0791","tarball":"https://registry.npmjs.org/@arsyadal/into-a-pieces/-/into-a-pieces-0.1.0.tgz","fileCount":13,"integrity":"sha512-l1W1UTwnQGHXkJfm5Xop3tWrJwmPO4U3kGAllyRRpATrsqBN/W1FkGYJD6E9uTx5e6nO0zCzDv/ATcw7ex8hzg==","signatures":[{"sig":"MEUCIQDDac6EYiQyxgUgEqkohTF5X9r0dIv0wfpdXREUFCjJkwIgZZt4eBxG+30vgkAYzWJ2Gk27osyd2JfAXjNp+xQld3g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35278},"main":"lib/compiler.js","type":"module","engines":{"node":">=18"},"gitHead":"24680135ccf4989061238939b1a5c2d24c6514cf","scripts":{"test":"node --test"},"_npmUser":{"name":"arsyadal","email":"arsyadal@student.telkomuniversity.ac.id"},"repository":{"url":"git+https://github.com/arsyadal/specc.git","type":"git"},"_npmVersion":"11.12.1","description":"Session & Skill Compiler and Controller for Claude Code","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/into-a-pieces_0.1.0_1784270818301_0.9184670569260611","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@arsyadal/into-a-pieces","version":"0.1.1","publishConfig":{"access":"public"},"description":"Session & Skill Compiler and Controller for Claude Code","type":"module","main":"lib/compiler.js","bin":{"specc":"bin/specc.js"},"scripts":{"test":"node --test"},"engines":{"node":">=18"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arsyadal/specc.git"},"homepage":"https://github.com/arsyadal/specc#readme","bugs":{"url":"https://github.com/arsyadal/specc/issues"},"gitHead":"3d6ef6a3787849f1cb47533f260f762f9a429575","_id":"@arsyadal/into-a-pieces@0.1.1","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-fJzrRm8fRE5y8wguTGHwhrI8unhi+43arZ2RPLLFLvdyp1CR0wbBz+31a7sRJfpvibncnJWcv72Ffn25gQEr/Q==","shasum":"f82766a15d00b2748697f78e8366d5d2b427701f","tarball":"https://registry.npmjs.org/@arsyadal/into-a-pieces/-/into-a-pieces-0.1.1.tgz","fileCount":13,"unpackedSize":35322,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEMaYJpxsB7cYq3XLP6n824FlHsKa+dvtQJQ5dsXZyB5AiAzNaigx+27Z4tY42fBmAd/52dyJm3avYukcfDNDGCgMA=="}]},"_npmUser":{"name":"arsyadal","email":"arsyadal@student.telkomuniversity.ac.id"},"directories":{},"maintainers":[{"name":"arsyadal","email":"arsyadal@student.telkomuniversity.ac.id"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/into-a-pieces_0.1.1_1784270945092_0.2861211958040464"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T06:46:58.097Z","modified":"2026-07-17T06:49:05.435Z","0.1.0":"2026-07-17T06:46:58.457Z","0.1.1":"2026-07-17T06:49:05.261Z"},"bugs":{"url":"https://github.com/arsyadal/specc/issues"},"license":"MIT","homepage":"https://github.com/arsyadal/specc#readme","repository":{"type":"git","url":"git+https://github.com/arsyadal/specc.git"},"description":"Session & Skill Compiler and Controller for Claude Code","maintainers":[{"name":"arsyadal","email":"arsyadal@student.telkomuniversity.ac.id"}],"readme":"# @arsyadal/into-a-pieces\n\n[![npm version](https://img.shields.io/npm/v/@arsyadal/into-a-pieces.svg)](https://www.npmjs.com/package/@arsyadal/into-a-pieces)\n[![license](https://img.shields.io/npm/l/@arsyadal/into-a-pieces.svg)](https://github.com/arsyadal/specc/blob/main/LICENSE)\n\n**into-a-pieces** is a Session & Skill Optimizer for Claude Code. It compiles a single `playbook.md` into highly focused micro-skills, tracks session character sizes, and allows clean context handoffs so you never lose task progress.\n\n## Features\n\n1. **Micro-Skills Compiler (`specc compile`):** Splits your monolithic playbook rules into tiny, single-purpose skills. When Claude needs a rule, only a tiny skill is loaded into context, avoiding the 8,000-character discovery ceiling and reducing token tax.\n2. **Session Handoff (`specc handoff`):** Captures your current git branch, status, commits, and diff. Saves them to a temporary file, prompts you to run `/clear`, and restores the state automatically on the new session start.\n3. **Token Watchdog (Hook-based):** Warns you when your session accumulates too many characters, prompting you to reset before prompts become expensive or context rot sets in.\n\n---\n\n## Installation\n\n```bash\nnpm install -g @arsyadal/into-a-pieces\n```\n\nFor development:\n```bash\ngit clone https://github.com/arsyadal/specc.git\ncd specc\nnpm link\n```\n\n---\n\n## Getting Started\n\n### 1. Compile Micro-Skills\n\nCreate a `playbook.md` in your project root:\n\n```markdown\n# Globals\nAll micro-skills inherit this.\n- Use ES Modules.\n\n# Target: skill/git-commit\n---\ndescription: Enforce conventional commits\n---\nRules for git commit...\n\n# Target: skill/deploy-staging\n---\ndescription: Deploy to staging\n---\nRules for staging deployment...\n```\n\nRun the compiler to build individual skills in `~/.claude/skills/`:\n```bash\nspecc compile\n```\n\n### 2. Configure Claude Code Hooks\n\nTo automate Session Handoff and the Token Watchdog, register `specc` in your project's `.claude/settings.json` or global configuration:\n\n```json\n{\n  \"hooks\": {\n    \"SessionStart\": \"specc hook session-start\",\n    \"UserPromptSubmit\": \"specc hook prompt-submit\"\n  }\n}\n```\n\n---\n\n## Commands\n\n| Command | Action |\n| --- | --- |\n| `specc compile` | Compiles `playbook.md` into micro-skills |\n| `specc handoff` | Saves git state, instructs you to run `/clear` |\n| `specc hook session-start` | Restores handoff state (called by Claude Code) |\n| `specc hook prompt-submit` | Warns if context size gets too large (called by Claude Code) |\n\n---\n\n## How it works\n\n- **Session Handoff:** Writing the current state to `.specc-handoff.json` allows the new session to pick up right where the old one left off. The `SessionStart` hook reads this context, pushes it into Claude's memory, and deletes the temporary file.\n- **Watchdog:** Character counts are cached in `.specc-token-cache` on every prompt submit. A warning is printed to `stderr` once the cache exceeds 80,000 characters (~20,000 tokens).\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}