nightshift/nightshift.yaml
K. Hodges fa97abf0c3 Implemented deterministic diff generation via a new file_writer stage.
What changed:

  - Added file_writer stage support in nightshift/config.py:93, nightshift/agents.py:446, and nightshift/pipeline.py:374.
  - Added file-block parsing and deterministic patch generation in nightshift/patches.py:65.
  - file_writer agents now return complete file blocks:

    ```file:relative/path.py
    <complete file content>
    ```
    NightShift reads current files and generates the unified diff itself.

  - Existing patch_validator, patch_normalizer, and patch_apply still run after that.
  - Switched tiny-lisp-nightshift/nightshift.yaml:51 to type: file_writer.
  - Updated tiny-lisp-nightshift/agents/implementer.md:1 to request file blocks instead of diffs.
  - Updated README, tutorial, config reference, and design doc.

  Also added tests for parsing file blocks, generating multi-file diffs, validating those diffs, and running a full file_writer -> normalize -> validate pipeline.

  Verification: python -m unittest discover -v passes, 101 tests.
2026-05-17 15:24:10 -07:00

89 lines
1.7 KiB
YAML

project:
name: tiny-lisp
root: .
task_file: tasks.md
artifact_dir: .nightshift
safety:
require_clean_worktree: false
scoped_paths:
- .
allowed_commands:
- python -m unittest discover -v
forbidden_commands:
- rm -rf
- git push
- curl | bash
agents:
planner:
backend: ollama
model: qwen2.5-coder:14b
temperature: 0.2
system_prompt: agents/planner.md
implementer:
backend: ollama
model: qwen2.5-coder:14b
temperature: 0.1
system_prompt: agents/implementer.md
reviewer:
backend: ollama
model: qwen2.5-coder:14b
temperature: 0.1
system_prompt: agents/reviewer.md
pipeline:
max_task_retries: 3
continue_on_task_failure: false
stages:
- id: plan
type: agent
agent: planner
output: plan.md
- id: context
type: repo_context
output: context-pack.md
- id: implement
type: code_writer
agent: implementer
output: proposed.patch
- id: normalize
type: patch_normalizer
output: normalized.patch
- id: validate_patch
type: patch_validator
output: patch-validation.md
max_files: 4
max_lines: 400
on_fail: implement
- id: apply_patch
type: patch_apply
mode: apply
output: patch-apply-output.txt
on_fail: implement
- id: test
type: command
commands:
- python -m unittest discover -v
output: test-output.txt
shell: true
timeout_seconds: 60
on_fail: implement
- id: review
type: agent_review
agent: reviewer
on_fail: implement
output: review.md
- id: summarize
type: summarize
output: final-notes.md