phramecms / proposal
AI-first Change Proposal Queue and Human Approval Workflow module for PhrameCMS.
v0.1.0
2026-12-04 21:10 UTC
Requires
- php: ^8.5
- phramecms/core: ^0.1
- phramecms/database: ^0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- infection/infection: ^0.35.12
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- phramecms/config: ^0.1
- phramecms/user: ^0.1
- spaze/phpstan-disallowed-calls: ^4.15
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 21:35:38 UTC
README
AI-first Change Proposal Queue and Human Approval Workflow module for PhrameCMS.
What It Provides
phramecms/proposal turns PhrameCMS's deterministic OperationBus (dryRun: true, JSON Schema validation, beforeHash optimistic locking, canonical diffs) into a universal staging & human-review workflow across content, schemas, and site configuration:
- Propose-Only Agent Workflows: Grant AI Agent Tokens explicit
propose.<permission>scopes (e.g.proposal.create,proposal.read,propose.schema.modify,propose.config.admin.settings.write,propose.entity.content.article.update) so agents can validate and submit rich diffs without direct live-write privileges. - Zero-Drift Optimistic Concurrency: Proposals capture
beforeHashand canonicaldiffvia dry-run simulation at submission time;proposal.approvere-checksbeforeHashbefore applying live so stale proposals fail safely (409/ProposalConflictException) unless explicitly forced after re-review. - Full OperationBus & Audit Trail:
proposal.create,proposal.list,proposal.get,proposal.approve,proposal.reject, andproposal.cancelare standardOperationInterfaceoperations — automatically available over MCP, CLI, REST, and the Admin UI (/admin/proposals), and immutably audited.
Architecture
- Namespace:
PhrameCms\Proposal\(src/), tests:PhrameCms\Proposal\Tests\(tests/) - Runtime dependencies:
phramecms/core,phramecms/database - Database table:
phrame_proposals(managed viaProposalSchemaInstaller) - License: MIT