Skip to content

Enhance update command and CI with minimal footprint support - #21

Merged
ainetx merged 5 commits into
mainfrom
cfs-mini-footprint
Jun 7, 2026
Merged

Enhance update command and CI with minimal footprint support#21
ainetx merged 5 commits into
mainfrom
cfs-mini-footprint

Conversation

@ainetx

@ainetx ainetx commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Improve the update command to allow optional kit updates and enhance error handling. Introduce a bootstrap repair step in CI jobs and support minimal footprint installations with configurable tracking policies. Update tests to ensure functionality and maintain correct behavior.

Summary by CodeRabbit

  • New Features

    • Init “repair” mode to restore generated runtime/agent surfaces for existing projects
    • Opt-in update flag --with-kits to include kit updates (off by default)
    • Configurable git-tracking policies for runtime, agents, and per-kit content
    • New local cache seeding and bootstrap init/repair commands
  • Documentation

    • Expanded docs on kit lifecycle, tracking, install/update semantics, and managed .gitignore
  • Behavior

    • Storytelling agents renamed to cf-... IDs; commit-footer trailer token standardized to "Co-Authored-By"
  • Tests

    • New and expanded tests covering init/update, kit UX, cache seeding, and version-check behavior

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds per-surface git-tracking and per-kit overrides, enables repair-mode init that restores generated surfaces without upgrading, makes kit updates opt-in via --with-kits, moves seed-cache to a Python script, centralizes manifest install prompting, renames storytelling agents to cf-*, and updates CI, docs, and tests accordingly.

Changes

Kit Lifecycle & Tracking Policies System

Layer / File(s) Summary
Managed Configuration & Tracking Policies
.bootstrap/config/core.toml, .bootstrap/config/README.md, .gitignore
core.toml adds [install] tracking defaults and per-kit overrides; .gitignore now contains a managed Constructor Studio block that respects per-kit tracking (ignored vs tracked); docs updated to clarify kit update semantics.
Cache Seeding & Bootstrap Tooling
scripts/seed_local_cache.py, Makefile
New scripts/seed_local_cache.py produces a local cache with provenance and version detection. Makefile adds bootstrap-init/bootstrap-repair/update-local, makes update an alias, and delegates seed-cache to the new script.
CI Bootstrap Repair Checkpoints
.github/workflows/ci.yml
spec-coverage, validate, and validate-kits jobs run make bootstrap-repair after Python setup to repair bootstrap state before test/validation steps.
Init Flow with Repair Mode & Tracking
skills/studio/scripts/studio/commands/init.py
cfs init gains --runtime-tracking, --agent-tracking, repeatable --kit-tracking, persisting install metadata into core.toml, writing the managed .gitignore, and _repair_existing_install() to restore generated surfaces when re-running init without --force. Interactive installers collect per-kit overrides.
Kit Manifest Installation UX Refactoring
skills/studio/scripts/studio/commands/kit.py
Manifest-driven installs now emit an install plan to stderr and allow selection-by-number edits for editable resources; helper functions compute resource_bindings and kit_root; Windows absolute-target serialization improved.
Update Flow with Kit Update Gating
skills/studio/scripts/studio/commands/update.py
Adds `--with-kits {yes
Generated Agent Naming Normalization
skills/studio/agents.toml, tests/test_agents_existing_snapshot.py
Storytelling agents renamed to cf-storytelling-* with prompt_file mappings; tests updated to expect the new IDs.
Background Version Normalization
src/studio_proxy/cli.py, tests/test_studio_proxy_cli.py
Background version check now normalizes versions (strips local: prefix) before comparing to avoid false update notices when cache uses local: prefixes.
Architecture & Feature Spec Documentation
architecture/DESIGN.md, architecture/features/core-infra.md
Documentation expanded to specify kit lifecycle, init-repair semantics, managed .gitignore behavior, tracking policy persistence, and --with-kits gating; includes diagrams and updated acceptance criteria.
Test Coverage for Init/Update Footprint & Manifest UX
tests/test_init_update_footprint.py, tests/test_kit*.py, tests/test_update.py, tests/test_migrate_from_cypilot.py, tests/test_seed_local_cache.py
New tests validate init prompts, repair behavior, .gitignore footprints, kit update gating, and manifest install interactive flows; many existing tests updated to exercise kit-related code paths and renamed agents.

Sequence Diagram(s)

(The changes are largely internal tooling, CLI flows, and docs; the embedded hidden artifact includes a concise sequence diagram for init/update/gitignore/kit gating.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

"🐰 I seeded the cache with a hop and a cheer,
Repairing init so old installs need not fear,
Kits chosen by policy, updates opt-in, not fright—
Gitignore tended, agents prefixed just right.
— A rabbit, nibbling diffs beneath moonlight."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Enhance update command and CI with minimal footprint support' accurately reflects the main changes: improving the update command with optional kit updates, adding bootstrap repair to CI, and supporting minimal-footprint installations with configurable tracking policies.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cfs-mini-footprint

Comment @coderabbitai help to get the list of available commands and usage tips.

ainetx and others added 3 commits June 7, 2026 15:15
…th-kits flag

- Updated the update command to allow users to specify whether to update project kit files using the --with-kits option.
- Modified the update pipeline to skip kit updates by default unless explicitly requested.
- Added logic to handle kit tracking and metadata persistence during updates.
- Refactored kit update logic to improve error handling and reporting.
- Updated tests to cover new functionality and ensure correct behavior with kit updates.
- Adjusted existing tests to accommodate changes in the update command's behavior.

Signed-off-by: ainetx <viator@via-net.org>
…mmands

Signed-off-by: ainetx <viator@via-net.org>
Add configurable runtime, agent, and per-kit tracking policies for init and repair flows.

Update bootstrap repair/update targets and keep top-level updates from refreshing kits unless explicitly requested.

Improve manifest kit install UX by showing the write plan before copying files and exposing editable paths through numbered navigation.

Signed-off-by: ainetx <viator@via-net.org>
Co-authored-by: Constructor Studio <291158726+constructor-studio[bot]@users.noreply.github.com>
Studio-Generated-By: Constructor Studio
Studio-Source-Repo: https://github.com/constructorfabric/studio
Constructor-Fabric: https://github.com/constructorfabric
Studio-Version: skill=1.0.0
@ainetx
ainetx force-pushed the cfs-mini-footprint branch from 86f9f25 to 98318af Compare June 7, 2026 12:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
architecture/features/core-infra.md (1)

160-170: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix ordered-list numbering in “Project Initialization” steps (MD029).

There is a duplicate 11. entry, which shifts subsequent numbers and triggers markdownlint failures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` around lines 160 - 170, The ordered list
in the "Project Initialization" section has duplicate numbering causing MD029
failures; renumber the list so it is sequential from 11 through 21 and ensure
each checklist item keeps its identifier tokens (e.g., inst-inject-agents,
inst-create-config-agents, inst-return-init-ok, inst-init-helpers,
inst-init-detect-existing, inst-init-inject-claude, inst-init-format-output,
inst-kit-tracking-policy, inst-persist-kit-tracking,
inst-write-gitignore-footprint, inst-existing-repair-mode) unchanged, updating
only the leading numeric prefixes so the markdown list is strictly increasing.

Source: Linters/SAST tools

tests/test_kit_manifest_install.py (1)

252-257: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make the non-TTY test deterministic.

At Line 254, this test claims non-TTY behavior but never forces sys.stdin.isatty() to False. In TTY runs, it can accidentally prompt and become flaky/hang. Patch stdin explicitly and assert input() is not called.

Proposed fix
-            manifest = load_manifest(kit_src)
-            # interactive=True but stdin is not a TTY, so no prompts
-            result = install_kit_with_manifest(
-                kit_src, adapter, "mykit", "2.0", manifest,
-                interactive=True,
-            )
+            manifest = load_manifest(kit_src)
+            # interactive=True but stdin is not a TTY, so no prompts
+            from unittest.mock import patch
+            with patch("sys.stdin") as mock_stdin, patch("builtins.input") as input_mock:
+                mock_stdin.isatty.return_value = False
+                result = install_kit_with_manifest(
+                    kit_src, adapter, "mykit", "2.0", manifest,
+                    interactive=True,
+                )
+            input_mock.assert_not_called()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_kit_manifest_install.py` around lines 252 - 257, The test claims
non-TTY behavior but never forces sys.stdin.isatty() to False, causing
flakiness; before calling load_manifest/install_kit_with_manifest in the test,
patch sys.stdin.isatty to return False (e.g. monkeypatch.setattr(sys.stdin,
"isatty", lambda: False)) and also patch or mock builtins.input (or use
monkeypatch.setattr builtins, "input", a callable that fails) and assert that
input() was not called after install_kit_with_manifest returns; target the
existing calls to load_manifest and install_kit_with_manifest in this test so
the non-TTY behavior is deterministic and the test fails if code tries to
prompt.
🧹 Nitpick comments (1)
scripts/seed_local_cache.py (1)

103-103: 💤 Low value

Remove unnecessary list conversion.

The expression list(argv if argv is not None else sys.argv[1:]) is redundant since both branches already return a list.

♻️ Simplify to
-    args = list(argv if argv is not None else sys.argv[1:])
+    args = argv if argv is not None else sys.argv[1:]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/seed_local_cache.py` at line 103, The assignment to args uses an
unnecessary list() conversion; change the line that sets args (the variable name
args and the argv parameter) to directly assign the chosen branch value without
wrapping in list() — i.e. set args = argv if argv is not None else sys.argv[1:]
so the result remains a list but removes the redundant list() call.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/seed_local_cache.py`:
- Around line 53-58: The script currently iterates over BUNDLE_ITEMS and
silently skips missing files/dirs; add an explicit validation before the copy
loop to ensure critical items exist (at minimum check that source_root /
"skills" exists and is a directory), and if the check fails raise a clear error
or exit (e.g., raise RuntimeError or call sys.exit) so the seeding aborts
instead of producing a non-functional cache; update any messages to include the
missing item name and use the existing variables BUNDLE_ITEMS, source_root, and
cache_dir to locate and report the missing resource.

In `@skills/studio/scripts/studio/commands/kit.py`:
- Around line 876-1011: The type hints reference ManifestResource and Manifest
as quoted forward refs which static type checkers can't resolve; add a
TYPE_CHECKING block near the top of the module to import ManifestResource and
Manifest (from their defining module) and then remove the quotes around those
type annotations in the functions _manifest_resource_target,
_manifest_resource_bindings, _emit_manifest_install_plan, and
_prompt_manifest_install_plan so they use ManifestResource and Manifest directly
for proper static typing.

In `@skills/studio/scripts/studio/commands/update.py`:
- Around line 330-336: The call to _write_gitignore_block (assigned to
actions["gitignore"]) can raise on malformed markers and is currently uncaught;
wrap the call in a try/except around the invocation (where actions["gitignore"]
is set) to catch the specific exception(s) thrown by _write_gitignore_block and
convert them into the same structured update error result used elsewhere in this
update flow (return or set the update result object with an error
status/message) so the update returns a controlled error instead of propagating
an exception; reference _write_gitignore_block and the actions["gitignore"]
assignment when locating where to add the handler.
- Around line 324-328: The call that sets actions["core_toml_metadata"] using
_persist_install_metadata(core_toml_path, kit_tracking, dry_run=False)
overwrites runtime_tracking and agent_tracking with defaults, resetting existing
policies; update the call to preserve existing runtime_tracking and
agent_tracking by first reading the current metadata from core_toml_path (or
retrieving the existing metadata object available in scope) and pass those
existing runtime_tracking and agent_tracking values into
_persist_install_metadata (or merge them into kit_tracking) so
_persist_install_metadata receives the preserved fields instead of replacing
them; reference functions/vars _persist_install_metadata,
actions["core_toml_metadata"], core_toml_path, kit_tracking, runtime_tracking,
and agent_tracking when making the change.

In `@tests/test_update.py`:
- Line 2064: The test payload uses the wrong key "studio_dir" instead of the
canonical result key "cypilot_dir"; update the payload in the _human_update_ok
test(s) to replace "studio_dir" with "cypilot_dir" and adjust any related
assertions or expected output checks to reference "cypilot_dir" so the test
validates the real update payload shape used by the contract.

---

Outside diff comments:
In `@architecture/features/core-infra.md`:
- Around line 160-170: The ordered list in the "Project Initialization" section
has duplicate numbering causing MD029 failures; renumber the list so it is
sequential from 11 through 21 and ensure each checklist item keeps its
identifier tokens (e.g., inst-inject-agents, inst-create-config-agents,
inst-return-init-ok, inst-init-helpers, inst-init-detect-existing,
inst-init-inject-claude, inst-init-format-output, inst-kit-tracking-policy,
inst-persist-kit-tracking, inst-write-gitignore-footprint,
inst-existing-repair-mode) unchanged, updating only the leading numeric prefixes
so the markdown list is strictly increasing.

In `@tests/test_kit_manifest_install.py`:
- Around line 252-257: The test claims non-TTY behavior but never forces
sys.stdin.isatty() to False, causing flakiness; before calling
load_manifest/install_kit_with_manifest in the test, patch sys.stdin.isatty to
return False (e.g. monkeypatch.setattr(sys.stdin, "isatty", lambda: False)) and
also patch or mock builtins.input (or use monkeypatch.setattr builtins, "input",
a callable that fails) and assert that input() was not called after
install_kit_with_manifest returns; target the existing calls to load_manifest
and install_kit_with_manifest in this test so the non-TTY behavior is
deterministic and the test fails if code tries to prompt.

---

Nitpick comments:
In `@scripts/seed_local_cache.py`:
- Line 103: The assignment to args uses an unnecessary list() conversion; change
the line that sets args (the variable name args and the argv parameter) to
directly assign the chosen branch value without wrapping in list() — i.e. set
args = argv if argv is not None else sys.argv[1:] so the result remains a list
but removes the redundant list() call.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 05e5ee5a-8bff-4cec-a532-cfaec2ed8a78

📥 Commits

Reviewing files that changed from the base of the PR and between cdf6987 and 86f9f25.

📒 Files selected for processing (20)
  • .bootstrap/config/README.md
  • .bootstrap/config/core.toml
  • .github/workflows/ci.yml
  • .gitignore
  • Makefile
  • architecture/DESIGN.md
  • architecture/features/core-infra.md
  • scripts/seed_local_cache.py
  • skills/studio/agents.toml
  • skills/studio/scripts/studio/commands/init.py
  • skills/studio/scripts/studio/commands/kit.py
  • skills/studio/scripts/studio/commands/update.py
  • src/studio_proxy/cli.py
  • tests/test_agents_existing_snapshot.py
  • tests/test_init_update_footprint.py
  • tests/test_kit.py
  • tests/test_kit_manifest_install.py
  • tests/test_migrate_from_cypilot.py
  • tests/test_studio_proxy_cli.py
  • tests/test_update.py

Comment thread scripts/seed_local_cache.py
Comment thread skills/studio/scripts/studio/commands/kit.py
Comment thread skills/studio/scripts/studio/commands/update.py Outdated
Comment thread skills/studio/scripts/studio/commands/update.py Outdated
Comment thread tests/test_update.py
_human_update_ok({
"status": "PASS",
"project_root": "/tmp/proj",
"studio_dir": "/tmp/proj/.bootstrap",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the canonical result key in this test payload (cypilot_dir)

Line 2064 uses studio_dir, while the surrounding _human_update_ok tests and update payload contract in this file consistently use cypilot_dir. This can make the test pass without validating the real output shape used elsewhere.

Suggested patch
-                "studio_dir": "/tmp/proj/.bootstrap",
+                "cypilot_dir": "/tmp/proj/.bootstrap",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"studio_dir": "/tmp/proj/.bootstrap",
"cypilot_dir": "/tmp/proj/.bootstrap",
🧰 Tools
🪛 Ruff (0.15.15)

[error] 2064-2064: Probable insecure usage of temporary file or directory: "/tmp/proj/.bootstrap"

(S108)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_update.py` at line 2064, The test payload uses the wrong key
"studio_dir" instead of the canonical result key "cypilot_dir"; update the
payload in the _human_update_ok test(s) to replace "studio_dir" with
"cypilot_dir" and adjust any related assertions or expected output checks to
reference "cypilot_dir" so the test validates the real update payload shape used
by the contract.

Update README and user guides to describe generated runtime files, generated host integrations, and per-kit git tracking under the new init/update contract.

Clarify that cfs update repairs runtime by default and only updates kits when explicitly requested with --with-kits yes.

Correct the Studio commit footer contract to render Co-Authored-By consistently across skill prompts, agent contracts, and tests.

Signed-off-by: ainetx <viator@via-net.org>

Co-Authored-By: Constructor Studio <291158726+constructor-studio[bot]@users.noreply.github.com>

Studio-Generated-By: Constructor Studio

Studio-Source-Repo: https://github.com/constructorfabric/studio

Constructor-Fabric: https://github.com/constructorfabric

Studio-Version: skill=1.0.0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
architecture/features/core-infra.md (1)

159-161: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Duplicate step number in Project Initialization flow.

Lines 159 and 161 both use step number "11", causing subsequent steps to be off by one. The correct sequence should be:

  • Line 159: Step 11 (ELSE: skip kit installation)
  • Line 161: Step 12 (inject root AGENTS.md)
  • Line 162: Step 13 (RETURN JSON)
  • etc.

Renumber step 161 onward to fix the sequence.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` around lines 159 - 161, The project
initialization flow has duplicate step numbering ("11") causing downstream
offsets; update the numbering for the entries starting with the algorithm
injection step so that "cpt-studio-algo-core-infra-inject-root-agents" /
`inst-inject-agents` becomes step 12 (not 11), the following
`inst-create-config-agents` becomes 13, and continue renumbering all subsequent
steps accordingly so the sequence is consecutive and the
`inst-skip-kit-declined` remains step 11.

Source: Linters/SAST tools

🧹 Nitpick comments (1)
architecture/features/core-infra.md (1)

187-187: 💤 Low value

Consider hyphenating compound adjectives for clarity.

Lines 187, 378, and 417 use compound adjectives before nouns without hyphens:

  • Line 187: "root managed block" → "root-managed block"
  • Line 378: "Constructor Studio managed block" → "Constructor-Studio-managed block"
  • Line 417: "Constructor Studio generated agent" → "Constructor-Studio-generated agent"

Hyphenating improves readability in technical documentation.

Also applies to: 378-378, 417-417

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` at line 187, Replace the unhyphenated
compound adjectives with hyphenated forms for clarity: change "root managed
block" to "root-managed block", "Constructor Studio managed block" to
"Constructor-Studio-managed block", and "Constructor Studio generated agent" to
"Constructor-Studio-generated agent" throughout the document (ensure consistency
in lines containing those phrases).

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@architecture/features/core-infra.md`:
- Line 196: The checklist item "inst-restore-gitignore" is marked complete ([x])
while its parent flow and most sibling steps are unchecked, causing inconsistent
state in the init/repair flow; update the checkbox state for
`inst-restore-gitignore` to match the actual implementation status (either
uncheck it if not implemented or check related steps and the parent flow if
implemented), and ensure the parent flow ID and sibling steps are updated
consistently so the block reflects the true completion state.
- Line 128: The checklist items in the doc are out of sync with the code: mark
the three flow checkboxes as complete if implemented—update the
`cpt-studio-flow-core-infra-project-init` entry (Project Init) at line 128 and
the corresponding Init Repair and Update flow entries at lines 174 and 203 to
checked state; verify this because `_repair_existing_install` is implemented and
invoked from `cmd_init`, so ensure the doc reflects that implementation by
changing the `- [ ]` to `- [x]` for those specific flow IDs.
- Line 625: The state transition checklist item with ID
cpt-studio-state-core-infra-project-install is inconsistent: the "init repair"
and "update-without-kits" transitions (currently unchecked at lines ~635-636)
are implemented in the flows at lines 172-200 and 201-228 respectively, so
update the spec to mark those checkboxes complete; alternatively, if those flows
are not actually implemented, revert or remove the transitions. Locate the state
transitions in the core-infra feature spec and either tick the checkboxes for
the implemented transitions or align the flows and spec so the implementation
and checklist match.
- Line 371: The checklist for algorithm ID
cpt-studio-algo-core-infra-gitignore-footprint is inconsistent with the
implementation: locate the algorithm entry with ID
cpt-studio-algo-core-infra-gitignore-footprint and update its checkbox states to
match current code (since _write_gitignore_block is invoked in the repair flow,
mark the overall algorithm and any corresponding steps as implemented/complete
or partially complete as appropriate), ensure step 2's checked state aligns with
the other steps, and scan nearby steps for similar mismatches so the document
accurately reflects implementation status.
- Line 745: The DoD checklist entries for init/repair and update behaviors (IDs
`cpt-studio-dod-core-infra-init-repair` and the corresponding ID at line ~766)
are still unchecked; update the markdown checklist items to mark them complete
(change the unchecked "- [ ]" to checked "- [x]") after verifying the underlying
flows and algorithms are implemented, and ensure the DoD text matches the
implemented behavior descriptions so the entries reflect the actual state of
`core-infra` init/repair and update flows.
- Line 222: The checklist entry for the gitignore rewrite is inconsistent: the
item "inst-update-gitignore" is marked complete ([x]) while its parent flow and
sibling steps remain unchecked; update the checklist so states align by changing
the line "3. [x] - `p1` - Rewrite the managed `.gitignore` block ... -
`inst-update-gitignore`" to an unchecked state ([ ]) (or conversely mark the
parent/siblings complete if that is correct) so the `inst-update-gitignore`
checkbox matches the parent flow's status.
- Around line 148-150: Update the checklist in
architecture/features/core-infra.md to mark the repair delegation as
implemented: change the unchecked box for item "3. `p1` - IF already initialized
and `--force` is absent: delegate to `cpt-studio-flow-core-infra-init-repair` -
`inst-if-exists`" to checked ([x]) and also mark its subitem "RETURN repair
result instead of treating existing initialization as an error -
`inst-return-repair`" as checked; this reflects the behavior already implemented
in cmd_init (init.py function cmd_init) per the referenced implementation.
- Line 861: Review the implementation status of the behaviors described at lines
861 and 865-868 in the core-infra.md file to determine which features are
actually implemented. For the `cfs init` repair mode behavior at line 861 and
the additional behaviors at lines 865-868, update each checkbox from unchecked
(- [ ]) to checked (- [x]) if the feature is fully implemented, or keep it
unchecked if it is not yet implemented or only partially implemented. Ensure the
checkbox states accurately reflect the current implementation status to maintain
spec consistency.

---

Outside diff comments:
In `@architecture/features/core-infra.md`:
- Around line 159-161: The project initialization flow has duplicate step
numbering ("11") causing downstream offsets; update the numbering for the
entries starting with the algorithm injection step so that
"cpt-studio-algo-core-infra-inject-root-agents" / `inst-inject-agents` becomes
step 12 (not 11), the following `inst-create-config-agents` becomes 13, and
continue renumbering all subsequent steps accordingly so the sequence is
consecutive and the `inst-skip-kit-declined` remains step 11.

---

Nitpick comments:
In `@architecture/features/core-infra.md`:
- Line 187: Replace the unhyphenated compound adjectives with hyphenated forms
for clarity: change "root managed block" to "root-managed block", "Constructor
Studio managed block" to "Constructor-Studio-managed block", and "Constructor
Studio generated agent" to "Constructor-Studio-generated agent" throughout the
document (ensure consistency in lines containing those phrases).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0fc67bd3-b840-4139-93b2-a912c07c1761

📥 Commits

Reviewing files that changed from the base of the PR and between 86f9f25 and 98318af.

📒 Files selected for processing (20)
  • .bootstrap/config/README.md
  • .bootstrap/config/core.toml
  • .github/workflows/ci.yml
  • .gitignore
  • Makefile
  • architecture/DESIGN.md
  • architecture/features/core-infra.md
  • scripts/seed_local_cache.py
  • skills/studio/agents.toml
  • skills/studio/scripts/studio/commands/init.py
  • skills/studio/scripts/studio/commands/kit.py
  • skills/studio/scripts/studio/commands/update.py
  • src/studio_proxy/cli.py
  • tests/test_agents_existing_snapshot.py
  • tests/test_init_update_footprint.py
  • tests/test_kit.py
  • tests/test_kit_manifest_install.py
  • tests/test_migrate_from_cypilot.py
  • tests/test_studio_proxy_cli.py
  • tests/test_update.py
✅ Files skipped from review due to trivial changes (2)
  • .bootstrap/config/README.md
  • architecture/DESIGN.md
🚧 Files skipped from review as they are similar to previous changes (12)
  • .github/workflows/ci.yml
  • tests/test_agents_existing_snapshot.py
  • Makefile
  • tests/test_migrate_from_cypilot.py
  • src/studio_proxy/cli.py
  • tests/test_studio_proxy_cli.py
  • skills/studio/agents.toml
  • .gitignore
  • scripts/seed_local_cache.py
  • tests/test_kit_manifest_install.py
  • tests/test_kit.py
  • skills/studio/scripts/studio/commands/init.py

### Project Initialization

- [x] `p1` - **ID**: `cpt-studio-flow-core-infra-project-init`
- [ ] `p1` - **ID**: `cpt-studio-flow-core-infra-project-init`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Verify checkbox states reflect actual implementation status.

Lines 128, 174, and 203 mark the Project Init, Init Repair, and Update flow IDs as unchecked (- [ ]), but the provided code snippets show _repair_existing_install is implemented and called from cmd_init. If these flows are already implemented, the checkboxes should be marked complete.

Also applies to: 174-174, 203-203

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` at line 128, The checklist items in the
doc are out of sync with the code: mark the three flow checkboxes as complete if
implemented—update the `cpt-studio-flow-core-infra-project-init` entry (Project
Init) at line 128 and the corresponding Init Repair and Update flow entries at
lines 174 and 203 to checked state; verify this because
`_repair_existing_install` is implemented and invoked from `cmd_init`, so ensure
the doc reflects that implementation by changing the `- [ ]` to `- [x]` for
those specific flow IDs.

Comment on lines +148 to 150
3. [ ] - `p1` - **IF** already initialized and `--force` is absent: delegate to `cpt-studio-flow-core-infra-init-repair` - `inst-if-exists`
1. [ ] - `p1` - **RETURN** repair result instead of treating existing initialization as an error - `inst-return-repair`
4. [x] - `p1` - **IF** interactive terminal AND no --dir flag - `inst-if-interactive`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Mark implemented repair delegation as complete.

Step 3 (lines 148-150) describes the repair delegation that is already implemented in cmd_init per the provided code snippet (init.py:1117-1127). If this behavior is live, mark the checkbox [x].

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` around lines 148 - 150, Update the
checklist in architecture/features/core-infra.md to mark the repair delegation
as implemented: change the unchecked box for item "3. `p1` - IF already
initialized and `--force` is absent: delegate to
`cpt-studio-flow-core-infra-init-repair` - `inst-if-exists`" to checked ([x])
and also mark its subitem "RETURN repair result instead of treating existing
initialization as an error - `inst-return-repair`" as checked; this reflects the
behavior already implemented in cmd_init (init.py function cmd_init) per the
referenced implementation.

Comment thread architecture/features/core-infra.md
**Steps**:
1. [ ] - `p1` - Parse `--with-kits {yes,true,no,false}` with default `no`; reject bare flags and unsupported values - `inst-parse-with-kits`
2. [ ] - `p1` - Refresh `.core/`, migrate config/layout metadata, and regenerate `.gen/` and generated agent outputs - `inst-update-core-generated`
3. [x] - `p1` - Rewrite the managed `.gitignore` block according to current install-dir and per-kit tracking policy - `inst-update-gitignore`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistent checkbox state in update flow.

Line 222 marks the gitignore rewrite step as complete [x], but the parent flow ID (line 203) and surrounding steps (lines 220-221, 223-227) are unchecked. Align checkbox states across the flow.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` at line 222, The checklist entry for the
gitignore rewrite is inconsistent: the item "inst-update-gitignore" is marked
complete ([x]) while its parent flow and sibling steps remain unchecked; update
the checklist so states align by changing the line "3. [x] - `p1` - Rewrite the
managed `.gitignore` block ... - `inst-update-gitignore`" to an unchecked state
([ ]) (or conversely mark the parent/siblings complete if that is correct) so
the `inst-update-gitignore` checkbox matches the parent flow's status.

Comment thread architecture/features/core-infra.md
### Project Installation State

- [x] `p1` - **ID**: `cpt-studio-state-core-infra-project-install`
- [ ] `p1` - **ID**: `cpt-studio-state-core-infra-project-install`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

State transition checkboxes should match flow implementation status.

Lines 635-636 add state transitions for init repair and update-without-kits, but are marked unchecked. If the corresponding flows (lines 172-200, 201-228) are implemented, these transitions should also be marked complete. Ensure consistency across the specification.

Also applies to: 635-636

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` at line 625, The state transition
checklist item with ID cpt-studio-state-core-infra-project-install is
inconsistent: the "init repair" and "update-without-kits" transitions (currently
unchecked at lines ~635-636) are implemented in the flows at lines 172-200 and
201-228 respectively, so update the spec to mark those checkboxes complete;
alternatively, if those flows are not actually implemented, revert or remove the
transitions. Locate the state transitions in the core-infra feature spec and
either tick the checkboxes for the implemented transitions or align the flows
and spec so the implementation and checklist match.

Comment thread architecture/features/core-infra.md

- [x] `cfs init` creates `{cf-studio-path}/config/core.toml` (kit registrations) and `{cf-studio-path}/config/artifacts.toml` with correct root system definition
- [x] `cfs init` in an already-initialized project returns exit code 2 with helpful message
- [ ] `cfs init` in an already-initialized project enters repair mode when metadata is readable, restores ignored/generated surfaces, and does not change pinned version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Align acceptance criteria checkboxes with implementation.

Line 861 describes init repair behavior that appears implemented based on code snippets, but is marked unchecked. Lines 865-868 describe new behaviors that may be partially or fully implemented. Review and update checkbox states to match actual implementation status for accurate spec tracking.

Also applies to: 865-868

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@architecture/features/core-infra.md` at line 861, Review the implementation
status of the behaviors described at lines 861 and 865-868 in the core-infra.md
file to determine which features are actually implemented. For the `cfs init`
repair mode behavior at line 861 and the additional behaviors at lines 865-868,
update each checkbox from unchecked (- [ ]) to checked (- [x]) if the feature is
fully implemented, or keep it unchecked if it is not yet implemented or only
partially implemented. Ensure the checkbox states accurately reflect the current
implementation status to maintain spec consistency.

Validate local cache bundle inputs before seeding and keep non-TTY manifest installs from prompting.

Preserve runtime and agent tracking during update metadata refresh and return a structured error for malformed managed gitignore blocks.

Update manifest typing annotations and fix the core-infra ordered list numbering.

Signed-off-by: ainetx <viator@via-net.org>

Co-Authored-By: Constructor Studio <291158726+constructor-studio[bot]@users.noreply.github.com>

Studio-Generated-By: Constructor Studio

Studio-Source-Repo: https://github.com/constructorfabric/studio

Constructor-Fabric: https://github.com/constructorfabric

Studio-Version: skill=1.0.0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@guides/CONFIGURATION.md`:
- Line 60: Update the documentation row that lists host integration files so the
surrounding prose uses the official platform name "GitHub" while leaving the
directory literal `.github/` unchanged; locate the table row that currently
reads something like "Host integration files | `.windsurf/`, `.cursor/`,
`.claude/`, `.github/`, `.codex/`, `.agents/` | ..." and replace the platform
name in the surrounding sentence (not the `.github/` path) with "GitHub".

In `@README.md`:
- Line 71: Update the README prose that references the host integration entry
containing the `.github/` token to use the official platform capitalization
"GitHub" (keep the directory path `.github/` unchanged), and apply the same
capitalization correction for the other occurrence that mentions `.github/`;
locate the table row or sentence that lists `.github/` and change surrounding
wording from lowercase "github" to "GitHub" for consistency in user-facing docs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 53666309-5f93-409d-bc6a-c6505fcc21cf

📥 Commits

Reviewing files that changed from the base of the PR and between 98318af and d26fc7e.

📒 Files selected for processing (18)
  • .bootstrap/config/README.md
  • README.md
  • architecture/features/core-infra.md
  • guides/AGENT-TOOLS.md
  • guides/CONFIGURATION.md
  • guides/MIGRATING-FROM-CYPILOT.md
  • guides/USAGE-GUIDE.md
  • scripts/seed_local_cache.py
  • skills/studio/SKILL.md
  • skills/studio/agents/cf-generate-author-worker.md
  • skills/studio/agents/cf-phase-compiler.md
  • skills/studio/agents/cf-phase-runner.md
  • skills/studio/scripts/studio/commands/kit.py
  • skills/studio/scripts/studio/commands/update.py
  • tests/test_kit_manifest_install.py
  • tests/test_seed_local_cache.py
  • tests/test_update.py
  • tests/test_workflow_subagents_dispatch.py
✅ Files skipped from review due to trivial changes (3)
  • skills/studio/agents/cf-phase-compiler.md
  • guides/AGENT-TOOLS.md
  • guides/USAGE-GUIDE.md
🚧 Files skipped from review as they are similar to previous changes (6)
  • skills/studio/scripts/studio/commands/update.py
  • tests/test_kit_manifest_install.py
  • scripts/seed_local_cache.py
  • skills/studio/scripts/studio/commands/kit.py
  • architecture/features/core-infra.md
  • tests/test_update.py

Comment thread guides/CONFIGURATION.md
| Host integration files | `.windsurf/`, `.cursor/`, `.claude/`, `.github/`, `.codex/`, `.agents/` | Generated by `cfs generate-agents`; regenerate when host setup changes |
| Runtime files | `.cf-studio/.core/`, `.cf-studio/.gen/` | Generated by Studio; gitignored by default; repaired by `cfs init`/`cfs update` |
| Installed kit content | `.cf-studio/config/kits/{slug}/` | Tracked or ignored per kit; tracked kits are editable repo content, ignored kits are generated local content |
| Host integration files | `.windsurf/`, `.cursor/`, `.claude/`, `.github/`, `.codex/`, `.agents/` | Generated by `cfs generate-agents`; gitignored by default; regenerate when host setup changes |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Normalize platform naming to “GitHub” in docs text.

Line 60 should use the official platform name GitHub in surrounding prose while keeping .github/ as the directory path literal.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~60-~60: The official name of this software platform is spelled with a capital “H”.
Context: ...| .windsurf/, .cursor/, .claude/, .github/, .codex/, .agents/ | Generated by...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@guides/CONFIGURATION.md` at line 60, Update the documentation row that lists
host integration files so the surrounding prose uses the official platform name
"GitHub" while leaving the directory literal `.github/` unchanged; locate the
table row that currently reads something like "Host integration files |
`.windsurf/`, `.cursor/`, `.claude/`, `.github/`, `.codex/`, `.agents/` | ..."
and replace the platform name in the surrounding sentence (not the `.github/`
path) with "GitHub".

Source: Linters/SAST tools

Comment thread README.md
| Host integration files | `.windsurf/`, `.cursor/`, `.claude/`, `.github/`, `.codex/`, `.agents/` | Generated by `cfs generate-agents`; regenerate when host integration changes |
| Setup directory | `.cf-studio/` | Created by setup; contains generated runtime files and user-editable config |
| Runtime files | `.cf-studio/.core/`, `.cf-studio/.gen/` | Generated by Studio; gitignored by default; repaired by `cfs init`/`cfs update` |
| Host integration files | `.windsurf/`, `.cursor/`, `.claude/`, `.github/`, `.codex/`, `.agents/` | Generated by `cfs generate-agents`; gitignored by default; regenerate when host integration changes |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use official platform capitalization (“GitHub”) in host integration examples.

Line 71 and Line 520 currently imply lowercase branding via .github/ in prose context. Please keep the directory path as-is but refer to the platform name as GitHub in surrounding wording for consistency in user-facing docs.

Also applies to: 520-520

🧰 Tools
🪛 LanguageTool

[uncategorized] ~71-~71: The official name of this software platform is spelled with a capital “H”.
Context: ...| .windsurf/, .cursor/, .claude/, .github/, .codex/, .agents/ | Generated by...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 71, Update the README prose that references the host
integration entry containing the `.github/` token to use the official platform
capitalization "GitHub" (keep the directory path `.github/` unchanged), and
apply the same capitalization correction for the other occurrence that mentions
`.github/`; locate the table row or sentence that lists `.github/` and change
surrounding wording from lowercase "github" to "GitHub" for consistency in
user-facing docs.

Source: Linters/SAST tools

@ainetx
ainetx merged commit 16fde5e into main Jun 7, 2026
20 checks passed
@ainetx
ainetx deleted the cfs-mini-footprint branch June 7, 2026 12:51
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