@ozzylabs/feedradar 0.1.6 → 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/dist/cli/dismiss.d.ts +2 -1
- package/dist/cli/dismiss.d.ts.map +1 -1
- package/dist/cli/dismiss.js +4 -1
- package/dist/cli/dismiss.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +7 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/items.d.ts +44 -0
- package/dist/cli/items.d.ts.map +1 -0
- package/dist/cli/items.js +288 -0
- package/dist/cli/items.js.map +1 -0
- package/dist/cli/research.d.ts +21 -0
- package/dist/cli/research.d.ts.map +1 -1
- package/dist/cli/research.js +54 -10
- package/dist/cli/research.js.map +1 -1
- package/dist/cli/review.d.ts +23 -0
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +293 -2
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/triage.d.ts +136 -0
- package/dist/cli/triage.d.ts.map +1 -0
- package/dist/cli/triage.js +1110 -0
- package/dist/cli/triage.js.map +1 -0
- package/dist/cli/undismiss.d.ts +30 -0
- package/dist/cli/undismiss.d.ts.map +1 -0
- package/dist/cli/undismiss.js +133 -0
- package/dist/cli/undismiss.js.map +1 -0
- package/dist/cli/workflow/generate-combined-with-triage.d.ts +115 -0
- package/dist/cli/workflow/generate-combined-with-triage.d.ts.map +1 -0
- package/dist/cli/workflow/generate-combined-with-triage.js +446 -0
- package/dist/cli/workflow/generate-combined-with-triage.js.map +1 -0
- package/dist/cli/workflow.d.ts +6 -5
- package/dist/cli/workflow.d.ts.map +1 -1
- package/dist/cli/workflow.js +13 -8
- package/dist/cli/workflow.js.map +1 -1
- package/dist/core/recipes.d.ts.map +1 -1
- package/dist/core/recipes.js +6 -0
- package/dist/core/recipes.js.map +1 -1
- package/dist/core/transitions.d.ts +30 -0
- package/dist/core/transitions.d.ts.map +1 -0
- package/dist/core/transitions.js +103 -0
- package/dist/core/transitions.js.map +1 -0
- package/dist/core/triage/adapter.d.ts +80 -0
- package/dist/core/triage/adapter.d.ts.map +1 -0
- package/dist/core/triage/adapter.js +128 -0
- package/dist/core/triage/adapter.js.map +1 -0
- package/dist/core/triage/index.d.ts +105 -0
- package/dist/core/triage/index.d.ts.map +1 -0
- package/dist/core/triage/index.js +246 -0
- package/dist/core/triage/index.js.map +1 -0
- package/dist/core/triage/prompt.d.ts +30 -0
- package/dist/core/triage/prompt.d.ts.map +1 -0
- package/dist/core/triage/prompt.js +157 -0
- package/dist/core/triage/prompt.js.map +1 -0
- package/dist/core/triage/response.d.ts +114 -0
- package/dist/core/triage/response.d.ts.map +1 -0
- package/dist/core/triage/response.js +188 -0
- package/dist/core/triage/response.js.map +1 -0
- package/dist/recipes/aws-whats-new.yaml +29 -0
- package/dist/recipes/dev-to.yaml +24 -0
- package/dist/schemas/item.d.ts +151 -5
- package/dist/schemas/item.d.ts.map +1 -1
- package/dist/schemas/item.js +164 -4
- package/dist/schemas/item.js.map +1 -1
- package/dist/schemas/recipe.d.ts +10 -0
- package/dist/schemas/recipe.d.ts.map +1 -1
- package/dist/schemas/recipe.js +10 -1
- package/dist/schemas/recipe.js.map +1 -1
- package/dist/schemas/source.d.ts +43 -0
- package/dist/schemas/source.d.ts.map +1 -1
- package/dist/schemas/source.js +34 -0
- package/dist/schemas/source.js.map +1 -1
- package/dist/templates/agents/AGENTS.md +30 -0
- package/dist/templates/workflows/combined-with-triage.template.yaml.tmpl +133 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/schemas/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/schemas/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoC3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/schemas/recipe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { SourceFacetsSchema, SourceFiltersSchema, SourceHttpOptionsSchema, SourceJsOptionsSchema, SourceJsonApiSelectorsSchema, SourceKindSchema, SourcePaginationSchema, SourceSelectorsSchema, TrustLevelSchema, } from "./source.js";
|
|
2
|
+
import { SourceFacetsSchema, SourceFiltersSchema, SourceHttpOptionsSchema, SourceJsOptionsSchema, SourceJsonApiSelectorsSchema, SourceKindSchema, SourcePaginationSchema, SourceSelectorsSchema, SourceTriagePolicySchema, TrustLevelSchema, } from "./source.js";
|
|
3
3
|
/**
|
|
4
4
|
* Schema for a bundled recipe YAML file (ADR-0012 §D3, strategy A —
|
|
5
5
|
* "リポ同梱").
|
|
@@ -53,5 +53,14 @@ export const RecipeFileSchema = z.object({
|
|
|
53
53
|
// without `facets:` keep working unchanged.
|
|
54
54
|
facets: SourceFacetsSchema.optional(),
|
|
55
55
|
trustLevel: TrustLevelSchema.default("untrusted"),
|
|
56
|
+
/**
|
|
57
|
+
* Default triage policy bundled with the recipe (ADR-0018 §W3). When
|
|
58
|
+
* `radar source add --recipe <name>` materializes a source from this
|
|
59
|
+
* recipe, the policy propagates onto `sources/<id>.yaml > triagePolicy:`
|
|
60
|
+
* so the user gets a sensible default without authoring rules by hand.
|
|
61
|
+
* Optional: existing bundled recipes (PR #229 / #232) ship without
|
|
62
|
+
* `triagePolicy:` and continue to validate.
|
|
63
|
+
*/
|
|
64
|
+
triagePolicy: SourceTriagePolicySchema.optional(),
|
|
56
65
|
});
|
|
57
66
|
//# sourceMappingURL=recipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../src/schemas/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,sDAAsD;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B;;;OAGG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,gBAAgB;IACtB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;QACnC,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,MAAM;QACjB,WAAW,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;QACjC,aAAa,EAAE,KAAK;KACrB,CAAC;IACF,SAAS,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IAC3C,EAAE,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,sBAAs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IAC3C,EAAE,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC7C,aAAa,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACtD,wEAAwE;IACxE,4CAA4C;IAC5C,MAAM,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;IACjD;;;;;;;OAOG;IACH,YAAY,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC"}
|
package/dist/schemas/source.d.ts
CHANGED
|
@@ -49,6 +49,39 @@ export declare const TrustLevelSchema: z.ZodEnum<{
|
|
|
49
49
|
untrusted: "untrusted";
|
|
50
50
|
}>;
|
|
51
51
|
export type TrustLevel = z.infer<typeof TrustLevelSchema>;
|
|
52
|
+
/**
|
|
53
|
+
* Per-source triage policy (ADR-0018 §W3).
|
|
54
|
+
*
|
|
55
|
+
* Drives `radar triage` for items emitted from this source. Optional on
|
|
56
|
+
* `SourceSchema`: existing source YAMLs (which omit `triagePolicy:` entirely)
|
|
57
|
+
* remain valid and `radar triage` simply skips them.
|
|
58
|
+
*
|
|
59
|
+
* - `agent`: which adapter runs the triage call. Reuses `AgentIdSchema` so
|
|
60
|
+
* the same enum gates both research and triage agents (a workspace can
|
|
61
|
+
* only triage with an adapter it has wired up). The adapter is free to
|
|
62
|
+
* route the triage channel to a cheaper model than the research channel
|
|
63
|
+
* (e.g. `gemini-2.5-flash-lite` vs `gemini-2.5-pro`), but that mapping is
|
|
64
|
+
* adapter-internal and not schema-modeled here.
|
|
65
|
+
* - `confidenceThreshold`: minimum confidence for a non-`unsure` decision to
|
|
66
|
+
* stick. Decisions below the threshold are demoted to `unsure` regardless
|
|
67
|
+
* of what the agent returned. Default `0.7` reflects ADR-0018's
|
|
68
|
+
* recommendation for cheap-model triage.
|
|
69
|
+
* - `rules`: free-form markdown describing how this source should be
|
|
70
|
+
* classified ("AWS GA は research、リージョン拡張は dismiss" 等). Wrapped
|
|
71
|
+
* in a `<policy>` boundary marker at prompt time per ADR-0018 §W-A; never
|
|
72
|
+
* parsed by the schema beyond non-empty.
|
|
73
|
+
*/
|
|
74
|
+
export declare const SourceTriagePolicySchema: z.ZodObject<{
|
|
75
|
+
agent: z.ZodEnum<{
|
|
76
|
+
"claude-code": "claude-code";
|
|
77
|
+
"codex-cli": "codex-cli";
|
|
78
|
+
"gemini-cli": "gemini-cli";
|
|
79
|
+
copilot: "copilot";
|
|
80
|
+
}>;
|
|
81
|
+
confidenceThreshold: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
rules: z.ZodString;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export type SourceTriagePolicy = z.infer<typeof SourceTriagePolicySchema>;
|
|
52
85
|
export declare const SourceFiltersSchema: z.ZodObject<{
|
|
53
86
|
keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
54
87
|
excludeKeywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -398,6 +431,16 @@ export declare const SourceSchema: z.ZodObject<{
|
|
|
398
431
|
trusted: "trusted";
|
|
399
432
|
untrusted: "untrusted";
|
|
400
433
|
}>>;
|
|
434
|
+
triagePolicy: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
agent: z.ZodEnum<{
|
|
436
|
+
"claude-code": "claude-code";
|
|
437
|
+
"codex-cli": "codex-cli";
|
|
438
|
+
"gemini-cli": "gemini-cli";
|
|
439
|
+
copilot: "copilot";
|
|
440
|
+
}>;
|
|
441
|
+
confidenceThreshold: z.ZodDefault<z.ZodNumber>;
|
|
442
|
+
rules: z.ZodString;
|
|
443
|
+
}, z.core.$strip>>;
|
|
401
444
|
}, z.core.$strip>;
|
|
402
445
|
export type Source = z.infer<typeof SourceSchema>;
|
|
403
446
|
//# sourceMappingURL=source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/schemas/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/schemas/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;EAQ3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;EAAyC,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,qGAAqG;AACrG,eAAO,MAAM,gBAAgB;;;;;EAA+C,CAAC;AAC7E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;;;EAAmC,CAAC;AACjE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAM9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG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F,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAoB9D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+ErB,CAAC;AACL,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/schemas/source.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { AgentIdSchema } from "./research.js";
|
|
2
3
|
export const SourceKindSchema = z.enum([
|
|
3
4
|
"rss",
|
|
4
5
|
"html",
|
|
@@ -33,6 +34,33 @@ export const MatchFieldSchema = z.enum(["title", "summary", "body", "tags"]);
|
|
|
33
34
|
* separate sub-issue so the schema change is reviewable in isolation.
|
|
34
35
|
*/
|
|
35
36
|
export const TrustLevelSchema = z.enum(["trusted", "untrusted"]);
|
|
37
|
+
/**
|
|
38
|
+
* Per-source triage policy (ADR-0018 §W3).
|
|
39
|
+
*
|
|
40
|
+
* Drives `radar triage` for items emitted from this source. Optional on
|
|
41
|
+
* `SourceSchema`: existing source YAMLs (which omit `triagePolicy:` entirely)
|
|
42
|
+
* remain valid and `radar triage` simply skips them.
|
|
43
|
+
*
|
|
44
|
+
* - `agent`: which adapter runs the triage call. Reuses `AgentIdSchema` so
|
|
45
|
+
* the same enum gates both research and triage agents (a workspace can
|
|
46
|
+
* only triage with an adapter it has wired up). The adapter is free to
|
|
47
|
+
* route the triage channel to a cheaper model than the research channel
|
|
48
|
+
* (e.g. `gemini-2.5-flash-lite` vs `gemini-2.5-pro`), but that mapping is
|
|
49
|
+
* adapter-internal and not schema-modeled here.
|
|
50
|
+
* - `confidenceThreshold`: minimum confidence for a non-`unsure` decision to
|
|
51
|
+
* stick. Decisions below the threshold are demoted to `unsure` regardless
|
|
52
|
+
* of what the agent returned. Default `0.7` reflects ADR-0018's
|
|
53
|
+
* recommendation for cheap-model triage.
|
|
54
|
+
* - `rules`: free-form markdown describing how this source should be
|
|
55
|
+
* classified ("AWS GA は research、リージョン拡張は dismiss" 等). Wrapped
|
|
56
|
+
* in a `<policy>` boundary marker at prompt time per ADR-0018 §W-A; never
|
|
57
|
+
* parsed by the schema beyond non-empty.
|
|
58
|
+
*/
|
|
59
|
+
export const SourceTriagePolicySchema = z.object({
|
|
60
|
+
agent: AgentIdSchema,
|
|
61
|
+
confidenceThreshold: z.number().min(0).max(1).default(0.7),
|
|
62
|
+
rules: z.string().min(1),
|
|
63
|
+
});
|
|
36
64
|
export const SourceFiltersSchema = z.object({
|
|
37
65
|
keywords: z.array(z.string()).default([]),
|
|
38
66
|
excludeKeywords: z.array(z.string()).default([]),
|
|
@@ -363,6 +391,12 @@ export const SourceSchema = z
|
|
|
363
391
|
// this is schema-only; policy branches that read `trustLevel` arrive in a
|
|
364
392
|
// separate sub-issue.
|
|
365
393
|
trustLevel: TrustLevelSchema.default("untrusted"),
|
|
394
|
+
// `triagePolicy` is the per-source triage configuration introduced by
|
|
395
|
+
// ADR-0018. Optional: existing source YAMLs without the block remain
|
|
396
|
+
// valid and `radar triage` (PR-3) skips sources missing a policy. PR-1
|
|
397
|
+
// is schema-only — the adapter (PR-2) and CLI (PR-3) consume this in
|
|
398
|
+
// later PRs.
|
|
399
|
+
triagePolicy: SourceTriagePolicySchema.optional(),
|
|
366
400
|
})
|
|
367
401
|
.superRefine((value, ctx) => {
|
|
368
402
|
if (value.kind !== "npm-registry" && !isValidHttpUrl(value.url)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/schemas/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/schemas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|
145
145
|
`watch run` は cron / GitHub Actions / Claude Routines から呼ぶことを想定しています。`research` / `review` / `update` / `dismiss` は人間の判断が伴うため、interactive session 経由を推奨します。
|
|
146
146
|
|
|
147
|
+
### scheduled triage workflow 例 (ADR-0018 §W5)
|
|
148
|
+
|
|
149
|
+
`triagePolicy:` を持つ source を登録済みの場合、scheduled GHA cron で `watch → triage → research → review` を**無人実行**できます。雛形は `radar workflow generate combined-with-triage` で生成:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
radar workflow generate combined-with-triage \
|
|
153
|
+
--watch-cron "0 6 * * *" \
|
|
154
|
+
--triage-agent gemini-cli \
|
|
155
|
+
--research-agent claude-code \
|
|
156
|
+
--review-agent codex-cli \
|
|
157
|
+
--max-items 10
|
|
158
|
+
# → .github/workflows/feedradar-daily.yaml
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
生成される workflow が 1 cron tick で走らせる 5 ステップ:
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
1. radar watch run # 新着 → detected
|
|
165
|
+
2. radar triage --apply --triage-agent gemini-cli # detected → triaged_research / triaged_digest / triaged_unsure / dismissed
|
|
166
|
+
3. radar research --batch --status triaged_research \
|
|
167
|
+
--max-items 10 --agent claude-code # triaged_research → researched (1 item 1 report)
|
|
168
|
+
4. radar research --digest <ids per triage.group> \
|
|
169
|
+
--agent claude-code # triaged_digest → researched (group ごとに 1 report 集約)
|
|
170
|
+
5. radar review --batch --status researched --agent codex-cli # researched → reviewed (cross-agent)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
末尾には `triaged_unsure` キュー深度を Slack 通知する `if: always()` step と、`peter-evans/create-pull-request@v6` で `items/ state/ research/` を 1 PR にまとめる step が付く。**triage の cost は research に比べて 1-2 桁安い** (cheap-model channel、`gemini-2.5-flash-lite` 想定で月数千 item でも \$0.10 未満) ため、cost gating の主防御は引き続き `--max-items` (ADR-0014 D3a)。
|
|
174
|
+
|
|
175
|
+
詳細・secrets setup・policy 書き方・cost 試算・troubleshooting は `radar` リポジトリの [`docs/user-guide.md` §triage workflow](https://github.com/ozzy-labs/feedradar/blob/main/docs/user-guide.md#triage-workflow) を参照。
|
|
176
|
+
|
|
147
177
|
## エージェント選択ガイド (cross-agent review)
|
|
148
178
|
|
|
149
179
|
[ADR-0001](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0001-agent-adapter-interface.md) に基づき、`research` と `review` は **別の agent** で実行することを推奨します:
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Generated by `radar workflow generate combined-with-triage` (ADR-0018 §W5).
|
|
2
|
+
# Chains watch run -> LLM triage -> capped research --batch -> per-group
|
|
3
|
+
# research --digest -> review --batch in one GitHub Actions job. The triage
|
|
4
|
+
# layer slashes detection volume to research-worthy items only, so the
|
|
5
|
+
# LoC-heavy research/review steps see ~5-15% of the raw detected count
|
|
6
|
+
# instead of the full firehose. Template placeholders / hard-cap rationale
|
|
7
|
+
# are documented in `src/cli/workflow/generate-combined-with-triage.ts`.
|
|
8
|
+
|
|
9
|
+
name: feedradar-daily
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: "{{watchCron}}"
|
|
14
|
+
workflow_dispatch: {}
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
pull-requests: write
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
# Distinct from feedradar-watch / feedradar-combined so this can co-exist
|
|
22
|
+
# with the simpler workflows on the same branch without serializing.
|
|
23
|
+
group: feedradar-daily-${{ github.ref }}
|
|
24
|
+
cancel-in-progress: false
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
daily:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
timeout-minutes: 45
|
|
30
|
+
env:
|
|
31
|
+
{{envBlock}}
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout workspace
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
persist-credentials: true
|
|
38
|
+
|
|
39
|
+
- name: Set up Node.js
|
|
40
|
+
uses: actions/setup-node@v4
|
|
41
|
+
with:
|
|
42
|
+
node-version: "22.21"
|
|
43
|
+
|
|
44
|
+
- name: Install FeedRadar
|
|
45
|
+
run: npm install -g @ozzylabs/feedradar
|
|
46
|
+
|
|
47
|
+
- name: Run watch (detect new items)
|
|
48
|
+
run: radar watch run
|
|
49
|
+
|
|
50
|
+
- name: Triage detected items (agent={{triageAgent}})
|
|
51
|
+
# ADR-0018 §W3: per-source `triagePolicy:` drives the cheap-model
|
|
52
|
+
# classification. Items without a policy are skipped and remain in
|
|
53
|
+
# `detected` so the existing untriaged-feeds workflow still picks
|
|
54
|
+
# them up.
|
|
55
|
+
run: radar triage --apply --triage-agent {{triageAgent}}
|
|
56
|
+
|
|
57
|
+
- name: Research triaged_research items (capped at {{maxItems}}, agent={{researchAgent}})
|
|
58
|
+
# `--batch --status triaged_research` consumes only items the triage
|
|
59
|
+
# step promoted, leaving `triaged_digest` for the digest step and
|
|
60
|
+
# `triaged_unsure` for the human-review queue. The hard cap protects
|
|
61
|
+
# against a triage misfire that promotes everything.
|
|
62
|
+
run: radar research --batch --status triaged_research --max-items {{maxItems}} --agent {{researchAgent}}
|
|
63
|
+
|
|
64
|
+
- name: Research digest groups (one report per triage.group)
|
|
65
|
+
# `radar items list --triage-group <g>` returns every item the triage
|
|
66
|
+
# adapter tagged with the same group hint, which `radar research
|
|
67
|
+
# --digest` then collapses into a single combined report. We walk
|
|
68
|
+
# the unique groups one at a time so each digest stays self-contained.
|
|
69
|
+
# `sort -u` dedupes since `items list --field` emits one row per
|
|
70
|
+
# matching item.
|
|
71
|
+
run: |
|
|
72
|
+
set -euo pipefail
|
|
73
|
+
GROUPS=$(radar items list --status triaged_digest --field triage.group | sort -u | grep -v '^-$' || true)
|
|
74
|
+
if [ -z "$GROUPS" ]; then
|
|
75
|
+
echo "no triaged_digest groups to process"
|
|
76
|
+
exit 0
|
|
77
|
+
fi
|
|
78
|
+
while IFS= read -r GROUP; do
|
|
79
|
+
[ -z "$GROUP" ] && continue
|
|
80
|
+
echo "::group::digest for triage.group=$GROUP"
|
|
81
|
+
IDS=$(radar items list --triage-group "$GROUP" --status triaged_digest --field id | tr '\n' ' ')
|
|
82
|
+
# shellcheck disable=SC2086
|
|
83
|
+
radar research --digest $IDS --agent {{researchAgent}}
|
|
84
|
+
echo "::endgroup::"
|
|
85
|
+
done <<< "$GROUPS"
|
|
86
|
+
|
|
87
|
+
- name: Review researched items (agent={{reviewAgent}})
|
|
88
|
+
# Cross-agent review (ADR-0001): the review step intentionally uses
|
|
89
|
+
# a different agent than the research step so the reviewer does not
|
|
90
|
+
# inherit the same model's blind spots.
|
|
91
|
+
run: radar review --batch --status researched --agent {{reviewAgent}}
|
|
92
|
+
|
|
93
|
+
- name: Notify unsure queue
|
|
94
|
+
# `if: always()` so a triage spike still alerts even when a
|
|
95
|
+
# downstream research step failed. The Slack notification is
|
|
96
|
+
# opt-in via `--slack-webhook secrets.<NAME>`; an empty webhook
|
|
97
|
+
# collapses the curl branch into a no-op so the step still succeeds
|
|
98
|
+
# without leaking the alert.
|
|
99
|
+
if: always()
|
|
100
|
+
env:
|
|
101
|
+
SLACK_WEBHOOK_URL: {{slackWebhookExpr}}
|
|
102
|
+
run: |
|
|
103
|
+
set -euo pipefail
|
|
104
|
+
UNSURE=$(radar items list --status triaged_unsure --json | jq length)
|
|
105
|
+
echo "triaged_unsure queue depth: $UNSURE"
|
|
106
|
+
if [ "$UNSURE" -gt 0 ] && [ -n "${SLACK_WEBHOOK_URL:-}" ]; then
|
|
107
|
+
curl -X POST "$SLACK_WEBHOOK_URL" \
|
|
108
|
+
-H 'Content-Type: application/json' \
|
|
109
|
+
-d "{\"text\":\"feedradar: $UNSURE items need human triage review\"}"
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
- name: Create PR with research output
|
|
113
|
+
# `peter-evans/create-pull-request@v6` stages items/ state/ research/
|
|
114
|
+
# into a single PR per cron tick. Human reviews the PR before
|
|
115
|
+
# research/ lands on main, giving an explicit gate on auto-generated
|
|
116
|
+
# content (ADR-0014 §X5 / ADR-0018 §W5).
|
|
117
|
+
uses: peter-evans/create-pull-request@v6
|
|
118
|
+
with:
|
|
119
|
+
commit-message: "chore(feedradar): daily watch + triage + research"
|
|
120
|
+
# peter-evans/create-pull-request does not run shell on these
|
|
121
|
+
# fields, so `$(date ...)` would land literally in the PR title.
|
|
122
|
+
# Use the `github.run_id` expression to keep titles unique per run.
|
|
123
|
+
title: "feedradar: daily triage + research (run ${{ github.run_id }})"
|
|
124
|
+
body: |
|
|
125
|
+
Automated feedradar pipeline output. Review the research/ Markdown
|
|
126
|
+
before merging — generated content is untrusted (ADR-0009).
|
|
127
|
+
branch: feedradar/daily
|
|
128
|
+
base: ${{ github.ref_name }}
|
|
129
|
+
delete-branch: true
|
|
130
|
+
add-paths: |
|
|
131
|
+
items/
|
|
132
|
+
state/
|
|
133
|
+
research/
|
package/package.json
CHANGED