Skip to content

Asta Flows: research workflows in three modes, tracked in a workspace - #323

Open
charliemcgrady wants to merge 1 commit into
charliem/stack/06-skill-placeholdersfrom
charliem/stack/07-run-workflow
Open

charliemcgrady wants to merge 1 commit into
charliem/stack/06-skill-placeholdersfrom
charliem/stack/07-run-workflow

Conversation

@charliemcgrady

Copy link
Copy Markdown
Contributor

Part 07 of 9 in a stack (00 to 08); review it against the PR below it.

run-workflow lists five workflows, with Gap-Driven Theory Testing the default and AutoDS running its tests.
It first asks whether to run with the libraries, the CLI or hosted, and never looks for keys itself.
Each workflow is a folder with its plan and report template, and the tool skills hold the how-to.
Every run is tracked in a workspace, where the report names each theory, test and experiment it rests on so the site links them.
After each workflow the agent checks the report's claims, renders the site, hands over its URL, and asks for feedback.

Testing

  • make check-skills and make test-plugins pass, including the theorizer-site-data tests.
  • theorizer-site-data rebuilds a real hosted Theorizer run's theories, papers and findings from its saved results.
  • Three full runs followed it: theory generation (CLI), gap-driven (library) and data-driven (hosted).
  • skill-runs: the mode-unset edge case passed on this text.

🤖 Generated with Claude Code

https://claude.ai/code/session_018g2sXoMhotXTAexAjPxh98

@gas2own

gas2own commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Automated review status

  • codex review of 95acc35 (job gas2own-23c8d9dfcc81) — findings posted; follow-up on executor dispatch-abb1eb2837fe4ae0 done
  • claude review of 6ebf1f3 (job gas2own-9a932b24a805) — findings posted; follow-up on executor dispatch-b3bc22aa495a4474 done

Now: automated cycle open — it closes once two different reviewer backends have posted a whole-PR review of the same head (6ebf1f3).

@gas2own

gas2own commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

🤖 Independent AI code review (Codex)

Automated review of the PR by a separately invoked Codex reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

None.

P1 (should fix)

  • workflows/gap-driven-theory-testing/templates/page.qmd:25,37: The page retains literal <gap ID> placeholders, so its theory and test shortcodes cannot load a run’s results. Generate a section for each actual gap and test directory before rendering.
  • workflows/gap-driven-theory-testing/README.md:123: The hosted AutoDS intent does not guarantee one experiment per committed prediction or preserve its design. Verify each executed test against its card and decision rule; mark unmatched predictions undecided and added experiments exploratory.
  • workflows/theory-generation/scripts/theorizer-site-data:390: Papers are deduplicated by normalized title alone. Different studies with the same title can disappear from the site and bibliography. Match on a stable identifier, or require corroborating author and year metadata.
  • workflows/theory-generation/scripts/theorizer-site-data:418: add_bib never updates an existing entry. Rerunning with checked --metadata leaves earlier, potentially incorrect citations in references.bib. Replace entries owned by this run when their metadata changes.

P2 (nits)

None.

Recommendation: request-changes

run-workflow lists five workflows and asks first whether to run them with
the libraries, the CLI or hosted. Each workflow is a folder with its plan
and report template; the tool skills hold the how-to. Every run is tracked
in a workspace, and after each one the agent checks the report's claims
and asks for feedback.
@charliemcgrady
charliemcgrady force-pushed the charliem/stack/07-run-workflow branch from 95acc35 to 6ebf1f3 Compare November 16, 2026 20:22
@charliemcgrady

Copy link
Copy Markdown
Contributor Author

@gas2own please run the independent AI code review (s2-ai-review) again on this PR's latest commit; the findings from the last round have been addressed across the stack.

@gas2own

gas2own commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Started async job gas2own-9a932b24a805 (6/10 slots in use). I’ll post its result here when it finishes.

@gas2own

gas2own commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

@charliemcgrady I've started a new independent review of the latest commit, 6ebf1f3. It's running as job gas2own-9a932b24a805, and the findings will be posted to this PR as their own comment. The last round used Codex, so this one uses Claude for a second opinion. The reviewer only sees the diff and isn't told about the earlier findings. If it comes back clean, that won't confirm those findings were fixed — check them against the current diff yourself.

ran via Claude (claude-opus-5-5, xhigh)

↪ Superseded by the later reply

@gas2own

gas2own commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

🤖 Independent AI code review (Claude)

Automated review of the PR by a separately invoked Claude reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

  • --gap labels theories but does not filter them.

    • Where: workflows/theory-generation/scripts/theorizer-site-data:~466 (the if gap: block), together with gap-driven-theory-testing/README.md:120 (step 5) and templates/page.qmd:25.
    • Problem: all gaps' theories are generated into one Theorizer project. Each --gap Gn run therefore writes every theory in the store into theorizer-Gn.json and tags them all "gap": "Gn". Every gap's section on the page then shows every theory, each labelled with the wrong gap.
    • Fix: filter theories by gap before tagging. Either match the gap ID in theory_query or the theory name (step 5 already requires the ID in the name), or record theory IDs per generation and pass --theories <ids>. Add a test that two gaps produce disjoint theory sets.
  • Gap-driven page reads a papers file that nothing writes.

    • Where: gap-driven-theory-testing/templates/page.qmd:45.
    • Problem: the page reads 01-plan-and-papers/data/papers.json. theorizer-site-data writes papers beside its output (05-theories/data/papers-<gap>.json), and no step writes the 01-… path. The Papers section renders empty or errors.
    • Fix: either run theorizer-site-data after step 1 into 01-plan-and-papers/data/theorizer.json, or point the shortcode at the file the script actually produces.
  • Secondary reproduction never plans a schema.

    • Where: secondary-reproduction/README.md:44.
    • Problem: step 5 runs "Theory generation's steps 3 to 6", which skips step 1 (plan). Step 2 here runs theme searches without any plan. The result is no extraction schema, and the verdicts mission never reaches the plan or schema; the old file re-ran plan with the mission for this reason.
    • Fix: say "steps 1 and 3 to 6": plan with the verdicts mission, skip step 2's search because the theme searches replace it, then extract and generate.

P1 (should fix)

  • allowed-tools pre-approves arbitrary execution and exfiltration.

    • Where: SKILL.md:4.
    • Problem: the list includes Bash(python3 *), Bash(curl *), Bash(cat *), Bash(git *), Bash(make *), Write and Edit. That pre-approves arbitrary code execution, network exfiltration and reading any file, including the key files the skill says not to go looking for.
    • Compounding risk: review/README.md:13-17 downloads remote skill files and tells the agent to "follow its phases … as written". That is untrusted instructions run with these permissions. The SHA pin reduces this but does not remove it.
    • Fix: narrow the list to the specific scripts (for example Bash(python3 */theorizer-site-data *)) and specific hosts. Drop cat * and curl *, or require a prompt for them. Treat the fetched pipeline as reference material, not as trusted instructions.
  • AutoDiscovery exploration lost its data-protection safeguards.

    • Where: autodiscovery-exploration/README.md (whole file) and the deleted templates/gitignore and scripts/runlog.py.
    • What was removed: the row-level-data guard (ROW_LEVEL), the data/ and raw-results gitignore, and the "restricted data never enters git" rule.
    • What replaced it: references to an autodiscovery skill that is not in this diff.
    • Fix: confirm those safeguards exist in the autodiscovery skill or workspace scaffold, or restore the gitignore and the row-level check.
  • Hosted merge patches are applied in mtime order.

    • Where: theorizer-site-data:~151 (hosted_stores).
    • Problem: cp, git checkout or unzip can reorder modification times. RFC 7396 patches applied out of order silently drop or overwrite store data.
    • Fix: order by a sequence the task results carry (task creation time or step index), or by a numbered filename prefix. Do not use mtime. The same applies to searches/*.json at ~205.
  • Local papers get s2- BibTeX keys.

    • Where: theorizer-site-data:~385 (add_bib).
    • Problem: key = f"s2-{corpusId or p['key']}" gives non-S2 papers keys like s2-hist:a. This contradicts the local-<name> convention in review/README.md:47-66, and the : in the key can break citeproc and the regex at ~383.
    • Fix: use local-<slug(key)> when corpusId is None, and test that case.
  • data-driven-theory-generation/README.md:12 raised the default to 100 AutoDS experiments.

    • Problem: the default was 10, and nothing in the plan states the cost.
    • Fix: state the cost or credits in the plan, or keep a smaller default.

P2 (nits)

  • theorizer-site-data:~345 (same_work): papers with identical generic titles ("Editorial", "Introduction") and no authors collapse into one card. Fall back to p["key"] when there is no surname.
  • theorizer-site-data:~330: a theory's papers can name keys that dedup later dropped from kept. Map them to the primary paper's key.
  • theorizer-site-data:~420: --gap, --metadata and --bib accept the next flag as their value. Reject values that start with --.
  • theorizer-site-data:~446: -h prints help to stderr. Send help to stdout.
  • gap-driven-theory-testing/templates/page.qmd: asta-files/asta-doc use .asta/… while asta-theories/asta-literature use ../.asta/…. One convention is likely wrong; make them consistent.
  • review/README.md:15: in the for f in $(curl …) loop, a manifest fetch failure is silent. Add set -euo pipefail, read the list with while read, and check that the list is non-empty.
  • tests/test_computational_review_workflow.py:19: iterdir() == ["README.md"] fails on a stray .DS_Store. Filter dotfiles.
  • tests/test_theorizer_site_data.py:~150: the comment ("hist:b now has hist:a's old title…") doesn't describe what the assertions check. Reword it.
  • SKILL.md:25 says "Don't link files", but review/README.md:44 lists the run's files with asta-files. Reconcile the two.
  • Setup pins (--python 3.13, pymupdf4llm<2, theorize doctor) were removed from this plugin. Confirm they now live in generate-theories.

Recommendation: request-changes

@gas2own

gas2own commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

The latest review recommends changes on 6ebf1f3. I confirmed incorrect gap labels, a missing papers-output instruction, and timestamp-dependent merge results. The earlier stale-BibTeX defect also remains.

I’d downgrade the reported P0s to P1 workflow issues. Several other findings are advisory or already covered elsewhere in the stack. This was review-only; no code changed or additional review launched.

ran via Codex (gpt-6.1-sol, high) · shortened — ask for the full reply

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants