Skip to content

feat(apps): pin design-tweak and spec-builder for adoption - #37450

Merged
bolichen97 merged 1 commit into
mainfrom
feat/w7-pins
Nov 15, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/w7-pins

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A host that has Design Tweak or Spec Builder as a built-in moves onto the app's own repository at its next restart, keeping everything it had.

Both apps now live in their own repositories under KiroCrewCaptain (kirocrew-app-design-tweak, kirocrew-app-spec-builder), ported up to the current wheel copy, with green CI on ubuntu, macOS and Windows. The wheel's adoption pin table does not name them yet, so no host adopts them and every fix keeps having to land twice.

Why it matters

Until a pin row exists, these two apps cannot leave core: every host keeps running the wheel copy, and the removal of the built-ins in #26967 cannot start for them.

Not a goal

  • Changing the adoption machinery, the D12 equality rule or any app's declared permissions.
  • Deleting the wheel copies (src/kiro_crew/apps/builtins/<app>/, website/src/apps/<app>/); only their app.json version moves.
  • Pinning the five apps of feat(apps): pin five more former built-ins for adoption #37411, whose rows stay as they are.
  • Pinning Ops Mission Control or Crew Companion (see "Held back" below).

What changed (motivation → approach → change)

Each row is the output of scripts/adoption_pin.py compute, copied into adoption-pins.json and the _SHIPPED_PINS table:

App Version Pinned commit minAppSdkLevel
design-tweak 0.10.0 to 0.10.1 deff125f4abf 8 (the exact =/api/chat entry landed after the level-7 constant, so 8 is the first level that always carries it; agentTools need 2)
spec-builder 0.1.0 to 0.1.1 79de0b4e3581 7 (chatSlots, ctx.chat_slots, agentReadOnlyDirs)

Each wheel built-in app.json version moves to the pinned version: a first-adoption pin must equal it (D12), and compute refuses the row with version_mismatch until it does. Each repository's app.json declares exactly the same permissions as its wheel copy (and the same agentTools, agentReadOnlyDirs and skills), so E9 holds nothing back. Design Tweak's =/api/chat and /api/chat/slots are the entries the wheel copy already declares under the owner ruling of 2026-11-13 (#26967, comment 6841699202, #36342); nothing is added. The owning spec records each adoption: app-kit-platform.md, "Permission parity of the wheel copies" (Design Tweak) and § 41 "The built-in" (Spec Builder); neither app has a module spec of its own.

Each pinned tree carries every change its wheel copy has on main 4c530d0bd2d1. Both repositories' PORTING.md record the sync point af94fac51f, and no origin/main commit has touched src/kiro_crew/apps/builtins/<dir>/, website/src/apps/<name>/ or website/public/app-assets/<name>/ since. Their prerequisites are on main: #36342 and #33141 for Design Tweak, #36128 and #33589 for Spec Builder.

Held back, with the reason:

  • crew-companion: feat(desktop): hand the companion's windows to its installed copy #37430 (open) is what makes the built-in's desktop shell stand down once its copy is adopted. Pinned before it lands, every desktop user with the companion enabled would get two avatars and every reminder twice.
  • ops-mission-control: the repository moves the provider tokens into data/secrets/ behind a credentialMasks directory entry the wheel copy does not declare. The agent tool gate reads the shipped built-ins' declarations only (credential_masks.declared_crew_leaves(installed=False)), so after adoption the new store would be fenced by the sandbox mask alone, while today's <data home>/ops_mission_control_secrets.json is fenced by both. It is pinned once that gap is closed.

Merge order: #37411 first. Both PRs append rows after auto-improvement in adoption-pins.json and _SHIPPED_PINS; whichever lands second is rebased, keeping the other's rows.

App repo: KiroCrewCaptain/kirocrew-app-design-tweak@deff125
App repo: KiroCrewCaptain/kirocrew-app-spec-builder@79de0b4

Wheel-copy base: design-tweak@4c530d0bd2d1465315b7a30b720f82a7a14f116a
Wheel-copy base: spec-builder@4c530d0bd2d1465315b7a30b720f82a7a14f116a

Backwards compatibility

Compatible: two rows are added and two versions move up. A host whose record is builtin-owned adopts at the next restart and keeps data/, .app_secret, the grants and enabled; a host that cannot adopt (an older SDK level, a pending config review, a file still beside app.json) keeps the wheel copy unchanged. No other row changes.

Removes nothing: the wheel copies, their routes and every existing pin row stay.

Tests

test/test_builtin_adoption_pins.py::test_the_shipped_pin_file_validates_and_pins_exactly_the_shipped_table takes the two new rows and fails with the pin file of main; test_every_shipped_pin_matches_its_wheel_built_in_version holds the version bumps.

Proof: PROVEN test/test_builtin_adoption_pins.py::test_the_shipped_pin_file_validates_and_pins_exactly_the_shipped_table (head 55f189b)

Determinism: no test logic changes, only the pinned data table. On origin/main 4c530d0bd2d1 plus this commit, every test/test_builtin_adoption_*.py, test/test_design_tweak_*.py, test/test_app_agent_tools_adopted.py, test/test_released_builtin_skill_copies.py, test/test_app_chat_slot_sdk.py, test/test_core_spec_builder_decoupling.py and both wheel copies' tests/: 2272 passed, 3 skipped; test/test_flake_pattern_ratchet.py passes. Black, flake8, isort, the comment-history, brand-name and line-cap gates and scripts/docs-lint.sh pass; the diff has no frontend change.

Manual verification

scripts/adoption_pin.py verify over the network on origin/main 4c530d0bd2d1 plus this commit, with a throwaway HOME and KIROCREW_HOME: all nine rows ok. Each pinned commit is the head of its repository's main, and its check runs are all green (Tests on ubuntu, macOS and Windows, the reproducible UI bundle, README, internal-content-scan with every added line checked, plus Design Tweak's tests against the real Kiro Crew host).

Related Issues

Part of #26967

Catalog rows: the kirodotdev/KiroCrewApps PR linked in a comment below switches both rows to git at the same commits. It is not auto-merged: the driver merges it right after this PR lands.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 15, 2026 01:44
@bolichen97
bolichen97 requested a review from CrysisDeu November 15, 2026 01:44
@bolichen97
bolichen97 enabled auto-merge (squash) November 15, 2026 01:44
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 81af710a643d88b71f1147ccac24597fb5291cd2 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 81af710a643d88b71f1147ccac24597fb5291cd2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this adds two pin rows to the existing adoption machinery, and leaving out crew-companion and ops-mission-control is justified.

Notes

  • If adoption misbehaves, the fix is to revert the row. A host that has already adopted runs the repo tree, so after a revert the next fix still has to land in that repo first.

[DESIGN-REVIEWED] 81af710

Description read

[DESCRIPTION-READ] cfb32a14b580df2d2e2996150e11e2ecae0b84b55ec63f03f6f9145600d58bbc

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 81af710a643d88b71f1147ccac24597fb5291cd2 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

This change does what the no-new-builtin-apps rule and #26967 already require: it adds two pin rows to the existing adoption table, through the existing pin machinery. It adds no new surface.

Not checked: whether the pinned commits and hashes match the external repositories (that needs the network).

What this change ships

Inventory (4 items) — 4 justified

Intent: let hosts that have Design Tweak or Spec Builder built in move onto each app's own repository at the next restart, keeping their data and grants. ADDITION, using an existing mechanism.

  1. A host with a builtin-owned Design Tweak adopts the external repository's tree at restart (SDK level 8 or higher). — justified
  2. A host with a builtin-owned Spec Builder adopts the external repository's tree at restart (SDK level 7 or higher). — justified
  3. The wheel copies' app.json versions move to 0.10.1 and 0.1.1, as the D12 equality rule requires for a first adoption. — justified
  4. The app-kit-platform spec records both adoptions and that each app's fixes now land in its own repository first. — justified

[FIRST-PRINCIPLES-REVIEWED] 81af710

Description read

[DESCRIPTION-READ] b101e71b9753393314ba708bbd8b0a001738a32408558be3705253eabdd9f99d

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 81af710a643d88b71f1147ccac24597fb5291cd2 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 81af710

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 81af710a643d88b71f1147ccac24597fb5291cd2 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 81af710a643d88b71f1147ccac24597fb5291cd2 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 81af710

Verdict parsed from the review's SHA-scoped output markers for commit 81af710a643d88b71f1147ccac24597fb5291cd2.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 81af710a643d88b71f1147ccac24597fb5291cd2 false-positive: <reason, 20 to 500 characters>

@bolichen97

Copy link
Copy Markdown
Contributor Author

Catalog half: kirodotdev/KiroCrewApps#80 adds design-tweak and flips spec-builder to git at the same two commits this PR pins. It is not auto-merged; the driver merges it right after this PR lands.

@bolichen97 bolichen97 changed the title feat(apps): pin design-tweak and spec-builder for adoption feat(apps): pin design-tweak, spec-builder and md-notebook for adoption Nov 15, 2026
bolichen97 added a commit to kirodotdev/KiroCrewApps that referenced this pull request Nov 15, 2026
…repositories

Flips spec-builder and md-notebook from a builtin source to a git source
in KiroCrewCaptain and adds design-tweak's first row, each pinned at the
commit the Kiro Crew adoption pin table names for it
(kirodotdev/KiroCrew#37450): design-tweak 0.10.1 at
KiroCrewCaptain/kirocrew-app-design-tweak@deff125f4abf, spec-builder
0.1.1 at KiroCrewCaptain/kirocrew-app-spec-builder@79de0b4e3581 and
md-notebook 1.0.1 at
KiroCrewCaptain/kirocrew-app-md-notebook@82707e67f2d9. The Kiro Crew org
rows (spec-builder, md-notebook) gain the KiroCrewCaptain author URL;
design-tweak keeps its person attribution.
@bolichen97

bolichen97 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Superseded: md-notebook was taken back out of this PR (head 8121d68d5c); see #37450 (comment). The note below describes the withdrawn head 192aee2cff94.

Scope note: this head (192aee2cff94) adds Notes (md-notebook 1.0.1 at KiroCrewCaptain/kirocrew-app-md-notebook@82707e67f2d9, minAppSdkLevel 8), whose only blocker, #36365, merged at 01:15Z. Drift check before computing: the only origin/main commit since the port point that touches its backend, page, store art, tests or apps.mdNotebook keys is #36365 itself. Its tree matches the port head f38999c0e3, except for the #37379 test comment, which the app repo already carries. adoption_pin.py compute reproduces the row byte for byte, and verify reports all ten rows ok. Design Tweak and Spec Builder are unchanged since af94fac51f. The catalog half, kirodotdev/KiroCrewApps#80, now flips md-notebook to git at the same commit (5d79d64). The frozen Goal line still names only the first two apps; I left it as written for a maintainer to rule on.

@bolichen97 bolichen97 changed the title feat(apps): pin design-tweak, spec-builder and md-notebook for adoption feat(apps): pin design-tweak and spec-builder for adoption Nov 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

md-notebook is held out of this PR. The head is back to the two pins of its goal: 8121d68 has the same tree as 55f189b. That means 192aee2, which pushed the md-notebook row a few minutes ago, is undone. The md-notebook row will come in a later pin PR, after a core fix.

Why it is held: a host from before #36365 keeps its Notes token, vaults.json and settings.json in <home>/md-notebook-staging/. Only md_notebook_state.move_state_to_app_data moves them into apps/md-notebook/data/state/. It is reached only from sealed_default_legacy_state(), which runs only before the shipped backend spawns (apps/backend.py, _shipped_md_notebook). Spawn prep runs only the first move.

Adoption applies on the boot after the staging. So a host whose Notes was disabled at upgrade, or whose move was held by an older-build sandbox on that first boot, would adopt without the move. The adopted backend would then open an empty data/state/: no vaults, no token, auto-sync off. Nothing would ever retry the move.

That move is getting its own core fix PR. The md-notebook pin follows once that fix lands and the app repository's PORTING.md gap 1 is corrected. The drift re-check for design-tweak and spec-builder against main 4a3697d05b2c is unchanged: no commit touches their wheel copies since af94fac51f.

bolichen97 added a commit to kirodotdev/KiroCrewApps that referenced this pull request Nov 15, 2026
Flips spec-builder from a builtin source to a git source in
KiroCrewCaptain and adds design-tweak's first row, each pinned at the
commit the Kiro Crew adoption pin table names for it
(kirodotdev/KiroCrew#37450): design-tweak 0.10.1 at
KiroCrewCaptain/kirocrew-app-design-tweak@deff125f4abf and
spec-builder 0.1.1 at
KiroCrewCaptain/kirocrew-app-spec-builder@79de0b4e3581. The Kiro Crew
org row (spec-builder) gains the KiroCrewCaptain author URL;
design-tweak keeps its person attribution.
@bolichen97

Copy link
Copy Markdown
Contributor Author

Backend Tests (3.12, 7) is red on this head (8121d68) on test/test_denied_commands_security_cost.py::TestSelfModuleIndexIsLinear::test_the_scan_is_linear_not_quadratic (2k tokens took 0.597s). The red comes from main, not from this diff: the same node fails on shard 7 of #37385, #37419, #37433, #37411, #37431, #37209 and #34056, all on bases carrying #28293. The record is #37446, and a rerun on #37209 failed the same way.

The fix is #37451, which bounds the scan by a CPU ratio instead of a wall-clock budget. This PR waits for it and rebases onto it once it lands. No override and no blind rerun for this red.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 15, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates a 10% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

This change is data only. It adds two pin rows (design-tweak and spec-builder) to adoption-pins.json and the matching rows to the test's _SHIPPED_PINS table. It also bumps the two wheel app.json versions, so the D12 version-equality test (test_every_shipped_pin_matches_its_wheel_built_in_version) passes. Spec paragraphs record each adoption.

What I checked:

  • Row shape: both rows match what _row_error requires.
  • Nav: each row's legacyNav route and icon match its wheel app.json nav entry (/design-tweak with Paintbrush, /spec-builder with ClipboardList).
  • SDK level: APP_SDK_LEVEL is 8, so both minAppSdkLevel values (8 and 7) can be adopted.
  • Tests: the shipped-table test fails against main's pin file.
  • Read-only dirs: Spec Builder is the first pinned app with agentReadOnlyDirs. Unlike the credentialMasks gap that held Ops Mission Control back, the read-only-dir tool gate reads installed manifests (installed=True by default) as well as built-ins. A spawned backend gets its seals back from the manifest of the code it runs, so adoption keeps the fence.
  • Coupling: decoupling tests stop core importing either built-in.
  • **Lefto

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 8121d68d5c · 74 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve on 8121d68. This PR lets hosts that run Design Tweak or Spec Builder as a built-in move onto each app's own repository at the next restart. It adds two rows to the adoption pin table and raises the two wheel copies' versions to match. Both rows were recomputed from the app repositories at the pinned commits and match byte for byte: commit, version, tree and archive digests, minimum SDK level and legacy nav. Each pinned commit is the head of its repository's main. Each repository's app.json asks for the same permissions, agent tools, agents, read-only agent directories and skills as its wheel copy. Both apps keep reading user data from the same places as the wheel copy, so nothing is lost on adoption. The two pin tests turn red when a version or a row is changed. The one red backend shard is a known wall-clock flake in a security cost test this PR does not touch (tracked in #37446, fix in #37451); the PR should rebase after that fix lands. This PR also conflicts textually with #37411 in the pin file and its test table, because both append rows at the same place. If #37411 merges first, as planned, this PR needs a rebase that keeps both sets of rows. Decisive lines: src/kiro_crew/apps/adoption-pins.json:95-119, test/test_builtin_adoption_pins.py:213-232, src/kiro_crew/apps/builtins/design_tweak/app.json:3, src/kiro_crew/apps/builtins/spec_builder/app.json:3

Design Tweak and Spec Builder now live in their own repositories under
KiroCrewCaptain, ported up to the current wheel copy with green CI on
ubuntu, macOS and Windows. Each row is the output of
scripts/adoption_pin.py compute and is added to adoption-pins.json and
the _SHIPPED_PINS table, so a host whose record is builtin-owned moves
onto the app's own tree at its next restart and keeps data/, the app
secret, the grants and enabled.

Each wheel built-in app.json version moves to the pinned version, since
a first-adoption pin must equal it (D12). Both repositories declare the
same permissions as their wheel copy, so E9 holds nothing back. The
owning spec records each adoption.

Part of #26967
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 15, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 15, 2026
@bolichen97
bolichen97 merged commit f5299f4 into main Nov 15, 2026
97 checks passed
@bolichen97
bolichen97 deleted the feat/w7-pins branch November 15, 2026 07:26
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 15, 2026
bolichen97 added a commit to kirodotdev/KiroCrewApps that referenced this pull request Nov 15, 2026
…80)

Flips spec-builder from a builtin source to a git source in
KiroCrewCaptain and adds design-tweak's first row, each pinned at the
commit the Kiro Crew adoption pin table names for it
(kirodotdev/KiroCrew#37450): design-tweak 0.10.1 at
KiroCrewCaptain/kirocrew-app-design-tweak@deff125f4abf and
spec-builder 0.1.1 at
KiroCrewCaptain/kirocrew-app-spec-builder@79de0b4e3581. The Kiro Crew
org row (spec-builder) gains the KiroCrewCaptain author URL;
design-tweak keeps its person attribution.
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.

3 participants