@oomfware/cgr 0.1.5 → 0.1.6

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 CHANGED
@@ -65,8 +65,8 @@ Use `npx @oomfware/cgr ask <repo> <question>` to ask questions about external re
65
65
  - `npx @oomfware/cgr ask -m sonnet github.com/shadcn-ui/ui "How do I configure path aliases so components install to the right location?"`
66
66
  - `npx @oomfware/cgr ask github.com/facebook/react -w github.com/vercel/next.js "How does Next.js integrate with React's server components?"`
67
67
 
68
- cgr works best with detailed questions. Include file/folder paths when you know them, and reference
69
- details from previous answers in follow-ups.
68
+ Broad questions work for getting oriented; detailed questions get precise answers. Include
69
+ file/folder paths when you know them, and reference details from previous answers in follow-ups.
70
70
 
71
71
  Run `npx @oomfware/cgr --help` for more options.
72
72
  ```
@@ -92,8 +92,8 @@ Useful repositories:
92
92
  - `github.com/tailwindlabs/tailwindcss` for Tailwind internals, plugin API
93
93
  - `github.com/bluesky-social/atproto` for AT Protocol, Bluesky API
94
94
 
95
- cgr works best with detailed questions. Include file/folder paths when you know them, and reference
96
- details from previous answers in follow-ups.
95
+ Broad questions work for getting oriented; detailed questions get precise answers. Include
96
+ file/folder paths when you know them, and reference details from previous answers in follow-ups.
97
97
 
98
98
  Run `npx @oomfware/cgr --help` for more options.
99
99
  ```
@@ -41,35 +41,57 @@ citations only for general programming concepts unrelated to the codebase.
41
41
 
42
42
  Here are some ways to cite sources:
43
43
 
44
- 1. Mention directories and key files inlinethis is the baseline for any answer:
44
+ 1. Mention directories and key files inline, this is the baseline for any answer:
45
45
 
46
- ```
47
- The monorepo is organized into three tiers: services (`services/pds`, `services/bsky`)
48
- provide runtime wrappers, business logic lives in `packages/pds` and `packages/bsky`,
49
- and protocol infrastructure like `@atproto/lexicon` and `@atproto/xrpc` handles schema
50
- validation and HTTP transport.
46
+ ```md
47
+ The monorepo is organized into three tiers: services (`services/pds`, `services/bsky`) provide
48
+ runtime wrappers, business logic lives in `packages/pds` and `packages/bsky`, and protocol
49
+ infrastructure like `@atproto/lexicon` and `@atproto/xrpc` handles schema validation and HTTP
50
+ transport.
51
51
  ```
52
52
 
53
53
  2. Reference file paths with line numbers in prose for specific claims:
54
54
 
55
- ```
55
+ ```md
56
56
  As shown in `src/config/database.ts:12`, the connection pool defaults to 10.
57
57
  ```
58
58
 
59
- 3. Add footnotes when making multiple claims that need sourcing:
59
+ 3. Reference files in section headers when covering multiple aspects:
60
+
61
+ ```md
62
+ ### Edge Case 5: Circular Peer Dependencies (`can-place-dep.js:370-371`, `place-dep.js:230-235`)
63
+
64
+ Arborist prevents infinite recursion when checking peer sets by tracking `peerPath`:
65
+
66
+ if (!peerEdge.peer || !peerEdge.to || peerPath.includes(peerEdge.to)) {
67
+ continue
68
+ }
69
+
70
+ And creates symbolic links when detecting nesting loops:
71
+
72
+ for (let p = target; p; p = p.resolveParent) {
73
+ if (p.matches(this.dep) && !p.isTop) {
74
+ this.placed = new Link({ parent: target, target: p });
60
75
 
76
+ return;
77
+ }
78
+ }
61
79
  ```
80
+
81
+ 4. Use footnotes when you have many citations to keep the prose flowing:
82
+
83
+ ```md
62
84
  The cache is invalidated whenever a user updates their profile. [^1]
63
85
 
64
- [^1]: **`src/services/user.ts:89`** - updateProfile() calls cache.invalidate()
86
+ [^1]: `src/services/user.ts:89` - updateProfile() calls cache.invalidate()
65
87
  ```
66
88
 
67
- 4. Include code snippets when they help illustrate the point:
89
+ 5. Include code snippets when they help illustrate the point:
68
90
 
69
- ```
91
+ ```md
70
92
  Signals track dependencies automatically when accessed inside an effect:
71
93
 
72
- **`packages/core/src/index.ts:152-158`**
94
+ `packages/core/src/index.ts:152-158`
73
95
 
74
96
  if (evalContext !== undefined) {
75
97
  let node = evalContext._sources;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oomfware/cgr",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "ask questions about git repositories using Claude Code",
5
5
  "license": "0BSD",
6
6
  "repository": {
@@ -41,35 +41,57 @@ citations only for general programming concepts unrelated to the codebase.
41
41
 
42
42
  Here are some ways to cite sources:
43
43
 
44
- 1. Mention directories and key files inlinethis is the baseline for any answer:
44
+ 1. Mention directories and key files inline, this is the baseline for any answer:
45
45
 
46
- ```
47
- The monorepo is organized into three tiers: services (`services/pds`, `services/bsky`)
48
- provide runtime wrappers, business logic lives in `packages/pds` and `packages/bsky`,
49
- and protocol infrastructure like `@atproto/lexicon` and `@atproto/xrpc` handles schema
50
- validation and HTTP transport.
46
+ ```md
47
+ The monorepo is organized into three tiers: services (`services/pds`, `services/bsky`) provide
48
+ runtime wrappers, business logic lives in `packages/pds` and `packages/bsky`, and protocol
49
+ infrastructure like `@atproto/lexicon` and `@atproto/xrpc` handles schema validation and HTTP
50
+ transport.
51
51
  ```
52
52
 
53
53
  2. Reference file paths with line numbers in prose for specific claims:
54
54
 
55
- ```
55
+ ```md
56
56
  As shown in `src/config/database.ts:12`, the connection pool defaults to 10.
57
57
  ```
58
58
 
59
- 3. Add footnotes when making multiple claims that need sourcing:
59
+ 3. Reference files in section headers when covering multiple aspects:
60
+
61
+ ```md
62
+ ### Edge Case 5: Circular Peer Dependencies (`can-place-dep.js:370-371`, `place-dep.js:230-235`)
63
+
64
+ Arborist prevents infinite recursion when checking peer sets by tracking `peerPath`:
65
+
66
+ if (!peerEdge.peer || !peerEdge.to || peerPath.includes(peerEdge.to)) {
67
+ continue
68
+ }
69
+
70
+ And creates symbolic links when detecting nesting loops:
71
+
72
+ for (let p = target; p; p = p.resolveParent) {
73
+ if (p.matches(this.dep) && !p.isTop) {
74
+ this.placed = new Link({ parent: target, target: p });
60
75
 
76
+ return;
77
+ }
78
+ }
61
79
  ```
80
+
81
+ 4. Use footnotes when you have many citations to keep the prose flowing:
82
+
83
+ ```md
62
84
  The cache is invalidated whenever a user updates their profile. [^1]
63
85
 
64
- [^1]: **`src/services/user.ts:89`** - updateProfile() calls cache.invalidate()
86
+ [^1]: `src/services/user.ts:89` - updateProfile() calls cache.invalidate()
65
87
  ```
66
88
 
67
- 4. Include code snippets when they help illustrate the point:
89
+ 5. Include code snippets when they help illustrate the point:
68
90
 
69
- ```
91
+ ```md
70
92
  Signals track dependencies automatically when accessed inside an effect:
71
93
 
72
- **`packages/core/src/index.ts:152-158`**
94
+ `packages/core/src/index.ts:152-158`
73
95
 
74
96
  if (evalContext !== undefined) {
75
97
  let node = evalContext._sources;
@@ -229,9 +229,7 @@ export const handler = async (args: Args): Promise<void> => {
229
229
  const usePadding = maxNameLen + 2 + maxSizeLen + 6 <= termWidth;
230
230
 
231
231
  const formatChoice = (name: string, size: number): string =>
232
- usePadding
233
- ? `${name.padEnd(maxNameLen)} ${formatSize(size)}`
234
- : `${name} (${formatSize(size)})`;
232
+ usePadding ? `${name.padEnd(maxNameLen)} ${formatSize(size)}` : `${name} (${formatSize(size)})`;
235
233
 
236
234
  const choices: Choice[] = repos.map((repo) => ({
237
235
  name: formatChoice(repo.displayPath, repo.size),