Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

Merge branch 'main' into HEAD

Corey Olson91b0c87cd050
diff --cc src/git.js
index 8c55b7c2,55d56d5c..6b782030
--- a/src/git.js
+++ b/src/git.js
@@@ -576,10 -542,15 +576,16 @@@ export function codeIsFromMain(root = C
return fact(key, () => readCodeIsFromMain(root));
}
+ /** Identify the running source's repository without letting an inherited hook redirect Git. */
+ export function codeUsesRepository(commonDir, root = CODE_ROOT) {
+ const info = tryGit(root, ['rev-parse', '--path-format=absolute', '--git-common-dir'], { env: gitChildEnv(root) });
+ return info.status === 0 && realpathSync.native(info.stdout.trim()) === realpathSync.native(commonDir);
+ }
+
/** Determine whether the code is from its main checkout, retaining the non-repository fallback. */
function readCodeIsFromMain(root) {
- const env = gitChildEnv(root);
+ // The same variables `git rev-parse --local-env-vars` names, cleared without a Git process to ask.
+ const env = cleanGitEnvironment();
const info = tryGit(root, ['rev-parse', '--path-format=absolute', '--show-toplevel', '--git-dir', '--git-common-dir'], { env });
const fields = info.stdout.split('\n');
if (info.status === 0 && fields.length === 3 && fields.every(Boolean)) {