What problem does it solve?
This capability automates the end-to-end publishing workflow for the Magnus Consulting website. It validates the local magnus repository, builds the site, commits changes to a feature branch, pushes, and opens a pull request on GitHub, ensuring every change goes through PR review and is not pushed directly to main.
Core Features & Use Cases
- Validates repository readiness: checks for package.json with astro in dependencies, src/pages, and docs/llm-context.md before publishing.
- Pre-flight checks: runs
npx astro check and npm run build, failing gracefully if errors are detected.
- Branch management: creates a feature branch from main (or reuses an existing one) and guards against creating new PRs if a branch already has an open PR.
- Atomic staging and committing: stages only touched files under src/pages, src/data, src/components, src/content, and updates docs/llm-context.md as needed, while refusing secrets or ignored files.
- PR creation and audit embedding: pushes the branch, opens a PR with a commit message and embedded approvals from the .magnus-changes/pending.log, and ensures approvals accompany the PR.
- Audit log management: truncates the pending log after PR creation.
- Scope limitation: not intended for editing/creating content; use magnus-edit-* or magnus-add-* skills for content changes.
Quick Start
Run magnus-publish after all changes are ready and approved to publish them via a feature-branch PR workflow.