Skip to content

Open-source skills for designing and reviewing software with AI agents

fix(review): save GoldfishContext URLs as files (#289)

Aryan Atre113a3afc44e8
diff --git a/distributions/claude/skills/egm-review-loop/SKILL.md b/distributions/claude/skills/egm-review-loop/SKILL.md
index e7b710a..7ee4205 100644
--- a/distributions/claude/skills/egm-review-loop/SKILL.md
+++ b/distributions/claude/skills/egm-review-loop/SKILL.md
@@ -55,7 +55,12 @@ The caller or user provides exactly these parameters:
paths).
* **`GoldfishContext`**: A reading list (source files, directories, or
documentation URLs) fed to reviewers to establish their baseline. An empty
- list from the caller counts as provided; do not ask for it again.
+ list from the caller counts as provided; do not ask for it again. Some
+ reviewers cannot open URLs, so before the first round save the raw page of
+ each URL as a new file in the working directory (or your harness's artifact
+ directory) and pass its absolute path instead. If a page cannot be saved,
+ ask the user for a local copy and end your turn; if no one can answer,
+ as in a headless run, leave it out, tell the user, and keep going.
## Path & Standard Resolution Logic
diff --git a/distributions/claude/skills/egm-review/SKILL.md b/distributions/claude/skills/egm-review/SKILL.md
index 2116de0..69fc5dc 100644
--- a/distributions/claude/skills/egm-review/SKILL.md
+++ b/distributions/claude/skills/egm-review/SKILL.md
@@ -110,8 +110,11 @@ If your harness has no subagent tool, stop and tell the user: a review in the sa
regular text, ask which to include, and end your turn; if no one can
answer, as in a headless run, leave them all out and keep going. Add only
approved ones and tell the user which were left out. Some reviewers cannot
- open URLs, so save each approved page as a file in the working directory
- (or your harness's artifact directory) and pass its path. Pass
+ open URLs, so save the raw page of each URL in `GoldfishContext` as a new
+ file in the working directory (or your harness's artifact directory) and
+ pass its absolute path instead. If a page cannot be saved, ask the user for
+ a local copy and end your turn; if no one can answer, as in a headless run,
+ leave it out, tell the user, and keep going. Pass
`GoldfishContext` to every stage except Stage 6, which reads the document
alone; tell any synthesizer to give these files to each reviewer.
diff --git a/skills/egm-review-loop/SKILL.md b/skills/egm-review-loop/SKILL.md
index e7b710a..7ee4205 100644
--- a/skills/egm-review-loop/SKILL.md
+++ b/skills/egm-review-loop/SKILL.md
@@ -55,7 +55,12 @@ The caller or user provides exactly these parameters:
paths).
* **`GoldfishContext`**: A reading list (source files, directories, or
documentation URLs) fed to reviewers to establish their baseline. An empty
- list from the caller counts as provided; do not ask for it again.
+ list from the caller counts as provided; do not ask for it again. Some
+ reviewers cannot open URLs, so before the first round save the raw page of
+ each URL as a new file in the working directory (or your harness's artifact
+ directory) and pass its absolute path instead. If a page cannot be saved,
+ ask the user for a local copy and end your turn; if no one can answer,
+ as in a headless run, leave it out, tell the user, and keep going.
## Path & Standard Resolution Logic
diff --git a/skills/egm-review-loop/TEST.md b/skills/egm-review-loop/TEST.md
index 5732305..6a8b50f 100644
--- a/skills/egm-review-loop/TEST.md
+++ b/skills/egm-review-loop/TEST.md
@@ -6,7 +6,7 @@ Frontmatter and link checks run in `pytest tests/unit` (see [TESTING.md](../../T
When evaluating or exploring `egm-review-loop` interactively in chat, verify:
-- **Step 1 (Intake & Config):** Validates required inputs and resolves standard paths.
+- **Step 1 (Intake & Config):** Validates required inputs, resolves standard paths, and saves each URL in `GoldfishContext` as a file before the first round, asking for a local copy of any page that cannot be saved.
- **Step 2.1 (Target Resolution):** Unconditionally re-scans line numbers before auditing.
- **Step 2.2 (Review Swarm):** Spawns subagents (or sequentially iterates personas in degraded mode) across requested standards.
- **Step 2.3 & 2.4 (Resolve Handoff & Turn Boundary):** Hands findings to `egm-resolve` and respects human decision gates.
diff --git a/skills/egm-review-loop/test_scenarios.yaml b/skills/egm-review-loop/test_scenarios.yaml
index 56a441a..bba063a 100644
--- a/skills/egm-review-loop/test_scenarios.yaml
+++ b/skills/egm-review-loop/test_scenarios.yaml
@@ -51,3 +51,33 @@ scenarios:
- type: "required_pattern"
pattern: "(?i)not run"
message: "A requested reviewer with no status must count as not run, so the round is not clean."
+
+ - scenario_id: "goldfish_context_urls_saved_as_files"
+ description: "Verifies that a URL in GoldfishContext is saved as a file before the first round, because some reviewers cannot open URLs."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-review-loop/SKILL.md"
+ turns:
+ - user_input: "Run the review loop on docs/design.md, full file, with reviewers design_critic and structural, both on feature-spec-standard, and GoldfishContext [src/cache.py, https://redis.io/docs/latest/develop/use/keyspace/]. I confirm this configuration; start round 1."
+ assertions:
+ - type: "required_pattern"
+ pattern: "(?i)(\\b(sav(e|es|ed|ing)|download\\w*|fetch\\w*|stor(e|es|ed|ing)|writ(e|es|ing|ten)|wrote)\\b[^\\n]{0,80}\\b(pages?|urls?|links?)\\b|\\b(pages?|urls?|links?)\\b[^\\n]{0,80}\\b(sav(e|es|ed|ing)|download\\w*|fetch\\w*|stor(e|es|ed|ing)|writ(e|es|ing|ten)|wrote)\\b|(redis|keyspace)[\\w-]*\\.(md|html?|txt)\\b)"
+ message: "The reply must say the URL's page is saved as a file."
+ - type: "forbidden_pattern"
+ pattern: "(?i)\\b(won't|will not|don't|do not|no need to|not going to|skip\\w*)\\s+(\\w+\\s+){0,2}(sav|download|fetch)\\w*"
+ message: "The reply must not skip saving the page."
+ - type: "forbidden_pattern"
+ pattern: "(?i)(?<!not )(?<!n't )(?<!never )(?<!of )\\b(pass\\w*|send\\w*|giv\\w*|hand\\w*)\\b[^\\n]{0,60}\\b(urls?|links?)\\b[^\\n]{0,40}\\b(directly|as-is|as is|straight|unchanged)\\b"
+ message: "The reply must not pass the URL to reviewers as is."
+
+ - scenario_id: "goldfish_context_unsaved_url_asks_for_local_copy"
+ description: "Verifies that the loop asks for a local copy when a GoldfishContext page cannot be saved."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-review-loop/SKILL.md"
+ turns:
+ - user_input: "Run the review loop on docs/design.md, full file, with reviewers design_critic and structural, both on feature-spec-standard, and GoldfishContext [src/cache.py, https://redis.io/docs/latest/develop/use/keyspace/]. Network access is off in this session, so that page cannot be fetched. I confirm this configuration; start round 1."
+ assertions:
+ - type: "required_pattern"
+ pattern: "(?i)\\b(local\\s+(copy|file|version)|copy|path)\\b[^\\n]{0,60}\\?"
+ message: "The loop must ask the user for a local copy of the page it cannot save."
diff --git a/skills/egm-review/SKILL.md b/skills/egm-review/SKILL.md
index 2116de0..69fc5dc 100644
--- a/skills/egm-review/SKILL.md
+++ b/skills/egm-review/SKILL.md
@@ -110,8 +110,11 @@ If your harness has no subagent tool, stop and tell the user: a review in the sa
regular text, ask which to include, and end your turn; if no one can
answer, as in a headless run, leave them all out and keep going. Add only
approved ones and tell the user which were left out. Some reviewers cannot
- open URLs, so save each approved page as a file in the working directory
- (or your harness's artifact directory) and pass its path. Pass
+ open URLs, so save the raw page of each URL in `GoldfishContext` as a new
+ file in the working directory (or your harness's artifact directory) and
+ pass its absolute path instead. If a page cannot be saved, ask the user for
+ a local copy and end your turn; if no one can answer, as in a headless run,
+ leave it out, tell the user, and keep going. Pass
`GoldfishContext` to every stage except Stage 6, which reads the document
alone; tell any synthesizer to give these files to each reviewer.
diff --git a/skills/egm-review/TEST.md b/skills/egm-review/TEST.md
index 99075be..f6085f6 100644
--- a/skills/egm-review/TEST.md
+++ b/skills/egm-review/TEST.md
@@ -8,8 +8,8 @@ When evaluating or exploring `egm-review` interactively in chat, verify:
- **Step 1 (Intake):** Gathers `TargetFile` and optional `GoldfishContext`.
Before the first stage that takes `GoldfishContext`, adds linked files
- inside the working directory and asks before adding links that resolve
- outside it or URLs.
+ inside the working directory, asks before adding links that resolve
+ outside it or URLs, and saves each URL in `GoldfishContext` as a file.
- **Step 2 (Preset Selection):** Offers the four review presets (interactive,
consolidated, feature spec only, implementation plan only), or maps an
explicit `Step` argument to its corresponding preset or individual stage subflow.
diff --git a/skills/egm-review/test_scenarios.yaml b/skills/egm-review/test_scenarios.yaml
index b3c06ac..42d6f76 100644
--- a/skills/egm-review/test_scenarios.yaml
+++ b/skills/egm-review/test_scenarios.yaml
@@ -152,3 +152,21 @@ scenarios:
- type: "required_pattern"
pattern: "(?i)((omitted|exclud\\w*|skipped|left out|not (be )?(includ|add|pass)\\w*)[^\\n]{0,80}(/etc/hosts|other-repo|example\\.com|links?\\b|them\\b)|(/etc/hosts|other-repo|example\\.com|links?\\b|those\\b|them\\b)[^\\n]{0,80}(omitted|exclud|skipped|left out|not (be )?(includ|add|pass))|leav\\w* (them|those|these|all)\\b[^\\n]{0,30}\\bout\\b|none of (those|these|the)\\b[^\\n]{0,60}(includ|add|pass))"
message: "Review must confirm the declined links are left out of the reviewers' context."
+
+ - scenario_id: "goldfish_context_urls_saved_as_files"
+ description: "Verifies that a URL the user gives in GoldfishContext is saved as a file before the first stage, because some reviewers cannot open URLs."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-review/SKILL.md"
+ turns:
+ - user_input: "Run EGM Review on docs/design.md with Step: 5 and GoldfishContext [https://redis.io/docs/latest/develop/use/keyspace/]. The doc cites no other sources."
+ assertions:
+ - type: "required_pattern"
+ pattern: "(?i)(\\b(sav(e|es|ed|ing)|download\\w*|fetch\\w*|stor(e|es|ed|ing)|writ(e|es|ing|ten)|wrote)\\b[^\\n]{0,80}\\b(pages?|urls?|links?)\\b|\\b(pages?|urls?|links?)\\b[^\\n]{0,80}\\b(sav(e|es|ed|ing)|download\\w*|fetch\\w*|stor(e|es|ed|ing)|writ(e|es|ing|ten)|wrote)\\b|(redis|keyspace)[\\w-]*\\.(md|html?|txt)\\b)"
+ message: "The reply must say the URL's page is saved as a file."
+ - type: "forbidden_pattern"
+ pattern: "(?i)\\b(won't|will not|don't|do not|no need to|not going to|skip\\w*)\\s+(\\w+\\s+){0,2}(sav|download|fetch)\\w*"
+ message: "The reply must not skip saving the page."
+ - type: "forbidden_pattern"
+ pattern: "(?i)(?<!not )(?<!n't )(?<!never )(?<!of )\\b(pass\\w*|send\\w*|giv\\w*|hand\\w*)\\b[^\\n]{0,60}\\b(urls?|links?)\\b[^\\n]{0,40}\\b(directly|as-is|as is|straight|unchanged)\\b"
+ message: "The reply must not pass the URL to reviewers as is."