Skip to content

v1.0.46

Latest

Choose a tag to compare

@andrelncampos andrelncampos released this 23 Jun 19:29

πŸŽ“ V44: Quickstart β€” Interactive SDD Pipeline Tour

The /quickstart command demonstrates the SDD pipeline in practice β€” users learn planned β†’ created β†’ verified β†’ implemented β†’ audited by watching it run, not reading documentation.

/quickstart β€” 5-minute guided tour

  • Demo mode: The LLM creates an example spec (hello-world CLI) and walks through the full cycle: /spec-plan β†’ /spec-new β†’ /spec-verify β†’ /spec-implement β†’ /spec-audit.
  • Real project: Alternatively, users can apply SDD immediately to their own project.
  • CLI flag: dscode --quickstart jumps straight into the tour without typing commands.
  • Welcome screen: The command appears as a suggestion for new users on the start screen.

Spec-plan optimized β€” zero LLM cost (spec 560)

/spec-plan-begin, /spec-plan-end, and /spec-plan-reset now execute as pure TypeScript (Level B), consuming zero auxiliary model tokens. Each call saves ~200-500 tokens that were previously wasted.

  • Bug fix: /spec-plan-end no longer fails when detecting the begin marker β€” the /spec-plan-begin message is now correctly stored in the session.
  • Cleaner architecture: All spec-plan orchestration was removed from OpenAIMessageConverter, leaving it focused solely on message format conversion.

Internal improvements

  • Lesson L11: New anti-pattern documented β€” don't split specs when documentation overhead outweighs code changes.
  • Vertical slice check: All three SDD templates (plan, verify, audit) now include end-to-end completeness verification.
  • Spec-list tree: /spec-list renders specs as a hierarchical tree grouped by status.
  • DeepCode purged: All legacy deepcode references removed from production code and tests.
  • Budget: Column Custo (USD) renamed to Custo Total (USD) in the /budget table for clarity.

Fixes

  • /spec-audit now correctly injects karpathyContent (missing since spec 550).
  • ESLint warnings fixed in AppStateContext.tsx and PromptInput.tsx.

⚑ V40: Performance-First Execution β€” 4 specs, zero regressions

Surgical optimization of I/O, CPU, and memory across 4 fronts. Result: faster sessions, lighter startup, leaner history.

Session I/O (spec 420)

  • Incremental writes: appendFileSync instead of rewriting the entire messages file
  • Sessions index cache: _cachedSessionsIndex in memory β€” loadSessionsIndex() was called 6Γ— per turn reading from disk
  • Directory guard: _projectDirEnsured avoids unnecessary mkdirSync
  • String buffers: push + join in streaming loops instead of += (reallocation per chunk)

Startup (spec 430)

  • Parallel skills: Promise.all + fs/promises β€” simultaneous loading, zero sequential readFileSync
  • Cached templates: Prompt templates (templates/tools/*.md, templates/skills/*.md) in immutable cache β€” no longer re-read from disk every turn

Compaction & memory (spec 440)

  • Incremental hash: findStablePrefixEndIndex() uses a single incremental SHA-256 instance β€” O(N) instead of O(NΒ²)
  • Parallel turns: readRecentTurns() decompresses files in parallel with Promise.all
  • Async backup: backupSpecFile() uses fs/promises.copyFile β€” zero blocking

Hardening (spec 450)

  • Limited concurrency: readRecentTurns processes in batches of 8 with early termination β€” no wasted I/O
  • Mtime invalidation: Sessions index cache checks mtimeMs β€” safe for multi-terminal use
  • ENOENT recovery: ensureProjectDir resets the flag if .dscode/ is deleted during a session
  • ESLint no-floating-promises: Active rule β€” 5 violations fixed with void

πŸ› PDF: Context Budget Fix (spec 460)

  • PDFs with compressed ObjStm: countPdfPages returns null (not 0) when regex heuristic fails. Large PDFs are no longer embedded as base64 in context β€” preventing overflow of the 1M token window.

πŸš€ Node.js 24 Native API Optimizations

  • Grep handler: native fs.globSync, async parallel reads, streaming β€” -143 lines, -1 dependency
  • Glob handler: Custom walker replaced by fs.globSync β€” -51 lines

πŸ”§ Fixes

  • cacheMode in Zod schema: Settings with cacheMode are no longer rejected as invalid
  • /spec-pipe: Auto-creates session when none is active
  • FD leaks: File descriptors closed in grep binary detection catch block and MCP client disconnect
  • Unused variable: unusedInBinaryDetection regex removed from grep handler

πŸ“‹ Documentation & infra

  • 5 steering rules in AGENTS.md: authorization, cross-check, verification, consequence, output
  • V39 and V40 documented in vision.md
  • Node 26 notice on welcome screen: "Starting October 2026, DsCode will require Node.js 26."
  • Release notes now use RELEASE_NOTES.md (not --generate-notes)

πŸš€ Node.js 24 β€” All-in

Complete migration to Node 24 as baseline. Zero compatibility with older versions.

Native APIs replacing dependencies

  • fs.globSync native replaces glob npm package β€” -4 dependencies
  • node:zstd native replaces Brotli fallback from node:zlib β€” 4Γ— smaller compressor
  • Error.isError() β†’ getErrorMessage() function cross-realm safe in 21 files
  • structuredClone native β€” deep clone from 8 lines to 1
  • esbuild target node24 β€” no polyfills for Node 22
  • CI on Node 24 β€” build and test on real runtime

🍎 macOS Apple Silicon in automatic releases

  • macOS ARM64 (macos-latest) now builds automatically on every tag push
  • macOS Intel (macos-13) removed β€” GitHub deprecated runner, no queue wait
  • Dry-run covers Windows, Linux, and macOS ARM64
  • Checksum download fixed (root cause of 400 Bad Content-Length error in v1.0.41)

πŸ”„ Robust Auto-Update

  • 100% aligned asset naming between CI and update-check.ts
  • Portable packages (fallback when SEA fails) now copy all companion files: dscode.mjs, node, templates/, node_modules/
  • File extraction and atomic binary replacement on all platforms

πŸ–ΌοΈ Local OCR with Tesseract.js

  • Offline OCR via tesseract.js for models without image support (e.g., DeepSeek V4)
  • Dynamic import β€” tesseract.js only loads when OCR is actually used, zero startup impact
  • All 12 transitive dependencies bundled in the portable package
  • Extracted text truncated at 2000 characters (word boundary)
  • /image-paste and /image-upload with automatic OCR fallback
  • File drag-and-drop via terminal paste

πŸ› Fixes

  • v1.0.41: 400 Bad Content-Length error on publish β€” checksums were not downloaded
  • v1.0.42/43: macOS Intel stuck releases due to missing runner β€” removed from pipeline
  • Auto-update: Portable packages broke on update β€” now copies companion files
  • Bundle: Silent build failure β€” now exit(1) and CI detects it
  • OCR startup: regenerator-runtime not found at startup β€” tesseract.js loaded on demand
  • Ink ErrorBanner error, context window overflow, spec suffixes

πŸ“ Specifications & build

  • Specs 370-410: build validation, operational resilience, traceability, auto-update
  • validate-binary.mjs uses tag version (not package.json)
  • release-dry-run.yml covers 3 platforms
  • README URL validation in CI