You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/webapp-agent-investigation.md
+52-12Lines changed: 52 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -534,26 +534,66 @@ Agent: Your app is ready! It includes:
534
534
535
535
---
536
536
537
-
## 8. Open Questions & Risks
537
+
## 8. Resolved Decisions
538
538
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) |
540
545
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
542
573
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
544
579
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
+
---
546
585
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
551
587
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?
553
589
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)?
0 commit comments