@oomfware/cgr 0.1.5 → 0.1.7
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 +4 -4
- package/dist/assets/system-prompt.md +32 -12
- package/package.json +1 -1
- package/src/assets/system-prompt.md +32 -12
- package/src/commands/clean.ts +1 -3
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
|
-
|
|
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
|
-
|
|
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,35 @@ 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 inline
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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.
|
|
59
|
+
3. Use footnotes when you have many citations to keep the prose flowing:
|
|
60
60
|
|
|
61
|
-
```
|
|
61
|
+
```md
|
|
62
62
|
The cache is invalidated whenever a user updates their profile. [^1]
|
|
63
63
|
|
|
64
|
-
[^1]:
|
|
64
|
+
[^1]: `src/services/user.ts:89` - updateProfile() calls cache.invalidate()
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
4. Include code snippets when they help illustrate the point:
|
|
68
68
|
|
|
69
|
-
```
|
|
69
|
+
```md
|
|
70
70
|
Signals track dependencies automatically when accessed inside an effect:
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
`packages/core/src/index.ts:152-158`
|
|
73
73
|
|
|
74
74
|
if (evalContext !== undefined) {
|
|
75
75
|
let node = evalContext._sources;
|
|
@@ -78,6 +78,26 @@ Here are some ways to cite sources:
|
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
```md
|
|
82
|
+
### Edge Case 5: Circular Peer Dependencies (`can-place-dep.js:370-371`, `place-dep.js:230-235`)
|
|
83
|
+
|
|
84
|
+
Arborist prevents infinite recursion when checking peer sets by tracking `peerPath`:
|
|
85
|
+
|
|
86
|
+
if (!peerEdge.peer || !peerEdge.to || peerPath.includes(peerEdge.to)) {
|
|
87
|
+
continue
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
And creates symbolic links when detecting nesting loops:
|
|
91
|
+
|
|
92
|
+
for (let p = target; p; p = p.resolveParent) {
|
|
93
|
+
if (p.matches(this.dep) && !p.isTop) {
|
|
94
|
+
this.placed = new Link({ parent: target, target: p });
|
|
95
|
+
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
81
101
|
If examining multiple repositories, prefix paths with the repository name.
|
|
82
102
|
|
|
83
103
|
**Explain the why**: Don't just describe what code does; explain why it exists and how it fits into
|
package/package.json
CHANGED
|
@@ -41,35 +41,35 @@ 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 inline
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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.
|
|
59
|
+
3. Use footnotes when you have many citations to keep the prose flowing:
|
|
60
60
|
|
|
61
|
-
```
|
|
61
|
+
```md
|
|
62
62
|
The cache is invalidated whenever a user updates their profile. [^1]
|
|
63
63
|
|
|
64
|
-
[^1]:
|
|
64
|
+
[^1]: `src/services/user.ts:89` - updateProfile() calls cache.invalidate()
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
4. Include code snippets when they help illustrate the point:
|
|
68
68
|
|
|
69
|
-
```
|
|
69
|
+
```md
|
|
70
70
|
Signals track dependencies automatically when accessed inside an effect:
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
`packages/core/src/index.ts:152-158`
|
|
73
73
|
|
|
74
74
|
if (evalContext !== undefined) {
|
|
75
75
|
let node = evalContext._sources;
|
|
@@ -78,6 +78,26 @@ Here are some ways to cite sources:
|
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
```md
|
|
82
|
+
### Edge Case 5: Circular Peer Dependencies (`can-place-dep.js:370-371`, `place-dep.js:230-235`)
|
|
83
|
+
|
|
84
|
+
Arborist prevents infinite recursion when checking peer sets by tracking `peerPath`:
|
|
85
|
+
|
|
86
|
+
if (!peerEdge.peer || !peerEdge.to || peerPath.includes(peerEdge.to)) {
|
|
87
|
+
continue
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
And creates symbolic links when detecting nesting loops:
|
|
91
|
+
|
|
92
|
+
for (let p = target; p; p = p.resolveParent) {
|
|
93
|
+
if (p.matches(this.dep) && !p.isTop) {
|
|
94
|
+
this.placed = new Link({ parent: target, target: p });
|
|
95
|
+
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
81
101
|
If examining multiple repositories, prefix paths with the repository name.
|
|
82
102
|
|
|
83
103
|
**Explain the why**: Don't just describe what code does; explain why it exists and how it fits into
|
package/src/commands/clean.ts
CHANGED
|
@@ -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),
|