Add quickstart file-write flow for faster local onboarding#322
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0c3e18ad8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds a local-first “materialize a starter file” path to the AgentGuard SDK CLI so users (and coding agents) can go from install → runnable file with one command, reducing copy/paste friction while keeping overwrite behavior explicit.
Changes:
- Extend
agentguard quickstartto support--write,--output, and--force, including updated “next commands” output for written files. - Add unit tests covering file creation, overwrite refusal/force behavior, and CLI integration.
- Update onboarding docs/READMEs and add proof artifacts for the new flow.
Reviewed changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/agentguard/quickstart.py | Implements --write flow, file writing, and updated rendering for written starters. |
| sdk/agentguard/cli.py | Wires new quickstart flags into argparse and passes through to run_quickstart. |
| sdk/tests/test_quickstart.py | Adds tests for write/create/refuse/force overwrite and CLI writing behavior. |
| README.md | Documents the new --write/--output/--force onboarding path. |
| sdk/PYPI_README.md | Mirrors README onboarding updates for PyPI. |
| docs/guides/coding-agents.md | Adds guidance for generating starter files in-place via --write. |
| examples/starters/README.md | Updates suggested flow to include quickstart --write. |
| proof/quickstart-write-flow/raw-output.txt | Captures proof output for raw quickstart write flow. |
| proof/quickstart-write-flow/openai-output.txt | Captures proof output for OpenAI quickstart write flow. |
| proof/quickstart-write-flow/overwrite-refusal.txt | Captures proof output for overwrite refusal behavior. |
| proof/quickstart-write-flow/agentguard_raw_quickstart.py | Saved generated raw starter file artifact. |
| proof/quickstart-write-flow/openai/agentguard_openai_quickstart.py | Saved generated OpenAI starter file artifact. |
| PR_DRAFT.md | Draft PR narrative + validation commands and artifact listing. |
| MORNING_REPORT.md | Summary of work completed + validation notes. |
Draft PR
Title
Add quickstart file-write flow for faster local onboardingSummary
agentguard quickstart --writeso the SDK can create a runnable starter file directly--outputand--forcefor safe local file creation and explicit overwrite behaviorproof/quickstart-write-flow/Why This Matters
Scope
sdk/agentguard/quickstart.pysdk/agentguard/cli.pysdk/tests/test_quickstart.pyREADME.mddocs/guides/coding-agents.mdexamples/starters/README.mdsdk/PYPI_README.mdproof/quickstart-write-flow/*Non-goals
Proof
python -m ruff check sdk/agentguard/cli.py sdk/agentguard/quickstart.py sdk/tests/test_quickstart.pyPYTHONPATH=<repo>/sdk python -m pytest sdk/tests/test_quickstart.py -vPYTHONPATH=<repo>/sdk python scripts/sdk_preflight.pyPYTHONPATH=<repo>/sdk python -m pytest sdk/tests -v --cov=agentguard --cov-report=term-missing --cov-fail-under=80python -m bandit -r sdk/agentguard -s B101,B110,B112,B311 -qSaved artifacts:
proof/quickstart-write-flow/raw-output.txtproof/quickstart-write-flow/openai-output.txtproof/quickstart-write-flow/overwrite-refusal.txtproof/quickstart-write-flow/agentguard_raw_quickstart.pyproof/quickstart-write-flow/openai/agentguard_openai_quickstart.pyNotes
agentguard47install outside this worktree, so local Python validation was run withPYTHONPATHpinned tosdk/in this branch to ensure the tests and CLI exercised the PR code.