feat: add cadre init interactive scaffolding command (#15) (#15)#20
Closed
feat: add cadre init interactive scaffolding command (#15) (#15)#20
cadre init interactive scaffolding command (#15) (#15)#20Conversation
This was referenced Feb 23, 2026
jafreck
added a commit
that referenced
this pull request
Feb 26, 2026
When running in DAG mode, the fleet orchestrator now logs the computed wave plan before executing any waves. Example output: DAG wave plan: Wave 0 → [#10, #12] | Wave 1 → [#15] | Wave 2 → [#20, #22] This makes it easy to verify the dependency resolution and execution order from logs without inspecting the fleet checkpoint file.
jafreck
added a commit
that referenced
this pull request
Feb 26, 2026
When running in DAG mode, the fleet orchestrator now logs the computed wave plan before executing any waves. Example output: DAG wave plan: Wave 0 → [#10, #12] | Wave 1 → [#15] | Wave 2 → [#20, #22] This makes it easy to verify the dependency resolution and execution order from logs without inspecting the fleet checkpoint file.
This was referenced Mar 4, 2026
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
Implements
cadre initas an interactive CLI wizard that scaffolds a complete CADRE project configuration. Users are prompted for project name, platform, repository, repo path, base branch, issue selection mode, agent backend, build commands, and GitHub auth method. The generatedcadre.config.jsonis validated viaCadreConfigSchema.parse()before being written to disk.Closes #15
Changes
package.json/package-lock.json: Added@inquirer/prompts@^7as a runtime dependency for interactive terminal prompts.src/cli/prompts.ts(new): Defines all interactive prompts with inline validation. ExportsrunPrompts({ yes: boolean })which either runs the interactive wizard or returns defaults in non-interactive mode. Exports thePromptAnswersinterface.src/cli/init.ts(new): Core init logic. Checks for a git repo, handles existing config overwrite confirmation, assembles and validates the config viaCadreConfigSchema.parse(), writescadre.config.json, appends.cadre/to.gitignore, and creates.github/agents/.src/index.ts: Registers theinitsubcommand with Commander, including--yes/-yand--repo-pathflags, following the existing command registration pattern.tests/prompts.test.ts(new): Unit tests forrunPromptscovering the--yesmode and all validation functions (project name, repository, repo path).tests/init.test.ts(new): Integration tests forrunInitusing temporary directories. Verifies git-repo detection, config writing,.gitignoremanagement,.github/agents/creation, and overwrite handling.tests/cli-init.test.ts(new): Additional init tests focused on edge-case behaviors.tests/index-init.test.ts(new): Tests for the Commander command registration (help output, flag routing, error handling).tests/inquirer-prompts.test.ts(new): Tests for the@inquirer/promptsintegration layer.tests/github-issues.test.ts: Fixed a pre-existing test assertion to match the updated MCP tool name (issue_readwithmethodparameter, replacing the oldget_issuecall).Implementation Details
Prompts are split into two layers:
prompts.tshandles the UI/UX layer (inquirer calls + validation) whileinit.tsorchestrates the file system side effects. In--yesmode, project name and repository are derived from the git remote URL when available, falling back to empty strings with a warning. Config assembly maps prompt answers directly to theCadreConfigSchemashape; theparse()call acts as a final correctness gate before any file is written. File writes useatomicWriteJSONfor the config and directfscalls for the.gitignoreappend and directory creation.Testing
--yesmode defaults, per-field validation, git-repo detection error, config write/parse round-trip,.gitignoreappend (existing and missing),.github/agents/directory creation, overwrite-with---yesflow, Commander command registrationgithub-issues.test.ts) is an unrelated regression from a prior MCP API rename and was fixed as part of this PRIntegration Verification
tests/github-issues.test.tsfixed in this PR; integration report captured it before the fix was applied)Notes
copilot; the Claude option is deferred to issue Multi-backend agent launcher: native support for Copilot CLI, Claude CLI, and direct API #3..github/agents/scaffolding (populating agent prompt files) is deferred to a sub-issue as noted in the original issue.--yesmode, fields without obvious defaults (project name, repository) are derived from the git remote URL if detectable; otherwise they default to empty strings with a logged warning.--repo-pathflag allows overriding the working directory and bypasses the local git-repo existence check.Cadre Process Challenges
--yesmode defaults for fields like project name and repository — the issue didn't specify what to do when no obvious default exists. The analysis agent reasonably inferred "derive from git remote or emit a warning", but this required an assumption.github-issues.test.ts), but it left a result markdown file (fix-surgeon-integration-fix-test-result.md) in the worktree root. This artifact should be cleaned up or written to the.cadre/scratch space, not the project root.task-00N-result.md,task-00N-tests.md) were committed to the worktree root rather than stored only in.cadre/. These clutter the diff and should be redirected to the.cadre/issues/<N>/directory or excluded from commits entirely.github-issues.test.tsfailure. The retry resolved the issue, though the failure was unrelated to the actual feature being implemented — the pipeline could benefit from a "pre-check" phase to detect pre-existing failures before attributing them to new code..cadre/issues/<N>/would keep the diff clean and focused on the actual feature changes.Closes #15