Skip to content

Commit 6dd6b82

Browse files
committed
handle non-git environment
1 parent 6dab027 commit 6dd6b82

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

plugins/compound-engineering/skills/ce-brainstorm/SKILL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ This skill does not implement code. It explores, clarifies, and documents decisi
1616

1717
## Optional Local Config
1818

19-
Read optional machine-local settings from `.compound-engineering/config.local.yaml` in the repo root. Resolve repo root with `git rev-parse --show-toplevel` and read from `<repo-root>/.compound-engineering/config.local.yaml`.
19+
Read optional machine-local settings from `.compound-engineering/config.local.yaml` in the repo root.
20+
21+
Use this guarded read pattern so non-git directories fall back cleanly:
22+
23+
!`(top=$(git rev-parse --show-toplevel 2>/dev/null); [ -n "$top" ] && cat "$top/.compound-engineering/config.local.yaml" 2>/dev/null) || echo '__NO_CONFIG__'`
24+
25+
If the block contains YAML key-value pairs, extract supported keys.
26+
If it shows `__NO_CONFIG__` (including non-git directories), treat as missing config and continue with defaults.
27+
If it shows an unresolved command string, attempt a native file-read from `.compound-engineering/config.local.yaml` only when repo root is known; otherwise treat as missing config.
2028

2129
Supported key:
2230
- `ce_brainstorm_mode` -- `lean` or `standard` (default `standard`)

plugins/compound-engineering/skills/ce-plan/SKILL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ This workflow produces a durable implementation plan. It does **not** implement
1616

1717
## Optional Local Config
1818

19-
Read optional machine-local settings from `.compound-engineering/config.local.yaml` in the repo root. Resolve repo root with `git rev-parse --show-toplevel` and read from `<repo-root>/.compound-engineering/config.local.yaml`.
19+
Read optional machine-local settings from `.compound-engineering/config.local.yaml` in the repo root.
20+
21+
Use this guarded read pattern so non-git directories fall back cleanly:
22+
23+
!`(top=$(git rev-parse --show-toplevel 2>/dev/null); [ -n "$top" ] && cat "$top/.compound-engineering/config.local.yaml" 2>/dev/null) || echo '__NO_CONFIG__'`
24+
25+
If the block contains YAML key-value pairs, extract supported keys.
26+
If it shows `__NO_CONFIG__` (including non-git directories), treat as missing config and continue with defaults.
27+
If it shows an unresolved command string, attempt a native file-read from `.compound-engineering/config.local.yaml` only when repo root is known; otherwise treat as missing config.
2028

2129
Supported key:
2230
- `ce_plan_research_mode` -- `lean` or `standard` (default `standard`)

0 commit comments

Comments
 (0)