feat(adf): populate command, unknown-op error clarity, CONTEXT scaffold section#48
Closed
SmartBrandStrategies wants to merge 2 commits intomainfrom
Closed
feat(adf): populate command, unknown-op error clarity, CONTEXT scaffold section#48SmartBrandStrategies wants to merge 2 commits intomainfrom
SmartBrandStrategies wants to merge 2 commits intomainfrom
Conversation
…versal Closes #43: Remove shell: true from runGit() in git-helpers.ts. Node.js resolves the git binary via PATH directly without a shell on WSL, Linux, macOS, and Windows. shell: true is unnecessary and allows shell metacharacters in args to be interpreted as shell syntax. Closes #42: Validate module paths in adf create before path.join. Paths containing ".." or absolute paths are rejected with a clear error. A secondary resolved-path check confirms the final path stays within the .ai/ directory, guarding against platform-specific bypass patterns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ld section charter adf populate [--dry-run] [--force] [--ai-dir <dir>] Reads package.json, README.md, and stack detection signals to auto-fill ADF files with project-specific content after charter adf init. Populates CONTEXT in core/backend/frontend.adf and STATE in state.adf. Idempotent: skips files with non-scaffold content unless --force. patcher: unknown ops now produce a clear error listing valid op names instead of the cryptic "handlers[op.op] is not a function" TypeError. CORE_SCAFFOLD: add a CONTEXT section placeholder so ADD_BULLET section:CONTEXT works immediately after adf init without requiring ADD_SECTION first. adf patch help: list all valid ops with concrete usage examples. bootstrap/init next steps: point to charter adf populate as step 1 instead of generic "edit core.adf manually" guidance. harness: extend SDLC corpus and runner with mixed QA/backend signal scenarios that exposed the classifier routing issues filed in #44/#45. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
ReviewVerdict: NEEDS FIX before merge Critical
Non-critical
Missing
Good
🤖 Generated with Claude Code |
Member
|
Superseded by 3ba3957 — populate command and CONTEXT scaffold section landed directly on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
charter adf populate— new command that auto-fills ADF context files from codebase signals (package.json, README, stack detection). Eliminates the "ADF files are pure boilerplate after init" problem observed in downstream repos. Idempotent: skips files with non-scaffold content unless--force.Unknown patch op: 'replace'. Valid ops: ADD_BULLET, ...instead of the cryptichandlers[op.op] is not a functionTypeError.CORE_SCAFFOLDCONTEXT section — scaffold now includes aCONTEXTplaceholder soADD_BULLET section:CONTEXTworks immediately post-init without a precedingADD_SECTION.adf patchhelp — lists all valid ops with concrete JSON examples for the three most common cases.charter adf populateinstead of vague "edit core.adf manually" guidance.Motivation
From a downstream repo session: after
charter bootstrap, the agent tried to fill ADF files withWrite(), failed on the lock file, then spent several turns discoveringADD_BULLETvia trial and error, and gothandlers[op.op] is not a functionwhen using the wrong op name. This PR fixes all of that friction.Test plan
charter adf populate --dry-runon a fresh repo shows detected project/stackcharter adf populatefills core.adf CONTEXT, state.adf STATE, backend/frontend.adf CONTEXTpopulateskips already-customized filescharter adf patch ... --ops '[{"op":"badOp"}]'shows clear error with valid ops listcharter adf initthencharter adf patch .ai/core.adf --ops '[{"op":"ADD_BULLET","section":"CONTEXT","value":"test"}]'works without ADD_SECTION first🤖 Generated with Claude Code