Skip to content

feat(agent): six-step agent flow with Streamlit Flow page and group guide - #2

Merged
jsshin2022 merged 2 commits into
mainfrom
feat/sample-flow
Sep 26, 2026
Merged

jsshin2022 merged 2 commits into
mainfrom
feat/sample-flow

Conversation

@jsshin2022

Copy link
Copy Markdown
Member

Stacked on #1 — merge #1 first, then this PR retargets to main.

What's added

  • Six-step agent flow (core/agent/), mirroring the track's pipeline (collect → structure metrics → estimate → report, automated by an agent):
Step What it does Week
1. Define problem Validate plan.yaml; pre-registration gate (plan must be committed before estimation) W3
2. Collect Run the data adapter; record source, license, snapshot hash W2
3. Structure metrics Column/type checks, missing rates, pre/post and treated/control counts W3
4. Estimate run_plan (DiD / event study / ITS) + placebo test; the LLM never computes numbers W4–5
5. Guard Abstention verdict + overclaim linter on report text (e.g. no "no effect" when the CI crosses zero) W6
6. Report report.md, figures, run_manifest.json (git SHA, versions, data/plan hashes) W7
  • Runs offline with no API key (pure-Python runner) or via LangGraph (engine=langgraph). Optional LLM narrative through any OpenAI-compatible endpoint (OPENAI_BASE_URL, OPENAI_API_KEY, LLM_MODEL); its text is linted before use.
  • CLI: make flow CASE=cases/_example_night_clinic
  • Streamlit Flow page (app/pages/1_Flow.py): run or replay a flow; per-step status, quality table, estimate and verdict, guard findings, report preview. Shows a SYNTHETIC banner for synthetic cases.
  • Sample outputs committed for cases/_example_night_clinic (flow_log.json, run_manifest.json, report, figures) — synthetic data, not a real policy effect.
  • docs/ops/group-guide.md: group roles mapped to the six steps, weekly milestones, branch/PR rules.
  • CI now also runs the example flow offline and uploads the log and report as artifacts.

Fixes

  • Flow logs store paths relative to the case folder (no local machine paths in a public repo).
  • The example-case test runs in a temp copy, so tests no longer modify tracked files.

Verification

  • pytest: 36 passed; ruff check / ruff format --check: clean
  • Example flow: event study −5.03 (95% CI −6.11 to −3.96) vs. true effect −5.0 → verdict identified; overall status warn because the data is synthetic.

Remaining

  • Callaway–Sant'Anna estimator for staggered adoption (most real cases); currently flagged and withheld.
  • Adapters for data.go.kr / Seoul Open Data; KOSIS adapter still unverified against the live API.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q


Generated by Claude Code

jsshin2022 and others added 2 commits September 24, 2026 11:36
- core/agent: define_problem → collect → structure_metrics → estimate
  → guard → report, runnable offline (python) or via LangGraph
- pre-registration gate: plan.yaml must be committed before running
- guard: abstention verdicts + overclaim linter on report text
- run_manifest.json for reproducibility; log paths relative to the case
- app/pages/1_Flow.py: run or replay a flow with per-step results
- docs/ops/group-guide.md: roles, weekly milestones, branch/PR rules
- tests run the example case in a temp copy (no tracked-file churn)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q
@jsshin2022
jsshin2022 changed the base branch from setup/initial-scaffold to main September 26, 2026 07:24
@jsshin2022
jsshin2022 merged commit 5139ac6 into main Sep 26, 2026
1 check passed
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.

1 participant