From 4b7d1e50867a9ad20f228c92ec0a851bbddb0591 Mon Sep 17 00:00:00 2001 From: Raghu Betina Date: Tue, 22 Sep 2026 20:57:53 -0500 Subject: [PATCH] Adopt released local tooling Keep the Codespaces fallback on published CLI and Skill 0.4.0. Use explicit GitHub compilation and route local development to its guide. --- .devcontainer/agent-versions.env | 8 ++++---- AGENTS.md | 7 ++++--- CONTRIBUTING.md | 9 ++++++--- README.md | 7 ++++++- script/check-firstdraft-wrapper.mjs | 4 ++-- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.devcontainer/agent-versions.env b/.devcontainer/agent-versions.env index 14c7d99..9a69945 100644 --- a/.devcontainer/agent-versions.env +++ b/.devcontainer/agent-versions.env @@ -2,12 +2,12 @@ # Record installed agent versions in qualification receipts. CODEX_VERSION=latest # First Draft compatibility pins are independent of the agents' update policy. -FIRSTDRAFT_CLI_VERSION=0.3.0 -# CLI 0.3.x requires staging to serve First Draft API 0.4.x before template promotion. +FIRSTDRAFT_CLI_VERSION=0.4.0 +# CLI 0.4.x uses First Draft API 0.4.x and defaults to local root output. FIRSTDRAFT_CLI_DEFAULT_API_URL=https://firstdraft.com FIRSTDRAFT_STAGING_API_URL=https://staging.firstdraft.com -# Shared Claude/Codex authoring Skill; exact source of published plugin 0.3.0 (API 0.4). -FIRSTDRAFT_SKILLS_REVISION=384fb9422a0cdd2a4bd08b86d6ca677e20048225 +# Shared Claude/Codex authoring Skill; exact source of published plugin 0.4.0 (API 0.4). +FIRSTDRAFT_SKILLS_REVISION=5f544bff149173a249899d2b5dfd403057cc5a30 FIRSTDRAFT_CLAUDE_SKILL_NAME=create-full-stack-app # Codex namespaces the canonical source checkout with its root plugin manifest. FIRSTDRAFT_CODEX_SKILL_NAME=firstdraft:create-full-stack-app diff --git a/AGENTS.md b/AGENTS.md index c416255..204a7dc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,8 @@ name the Skill or translate the request into a command. - The planning `.firstdraft/` is ignored by Git. Review the current Plan directly; do not infer its state from a Git diff. Root adoption moves this private state into `.firstdraft/design/.firstdraft/`; the new root `.firstdraft/` contains the generated app's submitted Plan and reviewed GapSet instead. -- Present `bin/firstdraft plan compile --output .` as the internal-alpha completion mode. Obtain explicit approval +- Present `bin/firstdraft plan compile --output .` as the internal-alpha completion mode; CLI 0.4 also selects it + with `bin/firstdraft plan compile`. Obtain explicit approval of the reviewed Plan, gaps, and relocation of this Drawing Board into `.firstdraft/design/` before running it from the physical workspace root. A generic Compile request does not authorize that relocation. If root eligibility fails, preserve the workspace and explain the exact refusal; do not delete files or switch modes to force it through. @@ -41,8 +42,8 @@ name the Skill or translate the request into a command. report the observed response, and stop. Do not edit or clear `config.hosts`, or add host-admission environment variables to the Drawing Board or the generated application. - **Create GitHub repository** means save the existing workspace privately, add `origin`, and push its commits; - it does not request another Compile. **Compile and publish through First Draft** explicitly selects zero-flag - `bin/firstdraft plan compile`, which compiles and creates a separate private artifact repository through the service. + it does not request another Compile. **Compile and publish through First Draft** selects + `bin/firstdraft plan compile --github`, which creates a separate private artifact repository through the service. Use VS Code's actual **Publish to GitHub** label for its UI. Never switch modes to recover from an ambiguous start. No Compile mode deploys the application. - Use `bin/firstdraft` for every First Draft command. When the installed Skill shows `firstdraft ...`, pass those diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c933a54..ddc4c40 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ setup or edits. Preserve and use an existing remote when the user chooses repository-first creation. Do not run the nested initializer or application smoke after root adoption, including their relocated copies. The optional `--output ./application` mode keeps an ignored, separate nested application; only that mode uses the initializer and application smoke. **Compile and publish through First Draft** selects the separate -zero-flag Publication mode; **Create GitHub repository** saves the existing workspace and does not Compile again. +`--github` Publication mode; **Create GitHub repository** saves the existing workspace and does not Compile again. The accepted cross-repository sequence and its safety boundaries live in [DIRECT_COMPILATION_PLAN.md](DIRECT_COMPILATION_PLAN.md). @@ -231,13 +231,16 @@ future generated target revision. ## Release handoff and periodic tool refresh -Drawing Board is a required consumer in the +Drawing Board is a post-publication follow-up in the [coordinated release process](https://github.com/firstdraft/firstdraft/blob/main/RELEASE_COORDINATION.md#drawing-board-release-handoff). -For each release, update `FIRSTDRAFT_CLI_VERSION` and `FIRSTDRAFT_SKILLS_REVISION` in +After the service and packages are released, update `FIRSTDRAFT_CLI_VERSION` and `FIRSTDRAFT_SKILLS_REVISION` in `.devcontainer/agent-versions.env` to the published compatible CLI and the released plugin's exact source revision. Reconcile the wrapper, setup messages, guide, root-adoption paths, and affected fixtures. Run `script/check`, require the pull request's built-container CI, and verify the merged revision's prebuild before declaring the template ready. Record the selected pins and observed checks; installation and discovery do not prove authenticated Compilation. +This update and its prebuild do not block package publication. Pins install during workspace setup, so changing +them alone requires no workspace-image rebuild. Local development starts in an empty folder; this template serves +the Codespaces fallback. Review tools weekly as well as during releases. Fresh setup already selects the vendors' latest public Claude and Codex releases; verify those installers still work with the template. Review the pinned First Draft CLI/Skills, diff --git a/README.md b/README.md index 016089d..fc0720a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# Build an app with First Draft +# Build an app in Codespaces with First Draft + +For the primary local workflow, start with the +[local development guide](https://gist.github.com/raghubetina/3d424a97a1eaa6de8c406e67f32a237e). +It starts in an empty folder and does not require cloning this repository. Drawing Board provides the Codespaces +fallback when you prefer a prepared cloud workspace. This repository is a workspace for building an app with Claude or Codex. Describe your idea, review the plan with your agent, and First Draft generates a Rails starting point at this repository's root. The original Drawing Board diff --git a/script/check-firstdraft-wrapper.mjs b/script/check-firstdraft-wrapper.mjs index 02ad79f..b1af61d 100644 --- a/script/check-firstdraft-wrapper.mjs +++ b/script/check-firstdraft-wrapper.mjs @@ -27,7 +27,7 @@ const fs = require("node:fs"); const arguments_ = process.argv.slice(2); if (arguments_.length === 1 && arguments_[0] === "--version") { process.stdout.write("firstdraft " + - (process.env.FIRSTDRAFT_TEST_CLI_VERSION ?? "0.3.0") + "\\n"); + (process.env.FIRSTDRAFT_TEST_CLI_VERSION ?? "0.4.0") + "\\n"); if (process.env.FIRSTDRAFT_TEST_CLI_NOTICE) { process.stderr.write("A benign version notice.\\n"); } @@ -164,7 +164,7 @@ fs.writeFileSync(process.env.FIRSTDRAFT_TEST_OUTPUT, JSON.stringify({ root: testRepository, stdio: "ignore", }), - /standalone First Draft CLI must be exactly 0\.3\.0/, + /standalone First Draft CLI must be exactly 0\.4\.0/, ); } finally { fs.rmSync(temporaryRoot, {force: true, recursive: true});