Skip to content

Cleanup: Change default output path to .chunk/context/review-prompt.md#78

Draft
schurchleycci wants to merge 23 commits intophase-2b/build-prompt-behaviorfrom
phase-6/output-path
Draft

Cleanup: Change default output path to .chunk/context/review-prompt.md#78
schurchleycci wants to merge 23 commits intophase-2b/build-prompt-behaviorfrom
phase-6/output-path

Conversation

@schurchleycci
Copy link
Contributor

Summary

  • Adds DEFAULT_OUTPUT_PATH (.chunk/context/review-prompt.md) and LEGACY_OUTPUT_PATH to config/index.ts
  • Changes --output default from ./review-prompt.md to .chunk/context/review-prompt.md
  • Adds deprecation warning when legacy ./review-prompt.md exists and new default is in use
  • Parent directory auto-creation already handled in core/build-prompt.ts
  • Updates README with changelog entry for the breaking change

Stacked on: Phase 2b (phase-2b/build-prompt-behavior)

Test plan

  • bun run typecheck passes
  • All tests pass

🤖 Generated with Claude Code

@schurchleycci schurchleycci force-pushed the phase-2b/build-prompt-behavior branch from 71fefe9 to c58eee8 Compare March 10, 2026 17:26
schurchleycci and others added 11 commits March 10, 2026 14:23
Proposed documentation for the codebase and CLI restructuring:
- ARCHITECTURE.md: target module structure, layering rules, naming conventions
- CLI.md: target command tree, flag conventions, naming rules
- tasks.md: implementation checklist for Phases 2-8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review feedback: clarify spinner ownership (orchestrators only,
not step functions), add module rules for api/, utils/, types/, skills/,
enumerate Phase 4 step functions, and add --output default change task.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ARCHITECTURE.md: Refine lateral dependency rule (allow ui/ imports
  from leaf modules), document known output.ts violation, clarify api/
  module contents, flatten `run task` to `run --definition`
- CLI.md: Flatten `chunk run task` to `chunk run` as default action,
  update naming rules with examples
- tasks.md: Add explicit import chain details for Phase 2, release
  notes callout for --output default change, Phase 5 help text update,
  Phase 6 merged view specification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clarify the proposed CLI and architecture changes, keep task as the top-level command group, and add a summary document for quicker review.

Made-with: Cursor
The hook command structure (7 subcommand families) was reviewed and
found well-suited to its purpose — no changes needed. Updated
SUMMARY.md non-goal wording and added evaluation note to
ARCHITECTURE.md. Also includes prior doc refinements: expanded
layering rules, build-prompt behavior matrix, task run definition
behavior, package boundary docs, and phase annotations in tasks.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Define index.ts as a composition root, separate mechanical and user-facing build-prompt work, and align enforcement scope with the proposed architecture so the restructuring plan stays easier to execute and review.

Made-with: Cursor
Make the phase dependency graph explicit so implementers can see what's
parallelizable and what must be sequenced. Pull hook test infrastructure
into its own Phase 7b since it's independent of restructuring work.
Add guidance to update CLAUDE.md incrementally rather than deferring
all doc updates to Phase 8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move DEFAULT_ANALYZE_MODEL and DEFAULT_PROMPT_MODEL from
commands/build-prompt.ts to config/index.ts so that both index.ts
and commands/build-prompt.ts import downward from config/ rather
than index.ts importing from the command layer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move command-specific CLI definitions (flags, help text, examples, parser
helpers, option defaults) out of src/index.ts into their respective
src/commands/* modules. Each command module now exports a register*()
function that takes the Commander program and registers itself, following
the same pattern already used by @chunk/hook's registerHookCommands().

This keeps index.ts limited to program creation, command registration
calls, and top-level error handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… core/task-run.ts

Move business logic out of the task command module into dedicated core
modules, keeping commands/ as a thin CLI layer. Includes lint fixes for
import ordering and export types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
schurchleycci and others added 3 commits March 10, 2026 14:38
The extraction in a257c89 dropped the CIRCLE_TOKEN preference,
only checking CIRCLECI_TOKEN. Restore the original behavior:
prefer CIRCLE_TOKEN, fall back to CIRCLECI_TOKEN.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tests

- Rewrite `chunk task` description to clarify tasks are CircleCI pipeline runs
- Rewrite `chunk task run --help` with usage examples, clarify --definition
  accepts a configured name or raw UUID, note .chunk/run.json is always required
- Rewrite `chunk task config --help` to describe the wizard and what it creates
- Fix env var name in help text from CIRCLE_TOKEN to CIRCLECI_TOKEN
- Align "Next steps" output in runTaskConfigWizard with finalized help text
- Remove deprecated re-exports (runTaskRun, runTaskConfig) from commands/task.ts
- Delete old duplicate test files (task-command.unit.test.ts, task.unit.test.ts)
  and port missing test cases into core/task-run.unit.test.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
schurchleycci and others added 8 commits March 10, 2026 14:48
The help text referenced CIRCLECI_TOKEN but the code prefers
CIRCLE_TOKEN with CIRCLECI_TOKEN as fallback. Also restore the
original description wording to match CLI help tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the standalone `skills status` subcommand and `listSkills()` from
core/skills.ts. The `skills list` command now shows skill name, description,
and per-agent install state (current/outdated/missing) in a unified view
powered by `getSkillsStatus()`. Tests updated accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clarify that the error occurs because there is no way to enumerate all
repos in an org, and suggest both alternatives: omit --org for
auto-detection, or provide --repos explicitly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract resolveOrgAndRepos() into core/build-prompt.ts so the
auto-detection and validation logic lives in the orchestration layer
rather than the thin command wrapper. The command layer now delegates
entirely to core for resolving org and repos from flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace outdated help text with examples covering all four flag
combinations: auto-detect, --repos only, --org + --repos, and a note
that --org without --repos is an error. Remove redundant -h/--help
line.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the Quick Start and build-prompt command reference to reflect
that --org and --repos are optional and auto-detected from git remote.
Add a behavior matrix documenting all four flag combinations. Update
examples to show the auto-detect-first workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The new default writes directly into the .chunk/context/ directory
where AI coding agents auto-discover context files, eliminating the
manual copy step. Parent directories are created automatically.
A deprecation warning is printed when a legacy ./review-prompt.md
exists so users with scripts referencing the old path are aware.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@schurchleycci schurchleycci force-pushed the phase-2b/build-prompt-behavior branch from c58eee8 to 2fdc058 Compare March 10, 2026 19:09
@schurchleycci schurchleycci changed the title Phase 6: Change default output path to .chunk/context/review-prompt.md Cleanup Phase 6: Change default output path to .chunk/context/review-prompt.md Mar 10, 2026
Extracts warnIfLegacyOutputPath() as an exported function and adds
3 test cases: warning when legacy file exists, no warning when absent,
no warning when --output is explicitly provided.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
originalCwd = process.cwd();
process.chdir(tempDir);
consoleSpy = mock(() => {});
console.log = consoleSpy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The console.log is globally overwritten but never restored in afterEach. If this test file runs before other tests in the same process, those tests will lose console output. Should afterEach restore the original console.log?

@schurchleycci schurchleycci force-pushed the phase-2b/build-prompt-behavior branch from 7b1b8c4 to 6618e35 Compare March 11, 2026 14:22
@schurchleycci schurchleycci changed the title Cleanup Phase 6: Change default output path to .chunk/context/review-prompt.md Cleanup: Change default output path to .chunk/context/review-prompt.md Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants