feat(apps): split +init commit, plainer wording, align skill branches - #14
Merged
Conversation
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
Optimizes the
apps +initorchestrator and its skill docs. Three things: (1) the user-facing progress/help/dry-run wording dropped the jargon term "scaffold" in favor of plainer "code init" phrasing (the machine-contract JSON keyscaffoldis kept unchanged); (2) the empty-repo initialization now produces two clearly-named commits instead of one; (3) the lark-apps skill docs now use+initas the Path A initialization step and align the app-repo branch model to what+initactually produces (sprint/defaulton remoteorigin, backend-confirmed). Also verified the "ask the user where to clone" step already existed and strengthened it from a soft tip into a hard gate.Changes
shortcuts/apps/apps_init.go: progress logScaffolding (running miaoda-cli)...->Initializing app code (running miaoda-cli)...;--templateflag desc and dry-run description drop "scaffold" wording; JSON output keyscaffoldpreserved.shortcuts/apps/apps_init.go:commitAndPushIfDirtynow takes the scaffold kind and, for the empty-repo (app init) path, splits the working tree into two commits —chore: initialize app project code(everything outside.spark/and.agent/) andchore: initialize miaoda app config(.spark/,.agent/) — skipping an empty group; the non-empty (app upgrade) path stays a singlechore: initialize miaoda app repository. NewclassifyPorcelain/porcelainPath/isConfigPath(read-only parse ofgit status --porcelain),stageAndCommithelper, andscaffoldKind*constants.shortcuts/apps/apps_init_test.go: unit tests for the porcelain classifier (incl. rename/quoted/.sparkrcedge cases), the two-commit split (both groups / app-only / config-only), non-empty single commit, pathspec assertions, and the wording change.skills/lark-apps/SKILL.md: Path A quickstart usesapps +init(local dev starts after init); dual-branch mental model and+publishrow aligneddevelop->sprint/default;+initindex row clone-dir guidance hardened to a MUST.skills/lark-apps/references/lark-apps-local-dev.md: branchdevelop->sprint/default, remotemiaoda->originacross the end-to-end flow and native-git notes; DB dev/online semantics unchanged (only the incidental branch-name reference updated); added a one-line+initpointer.skills/lark-apps/references/lark-apps-init.md: documents the two-commit split, plainer init wording, and promotes the "ask which directory before cloning" tip to a hard pre-flight gate with a few-shot.Test Plan
make unit-test/ validate passed (build + vet + unit + integration + convention + security)apps +init --app-id app_x --dry-run --as user(description drops "scaffold",scaffoldkey kept),apps +init --help(no "scaffold template"),apps +init --as user(missing --app-id -> structured validation error, exit 2)Note: the app-repo branch model alignment (
sprint/default+origin) follows backend-confirmed default-branch behavior; please confirm the publish chain (main <- sprint/default) reads correctly.Related Issues
N/A