Skip to content

Release v2.2.0 (Container) + v0.2.0 (CLI)#75

Merged
AnExiledDev merged 17 commits intomainfrom
staging
Apr 16, 2026
Merged

Release v2.2.0 (Container) + v0.2.0 (CLI)#75
AnExiledDev merged 17 commits intomainfrom
staging

Conversation

@AnExiledDev
Copy link
Copy Markdown
Owner

@AnExiledDev AnExiledDev commented Apr 16, 2026

Summary

  • @coredirective/cf-container v2.2.0 — Claude Code Router, Codex CLI, 6 new behavioral rules, agent model upgrades, config tuning, docs restructure
  • @coredirective/cf-cli v0.2.0session tokens command for thinking token analysis

Container Highlights

  • Claude Code Router — proxy daemon for routing API calls to alternate LLM providers (DeepSeek, Gemini, OpenRouter)
  • Codex CLI — OpenAI terminal coding agent with config management and persistence
  • New rules — auto-memory, zero-tolerance-bugs, scope-discipline, explicit-start, plan-presentation, surface-decisions
  • Agent system — all opus-based agents pinned to opus-4-5, investigator/security-auditor upgraded to opus
  • Config changes — Opus 4.7 default, thinking tokens reduced, effort level max, compaction tuned

CLI Highlights

  • codeforge session tokens — analyze thinking token usage across sessions with density metrics

Test plan

  • CLI tests pass (327 tests)
  • Container tests pass (updated for new config location)

Summary by CodeRabbit

  • Tests
    • Updated validation tests to confirm CodeForge assets are properly organized in the new default location
    • Tests now verify required configuration and manifest files are present in expected locations
    • Removed obsolete synchronization checks between separate asset directories
    • Strengthened validation to focus on default directory structure integrity

claude added 16 commits April 12, 2026 17:09
…ucture docs

Container:
- Add claude-code-router feature for LLM provider routing (DeepSeek, Gemini, OpenRouter)
- Add codex-cli feature for OpenAI Codex terminal agent
- Add defaults/ directory with factory config templates
- Update ccusage feature with Codex support
- Update auth scripts for new provider API keys

Dashboard:
- Extract dashboard/ to separate CodeDirective repository
- Add dashboard/ to .gitignore (deprecated in monorepo)

Documentation:
- Restructure docs: getting-started → start-here, features/customization → use/customize
- Move plugins/ under extend/ section
- Add new reference pages: agents, skills, cli-tools, environment-variables
- Consolidate architecture and troubleshooting in reference/

Housekeeping:
- Gitignore temp directories and screenshots
Dashboard extracted to separate CodeDirective repository. Remove:
- codeforge-dashboard devcontainer feature
- Dashboard port forwarding and config from devcontainer.json
- Dashboard documentation page and sidebar references
- Dashboard mentions from README, CLAUDE.md, and related docs
Configuration migrated to container/.devcontainer/defaults/codeforge/.
The .codeforge directory at package root was a development artifact that
should not ship with the npm package.
New rules in defaults/codeforge/config/rules/:
- auto-memory.md: memory constraints and staleness cleanup
- zero-tolerance-bugs.md: bugs always in scope, must be fixed
- scope-discipline.md: only user defines scope
- explicit-start.md: never start without clear instruction
- plan-presentation.md: compressed overview before full plan
- surface-decisions.md: surface assumptions before acting
All plugin scripts now check ~/.claude/disabled-hooks.json instead of
.codeforge/config/disabled-hooks.json for the hook disable list.
- settings.json: update to opus-4-7, reduce thinking tokens (31999),
  disable adaptive thinking, add effort_level max, adjust compaction
  thresholds, disable agent teams, add background tasks and no-flicker
- main-system-prompt.md: streamline prompt content
- file-manifest.json: update file list for new rules
- claude-code-router.json: add default router configuration
- Remove isolation: worktree from write-capable agents (documenter,
  implementer, migrator, refactorer, test-writer) — run in main worktree
- Upgrade investigator and security-auditor from sonnet to opus
- Move devcontainer guide from CLAUDE.md to AGENTS.md
- CLAUDE.md now uses @AGENTS.md include directive
- docs: update changelog, cli-tools reference, troubleshooting
- docs: remove dashboard references, fix sidebar formatting
- deps: update docs package-lock.json
Update all 9 opus-based agents to use explicit model version opus-4-5.
Update changelog with all changes since v2.1.1:
- Claude Code Router and Codex CLI features
- Dashboard feature removed from devcontainer
- 6 new behavioral rules
- Agent model pinning to opus-4-5
- Worktree isolation removed from write-capable agents
- Configuration updates (opus-4-7, reduced thinking tokens, max effort)
- Hook gate path changed to ~/.claude/
- Config directory restructure
- Documentation overhaul

Version updated in package.json and README.md.
Configure Opus 4.7 adaptive thinking via effort: field in frontmatter:
- 19 agents: max (2), xhigh (10), high (4), medium (5)
- 23 skills: xhigh (3), high (10), medium (9), low (1)

Effort levels calibrated by task complexity:
- max: architect, spec-writer (deep reasoning required)
- xhigh: implementer, migrator, refactorer, etc. (code writing)
- high: debug-logs, dependency-analyst, etc. (analysis tasks)
- medium: explorer, bash-exec, etc. (simple operations)
- low: worktree (basic git commands)
- New `codeforge session tokens` command analyzes thinking token usage
- Shows exact billed output tokens and visible content breakdown
- Thinking Density table: % turns with thinking, avg chars, session intensity
- Per-session breakdown: turns with thinking, density, avg chars per turn
- Filter by --project, --model, --since, --until
- Output formats: text (colorized) and JSON

Bump CLI version to 0.2.0
Add oh-my-claude multi-provider proxy feature for Chinese LLM routing
(Kimi, DeepSeek, Qwen, Zhipu, MiniMax). Feature is disabled pending
refinement — omc install modifies settings.json despite --skip-* flags.

Feature structure:
- devcontainer-feature.json with version, autostart, providerAgentsOnly options
- install.sh with backup/restore approach to protect settings.json
- poststart-hook.sh for auto-starting proxy
- README.md documenting usage and configuration

Supporting changes:
- .secrets.example: Add Chinese LLM provider API keys
- disabled-hooks.json: Add omc memory/preference hooks
- setup-aliases.sh: Add --disallowedTools for omc MCP tools, omc-apply alias
- devcontainer.json: Add Chinese provider secrets (feature commented out)

Note: claude-code-router also commented out pending router consolidation.
- Fix CLI version in README (0.1.0 → 0.2.0)
- Update 16 path references in AGENTS.md (.codeforge/ → defaults/codeforge/)
- Replace unsafe eval pattern with getent passwd in 9 install scripts

The eval echo "~$USERNAME" pattern could theoretically allow command
injection if username validation were removed in future changes.
Using getent passwd is safer and matches the pattern already used
in codex-cli/install.sh.
Update test.js to reference .devcontainer/defaults/codeforge/
instead of the removed .codeforge/ directory. Test 8 now validates
the defaults directory structure rather than comparing against
a source that no longer exists.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

The test suite was updated to validate CodeForge assets at a new defaults directory path (.devcontainer/defaults/codeforge/) instead of .codeforge/. Test validation logic was modified across Tests 3, 7, and 8, shifting from checksum equality comparison to directory structure verification.

Changes

Cohort / File(s) Summary
Test Suite Path Migration
container/test.js
Updated Tests 3, 7, and 8 to validate CodeForge assets in new defaults path. Test 3 expects required files in new location. Test 7 checks defaults directory existence and runs checksum generation there. Test 8 rewritten to verify directory structure and specific files instead of comparing checksums between directories. Final validation condition changed from bundledDefaultsInSync to defaultsStructureValid.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Paths shift and tests align,
New defaults in containers fine,
Checksums yield to structure's call,
CodeForge assets stand up tall!
Validation hops to .devcontainer way,
Tests pass brighter every day!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title references version releases (v2.2.0 Container, v0.2.0 CLI) which align with the PR's purpose of publishing major releases, though it is broad rather than highlighting the specific primary change.
Description check ✅ Passed The PR description covers the main changes, test plan status, and feature highlights for both Container and CLI releases. It follows the general spirit of the template with summary/highlights instead of the prescribed sections, missing formal Type of Change checkboxes and Changelog/Documentation update confirmations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
container/test.js (2)

100-137: Minor: consolidate the defaultsDir existence check.

Tests 7 and 8 both check fs.existsSync(defaultsDir) and emit separate "not found" messages. Consider guarding once up front (or extracting a helper) to avoid duplicated branches and failure messages.

Example consolidation
-	if (fs.existsSync(defaultsDir)) {
-		const checksums = generateChecksums(defaultsDir);
-		...
-	} else {
-		console.log("❌ Test 7: .devcontainer/defaults/codeforge/ not found, skipping");
-		checksumStructureValid = false;
-	}
+	const defaultsExists = fs.existsSync(defaultsDir);
+	if (!defaultsExists) {
+		console.log("❌ Tests 7-8: .devcontainer/defaults/codeforge/ not found");
+		checksumStructureValid = false;
+		defaultsStructureValid = false;
+	} else {
+		// run Test 7 and Test 8 bodies
+	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@container/test.js` around lines 100 - 137, Consolidate the duplicated
existence check for defaultsDir by guarding once before running Test 7 (and Test
8) so you only call fs.existsSync(defaultsDir) a single time; if the directory
is missing, emit one clear "not found" message and set the relevant test flags
(e.g., checksumStructureValid) accordingly, otherwise run
generateChecksums(defaultsDir) and the existing validation logic (checks for
object, non-empty keys, and 64-char SHA-256 hex strings) for the tests; update
references to defaultsDir, generateChecksums, and checksumStructureValid to use
this single branch or extract a small helper that performs the exists check and
returns the checksums to avoid duplicated branches and messages.

139-168: Test 8 coverage weakened — consider keeping a sync/integrity check.

The previous Test 8 compared checksums between a source .codeforge/ and the bundled defaults to catch drift. The rewrite only asserts that config/, file-manifest.json, and config/settings.json exist, which will pass even if the manifest is out of sync with actual file contents, or if other expected files under defaults/codeforge/ are missing/corrupted.

If there's still a canonical source for bundled defaults (or a manifest enumerating expected files), consider validating against it instead of a hardcoded 2-file list, so regressions in the packaged defaults are still caught.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@container/test.js` around lines 139 - 168, Test 8's current check (using
defaultsStructureValid, expectedSubdirs, expectedFiles and defaultsDir) only
verifies presence of a couple files; update it to validate integrity against the
canonical manifest or source: read the canonical file-manifest.json (or the
upstream .codeforge/ directory if available), iterate the manifest entries and
for each expected path verify existence and checksum/hash matches (or compare
file contents against the source copy), and fail (set defaultsStructureValid =
false and log) on any mismatch so the test detects drift rather than only
missing files.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@container/test.js`:
- Around line 100-137: Consolidate the duplicated existence check for
defaultsDir by guarding once before running Test 7 (and Test 8) so you only call
fs.existsSync(defaultsDir) a single time; if the directory is missing, emit one
clear "not found" message and set the relevant test flags (e.g.,
checksumStructureValid) accordingly, otherwise run
generateChecksums(defaultsDir) and the existing validation logic (checks for
object, non-empty keys, and 64-char SHA-256 hex strings) for the tests; update
references to defaultsDir, generateChecksums, and checksumStructureValid to use
this single branch or extract a small helper that performs the exists check and
returns the checksums to avoid duplicated branches and messages.
- Around line 139-168: Test 8's current check (using defaultsStructureValid,
expectedSubdirs, expectedFiles and defaultsDir) only verifies presence of a
couple files; update it to validate integrity against the canonical manifest or
source: read the canonical file-manifest.json (or the upstream .codeforge/
directory if available), iterate the manifest entries and for each expected path
verify existence and checksum/hash matches (or compare file contents against the
source copy), and fail (set defaultsStructureValid = false and log) on any
mismatch so the test detects drift rather than only missing files.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9f17f58b-57d8-405b-aeab-e9dfdfad753b

📥 Commits

Reviewing files that changed from the base of the PR and between 6824462 and 05d772d.

📒 Files selected for processing (1)
  • container/test.js

@AnExiledDev AnExiledDev merged commit 84714b9 into main Apr 16, 2026
9 of 10 checks passed
@AnExiledDev AnExiledDev deleted the staging branch April 16, 2026 20:51
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