Skip to content

Conversation

@fmueller
Copy link
Owner

Motivation

  • Introduce a non-destructive review step that evaluates a draft against a validated SEO brief and surfaces actionable editorial guidance without rewriting the draft.
  • Provide both a human-readable Markdown report and a machine-readable JSON report to support manual editing and automation pipelines.
  • Allow scoped reviews via section ranges and focused checks (seo, structure, clarity, style, evidence) to speed iterative editing.
  • Keep outputs deterministic in structure and conservative about facts when an original --note is provided.

Description

  • Add prompt templates in src/scribae/prompts/feedback.py to drive a structured, JSON-only feedback agent with an explicit schema.
  • Implement the feedback engine and validated models in src/scribae/feedback.py, including context preparation, section extraction, prompt rendering, LLM invocation, and md/json renderers.
  • Add the CLI entry scribae feedback in src/scribae/feedback_cli.py and wire the command into the CLI via src/scribae/main.py, supporting --body, --brief, --note, --section, --focus, --format, --out, --out-dir, --dry-run, --save-prompt, --project, --language, and --model flags.
  • Add tests and fixtures: tests/unit/feedback_cli_test.py and tests/fixtures/body_multi_section.md to cover Markdown/JSON outputs, dry-run prompt printing, and section scoping.

Testing

  • Ran uv run ruff check src tests and linting passed without issues.
  • Ran uv run pytest and the test suite completed successfully with 120 passed.
  • Started uv run mypy src tests in this environment but the invocation did not complete (interrupted); recommend running to completion in CI/locally.
  • New CLI unit tests for scribae feedback (Markdown/JSON/dry-run/section behavior) were executed as part of the test run and passed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants