feat(cli): telemetry data-schema+ post-create git init - #10
Merged
Conversation
… durations - Structured `code` on every *:finish:error (errorCode by step; e.g. MIGRATION_FAILED); the code is propagated to the terminal <cmd>:failed outcome event too. - Persistent anonymous distinct_id in ~/.config/chaibuilder/id; run_id stays per-run. - is_ci carried in event properties. - Command-outcome events <cmd>:done / <cmd>:failed for create/new/switch/check_env. - duration_ms on step finishes and on outcome events. New dimensions ride in `properties`; distinct_id/run_id reuse existing top-level fields, so no ingestion-endpoint change is required. Persistent id is skipped for opted-out users. Unifies runSteps cancel handling so a cancel is neither done nor failed.
New initGit step, run after the app is set up: - Only prompts when git is installed; decline/cancel is a skip and never fails create. - On confirm: git init + add -A + commit "feat: chaibuilder starter setup", supplying a fallback identity only for the field(s) git has none configured for. - Never stages env secrets (git reset -- .env), independent of the template .gitignore. - Cleans up a half-initialized .git if the commit fails. - Telemetry: create:git_init:start / finish:success (committed|declined) / finish:error (code GIT_INIT_FAILED), each with duration_ms.
Copilot stopped reviewing on behalf of
surajair due to an error
July 23, 2026 06:53
chaibuilder-dev
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two changes, one commit each:
Telemetry data & schema
codeon every*:finish:error(e.g.MIGRATION_FAILED), propagated to the terminal<cmd>:failedoutcome too.distinct_idin~/.config/chaibuilder/id;run_idstays per-run.is_ciin event properties.<cmd>:done/<cmd>:failedfor create/new/switch/check_env.duration_mson step finishes and outcomes.New dimensions ride in
properties;distinct_id/run_idreuse existing top-level fields — no ingestion-endpoint change required. Persistent id is skipped for opted-out users.Post-create git init
git init+ commitfeat: chaibuilder starter setup..envsecrets (independent of the template.gitignore); cleans up a half-init.giton failure.create:git_init:*events.Testing
tscclean, build clean.