Skip to content

[Feature] Add draft template analysis and publication workflow #965

Description

@chrismaddalena

Feature Description

Replace the current upload/edit/re-lint loop with one draft workspace for Word templates and PowerPoint presentation styles. Managers upload a candidate, see its derived analysis and lint results, replace the candidate repeatedly without leaving the workflow, and publish only when it is ready.

Are you intending to implement this feature?

Yes.

Current Behavior

Replacing a template changes the live file immediately. To retry linting, a manager must repeatedly leave the edit screen, upload, submit, and inspect a separate result. Ghostwriter cannot reliably tell users whether displayed facts still match the current file.

Desired Behavior

Every template has a current published file or a draft candidate. A draft records a content fingerprint, analyzer version, schema version, status, and results. The published file remains available while the manager tests a replacement. Errors block publication; warnings require an explicit acknowledgement. The primary library states are Draft, Ready, Needs attention, Legacy, and Archived.

Use Case

Template managers can safely iterate on a DOCX or PPTX without disrupting reports that use the published template, and can see exactly what must be fixed before publishing.

Implementation Suggestions

Use the refreshed UI from #964/PR #962. Keep permanent revision history and rollback after publication out of the MVP: retain the published file only while a replacement draft is being validated. Existing records become published templates; future legacy-PPTX conversion creates a separate record.

Additional Information

Acceptance criteria

  • Creating or editing a Word template or PowerPoint presentation style opens an iterative draft workspace.
  • Uploading or replacing a draft file automatically runs linting and derived analysis, storing a content fingerprint, analyzer/schema versions, timestamp, status, and format-specific results.
  • Managers can replace a draft file and rerun analysis/linting repeatedly without restarting the edit flow.
  • The current published file remains usable until a replacement draft is explicitly published.
  • Failed analysis and lint errors block publication; warnings require an explicit acknowledgement before publication.
  • Drafts and published templates use the plain-language statuses Draft, Ready, Needs attention, Legacy, and Archived; detailed causes are available on demand.
  • Existing templates receive a safe migration path without requiring re-upload.
  • Template edit permission controls draft editing and publication in the MVP.
  • Automated tests cover drafts, replacement safety, repeated upload, warning acknowledgement, lint/analysis failures, permissions, and migration.
  • The PR includes refreshed-UI screenshots and release notes.

Blocked by

None — implementation can start from feature/ui-refresh.

UI refresh dependency

#964 is the UI-refresh feature issue, implemented by PR #962. Development may start from feature/ui-refresh, but this issue's PR must not merge to master before the UI refresh.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentScoped and ready for implementation when blockers are completetriageRequires maintainer triage

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions