build: bundle shared ai config into installer
This commit is contained in:
parent
3eca60148c
commit
4680f4b629
|
|
@ -161,7 +161,10 @@ claude -p "Return JSON: {\"test\": true}"
|
||||||
# Check git config
|
# Check git config
|
||||||
git config --list | grep cascadingdev
|
git config --list | grep cascadingdev
|
||||||
|
|
||||||
# Try environment variable
|
# Inspect shared config (repo-wide defaults)
|
||||||
|
cat config/ai.yml
|
||||||
|
|
||||||
|
# Try environment variable override
|
||||||
CDEV_AI_COMMAND="claude -p '{prompt}'" git commit -m "test"
|
CDEV_AI_COMMAND="claude -p '{prompt}'" git commit -m "test"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,12 @@ READY: 0 • CHANGES: 2 • REJECT: 0
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
Phase 2 supports multiple AI providers via CLI commands or direct API:
|
Phase 2 supports multiple AI providers via CLI commands or direct API. The
|
||||||
|
preferred way to set defaults is editing `config/ai.yml` (copied into every
|
||||||
|
generated project). The `runner.command_chain` list is evaluated left → right
|
||||||
|
until a provider succeeds, and the `ramble` section controls the GUI defaults.
|
||||||
|
Environment variables or CLI flags still override the shared config for ad-hoc
|
||||||
|
runs:
|
||||||
|
|
||||||
**Option 1: CLI-based (Recommended)**
|
**Option 1: CLI-based (Recommended)**
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -82,7 +87,8 @@ Phase 2 supports multiple AI providers via CLI commands or direct API:
|
||||||
git config cascadingdev.aiprovider "claude-cli"
|
git config cascadingdev.aiprovider "claude-cli"
|
||||||
git config cascadingdev.aicommand "claude -p '{prompt}'"
|
git config cascadingdev.aicommand "claude -p '{prompt}'"
|
||||||
|
|
||||||
# Or via environment variables (session)
|
# Or via environment variables (session). These temporarily override
|
||||||
|
# `config/ai.yml` for the current shell.
|
||||||
export CDEV_AI_PROVIDER="claude-cli"
|
export CDEV_AI_PROVIDER="claude-cli"
|
||||||
export CDEV_AI_COMMAND="claude -p '{prompt}'"
|
export CDEV_AI_COMMAND="claude -p '{prompt}'"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -322,6 +322,11 @@ def copy_install_assets_to_target(target: Path):
|
||||||
copy_if_exists(INSTALL_ROOT / "assets" / "templates" / "USER_GUIDE.md",
|
copy_if_exists(INSTALL_ROOT / "assets" / "templates" / "USER_GUIDE.md",
|
||||||
target / "USER_GUIDE.md")
|
target / "USER_GUIDE.md")
|
||||||
|
|
||||||
|
# Shared AI configuration
|
||||||
|
ai_cfg_src = INSTALL_ROOT / "config" / "ai.yml"
|
||||||
|
if ai_cfg_src.exists():
|
||||||
|
copy_if_missing(ai_cfg_src, target / "config" / "ai.yml")
|
||||||
|
|
||||||
# Copy shipped templates (preferred source of truth)
|
# Copy shipped templates (preferred source of truth)
|
||||||
tmpl_src = INSTALL_ROOT / "assets" / "templates"
|
tmpl_src = INSTALL_ROOT / "assets" / "templates"
|
||||||
if tmpl_src.exists():
|
if tmpl_src.exists():
|
||||||
|
|
@ -418,4 +423,4 @@ def main():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ def main():
|
||||||
"feature_request.md",
|
"feature_request.md",
|
||||||
"feature.discussion.md",
|
"feature.discussion.md",
|
||||||
"feature.discussion.sum.md",
|
"feature.discussion.sum.md",
|
||||||
|
"design.discussion.md",
|
||||||
"design_doc.md",
|
"design_doc.md",
|
||||||
"USER_GUIDE.md",
|
"USER_GUIDE.md",
|
||||||
"root_gitignore",
|
"root_gitignore",
|
||||||
|
|
@ -41,6 +42,11 @@ def main():
|
||||||
copy_tree(ROOT / "assets" / "templates" / "process", BUNDLE / "assets" / "templates" / "process")
|
copy_tree(ROOT / "assets" / "templates" / "process", BUNDLE / "assets" / "templates" / "process")
|
||||||
copy_tree(ROOT / "assets" / "templates" / "rules", BUNDLE / "assets" / "templates" / "rules")
|
copy_tree(ROOT / "assets" / "templates" / "rules", BUNDLE / "assets" / "templates" / "rules")
|
||||||
|
|
||||||
|
# copy shared AI configuration
|
||||||
|
config_src = ROOT / "config"
|
||||||
|
if config_src.exists():
|
||||||
|
copy_tree(config_src, BUNDLE / "config")
|
||||||
|
|
||||||
# copy automation directory (workflow.py and future orchestration scripts)
|
# copy automation directory (workflow.py and future orchestration scripts)
|
||||||
automation_src = ROOT / "automation"
|
automation_src = ROOT / "automation"
|
||||||
if automation_src.exists():
|
if automation_src.exists():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue