Plan: Phase 1 — TMP fixes for templates with UIS services
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Completed
Completed: 2026-04-09 (PR helpers-no/dev-templates#25 merged, CI green, deployed)
Goal: Ship the TMP-side Phase 1 work from INVESTIGATE-improve-template-docs-with-services.md. Fix the bugs real-user testing surfaced in python-basic-webserver-database and postgresql-demo, plus the cross-cutting MDX generator and template hygiene issues.
Investigation: INVESTIGATE-improve-template-docs-with-services.md
Cross-team dependencies:
- DCT: shipping
PLAN-p1-dct-shim.md(items 1.8 + 1.9 in the investigation) — DCT shim +--namespace/--secret-name-prefixpass-through - UIS: shipping
PLAN-p1-uis-secret-namespace.md(item 1.10 + 1.11 coordination) —uis configure --namespace+ K8s Secret creation
Priority: High
Last Updated: 2026-04-09
Overview
Three workstreams, sequenced by external dependencies:
- Independent (start immediately): generator fixes, template hygiene files. Items 1.1–1.4 from the investigation. No external dependencies.
- Blocked on DCT shim:
postgresql-demoREADME rewrite,readme-structure.mdupdates. Items 1.6 + 1.7 from the investigation. - Blocked on DCT shim AND UIS minimum D5:
python-basic-webserver-databaseREADME rewrite, including the Verify section and the newuis configureflow. Items 1.5 + 1.12 + 1.13 from the investigation.
The plan is structured so that workstream 1 ships first as a single PR, then 2 and 3 ship as the upstream dependencies land.
Coordination items not implemented in this plan (tracked in the investigation, owned cross-team):
- 1.11 Secret name convention — TMP confirmed Option A (use
{{REPO_NAME}}placeholder), no template changes needed. UIS implements perPLAN-p1-uis-secret-namespace.md.
Phase 1: Independent TMP fixes (start immediately) — DONE
No external dependencies. Can ship as a single PR while DCT and UIS work in parallel.
Tasks
-
1.1 Update
scripts/generate-docs-markdown.shto route the install command by templatecontext✓ -
1.2 Stop the generator from emitting a duplicated "## Summary" section ✓
-
1.3 Add
.gitignoretotemplates/python-basic-webserver-database/ -
1.4 Add
.gitignoretouis-stack-templates/postgresql-demo/ -
[~] 1.5
Add— REVERTED.vscode/settings.jsontotemplates/python-basic-webserver-database/- Initial implementation shipped a
.vscode/settings.jsonwithpython-envs.alwaysUseUv: true. This was reverted because it would risk overwriting the user's existing.vscode/settings.json(orextensions.json) which contains the devcontainer recommendation needed for the project to start. - New approach: the README documents the setting as a one-line manual addition users can make to their workspace settings if they hit the VS Code "Error refreshing packages" cosmetic error. Doesn't risk overwriting anything.
- DCT follow-up: ideally DCT ships
python-envs.alwaysUseUv: trueas a global devcontainer-level setting in the base image (per the open question in B6 of the investigation). Then no template needs to ship it. Tracked as a DCT ask. - Solves: B6 (via documentation, not via template file)
- Initial implementation shipped a
-
1.6 Verify the
dev-template installcopy logic includes.vscode/and.gitignore- Finding (still relevant for future templates): Reviewed
helpers-no/devcontainer-toolbox/.devcontainer/manage/dev-template.shlines 88-131:- ✅
.gitignoreis handled explicitly (lines 107-131) — DCT merges it intelligently - ✅
.github/is handled explicitly (lines 98-105) - ✅
template-info.yamlis copied explicitly (lines 93-96) - ❌
.vscode/is NOT handled — the bulk copycp -r "$TEMPLATE_PATH/"* "$CALLER_DIR/"uses a glob*which by default does NOT match hidden directories. - ⚠️ Even if DCT fixes the hidden-directory bug, naively copying
.vscode/would overwrite the user's existing.vscode/extensions.jsonwith the devcontainer recommendation, breaking the project. DCT would need a JSON merge strategy similar to the.gitignoreline-merge.
- ✅
- DCT follow-up: if DCT wants to support
.vscode/in templates, they need both (a) include hidden directories in the bulk copy AND (b) implement JSON-merge for.vscode/*.jsonfiles (preserving existing keys). Until then, templates can't safely ship.vscode/files. - Decision for this PR: don't ship
.vscode/from any template. Document VS Code settings in the README as manual additions instead.
- Finding (still relevant for future templates): Reviewed
-
1.7 Regenerate the registry and docs locally
bash scripts/generate-registry.shbash scripts/generate-docs-markdown.sh --forcenpm run build --prefix websiteto verify no build errors- Confirm the postgresql-demo page now shows
uis template install postgresql-demoas the install command (1.1) - Confirm the duplicated
## Summaryis gone (1.2)
Validation — DONE
-
bash scripts/validate-metadata.shpasses — 5 categories, 10 templates -
bash scripts/validate-docs.shpasses — 0 errors, 4 warnings (optional headings only) -
npm run build --prefix websitesucceeds in devcontainer - postgresql-demo MDX page shows
install="uis template install postgresql-demo"(1.1 verified) - python-basic-webserver-database MDX page uses
install="dev-template python-basic-webserver-database"(existing behavior preserved) - No
## Summarysection emitted by generator (1.2 verified) - User confirms Phase 1 complete before moving to dependent phases
Phase 2: README rewrite — postgresql-demo — DONE
Blocked on: DCT 1.8 (uis shim) shipping. ✓ DCT v1.7.34 is live.
Tasks
- 2.1 Drop the misleading "From the UIS provision-host:" prefix throughout the README ✓
- 2.2 Populate
related:intemplate-info.yamlwith[python-basic-webserver-database]— auto-generated "Related Templates" section now appears ✓ - 2.3 Add a "Before you start" prerequisite section ✓
- 2.4 Update the "Verify it worked" section to use
uis connect postgresql demo_db✓ - 2.5 Regenerate docs and verify the build ✓ (validate-docs passes, npm run build SUCCESS)
Validation
bash scripts/generate-docs-markdown.sh --forceregenerates the postgresql-demo MDX pagenpm run build --prefix websitesucceeds- The rendered postgresql-demo page no longer references "From the UIS provision-host:"
- The "Related Templates" section appears, linking to python-basic-webserver-database
- User confirms phase is complete
Phase 3: README rewrite — python-basic-webserver-database — DONE
Blocked on: DCT 1.8 (uis shim) AND UIS 1.10 (minimum D5) shipping. ✓ Both live (DCT v1.7.34, UIS PR #121).
Tasks
- 3.1 Add a "What this is" section near the top with endpoints table ✓
- 3.2 Add a "Prerequisites" section (renamed from "Before you start" — uses the existing convention enforced by validate-rules.conf) ✓
- 3.3 Replace Quick Start with the canonical 7-step workflow ✓
- 3.4 Embed
template-info.yamlcontent inline ✓ - 3.5 Embed
config/init-database.sqlcontent inline ✓ - 3.6 Remove "Docker Build" and "Kubernetes Deployment" sections, replace with single "Deploy" section ✓
- 3.7 Quick Start uses
uv venv+uv pip install+python app/app.py✓ - 3.8 Verify and regenerate ✓ (validate-docs passes, npm run build SUCCESS)
Validation
bash scripts/validate-docs.shpassesbash scripts/generate-docs-markdown.sh --forcesucceedsnpm run build --prefix websitesucceeds- Spot-check the rendered python-basic-webserver-database page: every step in the canonical workflow is present, in order, with the right commands
- Real-user re-test: install the template into a scratch project, follow the README literally, confirm the original walls (uv warnings, missing dev-template step, wrong postgresql-demo prerequisite, etc.) are all fixed
- User confirms phase is complete
Phase 4: Cross-cutting docs — readme-structure.md — DONE
Tasks
- 4.1
readme-structure.mddocuments the "Prerequisites" / UIS-aware prerequisite requirements for templates withrequires✓ - 4.2
readme-structure.mddocuments the "Verify it worked" requirement (uis connect <service> <db>) ✓ - 4.3 Remove "Docker Build" and "Kubernetes Deployment" from the suggested sections list ✓
- Also removed them from
validate-rules.conf(no more spurious warnings) - Updated wording to discourage manual
docker build/kubectl applypatterns
- Also removed them from
- 4.4
readme-structure.mddocuments the requirement to embedtemplate-info.yamland init file contents inline ✓ - 4.5 (Deferred) Extend
validate-docs.shto enforce new requirements per-template — out of scope for this PR. The rules invalidate-rules.confapply globally toREADME-*.md; per-template enforcement would need template-info.yaml awareness invalidate-docs.sh. Tracked as follow-up.
Acceptance Criteria
- Generator routes install commands by
context(postgresql-demo showsuis template install) - Generator no longer emits duplicated
## Summarysections - Both templates have
.gitignorefiles preventing.env*from being committed - python-basic-webserver-database README documents the
python-envs.alwaysUseUvsetting as a manual workspace addition (not shipped as a file — see 1.5 reverted) - postgresql-demo README uses bare
uis ...commands (no "From the UIS provision-host:" prefix) - postgresql-demo README links to python-basic-webserver-database via
related: - python-basic-webserver-database README follows the canonical workflow from the investigation
- python-basic-webserver-database README has "What this is", "Prerequisites", and "Verify the database" sections
- python-basic-webserver-database README embeds
template-info.yamlandconfig/init-database.sqlcontent inline - python-basic-webserver-database README's Quick Start uses
uv(notpip) - python-basic-webserver-database README's "Docker Build" / "Kubernetes Deployment" sections are gone, replaced by a "Deploy" section using GitHub Actions + ArgoCD
-
readme-structure.mddocuments the new section requirements for templates withrequires -
validate-rules.confno longer warns on missing## Docker Build/## Kubernetes Deploymentheadings -
bash scripts/validate-metadata.shpasses -
bash scripts/validate-docs.shpasses (0 errors, 2 warnings — unrelatedplan-based-workflowREADME) -
npm run build --prefix websitepasses inside the devcontainer - CI pipeline is green after merge ✓
Files to Modify
Phase 1 (independent)
Generator:
scripts/generate-docs-markdown.sh— install command routing (1.1) + drop duplicated Summary (1.2)
Templates (new files):
templates/python-basic-webserver-database/.gitignore(1.3)templates/python-basic-webserver-database/.vscode/settings.json(1.5)uis-stack-templates/postgresql-demo/.gitignore(1.4)
Phase 2 (postgresql-demo)
uis-stack-templates/postgresql-demo/README-postgresql-demo.md(rewrite)uis-stack-templates/postgresql-demo/template-info.yaml(populaterelated:)
Phase 3 (python-basic-webserver-database)
templates/python-basic-webserver-database/README-python-basic-webserver-database.md(full rewrite around canonical workflow)
Phase 4 (cross-cutting docs)
website/docs/contributors/readme-structure.md(new section requirements)scripts/validate-docs.sh(optional — extend to enforce new requirements)scripts/validate-rules.conf(optional — add new rule entries)
Auto-regenerated by CI (don't hand-edit)
website/src/data/template-registry.jsonwebsite/docs/templates/demo/postgresql-demo.mdxwebsite/docs/templates/basic-web-server-database/python-basic-webserver-database.mdxwebsite/docs/ai-developer/plans/*/index.md
Implementation Notes
Branch strategy: each Phase becomes its own PR. Phase 1 is the "ship now" PR. Phases 2, 3, 4 ship as their dependencies land.
Phase 1 PR title: Phase 1 — Independent TMP fixes for templates with UIS services
Phase 2 PR title: Phase 2 — postgresql-demo README rewrite (after DCT shim)
Phase 3 PR title: Phase 3 — python-basic-webserver-database README rewrite (after DCT shim + UIS Secret)
Phase 4 PR title: Phase 4 — readme-structure.md updates
Test in the devcontainer, not on the host. All script runs (generate-docs-markdown.sh, validate-docs.sh, npm run build) should run inside the dev-templates devcontainer to match the CI environment.
Real-user re-test for Phase 3. After Phase 3 ships, install python-basic-webserver-database into a fresh scratch project and walk through every step of the README literally. The original user testing found 8+ issues by doing this — a re-test is the only way to confirm Phase 3 actually works.
Don't add features beyond what the investigation specifies. Phase 2 and 3 issues like "deduplicate the README intro paragraph against the Summary section" are tempting but out of scope (they're tracked as Phase 2 work in the investigation). Stay strictly within Phase 1.
Cross-references
- Investigation: INVESTIGATE-improve-template-docs-with-services.md
- DCT plan (cross-team):
helpers-no/devcontainer-toolbox→PLAN-p1-dct-shim.md - UIS plan (cross-team):
helpers-no/urbalurba-infrastructure→PLAN-p1-uis-secret-namespace.md - Coordination items in the investigation:
- 1.8 (DCT shim) — blocks Phases 2, 3, 4
- 1.10 (UIS minimum D5) — blocks Phase 3
- 1.11 (secret name convention) — TMP confirmed Option A, no template changes needed