@kingkyylian/handoffkit 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initial TypeScript ESM CLI scaffold.
6
+ - Added `handoffkit pack`.
7
+ - Added Markdown and JSON reports.
8
+ - Added git status, recent commit, changed file, diff summary, and optional diff collection.
9
+ - Added instruction file detection with compact redacted previews.
10
+ - Added package manager and verification script detection.
11
+ - Added best-effort secret redaction.
12
+ - Added `pack --since`, `pack --verify`, and `pack --for`.
13
+ - Added `verify`, `risk`, and `resume` commands.
14
+ - Added deterministic risk notes.
15
+ - Added optional `gitleaks` and `secretlint` availability metadata and bounded redacted scan results.
16
+ - Added release checklist documentation and CI package dry-run validation.
17
+ - Added unit and integration tests.
@@ -0,0 +1,24 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We are committed to a respectful, harassment-free project space.
6
+
7
+ ## Expected Behavior
8
+
9
+ - Be direct and constructive.
10
+ - Assume good intent, but prioritize clear technical discussion.
11
+ - Keep issues and pull requests focused on the project.
12
+ - Respect maintainer decisions about scope and tradeoffs.
13
+
14
+ ## Unacceptable Behavior
15
+
16
+ - Harassment, abuse, personal attacks, or discriminatory language.
17
+ - Publishing private information without consent.
18
+ - Repeated off-topic or disruptive comments.
19
+
20
+ ## Enforcement
21
+
22
+ Maintainers may edit, hide, or remove comments; close issues; block users; or take other reasonable action to protect the project.
23
+
24
+ Report concerns through GitHub security advisories or by contacting the maintainer.
@@ -0,0 +1,27 @@
1
+ # Contributing
2
+
3
+ Thanks for working on HandoffKit.
4
+
5
+ ## Local Setup
6
+
7
+ ```sh
8
+ pnpm install
9
+ pnpm check
10
+ pnpm pack:dry-run
11
+ ```
12
+
13
+ Node.js 22 or newer is required.
14
+
15
+ ## Development Rules
16
+
17
+ - Keep the CLI local-first and deterministic.
18
+ - Do not add LLM API calls or telemetry.
19
+ - Add focused tests for behavior changes.
20
+ - Keep generated handoff output redacted by default.
21
+ - Prefer small, readable modules over framework-heavy abstractions.
22
+
23
+ ## Pull Request Checklist
24
+
25
+ - `pnpm check`
26
+ - `pnpm pack:dry-run`
27
+ - Manual smoke test: `pnpm dev pack --goal "Make your own goal"`
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kyylian
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,229 @@
1
+ # HandoffKit
2
+
3
+ [![CI](https://github.com/kingkyylian/handoffkit/actions/workflows/ci.yml/badge.svg)](https://github.com/kingkyylian/handoffkit/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/@kingkyylian/handoffkit.svg)](https://www.npmjs.com/package/@kingkyylian/handoffkit)
5
+ [![Node](https://img.shields.io/badge/node-%3E%3D22-43853d.svg)](https://nodejs.org/)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
+
8
+ HandoffKit is the clean handoff packet for interrupted AI coding sessions.
9
+
10
+ It turns messy AI-assisted coding work into a safe resume packet you can paste into Codex, Claude Code, Cursor, Gemini, ChatGPT, or another agent. It is a local-first TypeScript CLI: it inspects the current git repository, summarizes the live branch state, detects agent instruction files, finds package verification scripts, redacts likely secrets, and prints compact Markdown by default. It does not call any LLM API.
11
+
12
+ ## Why It Exists
13
+
14
+ AI coding sessions get interrupted: context windows fill up, tools change, laptops sleep, a model gets stuck, or work needs to move from Claude Code to Codex or Cursor. The hard part is not feeding an entire repo to an agent. The hard part is explaining what happened on this branch and what the next agent should do.
15
+
16
+ HandoffKit creates a deterministic handoff packet with the pieces another assistant needs first:
17
+
18
+ - current branch and git status
19
+ - recent commits
20
+ - staged and unstaged diff summaries
21
+ - changed file list
22
+ - detected instruction files such as `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursor/rules`, and `.github/copilot-instructions.md`, with compact redacted previews
23
+ - package manager and common verification scripts from `package.json`
24
+ - best-effort redaction for likely secrets
25
+
26
+ ## Positioning
27
+
28
+ HandoffKit is not a repo ingestion tool. It is not trying to replace Repomix, Gitingest, or long-lived repo instruction tools.
29
+
30
+ Its job is narrower: capture the live state of an interrupted AI coding session so another agent can resume without guessing.
31
+
32
+ ## HandoffKit vs. Repo Instruction Tools
33
+
34
+ Repo instruction tools such as AgentFit help shape reusable project guidance for AI agents. HandoffKit has a different job: it captures the live state of a coding session right now.
35
+
36
+ Use repo instruction tools to maintain durable agent rules. Use HandoffKit when you need to hand off an in-progress branch, debugging session, or partially completed change to another assistant without pasting raw diffs and secrets by hand.
37
+
38
+ ## Current MVP
39
+
40
+ The first release focuses on the minimum useful handoff:
41
+
42
+ - local git state
43
+ - changed files
44
+ - recent commits
45
+ - diff summaries and optional patches
46
+ - agent instruction file previews
47
+ - package verification scripts
48
+ - best-effort secret redaction
49
+
50
+ It is useful today, but the goal is to become more than a prettier `git status`. See [ROADMAP.md](ROADMAP.md) for the next features that should make HandoffKit harder to replace with a manual paste.
51
+
52
+ ## Install
53
+
54
+ Run without installing:
55
+
56
+ ```sh
57
+ pnpm dlx @kingkyylian/handoffkit pack --goal "Make your own goal"
58
+ ```
59
+
60
+ Or install it globally:
61
+
62
+ ```sh
63
+ pnpm add -g @kingkyylian/handoffkit
64
+ ```
65
+
66
+ For local development:
67
+
68
+ ```sh
69
+ pnpm install
70
+ pnpm build
71
+ ```
72
+
73
+ Node.js 22 or newer is required.
74
+
75
+ ## Usage
76
+
77
+ From inside a git repository:
78
+
79
+ ```sh
80
+ handoffkit pack --goal "Make your own goal"
81
+ ```
82
+
83
+ Focus on the branch delta since a base ref:
84
+
85
+ ```sh
86
+ handoffkit pack --since main --goal "Continue this branch"
87
+ ```
88
+
89
+ Run safe verification scripts and include the result:
90
+
91
+ ```sh
92
+ handoffkit pack --verify --goal "Fix remaining failures"
93
+ ```
94
+
95
+ Run optional local secret scanners and include bounded redacted results:
96
+
97
+ ```sh
98
+ handoffkit pack --scan-secrets --goal "Review before handoff"
99
+ ```
100
+
101
+ Optimize the packet for a target agent:
102
+
103
+ ```sh
104
+ handoffkit pack --for codex --goal "Resume implementation"
105
+ ```
106
+
107
+ During development:
108
+
109
+ ```sh
110
+ pnpm dev pack --goal "Make your own goal"
111
+ ```
112
+
113
+ Write to a file:
114
+
115
+ ```sh
116
+ handoffkit pack --goal "Finish the CLI MVP" --output handoff.md
117
+ ```
118
+
119
+ JSON output:
120
+
121
+ ```sh
122
+ handoffkit pack --goal "Review this branch" --format json
123
+ ```
124
+
125
+ Include full patch text:
126
+
127
+ ```sh
128
+ handoffkit pack --goal "Continue implementation" --include-diff
129
+ ```
130
+
131
+ Omit diff summaries and patches:
132
+
133
+ ```sh
134
+ handoffkit pack --goal "Summarize repo state" --no-diff
135
+ ```
136
+
137
+ Set a rough Markdown token budget:
138
+
139
+ ```sh
140
+ handoffkit pack --goal "Prepare a compact handoff" --budget 3000
141
+ ```
142
+
143
+ Run verification directly:
144
+
145
+ ```sh
146
+ handoffkit verify
147
+ ```
148
+
149
+ Inspect deterministic risk notes:
150
+
151
+ ```sh
152
+ handoffkit risk
153
+ ```
154
+
155
+ Run optional local secret scanners directly:
156
+
157
+ ```sh
158
+ handoffkit scan-secrets
159
+ ```
160
+
161
+ Resume from a previous handoff or transcript:
162
+
163
+ ```sh
164
+ handoffkit resume previous-handoff.md --goal "Continue from here"
165
+ ```
166
+
167
+ ## CLI Options
168
+
169
+ | Option | Description |
170
+ | --- | --- |
171
+ | `--goal <text>` | The handoff goal to place at the top of the packet. |
172
+ | `--output <path>` | Write the packet to a file instead of stdout. |
173
+ | `--format markdown\|json` | Render Markdown or JSON. Defaults to Markdown. |
174
+ | `--for generic\|codex\|claude\|cursor` | Tune the packet heading and prompt shape for a target agent. |
175
+ | `--budget <tokens>` | Rough Markdown token budget. Defaults to `4000`. |
176
+ | `--since <ref>` | Focus committed branch delta on a base ref such as `main`. |
177
+ | `--verify` | Run safe verification scripts and include results in the packet. |
178
+ | `--scan-secrets` | Run optional local secret scanners and include bounded redacted results. |
179
+ | `--include-diff` | Include full tracked patches and bounded untracked previews. |
180
+ | `--no-diff` | Omit diff summaries and full patches. |
181
+
182
+ ## What Gets Collected
183
+
184
+ HandoffKit reads local git and filesystem metadata from the current repository:
185
+
186
+ - branch, status, recent commits, changed files, and diff summaries
187
+ - full tracked patch text only when `--include-diff` is used
188
+ - untracked file names in summaries, and untracked file preview content only when `--include-diff` is used
189
+ - compact previews of detected instruction files
190
+ - package manager and verification scripts from the root `package.json`
191
+ - optional verification results when `--verify` is used
192
+ - deterministic risk notes from changed file paths
193
+ - optional secret scanner availability for `gitleaks` and `secretlint`
194
+ - bounded, redacted secret scan results when `--scan-secrets` is used
195
+
196
+ ## What Never Happens
197
+
198
+ - No LLM API calls.
199
+ - No network requests from the CLI.
200
+ - No git writes, commits, staging, or branch changes.
201
+ - No files are written unless `--output` is provided.
202
+
203
+ ## Development
204
+
205
+ ```sh
206
+ pnpm install
207
+ pnpm typecheck
208
+ pnpm lint
209
+ pnpm test
210
+ pnpm build
211
+ pnpm check
212
+ pnpm pack:dry-run
213
+ ```
214
+
215
+ ## Release
216
+
217
+ Releases are manual and should happen only after CI, package dry-run, and install smoke tests pass. The preferred path is the GitHub `Release` workflow with an `NPM_TOKEN` repository secret so npm provenance is attached to the published package.
218
+
219
+ See [docs/RELEASE.md](docs/RELEASE.md) for the release checklist.
220
+
221
+ ## Security Model
222
+
223
+ HandoffKit is local-first and deterministic. It reads local git and filesystem state, renders a report, and redacts likely secrets from generated output. Redaction is best effort, so review packets before pasting them into a third-party tool.
224
+
225
+ When `--scan-secrets` is used, HandoffKit runs installed local scanners only. It does not install scanners, send code to a service, or fail when `gitleaks` or `secretlint` is missing.
226
+
227
+ ## License
228
+
229
+ MIT
package/ROADMAP.md ADDED
@@ -0,0 +1,109 @@
1
+ # Roadmap
2
+
3
+ HandoffKit is focused on one niche: clean handoff and resume packets for interrupted AI coding sessions.
4
+
5
+ It should not become a generic repo-to-context dumper. Existing tools already cover that space well. The roadmap below prioritizes features that make handoff quality better than a manual paste.
6
+
7
+ ## Implemented MVP Surface
8
+
9
+ These are implemented as local-first deterministic features:
10
+
11
+ ### `handoffkit pack --since <ref>`
12
+
13
+ Summarize the meaningful branch delta relative to a base ref such as `main`:
14
+
15
+ ```sh
16
+ handoffkit pack --since main --goal "Continue this branch"
17
+ ```
18
+
19
+ Expected behavior:
20
+
21
+ - compare current branch against the base ref
22
+ - include changed files and commits only from the branch delta
23
+ - reduce noise from unrelated working tree history
24
+ - keep deterministic local output
25
+
26
+ ### `handoffkit pack --verify` and `handoffkit verify`
27
+
28
+ Run detected verification commands and include the result in the packet:
29
+
30
+ ```sh
31
+ handoffkit verify
32
+ handoffkit pack --goal "Fix remaining failures"
33
+ ```
34
+
35
+ Expected behavior:
36
+
37
+ - choose safe scripts such as `typecheck`, `lint`, `test`, `build`
38
+ - capture command, exit code, duration, and tail output
39
+ - avoid running arbitrary destructive scripts
40
+ - include verification in a handoff packet when `pack --verify` is used
41
+
42
+ ### Agent-Specific Output
43
+
44
+ Optimize handoff shape for target agents:
45
+
46
+ ```sh
47
+ handoffkit pack --for codex
48
+ handoffkit pack --for claude
49
+ handoffkit pack --for cursor
50
+ ```
51
+
52
+ Expected behavior:
53
+
54
+ - keep the same source facts
55
+ - adjust section order, headings, and action prompts for the target tool
56
+ - avoid tool-specific claims that cannot be verified locally
57
+
58
+ ### `handoffkit risk`
59
+
60
+ Produce deterministic risk notes from changed files and package signals:
61
+
62
+ ```sh
63
+ handoffkit risk
64
+ ```
65
+
66
+ Expected behavior:
67
+
68
+ - flag likely test gaps
69
+ - note config, auth, security, migration, packaging, or CI-sensitive changes
70
+ - stay rule-based unless an explicit local model integration is added later
71
+
72
+ ### `handoffkit resume`
73
+
74
+ Generate a fresh packet from a previous handoff, transcript, or interrupted session notes:
75
+
76
+ ```sh
77
+ handoffkit resume previous-handoff.md --goal "Continue from here"
78
+ ```
79
+
80
+ Expected behavior:
81
+
82
+ - extract prior goal, completed work, remaining tasks, and verification state
83
+ - merge with current git state
84
+ - produce a clean next-agent packet
85
+
86
+ ### Stronger Secret Scanning
87
+
88
+ Regex redaction remains the default. HandoffKit detects optional local scanners and can run bounded local scans with `pack --scan-secrets` or `scan-secrets`:
89
+
90
+ - `secretlint`
91
+ - `gitleaks`
92
+ - provider-specific token patterns
93
+
94
+ Scan results are bounded and redacted before rendering.
95
+
96
+ ## Next Up
97
+
98
+ - Add scanner-specific installation guidance and config discovery.
99
+ - Make `risk` rules richer by mapping changed files to common failure modes.
100
+ - Improve `--for` formats beyond headings, with agent-specific action prompts.
101
+ - Add transcript parsers for Claude Code, Codex, Cursor, and Gemini exports.
102
+ - Add a stable `.handoffkit` cache format for verification and resume artifacts.
103
+
104
+ ## Non-Goals
105
+
106
+ - No LLM API calls in the core CLI.
107
+ - No telemetry.
108
+ - No generic full-repo context dumping as the primary product.
109
+ - No git writes unless a command explicitly asks for an output file or cache artifact.
package/SECURITY.md ADDED
@@ -0,0 +1,16 @@
1
+ # Security Policy
2
+
3
+ HandoffKit is designed to create safe handoff packets, but redaction is best effort.
4
+
5
+ ## Reporting a Vulnerability
6
+
7
+ Please open a private security advisory on GitHub or contact the maintainer directly. Do not publish working exploit details before there is a fix or documented mitigation.
8
+
9
+ ## Security Boundaries
10
+
11
+ - The CLI does not call LLM APIs.
12
+ - The CLI should not make network requests.
13
+ - The CLI should not modify git state.
14
+ - Generated output is redacted after rendering, before stdout or file writes.
15
+
16
+ Review generated packets before pasting them into third-party tools, especially when using `--include-diff`.
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node