feat: support simple projects and root Git repositories

Allow registering a single Git repository at the engineering project root with --path . while retaining path safety checks.

Document Git-optional projects first and cover plain folders, root repositories, and multiple repositories in process tests and native smoke scenarios.

Validated with 23 passing tests and macOS ARM64 native smoke checks for all three layouts.
This commit is contained in:
2026-11-11 16:38:18 +00:00
parent b91829270b
commit 8160c991a4
10 changed files with 178 additions and 9 deletions
@@ -51,7 +51,7 @@ public final class EngineeringCli implements Runnable {
}
private int report(ValidationReport report, Format format) { emit(report, format); return report.valid() ? 0 : 4; }
@Command(name = "init", mixinStandardHelpOptions = true, description = "Initialize protocol files without modifying Git.")
@Command(name = "init", mixinStandardHelpOptions = true, description = "Initialize protocol files in this project folder; Git is optional.")
int init(@Option(names = "--name", required = true) String name) {
Path target = project == null ? cwd : resolve(project);
return emit(projects.initialize(target, name), Format.markdown);
@@ -66,7 +66,8 @@ public final class EngineeringCli implements Runnable {
@Command(name = "repo", mixinStandardHelpOptions = true, description = "Register existing source repositories; default access is read-only.")
public class RepoCommands {
@Command(name = "add", mixinStandardHelpOptions = true)
int add(@Parameters(index = "0") String id, @Option(names = "--path", required = true) String path,
int add(@Parameters(index = "0") String id,
@Option(names = "--path", required = true, description = "Path relative to the project root; use . for the root repository.") String path,
@Option(names = "--type", defaultValue = "linked-git") String type,
@Option(names = "--language") String language, @Option(names = "--allow-edit") boolean edit,
@Option(names = "--validation-command") List<String> commands) {