Skip to content

docs(plans): save a good workspace as a template - #61

Open
pythonlearner1025 wants to merge 2 commits into
mainfrom
plan/ai-os-loop
Open

docs(plans): save a good workspace as a template#61
pythonlearner1025 wants to merge 2 commits into
mainfrom
plan/ai-os-loop

Conversation

@pythonlearner1025

@pythonlearner1025 pythonlearner1025 commented Aug 26, 2026

Copy link
Copy Markdown
Member

What part this touches

This docs-only PR adds one file, plans/AI-OS-LOOP.md.
It changes no product code.

A template stores a reusable workspace setup.
A workspace starts from a template or starts blank.
The plan audits the path that returns a successful workspace setup to a template.

The gap

BlitzOS can create a workspace from a template.
The workspace row stores neither its source template nor its requested template repositories.
No route derives an editable template draft from a workspace.

The audit also finds eight related product gaps.
Those gaps cover readiness, failures, sharing, lifecycle, onboarding, rules, recipes, and template editing.

The fix

The plan separates all nine findings from one committed change.
That change adds the secure browser workspace-to-template loop.

The design stores future provenance and requested repositories.
It adds a controller-only, redacted draft route.
It creates private templates and requires administrator review before organization publication.
It covers executable scripts, environment values, scope ceilings, folder paths, transactions, and soft deletion.

The plan names fail-first tests, cross-runtime fixtures, managed-build updates, and all three repository gates.
It defers every independent system to a named future change.

The risk trade

Private defaults and administrator publication add review work.
They prevent a workspace viewer from turning another member's secrets into organization content.

The rejected alternative adds workspaceId to POST /workspace-templates.
That route would derive and write in one hidden action.
Users could not review redaction, scope changes, or omitted disk state before save.

Tests

This PR changes no code, so no code test applies.
This documentation change cannot make a product test pass or fail.
The plan defines the tests that the future implementation must add first.

Deploy

Nothing ships.
This PR changes no Worker, web bundle, package, migration, or box image.
Rollback reverts the documentation commit and removes plans/AI-OS-LOOP.md.

🤖 Generated with Claude Code
https://claude.ai/code/session_01KXjajE99TTzesZmjsX6MwJ

@pythonlearner1025 pythonlearner1025 changed the title docs(plans): close the loop from a good workspace back to a template docs(plans): save a good workspace as a template Aug 26, 2026
pythonlearner1025 and others added 2 commits August 26, 2026 00:04
Audit the path that returns a working workspace setup to a template.

Part one keeps nine findings. Each one names the file and the line.
Part two commits to one change: the browser workspace-to-template loop.

Three independent reviews corrected this document before it landed.
A fact check found 23 wrong or stale claims. An adversarial review found
11 blocking holes. A contribution review found no proof obligations.

The largest correction is a security fault. The first draft route needed
only member access. A viewer already reads raw workspace environment data.
So any member could republish another member's secrets to the organization.
The route now needs workspace control. The draft omits environment values.

Templates now start private. Only an administrator publishes one.
A publish review shows the exact startup script and the selected rule.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXjajE99TTzesZmjsX6MwJ
Two commits landed while three reviews ran. Entitlements shipped in #62.
Box update shipped in #63. Ten cited lines moved.

A recheck read both commits against all nine findings. Every finding holds.
This change corrects the ten line numbers and pins the audit to one commit.

Three new facts:

A VM slot stays used in creating, ready, destroying, and error. Only
destroyed frees one. The cap keeps one source, orgs.vm_limit. Entitlements
writes that column, and org_entitlements holds seat limits only.

A cloud-VM host can now swap the image of a running workspace. So created_at
no longer identifies the running image. Gap 4 records that limit.

Box update state never enters a template.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXjajE99TTzesZmjsX6MwJ
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