Skip to content

v1.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Aug 07:27
ace066e

Added

  • Review fixes from /ship v1.2.0-beta.1: All observations from the 4-persona ship review addressed:
    • Security: CODICE_BYPASS_URL_VALIDATION is now gated behind NODE_ENV=test so the URL-validation escape hatch can never be active in production (src/infrastructure/config/constants.ts). Coordinated with the 4 E2E scripts and tests/integration/cli/main.test.ts that set it.
    • Path safety: withTrailingSeparator("/") now returns the filesystem root unchanged instead of producing // (src/infrastructure/adapters/pathResolver.ts).
    • Perf: FileMergeEngine.execute() only allocates the optional-path list when standard directory rules exist; staging cleanup now also runs when nothing was staged (total === 0).
    • Comments: Untrusted-input note for .codice-version parsing in UpdateWorkspaceUseCase; empty catch in safeEmit documented as intentional; PROGRESS_EMITTERS comment corrected.
    • Tests: Direct unit tests added for isPathWithin/withTrailingSeparator (tests/unit/adapters/path-resolver.test.ts) and isRuleSelected (tests/unit/domain/file-rule-manifest.test.ts); unused _makeRule helper removed from tests/integration/use-cases/update-granularity.test.ts.
  • Dependencies: @biomejs/biome 2.5.3 → 2.5.6, @types/semver 7.7.1 → 7.8.0 (TypeScript 6.x deferred — 7.x not yet adopted).
  • ADR-011: Binary Removal — documents the architectural decision (see specs/adr/adr-011-binary-removal.md)
  • tests/e2e/codice.sh: Wrapper script for bun run src/cli/main.ts in E2E tests
  • FEV-13 — SDD Plugin Auto-Discovery (Issue #53): 6 hardcoded maps extracted to autoDiscovery.tsCOMMAND_AGENT_MAP, VALID_SUBAGENTS, and AGENT_MENTION_PATTERNS now detected automatically from filesystem (commands/*.md, agents/*.md). New files: autoDiscovery.ts (182 lines), destructivePatterns.ts, normalizeBash.ts. See ADR-013.
  • FEV-13 — Config-Driven Plugin Behavior (Issue #53): INTENT_PATTERNS, COMMAND_PHASE_MAP, PHASE_SUGGESTIONS moved to defaults.ts with optional opencode.json sddPipeline section override. Plugin works without config (backward compatible).
  • FEV-14 — Progress bar during installation (Issue #47): ProgressEvent discriminated union (6 variants: stage_start, stage_complete, stage_skip, commit_start, commit_complete, error) in Domain layer. ProgressCallback optional on IFileMergeEngine.execute(). ClackPromptsAdapter implements clack.progress() (heavy style) with showProgressBar(total, label), updateProgress(current, filePath), completeProgress(). logProgressEvent(message) dispatches by category prefix: commit: → success, symlink: → success, gitignore: → info, error: → error, skip: → warn. Visible in all three modes (Clean, Project, Update).
  • FEV-14 — New /help slash command for onboarding (Issue #56): Interactive help menu with 6 options — discover Códice, start a new project, update workspace, learn the SDD cycle, list all 13 commands, troubleshoot issues. Assigned to Huitzilopochtli. Template: template/obligatorio/commands/help.md (63 lines).
  • FEV-14 — /help registered in pipeline maps: Added to COMMAND_AGENT_MAP, INTENT_PATTERNS (15 EN/ES keywords), COMMAND_PHASE_MAP (idle), and PHASE_SUGGESTIONS in defaults.ts.
  • FEV-14 — Spec/ADR templates with industry formats: MADR v4.0 ADR template (template/estandar/specs/adr/adr-template.md) and RFC-based spec template (template/estandar/specs/spec-template.md) replace previous placeholders.
  • FEV-14 — 14 new integration tests for progress events, structured logs, and adapter methods.
  • FEV-14 — E2E test extended with progress assertions (commit/symlink messages in stdout).
  • FEV-15 — Project Code of Conduct (Issue #55): CODE_OF_CONDUCT.md added to repo root, adapted from Contributor Covenant v2.1. Contact: dev@fisherk2.com.
  • FEV-15 — Template Code of Conduct: template/estandar/CODE_OF_CONDUCT.md created as a customizable placeholder. Includes 2 placeholders ([PROJECT_NAME], [CONTACT_EMAIL]).
  • FEV-15 — Manifest integration: CODE_OF_CONDUCT.md registered in FileRuleManifestData.ts with category: "standard" (11 standard files, was 10).
  • FEV-15 — Cross-references: CONTRIBUTING.md and README.md updated with ## Code of Conduct sections.
  • FEV-15 — E2E test extension: tests/e2e/01-clean-install.sh asserts CODE_OF_CONDUCT.md delivery and content.
  • FEV-16 — Pre-release Tech Debt Closure: Resolves 5 TECH_DEBT.md items (TD-1.1, TD-2.1, TD-5.1, TD-5.2, TD-6.2):
    • Coverage foundation: resolveInteractiveMode() extracted from main.ts for testability. 9 new unit tests. main.ts coverage 86.21% → 98.90%.
    • Use case refactor: Template Method pattern applied to CleanInstallUseCase + ProjectInstallUseCase. New InstallUseCaseBase abstract class. 166+147 → 73+72 lines.
    • Performance benchmarks: just bench recipe with hyperfine for 3 installation modes. 3 standalone benchmark scripts + assert-no-regression.sh for SC-9/10/11 verification.
    • Update granularity: Tree-level diff (diffTrees()) for standard directories. FileMergeEngine updated to stage only new files in update mode. 11 unit + 3 integration + 1 E2E test.
    • Coverage instrumentation: c8 evaluated (incompatible with Bun/JSC). Native Bun coverage used with 95% CI gate. main.ts 98.90%, overall 98.10%.
  • /test command: now ensures a test/ directory exists with unit/, integration/, and e2e/ subdirectories; if test/ exists but is not separated, prompts the user (via question) whether to refactor and standardize existing tests into those three directories (per @skills/test-driven-development/SKILL.md test-pyramid convention).
  • /ship command: adds a post-Phase-C incremental-fix phase that resolves all review observations one at a time using @skills/incremental-implementation/SKILL.md, verifies all tests pass, then creates atomic commits with descriptive messages (matching /code-simplify and /test conventions).

Changed

  • BREAKING: Binary compilation removed. The only installation method is now bunx @fisherk2-dev/codice (or npx @fisherk2-dev/codice). Compiled binaries are no longer produced or distributed. Users in air-gapped environments can use npm pack to download the tarball. See ADR-011 for migration details.
  • FEV-12 (References Restructuring): 59 reference files moved from centralized template/obligatorio/references/ to skills/<name>/references/ for co-location with their primary skill. opencode.json now includes a references section with 3 example entries (local path + 2 remote repos). docs/WORKFLOW.md and docs/TECH_DEBT.md removed from instructions array. Agent models updated: huitzilopochtli → deepseek-v4-flash, moctezuma steps 20→30, tlaloc steps 90→100. docs-mcp-server removed; codebase-memory-mcp added (disabled by default). See ADR-012.
  • FEV-13 — Wiki Rewrite (Issue #51): 8 Wiki pages rewritten for end users — removed all "edit sdd-pipeline.ts" references. Instructions now direct users to create agents/my-agent.md, commands/my-command.md, skills/my-skill/SKILL.md instead.
  • FEV-13 — Quality Infrastructure (Issue #53): Biome config extended to plugin directories. Justfile targets added: check-plugin, test-plugin-unit, test-plugin-integration. Plugin test suites: tests/plugin/unit/, tests/plugin/integration/.
  • FEV-13 — Documentation Reduction (Issue #51): WORKFLOW.md, CHANGELOG.md, SPEC.md audited and trimmed to target line counts (<300, <350, <400 respectively).
  • FEV-14 — DRY extraction — createProgressCallback() helper: Duplicated ~30-line progress callback (3 copies × 30 lines = ~90 lines) extracted to shared createProgressCallback(userPrompt, label) in src/application/helpers.ts. All 3 use cases now call the shared helper (each reduced by ~28 lines).
  • FEV-14 — Symlink/gitignore log events moved to postInstall.ts: Log events (symlink: Created .opencode/agents, gitignore: Generated .gitignore) now emit AFTER each operation completes in runPostInstallSteps(), not predicted before. Fixes false success on failure.
  • FEV-14 — 13 command files updated with explicit subagent delegation patterns (sequential only, never parallel).
  • SC-15: Updated to "npm package (tarball) size < 5MB" (previous SC-15 about compiled binaries removed)
  • ARCHITECTURE.md: Added ADR-011 to ADR table
  • FEV-15 — FileRuleManifestData delivery surface: 1 new entry in FileRuleManifestData.ts (now tracks 11 standard files, was 10).
  • FEV-16 — FileMergeEngine: Tree-level diff replaces directory-level skip. Standard rules in update mode now deliver new files.
  • FEV-16 — CleanInstallUseCase / ProjectInstallUseCase: Reduced from 313 → 145 lines (-168) via Template Method.
  • FEV-16 — Coverage thresholds: CI now enforces ≥95% lines/functions (was unenforced).
  • FEV-16 — main.ts: runMode restructured from switch to if/else for complete branch coverage.
  • FEV-16 — Code review simplifications: stageOne() extraction, stagePlanner total folding, walkRelative helper, resolveInteractiveMode return type narrowed, promptForMode async removed.
  • FEV-17 — Code simplification pass (Issue #53):
    • IFileMergeEngine.execute accepts MergeExecuteOptions object instead of positional params (improves call-site readability).
    • FileRuleManifest.isRuleSelected shared optional-filter predicate extracted from CleanInstallUseCase and ProjectInstallUseCase.
    • Test-only dead surface removed: IUserPrompt.showSpinner/stopSpinner, IGitHubClient.getLatestReleaseNotes, IVersionComparator.isUpdateAvailable/getReleaseType/ReleaseType, IStagingSystem.getStagingPath, IFileSystem.readTemplateFile (447 lines, 29 files).
    • pathResolver.withTrailingSeparator and isPathWithin shared helpers; TemplateResolver, BunSymlinkCreator, BunGitignoreCreator refactored to use them.
    • GitHubRestClient outer try/catch removed (redundant after domain error mapping).
    • ClackPromptsAdapter.selectOptional redundant as string[] cast removed.
    • BunSymlinkCreator verbose log now reports resolvedLinkPath (actual created path).
    • Plugin configLoader.ts 226→88 lines; extracted mergeConfig.ts (159 lines) for config merging helpers.
    • Plugin SDD pipeline modularized (655→379 lines + src/ modules).

Fixed

  • FEV-14 — Progress bar re-creation on every stage_start (CRITICAL): showProgressBar() was called on every event, orphaning previous clack.progress() instances. Fixed: added barStarted closure flag — bar initializes once, advances on subsequent events.
  • FEV-14 — Progress total included skipped files: total counted all non-virtual rules, but only some got staged. Fixed: FileMergeEngine pre-computes stageDecisions Map; total reflects only staged files. Bar always reaches 100%.
  • FEV-14 — Symlink/gitignore logs emitted before operations (CRITICAL): Success log was emitted before the actual symlink/gitignore creation. If creation failed, log falsely claimed success. Fixed: logs moved inside runPostInstallSteps().
  • FEV-14 — Redundant completeProgress() calls: Use cases called completeProgress() on merge failure, but the progress callback already handled this via the error event. Fixed: removed 3 redundant calls.
  • FEV-14 — Inline import() types in tests: Test file used import("path").Type syntax 6 times. Fixed: top-level imports added, inline references removed.
  • FEV-16 — TECH_DEBT items resolved: TD-1.1, TD-2.1, TD-5.1, TD-5.2, TD-6.2 all closed.
  • FD-6.2 — Standard directory updates: New files in standard directories now reach existing users during update (was: entire directory skipped).
  • CR-Fixes — Error context enrichment: wrapMergeError() preserves MergeError phase/path in user-facing messages (e.g. "Disk full during staging of opencode.json"). Affects InstallUseCaseBase and UpdateWorkspaceUseCase.
  • CR-Fixes — stageOne standard Result: FileMergeEngine.stageOne() returns Result<void, MergeError> instead of null sentinel. Call sites use !result.ok for consistency.
  • CR-Fixes — Exhaustiveness guard: shouldStage() in stagePlanner.ts uses assertNever() for compile-time safety on RuleCategory. Unreachable return false replaced.
  • CR-Fixes — Coverage script hardening: coverage-check.sh passes lcov path via env var instead of shell-in-Python interpolation.

Removed

  • BREAKING: .devin/ optional directory removed. The .devin/ compatibility layer (7 symlinks: skills, workflows, rules/*) is no longer installed. DEVIN_SYMLINKS configuration, devinSymlinks parameter from the use case chain, and .devin manifest entry all removed. 6 tests eliminated, 838 pass/0 fail. Users who selected .devin during installation will no longer see it in the optional files menu.
  • Binary compilation recipesjust build, just build-all removed from Justfile
  • Binary distribution from CI/CDci.yml no longer builds/smoke-tests/upload binaries; release.yml no longer builds/checksums/attaches binaries to GitHub Releases
  • Binary resolution from E2E test infrastructuresetup_binary() and related fallback logic (80+ lines) replaced with direct bun run src/cli/main.ts
  • Binary install documentation — Offline/air-gapped binary install section removed from README
  • Binary build instructions — Removed from CONTRIBUTING.md
  • SC-15 — "Compiled binaries are produced for Linux, macOS, and Windows x64" removed from SPEC.md