@ozzylabs/feedradar 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/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/agents/_boundary.d.ts +44 -0
- package/dist/agents/_boundary.d.ts.map +1 -0
- package/dist/agents/_boundary.js +59 -0
- package/dist/agents/_boundary.js.map +1 -0
- package/dist/agents/claude-code.d.ts +32 -0
- package/dist/agents/claude-code.d.ts.map +1 -0
- package/dist/agents/claude-code.js +256 -0
- package/dist/agents/claude-code.js.map +1 -0
- package/dist/agents/codex-cli.d.ts +31 -0
- package/dist/agents/codex-cli.d.ts.map +1 -0
- package/dist/agents/codex-cli.js +303 -0
- package/dist/agents/codex-cli.js.map +1 -0
- package/dist/agents/copilot.d.ts +29 -0
- package/dist/agents/copilot.d.ts.map +1 -0
- package/dist/agents/copilot.js +282 -0
- package/dist/agents/copilot.js.map +1 -0
- package/dist/agents/gemini-cli.d.ts +30 -0
- package/dist/agents/gemini-cli.d.ts.map +1 -0
- package/dist/agents/gemini-cli.js +316 -0
- package/dist/agents/gemini-cli.js.map +1 -0
- package/dist/agents/index.d.ts +12 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +33 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/types.d.ts +103 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/claude-skills/dismiss/SKILL.md +41 -0
- package/dist/claude-skills/research/SKILL.md +45 -0
- package/dist/claude-skills/review/SKILL.md +45 -0
- package/dist/claude-skills/update/SKILL.md +49 -0
- package/dist/cli/dismiss.d.ts +28 -0
- package/dist/cli/dismiss.d.ts.map +1 -0
- package/dist/cli/dismiss.js +122 -0
- package/dist/cli/dismiss.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +64 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +148 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +578 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/research.d.ts +30 -0
- package/dist/cli/research.d.ts.map +1 -0
- package/dist/cli/research.js +313 -0
- package/dist/cli/research.js.map +1 -0
- package/dist/cli/review.d.ts +34 -0
- package/dist/cli/review.d.ts.map +1 -0
- package/dist/cli/review.js +418 -0
- package/dist/cli/review.js.map +1 -0
- package/dist/cli/source.d.ts +57 -0
- package/dist/cli/source.d.ts.map +1 -0
- package/dist/cli/source.js +511 -0
- package/dist/cli/source.js.map +1 -0
- package/dist/cli/update.d.ts +43 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +429 -0
- package/dist/cli/update.js.map +1 -0
- package/dist/cli/watch.d.ts +22 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/cli/watch.js +101 -0
- package/dist/cli/watch.js.map +1 -0
- package/dist/core/config.d.ts +60 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +101 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/feeds/derive-id.d.ts +43 -0
- package/dist/core/feeds/derive-id.d.ts.map +1 -0
- package/dist/core/feeds/derive-id.js +66 -0
- package/dist/core/feeds/derive-id.js.map +1 -0
- package/dist/core/feeds/github-api.d.ts +69 -0
- package/dist/core/feeds/github-api.d.ts.map +1 -0
- package/dist/core/feeds/github-api.js +161 -0
- package/dist/core/feeds/github-api.js.map +1 -0
- package/dist/core/feeds/github-releases.d.ts +3 -0
- package/dist/core/feeds/github-releases.d.ts.map +1 -0
- package/dist/core/feeds/github-releases.js +85 -0
- package/dist/core/feeds/github-releases.js.map +1 -0
- package/dist/core/feeds/html.d.ts +10 -0
- package/dist/core/feeds/html.d.ts.map +1 -0
- package/dist/core/feeds/html.js +263 -0
- package/dist/core/feeds/html.js.map +1 -0
- package/dist/core/feeds/index.d.ts +5 -0
- package/dist/core/feeds/index.d.ts.map +1 -0
- package/dist/core/feeds/index.js +18 -0
- package/dist/core/feeds/index.js.map +1 -0
- package/dist/core/feeds/npm-registry.d.ts +36 -0
- package/dist/core/feeds/npm-registry.d.ts.map +1 -0
- package/dist/core/feeds/npm-registry.js +200 -0
- package/dist/core/feeds/npm-registry.js.map +1 -0
- package/dist/core/feeds/rss.d.ts +12 -0
- package/dist/core/feeds/rss.d.ts.map +1 -0
- package/dist/core/feeds/rss.js +222 -0
- package/dist/core/feeds/rss.js.map +1 -0
- package/dist/core/feeds/types.d.ts +45 -0
- package/dist/core/feeds/types.d.ts.map +1 -0
- package/dist/core/feeds/types.js +2 -0
- package/dist/core/feeds/types.js.map +1 -0
- package/dist/core/filter.d.ts +25 -0
- package/dist/core/filter.d.ts.map +1 -0
- package/dist/core/filter.js +123 -0
- package/dist/core/filter.js.map +1 -0
- package/dist/core/injection-detector.d.ts +57 -0
- package/dist/core/injection-detector.d.ts.map +1 -0
- package/dist/core/injection-detector.js +109 -0
- package/dist/core/injection-detector.js.map +1 -0
- package/dist/core/items.d.ts +20 -0
- package/dist/core/items.d.ts.map +1 -0
- package/dist/core/items.js +105 -0
- package/dist/core/items.js.map +1 -0
- package/dist/core/state.d.ts +12 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +42 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/templates.d.ts +21 -0
- package/dist/core/templates.d.ts.map +1 -0
- package/dist/core/templates.js +52 -0
- package/dist/core/templates.js.map +1 -0
- package/dist/core/watcher.d.ts +72 -0
- package/dist/core/watcher.d.ts.map +1 -0
- package/dist/core/watcher.js +240 -0
- package/dist/core/watcher.js.map +1 -0
- package/dist/gemini-commands/dismiss.toml +2 -0
- package/dist/gemini-commands/research.toml +2 -0
- package/dist/gemini-commands/review.toml +2 -0
- package/dist/gemini-commands/update.toml +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/config.d.ts +39 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +23 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/item.d.ts +38 -0
- package/dist/schemas/item.d.ts.map +1 -0
- package/dist/schemas/item.js +34 -0
- package/dist/schemas/item.js.map +1 -0
- package/dist/schemas/research.d.ts +82 -0
- package/dist/schemas/research.d.ts.map +1 -0
- package/dist/schemas/research.js +45 -0
- package/dist/schemas/research.js.map +1 -0
- package/dist/schemas/source.d.ts +139 -0
- package/dist/schemas/source.d.ts.map +1 -0
- package/dist/schemas/source.js +127 -0
- package/dist/schemas/source.js.map +1 -0
- package/dist/schemas/state.d.ts +19 -0
- package/dist/schemas/state.d.ts.map +1 -0
- package/dist/schemas/state.js +12 -0
- package/dist/schemas/state.js.map +1 -0
- package/dist/skills/research/SKILL.md +156 -0
- package/dist/skills/review/SKILL.md +173 -0
- package/dist/skills/update/SKILL.md +200 -0
- package/dist/templates/agents/AGENTS.md +161 -0
- package/dist/templates/claude/CLAUDE.md +5 -0
- package/dist/templates/default.md +16 -0
- package/dist/templates/feedradar.md +165 -0
- package/dist/templates/routines/watch-daily.md +42 -0
- package/dist/templates/workflows/watch.yaml +70 -0
- package/package.json +73 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Cross-review an existing research report with a different agent via the FeedRadar CLI.
|
|
4
|
+
argument-hint: <research-id> [--agent claude-code|codex-cli|gemini-cli|copilot] [--template <id>]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# review
|
|
8
|
+
|
|
9
|
+
Append a review block to an existing `research/<id>.md` and stamp the
|
|
10
|
+
frontmatter `reviewedAt` / `reviewedBy` fields.
|
|
11
|
+
|
|
12
|
+
This skill is a thin wrapper: it delegates to the `radar` CLI, which
|
|
13
|
+
handles research file resolution, template loading, adapter dispatch, schema
|
|
14
|
+
validation, and the `researched → reviewed` status transition. The canonical
|
|
15
|
+
review procedure (rubric, where the review block lands, frontmatter stamp
|
|
16
|
+
format) lives in `.agents/skills/review/SKILL.md` (the SSoT) and is invoked
|
|
17
|
+
by the agent adapter that the CLI spawns. Do not duplicate that procedure
|
|
18
|
+
here.
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. Resolve `$ARGUMENTS`. If empty or `--help`, run:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
radar review --help
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
and report the usage. Otherwise pass `$ARGUMENTS` through verbatim.
|
|
29
|
+
2. Execute:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
radar review $ARGUMENTS
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
3. Report the result: the CLI prints the research path it updated and the
|
|
36
|
+
item status transition (`status -> reviewed`).
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- For meaningful cross-checking, pick `--agent` different from the one that
|
|
41
|
+
wrote the original v1 (ADR-0001 § クロスエージェント運用). Example: if v1
|
|
42
|
+
was authored by `claude-code`, run review with `--agent codex-cli` or
|
|
43
|
+
`--agent gemini-cli`.
|
|
44
|
+
- If the CLI exits non-zero, surface the error and exit code; do not retry
|
|
45
|
+
with a different agent without user direction.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update
|
|
3
|
+
description: Regenerate an existing research report as v+1 via the FeedRadar CLI (rewrite-and-supersede).
|
|
4
|
+
argument-hint: <research-id> [--agent claude-code|codex-cli|gemini-cli|copilot] [--template <id>]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# update
|
|
8
|
+
|
|
9
|
+
Generate a new `<base>_v<N+1>.md` from the supplied predecessor research,
|
|
10
|
+
writing `supersedes: <prev-id>` into the new frontmatter and leaving the
|
|
11
|
+
predecessor file untouched (immutable history, ADR-0003).
|
|
12
|
+
|
|
13
|
+
This skill is a thin wrapper: it delegates to the `radar` CLI, which
|
|
14
|
+
handles predecessor parsing, version increment, supersedes wiring, adapter
|
|
15
|
+
dispatch, schema validation, and the **items.yaml status invariance** rule
|
|
16
|
+
(ADR-0008: update never changes the source item's `status`, regardless of
|
|
17
|
+
how many v+N files it generates). The canonical update procedure
|
|
18
|
+
(rewrite-and-supersede strategy, materiality judgement, what fields v+1
|
|
19
|
+
resets) lives in `.agents/skills/update/SKILL.md` (the SSoT) and is invoked
|
|
20
|
+
by the agent adapter that the CLI spawns. Do not duplicate that procedure
|
|
21
|
+
here.
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
1. Resolve `$ARGUMENTS`. If empty or `--help`, run:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
radar update --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
and report the usage. Otherwise pass `$ARGUMENTS` through verbatim.
|
|
32
|
+
2. Execute:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
radar update $ARGUMENTS
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
3. Report the v+1 file path the CLI produced (printed as `update: wrote
|
|
39
|
+
<path>` and `update: supersedes <prev-id> (items.yaml status unchanged
|
|
40
|
+
per ADR-0008)`).
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
- v+1 always resets `reviewedAt` / `reviewedBy` to `null` because a review
|
|
45
|
+
only applies to the version it was written against (ADR-0003). To
|
|
46
|
+
re-review the new version, run `/review <new-id>` afterwards.
|
|
47
|
+
- If the CLI exits non-zero (e.g. the supplied predecessor's frontmatter
|
|
48
|
+
doesn't match the schema), surface the error and exit code; do not edit
|
|
49
|
+
the predecessor file to fix it — that violates immutable history.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Command } from "./index.js";
|
|
2
|
+
/** Sinks for the dismiss command's user-facing output. Tests inject capturing sinks. */
|
|
3
|
+
export interface DismissIO {
|
|
4
|
+
log?: (message: string) => void;
|
|
5
|
+
error?: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface DismissCommandOptions {
|
|
8
|
+
cwd?: string;
|
|
9
|
+
io?: DismissIO;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Implementation of `radar dismiss <item-id>`.
|
|
13
|
+
*
|
|
14
|
+
* Triggers the `detected → dismissed` state transition (ADR-0008). The command
|
|
15
|
+
* is intentionally agent-free: it only mutates `items/<sourceId>/<item-id>.yaml`
|
|
16
|
+
* so users can prune noise from `watch run` output without spending agent
|
|
17
|
+
* tokens.
|
|
18
|
+
*
|
|
19
|
+
* Flow:
|
|
20
|
+
* 1. Parse + validate args.
|
|
21
|
+
* 2. Locate `items/<sourceId>/<item-id>.yaml`.
|
|
22
|
+
* 3. Reject if the item is not in `detected` (terminal/researched states
|
|
23
|
+
* cannot be dismissed; there is no `undismiss`).
|
|
24
|
+
* 4. Write back with `status: dismissed`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runDismiss(args: string[], options?: DismissCommandOptions): Promise<number>;
|
|
27
|
+
export declare const dismissCommand: Command;
|
|
28
|
+
//# sourceMappingURL=dismiss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dismiss.d.ts","sourceRoot":"","sources":["../../src/cli/dismiss.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,wFAAwF;AACxF,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,SAAS,CAAC;CAChB;AA8DD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,MAAM,CAAC,CAgDjB;AAED,eAAO,MAAM,cAAc,EAAE,OAI5B,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { access } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { loadItems, saveItems } from "../core/items.js";
|
|
4
|
+
function parseArgs(args) {
|
|
5
|
+
const out = {};
|
|
6
|
+
for (let i = 0; i < args.length; i++) {
|
|
7
|
+
const a = args[i];
|
|
8
|
+
if (a === "-h" || a === "--help") {
|
|
9
|
+
out.help = true;
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
if (a?.startsWith("--")) {
|
|
13
|
+
throw new Error(`unknown option: ${a}`);
|
|
14
|
+
}
|
|
15
|
+
if (!out.itemId) {
|
|
16
|
+
out.itemId = a;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
throw new Error(`unexpected positional argument: ${a}`);
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
function printHelp(log) {
|
|
24
|
+
log("Usage: radar dismiss <item-id>");
|
|
25
|
+
log("");
|
|
26
|
+
log("Arguments:");
|
|
27
|
+
log(" <item-id> Item id (matches items/<sourceId>/<item-id>.yaml)");
|
|
28
|
+
log("");
|
|
29
|
+
log("Transitions the item's status from `detected` to `dismissed` (ADR-0008).");
|
|
30
|
+
log("Items already in `researched`, `reviewed`, or `dismissed` cannot be dismissed.");
|
|
31
|
+
}
|
|
32
|
+
async function pathExists(p) {
|
|
33
|
+
try {
|
|
34
|
+
await access(p);
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Locate `items/<sourceId>/<item-id>.yaml` across all source directories.
|
|
43
|
+
*
|
|
44
|
+
* Mirrors the lookup strategy used by `research`: `loadItems` walks every
|
|
45
|
+
* source subdir and we match by id, so the caller only needs `<item-id>`
|
|
46
|
+
* (sourceId is inferred from the loaded item).
|
|
47
|
+
*/
|
|
48
|
+
async function findItem(cwd, itemId) {
|
|
49
|
+
const itemsDir = join(cwd, "items");
|
|
50
|
+
if (!(await pathExists(itemsDir)))
|
|
51
|
+
return null;
|
|
52
|
+
const items = await loadItems(itemsDir);
|
|
53
|
+
const match = items.find((i) => i.id === itemId);
|
|
54
|
+
if (!match)
|
|
55
|
+
return null;
|
|
56
|
+
return { item: match };
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Implementation of `radar dismiss <item-id>`.
|
|
60
|
+
*
|
|
61
|
+
* Triggers the `detected → dismissed` state transition (ADR-0008). The command
|
|
62
|
+
* is intentionally agent-free: it only mutates `items/<sourceId>/<item-id>.yaml`
|
|
63
|
+
* so users can prune noise from `watch run` output without spending agent
|
|
64
|
+
* tokens.
|
|
65
|
+
*
|
|
66
|
+
* Flow:
|
|
67
|
+
* 1. Parse + validate args.
|
|
68
|
+
* 2. Locate `items/<sourceId>/<item-id>.yaml`.
|
|
69
|
+
* 3. Reject if the item is not in `detected` (terminal/researched states
|
|
70
|
+
* cannot be dismissed; there is no `undismiss`).
|
|
71
|
+
* 4. Write back with `status: dismissed`.
|
|
72
|
+
*/
|
|
73
|
+
export async function runDismiss(args, options = {}) {
|
|
74
|
+
const cwd = options.cwd ?? process.cwd();
|
|
75
|
+
const log = options.io?.log ?? ((m) => console.log(m));
|
|
76
|
+
const error = options.io?.error ?? ((m) => console.error(m));
|
|
77
|
+
let parsed;
|
|
78
|
+
try {
|
|
79
|
+
parsed = parseArgs(args);
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
error(`dismiss: ${e instanceof Error ? e.message : String(e)}`);
|
|
83
|
+
return 2;
|
|
84
|
+
}
|
|
85
|
+
if (parsed.help) {
|
|
86
|
+
printHelp(log);
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
if (!parsed.itemId) {
|
|
90
|
+
error("dismiss: missing <item-id>");
|
|
91
|
+
printHelp(error);
|
|
92
|
+
return 2;
|
|
93
|
+
}
|
|
94
|
+
const found = await findItem(cwd, parsed.itemId);
|
|
95
|
+
if (!found) {
|
|
96
|
+
error(`dismiss: item '${parsed.itemId}' not found under items/`);
|
|
97
|
+
return 1;
|
|
98
|
+
}
|
|
99
|
+
const { item } = found;
|
|
100
|
+
if (item.status !== "detected") {
|
|
101
|
+
error(`dismiss: item '${item.id}' is in status '${item.status}', expected 'detected' (dismiss is only valid from the detected state; ADR-0008)`);
|
|
102
|
+
return 1;
|
|
103
|
+
}
|
|
104
|
+
const updated = { ...item, status: "dismissed" };
|
|
105
|
+
try {
|
|
106
|
+
// saveItems writes by sourceId+id, so it overwrites the existing file in
|
|
107
|
+
// place. The status transition is the entire effect of the command.
|
|
108
|
+
await saveItems(join(cwd, "items"), [updated]);
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
error(`dismiss: failed to update item status: ${e instanceof Error ? e.message : String(e)}`);
|
|
112
|
+
return 1;
|
|
113
|
+
}
|
|
114
|
+
log(`dismiss: items/${item.sourceId}/${item.id}.yaml status -> dismissed`);
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
117
|
+
export const dismissCommand = {
|
|
118
|
+
name: "dismiss",
|
|
119
|
+
summary: "Mark a detected item as dismissed (no research/review)",
|
|
120
|
+
run: (args) => runDismiss(args),
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=dismiss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dismiss.js","sourceRoot":"","sources":["../../src/cli/dismiss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CA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,EAAE,CAAC,CAAC;QAC9F,OAAO,CAAC,CAAC;IACX,CAAC;IAED,GAAG,CAAC,kBAAkB,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,EAAE,2BAA2B,CAAC,CAAC;IAC3E,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,wDAAwD;IACjE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1C;AAqCD,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBvD"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { dismissCommand } from "./dismiss.js";
|
|
5
|
+
import { initCommand } from "./init.js";
|
|
6
|
+
import { researchCommand } from "./research.js";
|
|
7
|
+
import { reviewCommand } from "./review.js";
|
|
8
|
+
import { sourceCommand } from "./source.js";
|
|
9
|
+
import { updateCommand } from "./update.js";
|
|
10
|
+
import { watchCommand } from "./watch.js";
|
|
11
|
+
const commands = [
|
|
12
|
+
initCommand,
|
|
13
|
+
sourceCommand,
|
|
14
|
+
watchCommand,
|
|
15
|
+
researchCommand,
|
|
16
|
+
dismissCommand,
|
|
17
|
+
reviewCommand,
|
|
18
|
+
updateCommand,
|
|
19
|
+
];
|
|
20
|
+
// Read the installed package's version at runtime so `radar --version`
|
|
21
|
+
// tracks release-please bumps without a parallel source edit. The bin
|
|
22
|
+
// ships as dist/cli/index.js with package.json two levels up; the path
|
|
23
|
+
// is identical in both npm-installed and local-built layouts because
|
|
24
|
+
// tsc preserves src/ → dist/ structure.
|
|
25
|
+
const PKG_PATH = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "package.json");
|
|
26
|
+
const VERSION = JSON.parse(readFileSync(PKG_PATH, "utf8")).version;
|
|
27
|
+
function printHelp() {
|
|
28
|
+
console.log("FeedRadar — Multi-agent CLI for blog/release feed research");
|
|
29
|
+
console.log("");
|
|
30
|
+
console.log("Usage: radar <command> [options]");
|
|
31
|
+
console.log("");
|
|
32
|
+
console.log("Commands:");
|
|
33
|
+
for (const c of commands) {
|
|
34
|
+
console.log(` ${c.name.padEnd(10)} ${c.summary}`);
|
|
35
|
+
}
|
|
36
|
+
console.log("");
|
|
37
|
+
console.log("Options:");
|
|
38
|
+
console.log(" -h, --help Show this help");
|
|
39
|
+
console.log(" -v, --version Show version");
|
|
40
|
+
console.log("");
|
|
41
|
+
console.log("Status: alpha — Phase 1-5 complete, Phase 6 (npm publish 0.1.0) pending.");
|
|
42
|
+
}
|
|
43
|
+
export async function run(argv) {
|
|
44
|
+
const [first, ...rest] = argv;
|
|
45
|
+
if (!first || first === "-h" || first === "--help" || first === "help") {
|
|
46
|
+
printHelp();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (first === "-v" || first === "--version" || first === "version") {
|
|
50
|
+
console.log(VERSION);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const command = commands.find((c) => c.name === first);
|
|
54
|
+
if (!command) {
|
|
55
|
+
console.error(`radar: unknown command '${first}'`);
|
|
56
|
+
console.error("Run 'radar --help' for available commands.");
|
|
57
|
+
process.exit(2);
|
|
58
|
+
}
|
|
59
|
+
const code = await command.run(rest);
|
|
60
|
+
if (code !== 0)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AAC,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,2BAA2B,KAAK,GAAG,CAAC,CAAC;QACnD,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { Command } from "./index.js";
|
|
2
|
+
interface InitOptions {
|
|
3
|
+
cwd: string;
|
|
4
|
+
force: boolean;
|
|
5
|
+
/** Override the source location of bundled engine skills (used by tests). */
|
|
6
|
+
skillsRoot?: string;
|
|
7
|
+
/** Override the source location of bundled init templates (used by tests). */
|
|
8
|
+
templatesRoot?: string;
|
|
9
|
+
/** Override the source location of bundled Claude discovery skills (used by tests). */
|
|
10
|
+
claudeSkillsRoot?: string;
|
|
11
|
+
/** Override the source location of bundled Gemini CLI command TOMLs (used by tests). */
|
|
12
|
+
geminiCommandsRoot?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Skip writing Claude Code slash-command wrappers to
|
|
15
|
+
* `<cwd>/.claude/skills/`. Useful for workspaces that already manage that
|
|
16
|
+
* directory via the `@ozzylabs/skills` Renovate preset and don't want
|
|
17
|
+
* FeedRadar's discovery skills to land alongside the preset ones.
|
|
18
|
+
*
|
|
19
|
+
* The engine SKILLs at `<cwd>/.agents/skills/` (which the agent adapter
|
|
20
|
+
* reads when the CLI spawns the agent) are always written regardless of
|
|
21
|
+
* this flag; they are the SSoT.
|
|
22
|
+
*/
|
|
23
|
+
noClaudeSkills?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Skip writing Gemini CLI slash-command TOMLs to
|
|
26
|
+
* `<cwd>/.gemini/commands/`. Useful for workspaces that already manage
|
|
27
|
+
* that directory via another mechanism, or that don't use Gemini CLI.
|
|
28
|
+
*
|
|
29
|
+
* The engine SKILLs at `<cwd>/.agents/skills/` are always written
|
|
30
|
+
* regardless of this flag; they are the SSoT. Codex CLI / Gemini CLI
|
|
31
|
+
* interactive sessions also fall back to the engine SKILLs via the
|
|
32
|
+
* "Invocation modes" dual-mode procedure when no slash command is
|
|
33
|
+
* configured.
|
|
34
|
+
*/
|
|
35
|
+
noGeminiCommands?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Skip writing `<cwd>/AGENTS.md`. By default `init` copies the bundled
|
|
38
|
+
* AGENTS.md template into the workspace so that agent CLIs which auto-read
|
|
39
|
+
* an agent-agnostic instructions file (Codex / Gemini / Copilot) get
|
|
40
|
+
* workspace context (available commands, typical workflow, docs pointers)
|
|
41
|
+
* the moment a user opens an interactive session.
|
|
42
|
+
*
|
|
43
|
+
* Useful for workspaces that already manage their own AGENTS.md (e.g. a
|
|
44
|
+
* monorepo with project-wide instructions) and don't want FeedRadar's
|
|
45
|
+
* boilerplate to land at the root.
|
|
46
|
+
*
|
|
47
|
+
* See ADR-0007 (revised 2026-05-17 b) for the four-layer init bundle
|
|
48
|
+
* (engine SKILL / claude discovery / AGENTS.md / schedule scaffolds).
|
|
49
|
+
*/
|
|
50
|
+
noAgentsMd?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Skip writing `<cwd>/CLAUDE.md`. By default `init` writes a minimal
|
|
53
|
+
* `CLAUDE.md` at the workspace root that re-exports `AGENTS.md` via the
|
|
54
|
+
* `@AGENTS.md` import directive. Without `CLAUDE.md`, Claude Code does
|
|
55
|
+
* not auto-read `AGENTS.md`, so the industry-standard pattern of "single
|
|
56
|
+
* source of truth in AGENTS.md, imported by CLAUDE.md" breaks.
|
|
57
|
+
*
|
|
58
|
+
* Useful for workspaces that already manage their own `CLAUDE.md` (and
|
|
59
|
+
* load `AGENTS.md` via a different mechanism) or that don't use Claude
|
|
60
|
+
* Code at all.
|
|
61
|
+
*
|
|
62
|
+
* Note: when `noAgentsMd` is true, the bundled `CLAUDE.md` template's
|
|
63
|
+
* `@AGENTS.md` import would dangle, so `init` auto-skips `CLAUDE.md` in
|
|
64
|
+
* that case and emits a warning explaining why.
|
|
65
|
+
*/
|
|
66
|
+
noClaudeMd?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Skip writing `<cwd>/templates/default.md`. By default `init` emits a
|
|
69
|
+
* starter Markdown template body that mirrors the engine `research`
|
|
70
|
+
* SKILL's fallback structure (要約 / 詳細 / 出典). The file is the
|
|
71
|
+
* first editable artifact the user can tweak to customize report
|
|
72
|
+
* shape; the research engine SKILL falls back to its own built-in
|
|
73
|
+
* structure when `templateBody` is empty, so skipping does not break
|
|
74
|
+
* runtime behavior — it only removes the editable starter.
|
|
75
|
+
*
|
|
76
|
+
* Useful for workspaces that manage `templates/` via another mechanism
|
|
77
|
+
* or that already have a populated `templates/default.md`.
|
|
78
|
+
*/
|
|
79
|
+
noTemplates?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Skip writing `<cwd>/FEEDRADAR.md` (human-facing workspace guide).
|
|
82
|
+
* By default `init` emits this file at the workspace root to teach the
|
|
83
|
+
* user how to drive the workspace via natural-language requests to AI
|
|
84
|
+
* agents (primary) or CLI direct invocation (secondary). Useful for
|
|
85
|
+
* workspaces that already have their own user-facing documentation, or
|
|
86
|
+
* that manage this file via another mechanism.
|
|
87
|
+
*/
|
|
88
|
+
noFeedradarMd?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Emit the Claude Routines schedule template
|
|
91
|
+
* (`claude/routines/watch-daily.md`).
|
|
92
|
+
*/
|
|
93
|
+
withRoutines?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Emit the GitHub Actions schedule template (`.github/workflows/watch.yaml`).
|
|
96
|
+
*/
|
|
97
|
+
withActions?: boolean;
|
|
98
|
+
/** Sink for warnings; defaults to console.warn. */
|
|
99
|
+
warn?: (message: string) => void;
|
|
100
|
+
/** Sink for info messages; defaults to console.log. */
|
|
101
|
+
info?: (message: string) => void;
|
|
102
|
+
}
|
|
103
|
+
interface InitResult {
|
|
104
|
+
createdDirs: string[];
|
|
105
|
+
copiedFiles: string[];
|
|
106
|
+
skippedFiles: string[];
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Initialize the current directory as a FeedRadar workspace.
|
|
110
|
+
*
|
|
111
|
+
* Creates the canonical workspace directories and copies bundled SKILL.md
|
|
112
|
+
* files into `.agents/skills/<name>/SKILL.md`. Existing files are protected
|
|
113
|
+
* unless `force` is true.
|
|
114
|
+
*
|
|
115
|
+
* Claude Code discoverability (ADR-0007, revised 2026-05-17 via #75): in
|
|
116
|
+
* addition to the engine SKILLs at `.agents/skills/`, `init` also writes
|
|
117
|
+
* thin slash-command wrappers to `.claude/skills/` so that Claude Code,
|
|
118
|
+
* when opened interactively in the workspace, surfaces `/research` /
|
|
119
|
+
* `/review` / `/update` / `/dismiss`. The wrappers delegate to the
|
|
120
|
+
* `radar` CLI rather than duplicating the engine procedure (the
|
|
121
|
+
* engine SKILL at `.agents/skills/<name>/SKILL.md` remains the SSoT).
|
|
122
|
+
* Existing files are protected, so workspaces that already manage
|
|
123
|
+
* `.claude/skills/` via the `@ozzylabs/skills` Renovate preset won't be
|
|
124
|
+
* surprised; alternatively use `--no-claude-skills` to skip the discovery
|
|
125
|
+
* layer entirely.
|
|
126
|
+
*
|
|
127
|
+
* Multi-agent context (ADR-0007, revised 2026-05-17 b via #77): `init`
|
|
128
|
+
* also writes an agent-agnostic `AGENTS.md` at the workspace root. Codex
|
|
129
|
+
* CLI, Gemini CLI, and GitHub Copilot CLI auto-read this file when opened
|
|
130
|
+
* interactively in the workspace, giving those agents context about
|
|
131
|
+
* available commands, typical workflow, and docs pointers without any
|
|
132
|
+
* extra setup. Opt out via `--no-agents-md` (workspaces that already have
|
|
133
|
+
* their own AGENTS.md).
|
|
134
|
+
*
|
|
135
|
+
* Gemini CLI slash commands (ADR-0007, revised 2026-05-17 c via #78):
|
|
136
|
+
* `init` writes Gemini CLI's native slash command TOMLs at
|
|
137
|
+
* `<cwd>/.gemini/commands/{research,review,update,dismiss}.toml`. These
|
|
138
|
+
* thin wrappers shell out to the `radar` CLI through Gemini's
|
|
139
|
+
* `{{args}}` interpolation, surfacing `/research` etc. inside Gemini CLI
|
|
140
|
+
* interactive sessions. Opt out via `--no-gemini-commands` (engine SKILLs
|
|
141
|
+
* remain in place via the dual-mode "Invocation modes" fallback). This
|
|
142
|
+
* closes the slash-command UX gap for Gemini CLI (Codex CLI is covered by
|
|
143
|
+
* the engine SKILL dual-mode procedure itself).
|
|
144
|
+
*/
|
|
145
|
+
export declare function initWorkspace(options: InitOptions): Promise<InitResult>;
|
|
146
|
+
export declare const initCommand: Command;
|
|
147
|
+
export {};
|
|
148
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA0F1C,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC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