pullfrog 0.0.202 → 0.0.203

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.
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: git-archaeology
3
+ description: Investigate how code reached its current state — when a line, function, import, or whole file was changed or deleted, who removed it, and what it looked like before. Use when `git blame` came up empty, when content has been refactored away, or when you need the full evolution of a function across commits.
4
+ ---
5
+
6
+ # Git history archaeology
7
+
8
+ `git blame` only sees what's still in the working tree. For anything that was
9
+ deleted, moved, or refactored away, you need the commands below. Most agents
10
+ under-use them and end up scrolling through `git log -p` instead.
11
+
12
+ ## Output discipline (read first)
13
+
14
+ `git log -p` on a long-lived file can dump tens of thousands of lines and blow
15
+ the context window. Always:
16
+
17
+ 1. **Start narrow.** Use `--oneline` or `--stat` to get a list of candidate
18
+ commits.
19
+ 2. **Drill in.** Use `git show <sha> -- <path>` for the diff of one specific
20
+ commit.
21
+ 3. **Scope the search.** Add `--since="3 months ago"`, `-n 20`, or a path
22
+ restriction (`-- <path>`) so output stays manageable.
23
+ 4. **Avoid `git log -p` without a path filter** on any non-trivial repo.
24
+
25
+ ## Decision tree (by agent intent)
26
+
27
+ ### "When did this exact line, string, or import disappear?"
28
+
29
+ ```bash
30
+ git log -S'<exact-string>' --oneline -- <file>
31
+ ```
32
+
33
+ The pickaxe. Returns commits that **changed the count** of that string in the
34
+ file. The most recent hit is typically the removal commit. Add `-p` only after
35
+ you've narrowed to a few candidates.
36
+
37
+ Notes:
38
+ - `-S` is exact-string by default. Add `--pickaxe-regex` to make it a regex.
39
+ - The argument is "cuddled" with `-S` (`-S'foo bar'`), no space.
40
+ - `-S` will not detect pure in-file moves (count unchanged). Use `-G` for that.
41
+ - `--pickaxe-all` shows the entire changeset of matching commits, useful when
42
+ a commit changes both a definition and its call sites in other files.
43
+
44
+ ### "When did the diff stop matching this regex?"
45
+
46
+ ```bash
47
+ git log -G'<regex>' --oneline -- <file>
48
+ ```
49
+
50
+ Like `-S` but matches any added or removed hunk line against the regex. Use
51
+ `-G` when:
52
+ - You don't know the exact string but know a pattern.
53
+ - You want to catch in-file moves (`-S` won't).
54
+ - You want to find any diff that touched a pattern, even if the count was
55
+ preserved (e.g., a refactor that changed call sites without removing the
56
+ function).
57
+
58
+ ### "How did this function evolve over time?"
59
+
60
+ ```bash
61
+ git log -L :<function-name>:<file>
62
+ ```
63
+
64
+ Every commit that touched the function, with diffs scoped to just the function
65
+ body. Works for languages git understands (most mainstream ones).
66
+
67
+ ### "How did lines N–M evolve?"
68
+
69
+ ```bash
70
+ git log -L <N>,<M>:<file>
71
+ ```
72
+
73
+ ### "What's the full history of this file, including across renames?"
74
+
75
+ ```bash
76
+ git log --follow --oneline -- <file> # overview
77
+ git log --follow -p -- <file> # with diffs (use sparingly)
78
+ ```
79
+
80
+ `--follow` only works for a single file, not directories.
81
+
82
+ ### "Where was a now-deleted line last present?"
83
+
84
+ Two-step pattern when you have an exact deleted string:
85
+
86
+ ```bash
87
+ # 1. find a historical commit that contained the string
88
+ git log -S'<deleted-string>' --oneline --all -- <file>
89
+
90
+ # 2. reverse-blame from that commit to find the last commit it survived in
91
+ git blame --reverse <old-sha>..HEAD -- <file>
92
+ ```
93
+
94
+ The reverse blame tells you, for each line, the last commit it survived in
95
+ before being modified or deleted. Pinpoints the exact deletion commit.
96
+
97
+ ### "This file no longer exists — when was it deleted, and what was in it?"
98
+
99
+ ```bash
100
+ # find all commits that touched the path, even on other branches
101
+ git log --all --full-history --oneline -- <deleted-path>
102
+
103
+ # the most recent of those is usually the deletion. confirm:
104
+ git show <sha> --stat
105
+
106
+ # view the file's contents at any commit where it existed
107
+ git show <sha>^:<deleted-path>
108
+ ```
109
+
110
+ If you don't know the path, find it from filename alone:
111
+
112
+ ```bash
113
+ # list all delete events with paths
114
+ git log --all --diff-filter=D --summary | grep -i '<filename>'
115
+
116
+ # or glob across all branches
117
+ git log --all --oneline -- '**/<filename>.*'
118
+ ```
119
+
120
+ ### "Who deleted it, in one shot?"
121
+
122
+ ```bash
123
+ git rev-list -n 1 HEAD -- <deleted-path> # the deletion commit
124
+ git show $(git rev-list -n 1 HEAD -- <deleted-path>) -- <deleted-path>
125
+ ```
126
+
127
+ ### "Restore a deleted file (locally, no commit)"
128
+
129
+ ```bash
130
+ git restore --source=<deletion-sha>^ -- <deleted-path>
131
+ # or, on older git:
132
+ git checkout <deletion-sha>^ -- <deleted-path>
133
+ ```
134
+
135
+ The `^` is critical — at the deletion commit the file is already gone, so we
136
+ read from its parent.
137
+
138
+ ### "Search commit messages, not content"
139
+
140
+ ```bash
141
+ git log --all --grep='<text>' --oneline
142
+ git log --all --grep='<text>' -i --oneline # case-insensitive
143
+ ```
144
+
145
+ Orthogonal to `-S`/`-G`, which only see the diff.
146
+
147
+ ## Standard workflow for "why does this code look like this"
148
+
149
+ 1. `git log --follow --oneline -- <file>` — overview of commits touching it.
150
+ 2. If a recent commit looks suspicious: `git show <sha> -- <file>`.
151
+ 3. If you expected to find something and it's missing:
152
+ `git log -S'<expected-string>' --oneline -- <file>`.
153
+ 4. For a specific function's full lifecycle:
154
+ `git log -L :<fn>:<file>`.
155
+ 5. For the deletion point of a known string: pickaxe to find an old commit
156
+ that contained it, then `git blame --reverse <old-sha>..HEAD -- <file>`.
157
+
158
+ ## Useful flags reference
159
+
160
+ | Flag | Effect |
161
+ |------|--------|
162
+ | `--all` | Search all refs, not just the current branch. Use when investigating something that may have lived only on a feature branch. |
163
+ | `--full-history` | Keeps commits that history-simplification would otherwise drop. Needed for accurate history across merges. |
164
+ | `--follow` | Track a single file across renames. Single-file only. |
165
+ | `-M` / `-C` | Detect renames (`-M`) and copies (`-C`) when reading diffs. |
166
+ | `--diff-filter=D` | Restrict to commits that **deleted** something. `A`=added, `M`=modified, `R`=renamed. |
167
+ | `--source` | When combined with `--all`, annotate each commit with the ref it was reached from. |
168
+ | `--pickaxe-all` | With `-S`/`-G`, show all files in the matching commit, not just the matching file. |
169
+ | `--pickaxe-regex` | Treat the `-S` argument as a regex. |
170
+ | `--since` / `--until` | Time-bound the search. Cheap perf win on big repos. |
171
+ | `-n <count>` | Cap result count. |
172
+ | `--stat` | Per-commit file stats instead of full patches. Good first pass. |
173
+
174
+ ## Notes and pitfalls
175
+
176
+ - Always include `--` before paths to disambiguate from refs (e.g.
177
+ `git log -S'foo' -- src/auth.ts`).
178
+ - `-S` triggers on **count change**. A pure refactor that moves a line within
179
+ the same file will not match. Use `-G` for those.
180
+ - `-G` runs diff twice and greps; it's slower than `-S`. Scope with paths and
181
+ `--since` on big repos.
182
+ - Without `--all`, `git log -- <path>` shows nothing if the path never existed
183
+ on the current branch. When in doubt, add `--all`.
184
+ - `git log --full-history -- <path>` alone has had bugs in some git versions
185
+ for deleted files; pair with `--all` for reliability.
186
+ - For files that were renamed, `git log -- <new-path>` only shows post-rename
187
+ history. Use `--follow` (one file) or `git log --all -- <old-path>` when
188
+ hunting across rename events.
@@ -12,6 +12,7 @@ export interface RepoSettings {
12
12
  setupScript: string | null;
13
13
  postCheckoutScript: string | null;
14
14
  prepushScript: string | null;
15
+ stopScript: string | null;
15
16
  push: PushPermission;
16
17
  shell: ShellPermission;
17
18
  prApproveEnabled: boolean;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * write all bundled skills into the fake HOME so OpenCode / Claude Code discover
3
+ * them via their auto-scan directories.
4
+ *
5
+ * called once per agent run from each agent's `run()`. cheap (small file
6
+ * writes), no network, idempotent.
7
+ */
8
+ export declare function installBundledSkills(params: {
9
+ home: string;
10
+ }): void;
1
11
  /**
2
12
  * install a skill globally via the `skills` CLI.
3
13
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.0.202",
3
+ "version": "0.0.203",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",