@m2015agg/git-skill 0.4.5 → 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/README.md +33 -3
- package/dist/commands/add-key.d.ts +2 -0
- package/dist/commands/add-key.js +85 -0
- package/dist/commands/add-key.js.map +1 -0
- package/dist/commands/init.js +28 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.js +143 -48
- package/dist/commands/install.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/templates/walkthrough.d.ts +3 -0
- package/dist/templates/walkthrough.js +166 -0
- package/dist/templates/walkthrough.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,11 +45,22 @@ If `git-skill` is not found after install, run `hash -r` to refresh your shell's
|
|
|
45
45
|
## Quick Start
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
+
# First time only — interactive wizard configures embeddings + API key
|
|
49
|
+
git-skill install
|
|
50
|
+
|
|
51
|
+
# Then in each repo
|
|
48
52
|
cd your-project
|
|
49
|
-
git-skill init #
|
|
53
|
+
git-skill init # Hook, snapshot, /review command, 30-day context
|
|
50
54
|
git-skill doctor # Verify setup
|
|
51
55
|
```
|
|
52
56
|
|
|
57
|
+
Or skip the wizard and add your key directly:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git-skill add-key sk-ant-your-key-here # auto-detects Anthropic
|
|
61
|
+
git-skill add-key sk-your-key-here # auto-detects OpenAI
|
|
62
|
+
```
|
|
63
|
+
|
|
53
64
|
## Embeddings (Optional)
|
|
54
65
|
|
|
55
66
|
For semantic search, configure an embedding provider. Works with any OpenAI-compatible endpoint (OpenAI, Ollama, LMStudio).
|
|
@@ -166,8 +177,9 @@ git-skill why <hash> # View enrichment for a commit
|
|
|
166
177
|
|
|
167
178
|
| Command | Description |
|
|
168
179
|
|---------|-------------|
|
|
169
|
-
| `git-skill install` |
|
|
170
|
-
| `git-skill init` | Per-project setup (hook, snapshot,
|
|
180
|
+
| `git-skill install` | Interactive setup wizard (embeddings, enrichment, API key) |
|
|
181
|
+
| `git-skill init` | Per-project setup (hook, snapshot, /review command, 30-day context) |
|
|
182
|
+
| `git-skill add-key <key>` | Add or update API key (auto-detects Anthropic/OpenAI) |
|
|
171
183
|
| `git-skill approve` | Pre-approve read commands in Claude Code |
|
|
172
184
|
| `git-skill docs` | Output CLAUDE.md snippet |
|
|
173
185
|
| `git-skill cron` | Nightly fetch + snapshot + embed automation |
|
|
@@ -180,6 +192,23 @@ git-skill why <hash> # View enrichment for a commit
|
|
|
180
192
|
- `--limit N` — Cap results
|
|
181
193
|
- `--since <date>` / `--until <date>` — Time filter
|
|
182
194
|
|
|
195
|
+
## Dev Workflow Commands
|
|
196
|
+
|
|
197
|
+
`git-skill init` installs four slash commands for a gated development workflow:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
/plan → /implement → /review → /finalize
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Command | What It Does | git-skill Integration |
|
|
204
|
+
|---------|-------------|----------------------|
|
|
205
|
+
| `/plan` | Design a feature, check what was tried before | `search`, `decisions`, `hotspots`, `coupling` |
|
|
206
|
+
| `/implement` | TDD, branch, draft PR, frequent commits | — |
|
|
207
|
+
| `/review` | Code review with history verification | `verify` (PASS/WARN/BLOCK), `hotspots` |
|
|
208
|
+
| `/finalize` | Tests, clean commit, PR ready | `verify`, `doctor` |
|
|
209
|
+
|
|
210
|
+
Each phase **stops and waits** for your approval before proceeding. See [docs/workflow.md](docs/workflow.md) for the full guide with examples.
|
|
211
|
+
|
|
183
212
|
## How It Works
|
|
184
213
|
|
|
185
214
|
Three-layer SQLite cache at `.git-history/history.db`:
|
|
@@ -279,6 +308,7 @@ Claude can read the config, run the commands, and interpret the results. When in
|
|
|
279
308
|
|
|
280
309
|
## Detailed Documentation
|
|
281
310
|
|
|
311
|
+
- [Dev Workflow Guide](docs/workflow.md) — How `/plan`, `/implement`, `/review`, `/finalize` work together
|
|
282
312
|
- [Design Spec](docs/specs/2026-03-31-git-skill-design.md) — Full architecture, schema, algorithms, and test strategy
|
|
283
313
|
- [GeorgeWorks: Memory Integration](docs/specs/context-injection.md) — How context-update writes to Claude's memory system, internal architecture of `findRelevantMemories`, consolidation phases, and thresholds
|
|
284
314
|
- [Opus Verification Layer](docs/specs/opus-verification-layer.md) — Design and real-world case studies for the verify command
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
import { existsSync, readFileSync, writeFileSync, appendFileSync } from "fs";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
import { readConfig, writeConfig } from "../util/config.js";
|
|
6
|
+
function write(msg) { process.stdout.write(msg); }
|
|
7
|
+
export function addKeyCommand() {
|
|
8
|
+
return new Command("add-key")
|
|
9
|
+
.description("Add or update your LLM API key")
|
|
10
|
+
.argument("<key>", "API key (Anthropic or OpenAI)")
|
|
11
|
+
.option("--provider <provider>", "Provider: anthropic or openai (auto-detected from key prefix)")
|
|
12
|
+
.action((key, opts) => {
|
|
13
|
+
// Auto-detect provider from key prefix
|
|
14
|
+
let provider = opts.provider;
|
|
15
|
+
if (!provider) {
|
|
16
|
+
if (key.startsWith("sk-ant-")) {
|
|
17
|
+
provider = "anthropic";
|
|
18
|
+
}
|
|
19
|
+
else if (key.startsWith("sk-")) {
|
|
20
|
+
provider = "openai";
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
provider = "unknown";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
write(`Detected provider: ${provider}\n`);
|
|
27
|
+
// 1. Save key to ~/.env
|
|
28
|
+
const envPath = join(homedir(), ".env");
|
|
29
|
+
const entry = `GIT_SKILL_LLM_KEY=${key}`;
|
|
30
|
+
if (existsSync(envPath)) {
|
|
31
|
+
const content = readFileSync(envPath, "utf-8");
|
|
32
|
+
if (content.includes("GIT_SKILL_LLM_KEY=")) {
|
|
33
|
+
const updated = content.replace(/GIT_SKILL_LLM_KEY=.*/g, entry);
|
|
34
|
+
writeFileSync(envPath, updated, { mode: 0o600 });
|
|
35
|
+
write("Updated GIT_SKILL_LLM_KEY in ~/.env\n");
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const suffix = content.endsWith("\n") ? "" : "\n";
|
|
39
|
+
appendFileSync(envPath, `${suffix}${entry}\n`);
|
|
40
|
+
write("Added GIT_SKILL_LLM_KEY to ~/.env\n");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
writeFileSync(envPath, `${entry}\n`, { mode: 0o600 });
|
|
45
|
+
write("Created ~/.env with GIT_SKILL_LLM_KEY\n");
|
|
46
|
+
}
|
|
47
|
+
// 2. Update config to enable enrichment with detected provider
|
|
48
|
+
const config = readConfig();
|
|
49
|
+
if (config) {
|
|
50
|
+
let changed = false;
|
|
51
|
+
if (!config.enrichment.enabled) {
|
|
52
|
+
config.enrichment.enabled = true;
|
|
53
|
+
config.enrichment.apiKey = "${GIT_SKILL_LLM_KEY}";
|
|
54
|
+
if (provider === "anthropic") {
|
|
55
|
+
config.enrichment.url = "https://api.anthropic.com/v1/messages";
|
|
56
|
+
config.enrichment.model = "claude-sonnet-4-5-20250514";
|
|
57
|
+
}
|
|
58
|
+
else if (provider === "openai") {
|
|
59
|
+
config.enrichment.url = "https://api.openai.com/v1/chat/completions";
|
|
60
|
+
config.enrichment.model = "gpt-4o";
|
|
61
|
+
}
|
|
62
|
+
changed = true;
|
|
63
|
+
write(`Enabled enrichment (${config.enrichment.model})\n`);
|
|
64
|
+
}
|
|
65
|
+
if (provider === "openai" && !config.embedding.enabled) {
|
|
66
|
+
config.embedding.enabled = true;
|
|
67
|
+
config.embedding.url = "https://api.openai.com/v1/embeddings";
|
|
68
|
+
config.embedding.model = "text-embedding-3-small";
|
|
69
|
+
config.embedding.apiKey = "${GIT_SKILL_LLM_KEY}";
|
|
70
|
+
config.embedding.provider = "openai";
|
|
71
|
+
config.embedding.dimensions = 1536;
|
|
72
|
+
changed = true;
|
|
73
|
+
write("Enabled embeddings (text-embedding-3-small)\n");
|
|
74
|
+
}
|
|
75
|
+
if (changed) {
|
|
76
|
+
writeConfig(config);
|
|
77
|
+
write("Config updated.\n");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
write("\nReady! Run these in your repo:\n");
|
|
81
|
+
write(" git-skill enrich # analyze commit history\n");
|
|
82
|
+
write(" git-skill embed # generate embeddings (if configured)\n");
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=add-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-key.js","sourceRoot":"","sources":["../../src/commands/add-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE5D,SAAS,KAAK,CAAC,GAAW,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEhE,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,OAAO,CAAC,SAAS,CAAC;SAC1B,WAAW,CAAC,gCAAgC,CAAC;SAC7C,QAAQ,CAAC,OAAO,EAAE,+BAA+B,CAAC;SAClD,MAAM,CAAC,uBAAuB,EAAE,+DAA+D,CAAC;SAChG,MAAM,CAAC,CAAC,GAAW,EAAE,IAA2B,EAAE,EAAE;QACnD,uCAAuC;QACvC,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAA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CAAC,UAAU,GAAG,IAAI,CAAC;gBACnC,OAAO,GAAG,IAAI,CAAC;gBACf,KAAK,CAAC,+CAA+C,CAAC,CAAC;YACzD,CAAC;YAED,IAAI,OAAO,EAAE,CAAC;gBACZ,WAAW,CAAC,MAAM,CAAC,CAAC;gBACpB,KAAK,CAAC,mBAAmB,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;QAED,KAAK,CAAC,oCAAoC,CAAC,CAAC;QAC5C,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC9D,KAAK,CAAC,mEAAmE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/init.js
CHANGED
|
@@ -6,7 +6,7 @@ import { installHook } from "../util/hooks.js";
|
|
|
6
6
|
import { isGitRepo } from "../util/git.js";
|
|
7
7
|
import { upsertSection } from "../util/claude-md.js";
|
|
8
8
|
import { getSkillDoc } from "./docs.js";
|
|
9
|
-
import { WALKTHROUGH, REVIEW_COMMAND } from "../templates/walkthrough.js";
|
|
9
|
+
import { WALKTHROUGH, REVIEW_COMMAND, PLAN_COMMAND, IMPLEMENT_COMMAND, FINALIZE_COMMAND } from "../templates/walkthrough.js";
|
|
10
10
|
import { runContextUpdate } from "./context-update.js";
|
|
11
11
|
function write(msg) { process.stdout.write(msg); }
|
|
12
12
|
export function initCommand() {
|
|
@@ -71,6 +71,33 @@ export function initCommand() {
|
|
|
71
71
|
else {
|
|
72
72
|
write(" /review — already exists (not overwritten)\n");
|
|
73
73
|
}
|
|
74
|
+
// Install plan command if it doesn't already exist
|
|
75
|
+
const planPath = join(walkthroughDir, "plan.md");
|
|
76
|
+
if (!existsSync(planPath)) {
|
|
77
|
+
writeFileSync(planPath, PLAN_COMMAND);
|
|
78
|
+
write(" /plan — plan features with git history awareness (NEW)\n");
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
write(" /plan — already exists (not overwritten)\n");
|
|
82
|
+
}
|
|
83
|
+
// Install implement command if it doesn't already exist
|
|
84
|
+
const implementPath = join(walkthroughDir, "implement.md");
|
|
85
|
+
if (!existsSync(implementPath)) {
|
|
86
|
+
writeFileSync(implementPath, IMPLEMENT_COMMAND);
|
|
87
|
+
write(" /implement — implement features with TDD and frequent commits (NEW)\n");
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
write(" /implement — already exists (not overwritten)\n");
|
|
91
|
+
}
|
|
92
|
+
// Install finalize command if it doesn't already exist
|
|
93
|
+
const finalizePath = join(walkthroughDir, "finalize.md");
|
|
94
|
+
if (!existsSync(finalizePath)) {
|
|
95
|
+
writeFileSync(finalizePath, FINALIZE_COMMAND);
|
|
96
|
+
write(" /finalize — finalize features with verification (NEW)\n");
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
write(" /finalize — already exists (not overwritten)\n");
|
|
100
|
+
}
|
|
74
101
|
// 6. Run snapshot
|
|
75
102
|
if (!opts.skipSnapshot) {
|
|
76
103
|
write("5. Running initial snapshot...\n");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3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AAS,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3E,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,CAAC,iEAAiE,CAAC,CAAC;QAC3E,CAAC;QAED,2CAA2C;QAC3C,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACzD,IAAI,CAAC;YACH,gBAAgB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC1B,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,CAAC,2FAA2F,CAAC,CAAC;QACrG,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC/B,CAAC;QAED,KAAK,CAAC,4BAA4B,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/install.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { join } from "path";
|
|
3
|
+
import { existsSync, readFileSync, writeFileSync, appendFileSync } from "fs";
|
|
3
4
|
import { homedir } from "os";
|
|
4
5
|
import { execSync } from "child_process";
|
|
6
|
+
import { createInterface } from "readline";
|
|
5
7
|
import { writeConfig, getDefaultConfig, readConfig } from "../util/config.js";
|
|
6
8
|
import { upsertSection } from "../util/claude-md.js";
|
|
7
9
|
import { getSkillDoc } from "./docs.js";
|
|
@@ -15,70 +17,163 @@ function checkGit() {
|
|
|
15
17
|
return false;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
20
|
+
function ask(question) {
|
|
21
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
22
|
+
return new Promise((resolve) => {
|
|
23
|
+
rl.question(question, (answer) => { rl.close(); resolve(answer.trim()); });
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function writeApiKey(key) {
|
|
27
|
+
const envPath = join(homedir(), ".env");
|
|
28
|
+
const entry = `GIT_SKILL_LLM_KEY=${key}`;
|
|
29
|
+
if (existsSync(envPath)) {
|
|
30
|
+
const content = readFileSync(envPath, "utf-8");
|
|
31
|
+
if (content.includes("GIT_SKILL_LLM_KEY=")) {
|
|
32
|
+
// Replace existing key
|
|
33
|
+
const updated = content.replace(/GIT_SKILL_LLM_KEY=.*/g, entry);
|
|
34
|
+
writeFileSync(envPath, updated, { mode: 0o600 });
|
|
35
|
+
write(" Updated GIT_SKILL_LLM_KEY in ~/.env\n");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const suffix = content.endsWith("\n") ? "" : "\n";
|
|
39
|
+
appendFileSync(envPath, `${suffix}${entry}\n`);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
writeFileSync(envPath, `${entry}\n`, { mode: 0o600 });
|
|
43
|
+
}
|
|
44
|
+
write(" Saved GIT_SKILL_LLM_KEY to ~/.env\n");
|
|
45
|
+
}
|
|
46
|
+
async function testEmbeddingConnection(url, model) {
|
|
47
|
+
write(" Testing connection...");
|
|
48
|
+
try {
|
|
49
|
+
const response = await fetch(url, {
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers: { "Content-Type": "application/json" },
|
|
52
|
+
body: JSON.stringify({ model, input: "test" }),
|
|
53
|
+
});
|
|
54
|
+
if (response.ok) {
|
|
55
|
+
write(" connected!\n");
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
write(` failed (${response.status})\n`);
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
write(` failed (${e.message?.slice(0, 50) ?? "connection error"})\n`);
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
18
66
|
export function installCommand() {
|
|
19
67
|
return new Command("install")
|
|
20
68
|
.description("Global setup wizard — install git-skill system-wide")
|
|
21
69
|
.option("--ci", "Non-interactive mode, use defaults")
|
|
22
|
-
.action((opts) => {
|
|
23
|
-
write("
|
|
70
|
+
.action(async (opts) => {
|
|
71
|
+
write("git-skill Setup Wizard\n");
|
|
72
|
+
write("═".repeat(40) + "\n\n");
|
|
24
73
|
// 1. Check git
|
|
25
74
|
write("1. Checking git...\n");
|
|
26
75
|
if (!checkGit()) {
|
|
27
|
-
write(" Error: git not found
|
|
76
|
+
write(" Error: git not found. Install git first.\n");
|
|
28
77
|
process.exit(1);
|
|
29
78
|
}
|
|
30
|
-
write(" git found.\n");
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
write(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
79
|
+
write(" git found.\n\n");
|
|
80
|
+
// Load or create config
|
|
81
|
+
const config = readConfig() ?? getDefaultConfig();
|
|
82
|
+
if (!opts.ci) {
|
|
83
|
+
// 2. Embedding setup
|
|
84
|
+
write("2. Embeddings (semantic search)\n");
|
|
85
|
+
write(" Embeddings let you search by meaning, not just keywords.\n");
|
|
86
|
+
write(" Requires an embedding provider (Ollama is free and local).\n\n");
|
|
87
|
+
const wantEmbed = await ask(" Enable embeddings? [y/N] ");
|
|
88
|
+
if (wantEmbed.toLowerCase() === "y") {
|
|
89
|
+
write("\n Providers:\n");
|
|
90
|
+
write(" 1) Ollama (free, local) — http://localhost:11434/api/embed\n");
|
|
91
|
+
write(" 2) OpenAI — https://api.openai.com/v1/embeddings\n");
|
|
92
|
+
write(" 3) Custom URL\n\n");
|
|
93
|
+
const provider = await ask(" Choose [1/2/3]: ");
|
|
94
|
+
if (provider === "1") {
|
|
95
|
+
const url = await ask(" Ollama URL [http://localhost:11434/api/embed]: ");
|
|
96
|
+
config.embedding.url = url || "http://localhost:11434/api/embed";
|
|
97
|
+
const model = await ask(" Embedding model [mxbai-embed-large]: ");
|
|
98
|
+
config.embedding.model = model || "mxbai-embed-large";
|
|
99
|
+
config.embedding.provider = "ollama";
|
|
100
|
+
config.embedding.dimensions = 1024;
|
|
101
|
+
}
|
|
102
|
+
else if (provider === "2") {
|
|
103
|
+
config.embedding.url = "https://api.openai.com/v1/embeddings";
|
|
104
|
+
config.embedding.model = "text-embedding-3-small";
|
|
105
|
+
config.embedding.provider = "openai";
|
|
106
|
+
config.embedding.apiKey = "${GIT_SKILL_LLM_KEY}";
|
|
107
|
+
config.embedding.dimensions = 1536;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const url = await ask(" Embedding URL: ");
|
|
111
|
+
const model = await ask(" Model name: ");
|
|
112
|
+
config.embedding.url = url;
|
|
113
|
+
config.embedding.model = model;
|
|
114
|
+
}
|
|
115
|
+
config.embedding.enabled = true;
|
|
116
|
+
await testEmbeddingConnection(config.embedding.url, config.embedding.model);
|
|
117
|
+
}
|
|
118
|
+
write("\n");
|
|
119
|
+
// 3. Enrichment setup
|
|
120
|
+
write("3. LLM Enrichment (commit analysis)\n");
|
|
121
|
+
write(" Enrichment uses an LLM to analyze each commit — what changed, why,\n");
|
|
122
|
+
write(" and what alternatives existed. Powers the 'verify' command.\n");
|
|
123
|
+
write(" Requires an API key (Anthropic or OpenAI).\n\n");
|
|
124
|
+
const wantEnrich = await ask(" Enable enrichment? [y/N] ");
|
|
125
|
+
if (wantEnrich.toLowerCase() === "y") {
|
|
126
|
+
write("\n Providers:\n");
|
|
127
|
+
write(" 1) Anthropic (recommended) — claude-sonnet-4-5\n");
|
|
128
|
+
write(" 2) OpenAI — gpt-4o\n\n");
|
|
129
|
+
const enrichProvider = await ask(" Choose [1/2]: ");
|
|
130
|
+
if (enrichProvider === "2") {
|
|
131
|
+
config.enrichment.url = "https://api.openai.com/v1/chat/completions";
|
|
132
|
+
config.enrichment.model = "gpt-4o";
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
config.enrichment.url = "https://api.anthropic.com/v1/messages";
|
|
136
|
+
config.enrichment.model = "claude-sonnet-4-5-20250514";
|
|
137
|
+
}
|
|
138
|
+
config.enrichment.apiKey = "${GIT_SKILL_LLM_KEY}";
|
|
139
|
+
config.enrichment.enabled = true;
|
|
140
|
+
write("\n");
|
|
141
|
+
const apiKey = await ask(" Paste your API key (stored in ~/.env, not in config): ");
|
|
142
|
+
if (apiKey) {
|
|
143
|
+
writeApiKey(apiKey);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
write(" Skipped — add it later with: git-skill add-key <your-key>\n");
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
write("\n");
|
|
41
150
|
}
|
|
42
|
-
//
|
|
43
|
-
write("
|
|
151
|
+
// 4. Write config
|
|
152
|
+
write("4. Saving config...\n");
|
|
153
|
+
writeConfig(config);
|
|
154
|
+
write(` Config saved to ~/.config/git-skill/config.json\n`);
|
|
155
|
+
// 5. Update CLAUDE.md
|
|
156
|
+
write("5. Updating ~/.claude/CLAUDE.md...\n");
|
|
44
157
|
const claudeMdPath = join(homedir(), ".claude", "CLAUDE.md");
|
|
45
158
|
const result = upsertSection(claudeMdPath, getSkillDoc());
|
|
46
159
|
write(` CLAUDE.md: ${result}\n`);
|
|
47
|
-
//
|
|
48
|
-
write("\
|
|
160
|
+
// 6. Summary
|
|
161
|
+
write("\n" + "═".repeat(40) + "\n");
|
|
162
|
+
write("git-skill installed!\n\n");
|
|
163
|
+
write("Configuration:\n");
|
|
164
|
+
write(` Embeddings: ${config.embedding.enabled ? `enabled (${config.embedding.provider})` : "disabled"}\n`);
|
|
165
|
+
write(` Enrichment: ${config.enrichment.enabled ? `enabled (${config.enrichment.model})` : "disabled"}\n`);
|
|
166
|
+
write("\n");
|
|
49
167
|
write("Next steps:\n");
|
|
50
168
|
write(" cd <your-repo>\n");
|
|
51
|
-
write(" git-skill init #
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
write(' embedding.url = "http://localhost:11434/api/embed" (Ollama)\n');
|
|
58
|
-
write(' embedding.model = "mxbai-embed-large" (or any model)\n');
|
|
59
|
-
write(" Then run: git-skill embed\n");
|
|
60
|
-
write("\n");
|
|
61
|
-
write("Optional — LLM Enrichment (commit analysis):\n");
|
|
62
|
-
write(" Edit ~/.config/git-skill/config.json and set:\n");
|
|
63
|
-
write("\n");
|
|
64
|
-
write(" Anthropic (recommended):\n");
|
|
65
|
-
write(' enrichment.enabled = true\n');
|
|
66
|
-
write(' enrichment.url = "https://api.anthropic.com/v1/messages"\n');
|
|
67
|
-
write(' enrichment.model = "claude-sonnet-4-5-20250514"\n');
|
|
68
|
-
write(' enrichment.apiKey = "${GIT_SKILL_LLM_KEY}"\n');
|
|
69
|
-
write("\n");
|
|
70
|
-
write(" OpenAI:\n");
|
|
71
|
-
write(' enrichment.url = "https://api.openai.com/v1/chat/completions"\n');
|
|
72
|
-
write(' enrichment.model = "gpt-4o"\n');
|
|
73
|
-
write("\n");
|
|
74
|
-
write(" Set your API key in ~/.env (or project .env):\n");
|
|
75
|
-
write(' GIT_SKILL_LLM_KEY=sk-ant-... # Anthropic\n');
|
|
76
|
-
write(' GIT_SKILL_LLM_KEY=sk-... # OpenAI\n');
|
|
77
|
-
write("\n");
|
|
78
|
-
write(" Then run: git-skill enrich\n");
|
|
79
|
-
if (!opts.ci) {
|
|
80
|
-
write("\nTip: Run `git-skill approve --global` to pre-approve commands globally.\n");
|
|
169
|
+
write(" git-skill init # set up a repo (hook, snapshot, 30-day context)\n");
|
|
170
|
+
if (config.enrichment.enabled) {
|
|
171
|
+
write(" git-skill enrich # analyze commit history with LLM\n");
|
|
172
|
+
}
|
|
173
|
+
if (config.embedding.enabled) {
|
|
174
|
+
write(" git-skill embed # generate embeddings for semantic search\n");
|
|
81
175
|
}
|
|
176
|
+
write("\n");
|
|
82
177
|
});
|
|
83
178
|
}
|
|
84
179
|
//# sourceMappingURL=install.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/comm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AO,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,SAAS,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC;QAC9G,KAAK,CAAC,kBAAkB,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC;QAC7G,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,KAAK,CAAC,8EAA8E,CAAC,CAAC;QACtF,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC9B,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACzE,CAAC;QACD,IAAI,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;YAC7B,KAAK,CAAC,uEAAuE,CAAC,CAAC;QACjF,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import { cronCommand } from "./commands/cron.js";
|
|
|
29
29
|
import { updateCommand } from "./commands/update.js";
|
|
30
30
|
import { uninstallCommand } from "./commands/uninstall.js";
|
|
31
31
|
import { contextUpdateCommand } from "./commands/context-update.js";
|
|
32
|
+
import { addKeyCommand } from "./commands/add-key.js";
|
|
32
33
|
import { verifyCommand } from "./commands/verify.js";
|
|
33
34
|
const program = new Command();
|
|
34
35
|
program
|
|
@@ -59,6 +60,7 @@ program.addCommand(installCommand());
|
|
|
59
60
|
program.addCommand(cronCommand());
|
|
60
61
|
program.addCommand(updateCommand());
|
|
61
62
|
program.addCommand(uninstallCommand());
|
|
63
|
+
program.addCommand(addKeyCommand());
|
|
62
64
|
program.addCommand(contextUpdateCommand());
|
|
63
65
|
program.addCommand(verifyCommand());
|
|
64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= "# Git History Walkthrough\n\nUse git-skill to explore this repository's history.\n\n## Quick Start\n```\ngit-skill doctor # Check setup health\ngit-skill hotspots # Find churning files\ngit-skill trends # View metric trends\ngit-skill search \"auth\" # Search history\n```\n";
|
|
2
|
+
export declare const PLAN_COMMAND = "---\ndescription: \"Plan a feature with git history awareness \u2014 checks what was tried before\"\n---\n\n# Planning Phase\n\nPlan implementation for the requested feature.\n\n**PROCESS:**\n\n1. **Gather Context**:\n - `git-skill search \"<feature>\"` \u2014 check if this was attempted before\n - `git-skill timeline <file>` \u2014 review history of files you plan to change\n - `git-skill hotspots` \u2014 identify unstable files to approach carefully\n - `git-skill coupling <file>` \u2014 what co-changes with target files\n\n2. **Check Git History**: Before designing changes, verify nothing was tried and reverted:\n ```bash\n git-skill search \"<feature keywords>\"\n git-skill decisions --type revert\n ```\n If a similar approach was tried and reverted, note it in the plan and explain why this attempt is different.\n\n3. **Ask Questions**: Clarify requirements (max 5-7 questions)\n\n4. **Write Plan**: Create plan at `docs/plans/YYYY-MM-DD-[feature-name].md`\n\n**PLAN STRUCTURE:**\n```markdown\n# Feature Name\n\n## TLDR\n2-3 sentence summary\n\n## Context from Git History\n- Prior attempts: [what git-skill found]\n- Hotspot files: [files to be careful with]\n- Related decisions: [reverts, refactors that matter]\n\n## Requirements\n- Bullet points\n\n## Implementation Steps\n1. Step 1\n2. Step 2\n\n## Files to Modify/Create\n- `path/to/file` \u2014 description\n\n## Testing\n- How to verify this works\n```\n\n5. **Create GitHub Issue**: `gh issue create --title \"feat: ...\" --body \"See docs/plans/...\"`\n\n6. **STOP**: Wait for approval \u2014 DO NOT start implementation\n\n**CRITICAL:**\n- Check git history FIRST \u2014 don't re-try reverted approaches\n- Plans live in git (`docs/plans/`), not external tools\n- Be concise \u2014 the plan is for implementation, not documentation\n";
|
|
3
|
+
export declare const IMPLEMENT_COMMAND = "---\ndescription: \"Implement a planned feature with TDD and frequent commits\"\n---\n\n# Implementation Phase\n\nImplement feature according to the plan file.\n\n**PROCESS:**\n\n1. **Read Plan**: Read the plan file carefully\n2. **Create Branch**:\n ```bash\n git checkout -b [feature-name]\n git push -u origin [feature-name]\n ```\n3. **Create Draft PR**:\n ```bash\n gh pr create --draft --title \"WIP: [Feature Name]\" --body \"See docs/plans/...\"\n ```\n4. **Follow TDD** (Red \u2192 Green \u2192 Refactor):\n - Write test that fails\n - Implement minimal code to pass\n - Refactor while keeping tests green\n\n5. **For Each Task**:\n - Make changes following existing patterns in the codebase\n - Run tests after each change\n - Push commits frequently (backup points):\n ```bash\n git add . && git commit -m \"wip: [task]\" && git push\n ```\n\n6. **STOP**: Notify completion \u2014 DO NOT finalize or merge\n\n**IMPORTANT:**\n- Follow plan exactly \u2014 don't deviate without asking\n- Push commits often (rollback points)\n- Keep user updated every 3-4 tasks\n- DO NOT finalize \u2014 just implement\n";
|
|
4
|
+
export declare const FINALIZE_COMMAND = "---\ndescription: \"Finalize a feature \u2014 tests, lint, commit, PR ready\"\n---\n\n# Finalization Phase\n\nFinalize the implemented feature.\n\n**PROCESS:**\n\n1. **Verify Tests Pass**:\n ```bash\n # Run your project's test suite\n npm test # Node.js\n # pytest tests/ # Python\n # cargo test # Rust\n ```\n If tests fail, STOP and return to implementation.\n\n2. **Run git-skill verify**:\n ```bash\n git-skill verify\n ```\n Address any WARN or BLOCK findings before proceeding.\n\n3. **Update Documentation**: Add/update docs if needed\n\n4. **Create Final Commit**:\n ```bash\n git add .\n git commit -m \"feat: [description]\n\n Closes #[issue-number]\"\n git push\n ```\n\n5. **Convert PR to Ready**:\n ```bash\n gh pr ready\n ```\n\n6. **Run Final Verification**:\n ```bash\n git-skill doctor\n git-skill hotspots --limit 3\n ```\n Show output \u2014 never claim completion without proof.\n\n7. **STOP**: Report completion with PR link and verification output\n\n**CHECKLIST:**\n- [ ] All tests passing\n- [ ] `git-skill verify` \u2014 no BLOCK findings\n- [ ] Documentation updated\n- [ ] Commit message follows conventions\n- [ ] PR converted to ready\n- [ ] Verification output shown\n\n**IMPORTANT:**\n- NEVER skip verification\n- NEVER merge PR \u2014 user reviews and merges\n- If anything fails, return to implementation\n";
|
|
2
5
|
export declare const REVIEW_COMMAND = "---\ndescription: \"Code review with git history verification \u2014 checks for repeated mistakes before merge\"\n---\n\n# Code Review with History Verification\n\nReview the current branch changes before merging.\n\n**PROCESS:**\n\n1. **Run tests**:\n ```bash\n # Run the project's test suite (adjust command for your project)\n npm test # Node.js\n # pytest # Python\n # cargo test # Rust\n ```\n\n2. **Git History Verification** (prevent re-trying failed approaches):\n ```bash\n git-skill verify\n ```\n If `git-skill verify` returns WARN or BLOCK:\n - **BLOCK**: STOP. This change re-introduces something that was explicitly reverted. Ask the user before proceeding.\n - **WARN**: Note the warning. Check if the current approach addresses the previous failure. Proceed with caution.\n - **PASS**: No concerns from history.\n\n3. **Check codebase health**:\n ```bash\n git-skill doctor\n git-skill hotspots --limit 5\n ```\n Flag any files being modified that appear in the hotspots list.\n\n4. **Review against criteria**:\n - **Critical** (must fix): Security vulnerabilities, data loss risks, breaking changes, tests failing\n - **Major** (should fix): Missing error handling, pattern violations, missing tests\n - **Minor** (optional): Style, docs, optimization\n\n5. **Auto-fix critical/major issues**:\n - Fix issues following established patterns\n - Run tests after each fix\n - Commit fixes separately\n\n6. **Report findings**:\n - List issues found and fixed\n - List any WARN/BLOCK from git-skill verify\n - Provide verification commands\n - Recommend proceeding or returning to implementation\n\n**IMPORTANT:**\n- `git-skill verify` is authoritative \u2014 if it says something was reverted before, take it seriously\n- Auto-fix critical/major issues, don't just report them\n- Always run tests after fixes\n";
|
|
@@ -10,6 +10,172 @@ git-skill trends # View metric trends
|
|
|
10
10
|
git-skill search "auth" # Search history
|
|
11
11
|
\`\`\`
|
|
12
12
|
`;
|
|
13
|
+
export const PLAN_COMMAND = `---
|
|
14
|
+
description: "Plan a feature with git history awareness — checks what was tried before"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Planning Phase
|
|
18
|
+
|
|
19
|
+
Plan implementation for the requested feature.
|
|
20
|
+
|
|
21
|
+
**PROCESS:**
|
|
22
|
+
|
|
23
|
+
1. **Gather Context**:
|
|
24
|
+
- \`git-skill search "<feature>"\` — check if this was attempted before
|
|
25
|
+
- \`git-skill timeline <file>\` — review history of files you plan to change
|
|
26
|
+
- \`git-skill hotspots\` — identify unstable files to approach carefully
|
|
27
|
+
- \`git-skill coupling <file>\` — what co-changes with target files
|
|
28
|
+
|
|
29
|
+
2. **Check Git History**: Before designing changes, verify nothing was tried and reverted:
|
|
30
|
+
\`\`\`bash
|
|
31
|
+
git-skill search "<feature keywords>"
|
|
32
|
+
git-skill decisions --type revert
|
|
33
|
+
\`\`\`
|
|
34
|
+
If a similar approach was tried and reverted, note it in the plan and explain why this attempt is different.
|
|
35
|
+
|
|
36
|
+
3. **Ask Questions**: Clarify requirements (max 5-7 questions)
|
|
37
|
+
|
|
38
|
+
4. **Write Plan**: Create plan at \`docs/plans/YYYY-MM-DD-[feature-name].md\`
|
|
39
|
+
|
|
40
|
+
**PLAN STRUCTURE:**
|
|
41
|
+
\`\`\`markdown
|
|
42
|
+
# Feature Name
|
|
43
|
+
|
|
44
|
+
## TLDR
|
|
45
|
+
2-3 sentence summary
|
|
46
|
+
|
|
47
|
+
## Context from Git History
|
|
48
|
+
- Prior attempts: [what git-skill found]
|
|
49
|
+
- Hotspot files: [files to be careful with]
|
|
50
|
+
- Related decisions: [reverts, refactors that matter]
|
|
51
|
+
|
|
52
|
+
## Requirements
|
|
53
|
+
- Bullet points
|
|
54
|
+
|
|
55
|
+
## Implementation Steps
|
|
56
|
+
1. Step 1
|
|
57
|
+
2. Step 2
|
|
58
|
+
|
|
59
|
+
## Files to Modify/Create
|
|
60
|
+
- \`path/to/file\` — description
|
|
61
|
+
|
|
62
|
+
## Testing
|
|
63
|
+
- How to verify this works
|
|
64
|
+
\`\`\`
|
|
65
|
+
|
|
66
|
+
5. **Create GitHub Issue**: \`gh issue create --title "feat: ..." --body "See docs/plans/..."\`
|
|
67
|
+
|
|
68
|
+
6. **STOP**: Wait for approval — DO NOT start implementation
|
|
69
|
+
|
|
70
|
+
**CRITICAL:**
|
|
71
|
+
- Check git history FIRST — don't re-try reverted approaches
|
|
72
|
+
- Plans live in git (\`docs/plans/\`), not external tools
|
|
73
|
+
- Be concise — the plan is for implementation, not documentation
|
|
74
|
+
`;
|
|
75
|
+
export const IMPLEMENT_COMMAND = `---
|
|
76
|
+
description: "Implement a planned feature with TDD and frequent commits"
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# Implementation Phase
|
|
80
|
+
|
|
81
|
+
Implement feature according to the plan file.
|
|
82
|
+
|
|
83
|
+
**PROCESS:**
|
|
84
|
+
|
|
85
|
+
1. **Read Plan**: Read the plan file carefully
|
|
86
|
+
2. **Create Branch**:
|
|
87
|
+
\`\`\`bash
|
|
88
|
+
git checkout -b [feature-name]
|
|
89
|
+
git push -u origin [feature-name]
|
|
90
|
+
\`\`\`
|
|
91
|
+
3. **Create Draft PR**:
|
|
92
|
+
\`\`\`bash
|
|
93
|
+
gh pr create --draft --title "WIP: [Feature Name]" --body "See docs/plans/..."
|
|
94
|
+
\`\`\`
|
|
95
|
+
4. **Follow TDD** (Red → Green → Refactor):
|
|
96
|
+
- Write test that fails
|
|
97
|
+
- Implement minimal code to pass
|
|
98
|
+
- Refactor while keeping tests green
|
|
99
|
+
|
|
100
|
+
5. **For Each Task**:
|
|
101
|
+
- Make changes following existing patterns in the codebase
|
|
102
|
+
- Run tests after each change
|
|
103
|
+
- Push commits frequently (backup points):
|
|
104
|
+
\`\`\`bash
|
|
105
|
+
git add . && git commit -m "wip: [task]" && git push
|
|
106
|
+
\`\`\`
|
|
107
|
+
|
|
108
|
+
6. **STOP**: Notify completion — DO NOT finalize or merge
|
|
109
|
+
|
|
110
|
+
**IMPORTANT:**
|
|
111
|
+
- Follow plan exactly — don't deviate without asking
|
|
112
|
+
- Push commits often (rollback points)
|
|
113
|
+
- Keep user updated every 3-4 tasks
|
|
114
|
+
- DO NOT finalize — just implement
|
|
115
|
+
`;
|
|
116
|
+
export const FINALIZE_COMMAND = `---
|
|
117
|
+
description: "Finalize a feature — tests, lint, commit, PR ready"
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
# Finalization Phase
|
|
121
|
+
|
|
122
|
+
Finalize the implemented feature.
|
|
123
|
+
|
|
124
|
+
**PROCESS:**
|
|
125
|
+
|
|
126
|
+
1. **Verify Tests Pass**:
|
|
127
|
+
\`\`\`bash
|
|
128
|
+
# Run your project's test suite
|
|
129
|
+
npm test # Node.js
|
|
130
|
+
# pytest tests/ # Python
|
|
131
|
+
# cargo test # Rust
|
|
132
|
+
\`\`\`
|
|
133
|
+
If tests fail, STOP and return to implementation.
|
|
134
|
+
|
|
135
|
+
2. **Run git-skill verify**:
|
|
136
|
+
\`\`\`bash
|
|
137
|
+
git-skill verify
|
|
138
|
+
\`\`\`
|
|
139
|
+
Address any WARN or BLOCK findings before proceeding.
|
|
140
|
+
|
|
141
|
+
3. **Update Documentation**: Add/update docs if needed
|
|
142
|
+
|
|
143
|
+
4. **Create Final Commit**:
|
|
144
|
+
\`\`\`bash
|
|
145
|
+
git add .
|
|
146
|
+
git commit -m "feat: [description]
|
|
147
|
+
|
|
148
|
+
Closes #[issue-number]"
|
|
149
|
+
git push
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
5. **Convert PR to Ready**:
|
|
153
|
+
\`\`\`bash
|
|
154
|
+
gh pr ready
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
6. **Run Final Verification**:
|
|
158
|
+
\`\`\`bash
|
|
159
|
+
git-skill doctor
|
|
160
|
+
git-skill hotspots --limit 3
|
|
161
|
+
\`\`\`
|
|
162
|
+
Show output — never claim completion without proof.
|
|
163
|
+
|
|
164
|
+
7. **STOP**: Report completion with PR link and verification output
|
|
165
|
+
|
|
166
|
+
**CHECKLIST:**
|
|
167
|
+
- [ ] All tests passing
|
|
168
|
+
- [ ] \`git-skill verify\` — no BLOCK findings
|
|
169
|
+
- [ ] Documentation updated
|
|
170
|
+
- [ ] Commit message follows conventions
|
|
171
|
+
- [ ] PR converted to ready
|
|
172
|
+
- [ ] Verification output shown
|
|
173
|
+
|
|
174
|
+
**IMPORTANT:**
|
|
175
|
+
- NEVER skip verification
|
|
176
|
+
- NEVER merge PR — user reviews and merges
|
|
177
|
+
- If anything fails, return to implementation
|
|
178
|
+
`;
|
|
13
179
|
export const REVIEW_COMMAND = `---
|
|
14
180
|
description: "Code review with git history verification — checks for repeated mistakes before merge"
|
|
15
181
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;CAW1B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;CAW1B,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD7B,CAAC"}
|