- Never commit directly to
master; use a branch for work. - Only commit when explicitly asked by the user.
- When the user asks for a commit, stage and commit everything currently shown by
git statusunless the user says otherwise. - Never delete files without permission.
zcmd.cppand thesrc/*.hmodules are the C++ side of the project.
- Keep changes simple and focused; avoid over-engineering.
- No breaking changes without checking with the user first.
- Prefer Windows SDK / standard Windows APIs over extra dependencies.
- Prefer native Windows APIs and standard library solutions whenever possible.
- Avoid third-party library dependencies unless there is a clear need and the user agrees.
- Build through
build.bat.
- Use
snake_casefor variables and functions. - Prefer single-word function and variable names where there is no ambiguity.
- Prefer single-word module / command names when possible.
- Use command-style names for user-facing tools when it fits the project style.
Examples:
play,edit,explore. - Use PascalCase / camel-cased type names for structs and other types.
Examples:
ExploreState,ExploreDialog. - Use all-caps enum types and enum values for explorer-style mode constants.
Examples:
EXPLORER_SORT_MODE,EXPLORER_SORT_NAME. - Use a clear module prefix for related helpers.
Example:
explore_toggle(),explore_draw(),explore_load_entries().
- Tool name is
Zcmd. - Prompt format is
[time]folder[branch*]>. - Display paths with
/separators everywhere in UI output. - Keep built-in command UX keyboard-friendly and consistent.
- Keep the built-in color language consistent.
- Directories: blue
75 - Executables / commands: green
114 - Archives: red
203 - Images: magenta
38;5;170 - Audio/video: cyan
38;5;51 - Hidden files: gray
240 - Shared macros stay the source of truth:
GRAY,BLUE,RED,YELLOW,GREEN,RESET
- Version format is
0.0.X. - Only the third number is auto-bumped during normal builds.
version.txtstores the current patch version.build.batincrements on successful build and rolls back on failure.- Major/minor version jumps are manual.
- By default, a user request to release means the binary is already built and
version.txtalready contains the intended release patch version. - For a normal release request, do not run
build.bat. - For a normal release request, do not edit
version.txt. - For a normal release request, do not commit, merge, tag, or push unless the user explicitly asks for that as a separate step.
- Use release tags in
v0.0.Xformat and release titles inzcmd v0.0.Xformat. - Always attach
zcmd.exeas the GitHub release asset. - For a normal release request, include short release notes that summarize what changed in that version, not just the version number.
- If the user does not provide release notes, infer a concise high-signal summary from the recent completed work.
- Default release flow:
Read
version.txtRelease.\zcmd.exeasv0.0.XExample:gh release create v0.0.X .\zcmd.exe --title "zcmd v0.0.X" --notes "Highlights: ..." - If the asset needs to be replaced on an existing release, use:
gh release upload v0.0.X .\zcmd.exe --clobber - Commit, push, branch cleanup, and tag/source alignment are separate follow-up tasks and should not be done as part of a normal release request unless explicitly requested.
- This shortcut flow may leave the GitHub release tag temporarily pointing at the current remote state instead of the local unpushed commit; fixing that later is a separate explicit task.
build.batalready kills runningzcmd.exebefore building.- Tab completion should stay focused on file/folder navigation; PATH executable completion is postponed by design.