UNPKG

cmte

Version:

Design by Committee™ except it's just you and LLMs

135 lines (105 loc) 9.69 kB
# Changelog All notable changes to Committee will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.1.4] ### Added - Improved `--dryrun` reporting ## [1.1.3] ### Added - Template Escaping: Added support for escaping template syntax (`{{` and `}}`) within task templates using a backslash (`\{{` and `\}}`) to allow literal rendering. ### Changed - File collection content embedded via `{{ files.collectionName }}` in `workflow.yaml` is now padded with extra newlines for better visual separation in prompts. ## [1.1.2] ### Fixed - Resolved regression in template rendering logic that prevented context variables originating from `prior_outputs` (like `previous_summary`) from being found. - Restored UX fallback allowing `{{ item.key }}` instead of `{{ item.value.key }}` in task templates when iterating over objects. - Fixed bug in `WorkflowExecutor` where initial workflow interpolation failed due to incorrect context passing. - Fixed bug where `TemplateRenderer` used incorrect method name (`getCollectionPaths` instead of `getFiles`) for file collection path lookups in task templates. - Fixed bug where `OutputReferenceResolver` incorrectly applied `.output` as a property path, causing wildcard (`[*]`) and potentially other references to return `undefined`. - Fixed unit tests that failed due to changes in logging messages or adaptive concurrency logic. - Fixed `fs.readFileSync` usage in CLI entry point. - Fixed commander option definitions with leading spaces. - Fixed CLI entry point import error for `main` function. ### Added - Adaptive concurrency limiting for LLM API calls: - Automatically reduces concurrency limit (`_currentConcurrencyLimit`) upon receiving a 429 rate limit error. - Introduces an adaptive inter-request delay (`_interRequestDelayMs`) which increases significantly on a 429 error. - Schedules a recovery attempt to gradually increase concurrency and decrease delay after a period of stability. - Environment variable `REQUEST_DELAY_SECONDS` to configure the minimum inter-request delay (defaults to 0.1 seconds if not set). ### Changed - Increased default LLM API call retries (`maxRetries`) from 5 to 20. - Changed logging behavior: File log level is `warn` by default (`debug` if `--debug` is passed). Console log level is `info` by default (`debug` if `--debug` is passed). - Log file names now use timestamps instead of UUIDs, and only one log file is created per run. - Adjusted log levels for expected reference resolution failures in `OutputReferenceResolver` from `error` to `debug` to reduce log noise during context fallbacks. ## [1.1.0] - 2024-07-31 ### Added - Initial release of the Committee framework. - Core concepts: Workflows, Sets, Tasks, File Collections. - Support for Anthropic Claude and local OpenAI-compatible LLMs. - Basic CLI for running workflows. - Iteration over arrays/objects using `for_each`. - Referencing prior task outputs. - Two-phase thinking capability. - Options for dry runs, saving prompts, lite models. ## [1.0.4] ### Added - `--dryrun` CLI flag to simulate workflow execution without making LLM calls or writing final output files. ### Fixed - Fixed an issue where `--dryrun` was still making LLM API calls instead of skipping them with placeholder responses. - Fixed an issue where using `--prompts` together with `--dryrun` prevented prompt files from being saved. ### Changed - Modified `--dryrun` to log the intended path for any defined structured workflow output (within a conceptual `<workflow_dir>/dryrun/` directory) instead of silently skipping output. ## [1.0.3] ### Fixed - Corrected an issue where the `outputPath` specified in the `workflow.yaml` file was ignored. Output files were incorrectly being saved to a default `output/` or `workflow-output/` directory relative to the project's root, instead of resolving the `outputPath` relative to the workflow file's own directory as intended. - Fixed an issue where environment variables (`.env`) in the workflow's directory were not loaded, preventing workflow-specific settings (like `MAX_TOKENS`) from overriding project-level or default settings. The loader now prioritizes `.env` in the workflow directory. - Resolved several path resolution errors related to recent refactoring, ensuring workflow files, components (sets, tasks), and file collections are located correctly relative to the workflow directory. - Fixed a bug where variable references using the `[*]` wildcard (e.g., `{{ gather-requirements.analyze-service-needs-for-directive[*].output }}`) were not correctly resolved and made available to task templates due to incorrect context handling in the `TemplateRenderer`. - Addressed a build failure caused by `TemplateRenderer` importing a non-existent `getNestedProperty` utility. Centralized the utility function in `src/utils/`. - Fixed an issue where the configured `LOCAL_LLM_MODEL` from `.env` was ignored when using the `--local` flag, incorrectly defaulting to a model named "default". Model selection logic now correctly prioritizes environment variables. ### Changed - Task output filenames are now prefixed with a zero-padded sequential number corresponding to the set's execution order within the workflow (e.g., `01-setname.taskname.md`, `02-setname.taskname[iterkey].md`). This improves chronological sorting in the output directory. - Refactored `TemplateRenderer` to simplify context handling and rely on shared `FileCollectionManager` and `OutputReferenceResolver` instances passed during execution. - Modified `--prompts` to save prompt files to a top-level `<workflow_dir>/prompts/` directory relative to the workflow, separating them from task outputs. ## [1.0.2] ### Fixed - Corrected an issue where the workflow executor calculated the base path for file collections incorrectly, preventing files specified with relative paths within the workflow definition (e.g., `src/file.js`) from being found when the workflow was run from outside its own directory. The base path is now correctly resolved to the workflow's directory. ## [1.0.1] ### Fixed - Corrected an issue where iterating over objects defined in `iterable_objects` using `for_each` would fail to capture the `iterationKey` (object key), leading to `null` iteration keys in logs and preventing output files for those iterations from being saved. The iteration context is now correctly structured as `{ item: { key: '...', value: { ... } } }`. - Resolved subsequent test failures by adding a missing `_getNestedProperty` helper method to the `TemplateRenderer`. - Fixed build errors caused by incorrect default imports of the logger module. - Fixed build error caused by importing a non-existent `setFilesAwaitingReview` function from the state module. ### Changed - Modified the `TemplateRenderer` to automatically handle fallback resolution for iteration items. When rendering `{{ item.PROPERTY }}` for an item derived from an iterated object, if `item.PROPERTY` doesn't exist directly, the renderer will now attempt to resolve `item.value.PROPERTY`. This allows for the more intuitive `{{ item.PROPERTY }}` syntax in templates while retaining the internal `{ item: { key: ..., value: ... } }` structure needed for robust key handling. - Updated `TemplateRenderer` behavior for unresolved template variables (`{{ unknown }}`) to render an empty string instead of an error message, aligning with previous behavior and common templating engine practice. ## [1.0.0] - YYYY-MM-DD ### Added - Initial release of Committee. - Core workflow execution engine supporting sequential sets and parallel tasks. - File collection management (`workflow.yaml` `files:` block). - Global variables (`workflow.yaml` `global_variables:`). - Iteration over `iterable_objects` defined in `workflow.yaml` using `for_each` in set definitions. - Iteration over file collections using `for_each` in set definitions. - Task output referencing using `prior_outputs` in set definitions (`{{ setName.taskName.output }}`, `{{ setName.taskName[iterationKey].output }}`, `{{ setName.taskName[*].output }}`). - Template rendering with variable substitution. - Support for Anthropic Claude 3 models (Haiku, Sonnet, Opus) via API key. - Support for local LLMs compatible with OpenAI API spec (e.g., Ollama, LM Studio) via `--local` flag. - `--lite` flag for using faster/cheaper models. - `--prompts` flag to save rendered prompts and outputs. - `--debug` flag for verbose logging. - Basic CLI (`cmte path/to/workflow [options]`). - Two-phase thinking mechanism for tasks. - LLMXML prompt format support. - Wrapper script (`bin/cmte.sh`) to handle Node options (e.g., suppressing `punycode` warning). ### Fixed - Resolved numerous dynamic require issues related to ESM build compatibility with CommonJS dependencies (`logform`, `colors`, `commander`, `dotenv`, `node-fetch`, `agentkeepalive`). Primarily addressed by externalizing problematic dependencies in the `esbuild` configuration. - Fixed `llmxml` grammar loading issue by externalizing the package. - Corrected model selection logic in `ClaudeAdapter` to handle `lite` mode and `DEFAULT_MODEL` environment variables properly. - Addressed inconsistent test failures caused by local LLM variability by making assertions more lenient. - Fixed console output formatting issue where spinner animation line was not properly cleared on success. - Suppressed `punycode` deprecation warning during CLI execution and tests. ### Changed - Updated README with clearer explanations and examples. - Refined console logging and loading animations.