Skip to content

feat(apps): split +init commit, plainer wording, align skill branches - #14

Merged
raistlin042 merged 11 commits into
feat/lark-apps-devfrom
feat/apps-init-log-commit
Jun 4, 2026
Merged

feat(apps): split +init commit, plainer wording, align skill branches#14
raistlin042 merged 11 commits into
feat/lark-apps-devfrom
feat/apps-init-log-commit

Conversation

@raistlin042

@raistlin042 raistlin042 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

Optimizes the apps +init orchestrator 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 key scaffold is kept unchanged); (2) the empty-repo initialization now produces two clearly-named commits instead of one; (3) the lark-apps skill docs now use +init as the Path A initialization step and align the app-repo branch model to what +init actually produces (sprint/default on remote origin, 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 log Scaffolding (running miaoda-cli)... -> Initializing app code (running miaoda-cli)...; --template flag desc and dry-run description drop "scaffold" wording; JSON output key scaffold preserved.
  • shortcuts/apps/apps_init.go: commitAndPushIfDirty now 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/) and chore: initialize miaoda app config (.spark/, .agent/) — skipping an empty group; the non-empty (app upgrade) path stays a single chore: initialize miaoda app repository. New classifyPorcelain/porcelainPath/isConfigPath (read-only parse of git status --porcelain), stageAndCommit helper, and scaffoldKind* constants.
  • shortcuts/apps/apps_init_test.go: unit tests for the porcelain classifier (incl. rename/quoted/.sparkrc edge 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 uses apps +init (local dev starts after init); dual-branch mental model and +publish row aligned develop -> sprint/default; +init index row clone-dir guidance hardened to a MUST.
  • skills/lark-apps/references/lark-apps-local-dev.md: branch develop -> sprint/default, remote miaoda -> origin across 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 +init pointer.
  • 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)
  • local-eval passed (sandbox E2E 3/3, 1 real-init scenario fixture-skipped — covered by unit tests; skillave 4/4)
  • acceptance-reviewer passed (6/6 scenarios)
  • security code review passed (0 real vulnerabilities)
  • manual verification: apps +init --app-id app_x --dry-run --as user (description drops "scaffold", scaffold key 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

@raistlin042 raistlin042 added the feature New functionality label Jun 4, 2026
@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jun 4, 2026
@raistlin042
raistlin042 merged commit 5806fb9 into feat/lark-apps-dev Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant