Community程式設計與開發github.com

test-local-twoliter

Build and test local changes to twoliter before releasing

相容平台~Claude Code~Codex CLI~Cursor
npx add-skill https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/test-local-twoliter

name: test-local-twoliter description: Build and test local changes to twoliter before releasing

Skill: Test Local Twoliter Changes

Purpose

Build twoliter from local source and configure kits to use the locally-built binary for testing changes before release.

When to Use

  • Making changes to twoliter source code
  • Testing twoliter modifications before creating a PR
  • Debugging twoliter behavior
  • Validating fixes to twoliter

Prerequisites

  • Twoliter repository cloned in the forest
  • Rust toolchain installed
  • At least one kit repository to test with

Procedure

1. Make changes to twoliter source

Edit files in twoliter/twoliter/src/ or twoliter/twoliter/embedded/.

2. Build twoliter

cd twoliter
cargo build --release

The binary will be at target/release/twoliter.

3. Test the changes

Override TWOLITER_DIR to point to your local build directory:

cd kits/bottlerocket-core-kit
make build TWOLITER_DIR=./twoliter/target/release

4. Iterate

After making more changes:

# Rebuild twoliter
cd ./twoliter
cargo build --release

# Test again
cd kits/bottlerocket-core-kit
make build TWOLITER_DIR=./twoliter/target/release

Validation

Verify the local twoliter is being used by checking the path:

cd kits/bottlerocket-core-kit
make build TWOLITER_DIR=./twoliter/target/release 2>&1 | head -5

You should see your modified twoliter being invoked.

Common Issues

Changes not taking effect:

  • Ensure you ran cargo build --release after making changes
  • Verify the path in TWOLITER_DIR is correct
  • Check that the binary exists: ls -lh ./twoliter/target/release/twoliter

Build errors in twoliter:

  • Run cargo check to see detailed error messages
  • Run cargo clippy to catch common issues
  • Run cargo test to verify tests pass

Kit build fails with local twoliter:

  • Check twoliter output for error messages
  • Add --log-level debug by modifying the Makefile temporarily or using the twoliter binary directly

Reverting to Released Version

To go back to using the released version, simply omit the TWOLITER_DIR override:

cd kits/bottlerocket-core-kit
make build

This uses the default tools/twoliter/twoliter from the released version.

Related Skills

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-kit-locally

Build a kit and publish it to a locally hosted registry for development testing

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

prepare-core-kit-release

Prepare bottlerocket-core-kit for release by bumping version and updating changelog

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相關技能