Skip to content

Commit eac41ed

Browse files
committed
Update investigation with resolved decisions and repo location analysis
Record decisions: CLI users (Claude Agent SDK), both standalone/in-template generation, openms-insight as default visualization, flexible TOPP binaries. Add detailed pros/cons analysis for repo location (inside template vs separate). https://claude.ai/code/session_011dutf865eEBg2bXnbBa7N9
1 parent 846b849 commit eac41ed

File tree

1 file changed

+52
-12
lines changed

1 file changed

+52
-12
lines changed

docs/webapp-agent-investigation.md

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -534,26 +534,66 @@ Agent: Your app is ready! It includes:
534534

535535
---
536536

537-
## 8. Open Questions & Risks
537+
## 8. Resolved Decisions
538538

539-
### Open Questions
539+
| Question | Decision | Implication |
540+
|----------|----------|-------------|
541+
| **Target users** | CLI-comfortable developers/bioinformaticians | Use **Approach A: Claude Agent SDK** directly — no web UI needed for the builder itself |
542+
| **Scope of generation** | Both standalone apps and pages within existing template | Agent needs two modes: scaffold-from-template and add-page-to-existing |
543+
| **TOPP tool availability** | Flexible — compile from source or provide precompiled binaries | Include TOPP binaries in the agent's environment (Docker image or local install) |
544+
| **Visualization default** | openms-insight first, pyopenms-viz as fallback | Agent defaults to openms-insight components; only falls back to pyopenms-viz for plot types openms-insight doesn't cover (chromatogram, mobilogram, peakmap 3D) |
540545

541-
1. **Target users**: Are the end users bioinformaticians comfortable with CLI, or do they need a fully web-based experience? This determines whether Approach A (SDK) or Approach C (hybrid) is better.
546+
---
547+
548+
## 9. Open Question: Repository Location
549+
550+
### Option A: Inside this `streamlit-template` repo
551+
552+
**For:**
553+
- Agent lives next to the code it generates — zero-friction access to template patterns, example workflows, and framework source
554+
- Skill files (`.claude/skills/`) are repo-scoped by design, so they naturally belong here
555+
- Contributors to the template can also contribute to the agent
556+
- Single CI/CD pipeline; agent tests can verify generated code against the real template
557+
- The template IS the agent's primary knowledge source — co-location keeps them in sync
558+
559+
**Against:**
560+
- Bloats the template repo with agent infrastructure (`agent/`, MCP tools, system prompts, test fixtures)
561+
- Template users who just want to build webapps manually must carry agent code they don't use
562+
- Different release cadences — agent may iterate faster than the template framework
563+
- Muddies the repo's purpose: is it a template or an agent?
564+
565+
### Option B: Separate repo (e.g., `OpenMS/openms-webapp-agent`)
566+
567+
**For:**
568+
- Clean separation of concerns — template is the "library", agent is the "consumer"
569+
- Independent versioning and release cycles
570+
- Agent repo can pin a specific template version, avoiding breakage from template changes
571+
- Easier to add other agent capabilities later (e.g., generating non-Streamlit apps, batch processing scripts)
572+
- Lighter template repo stays focused on its core purpose
542573

543-
2. **Deployment model**: Will generated apps run locally, in Docker, or on a shared server? This affects the preview/testing strategy.
574+
**Against:**
575+
- Cross-repo synchronization burden — template pattern changes must be manually propagated to agent skill files
576+
- Skill files can't be repo-scoped (would need to be copied or symlinked)
577+
- Two repos to clone, two CI pipelines to maintain
578+
- The agent needs the template source code at generation time anyway — so it will either clone it or vendor it, adding complexity
544579

545-
3. **TOPP tool availability**: The agent needs access to TOPP tool binaries to generate `.ini` files and test workflows. This requires the full Docker image (`Dockerfile`, not `Dockerfile_simple`).
580+
### Recommendation
581+
582+
**Start inside this repo** (as `agent/` + `.claude/skills/`), with the expectation of extracting to a separate repo if/when the agent grows beyond simple code generation. The skill files *must* live here regardless (they're repo-scoped Claude Code config), so starting co-located avoids premature indirection.
583+
584+
---
546585

547-
4. **Scope of generation**: Should the agent generate:
548-
- (a) Complete standalone apps from scratch?
549-
- (b) New workflows/pages within the existing template?
550-
- (c) Both, depending on complexity?
586+
## 10. Remaining Open Questions
551587

552-
5. **Model selection**: Claude Opus for planning/reviewing, Claude Sonnet for code generation (faster, cheaper), Claude Haiku for simple validation tasks?
588+
1. **Model selection**: Claude Opus for planning/reviewing, Claude Sonnet for code generation (faster, cheaper), Claude Haiku for simple validation tasks? Or single model throughout?
553589

554-
6. **Visualization library choice**: When should generated apps use pyopenms-viz (simple, single-line plots) vs openms-insight (interactive dashboards with linked components, large dataset support)? The agent needs clear heuristics — e.g., use openms-insight when the app needs cross-component selection, server-side pagination, or million-point heatmaps.
590+
2. **pyopenms-viz fallback scope**: openms-insight doesn't cover chromatogram, mobilogram, or 3D peakmap plot types. Should the agent use pyopenms-viz for these, or should we request these as openms-insight features?
591+
592+
3. **Existing app migration**: Should the agent be able to refactor existing OpenMS webapps (e.g., adding openms-insight components to an app currently using raw Plotly)?
593+
594+
---
555595

556-
### Risks
596+
## 11. Risks
557597

558598
| Risk | Mitigation |
559599
|------|------------|

0 commit comments

Comments
 (0)