brainstorming
Structured design dialogue that validates ideas before implementation begins.
governance-patterns
Follow these patterns when implementing governance operations (copy, branch, transfer, promote, merge) in OptAIC. Covers artifact handling, RBAC mutations, lineage tracking, and activity emission.
Full skill instructions
Guide for implementing resource governance operations with proper artifact management, RBAC mutations, and lineage tracking.
Apply when:
libs/core/artifacts.py)Manages file artifacts stored at {DATA_DIR}/artifacts/{artifact_ref}/.
from libs.core.artifacts import ArtifactManager
manager = ArtifactManager(data_dir=data_dir)
# Create empty artifact
artifact_ref = manager.create_artifact()
# Copy artifact (for branch/promote)
new_ref = manager.copy_artifact(source_ref)
# File operations
manager.write_file(artifact_ref, "model.pkl", model_bytes)
content = manager.read_file(artifact_ref, "model.pkl")
files = manager.list_files(artifact_ref)
libs/core/governance.py)Orchestrates governance operations with RBAC mutations.
from libs.core.governance import GovernanceService
service = GovernanceService(artifact_manager=manager)
# Copy (reference only)
result = await service.copy_resource(session, actor, source_id=src, target_parent_id=parent)
# Branch (with file copy)
result = await service.branch_resource(session, actor, source_id=src, target_parent_id=parent)
# Transfer ownership
result = await service.transfer_resource(session, actor, resource_id=res, target_owner_id=owner)
# Promote to team
result = await service.promote_resource(session, actor, source_id=src, target_space_id=space, team_principal_id=team)
# Merge branch
result = await service.merge_resource(session, actor, source_id=branch, target_id=ancestor)
artifact_ref (no file copy)copy_of edgeartifact_ref with copied filesbranch_of edgeartifact_ref (ownership change only)transferred_from edgeartifact_ref with copied filespromoted_from edgemerged_from edgeTemplates define role binding mutations for operations.
template = RbacTemplate(
name="branch",
policy={
"bindings": [
{"principal": "actor_id", "role": "owner"},
{"principal": "source_owner_id", "role": "viewer"},
],
"revocations": [] # Optional role revocations
}
)
Context variables for templates:
actor_id: User performing the operationsource_owner_id: Original owner of source resourcetarget_owner_id: New owner for transferteam_id: Team principal for promote| Edge Type | Meaning |
|---|---|
copy_of | Resource references same artifact |
branch_of | Resource is a branch with copied files |
transferred_from | Ownership was transferred |
promoted_from | Promoted to team space |
merged_from | Branch merged back to ancestor |
derived_from | General derivation (legacy) |
All endpoints at /governance/resources/{resource_id}/:
POST /copy - Copy by reference
POST /branch - Branch with file copy
POST /transfer - Transfer ownership
POST /promote - Promote to team
POST /merge - Merge branch
GET /lineage - Query lineage chain
Governance operations emit these activities:
resource.copied resource.branched
resource.transferred resource.promoted
resource.merged
artifact_ref: UUID reference to artifact folderedge_type: Type of relationshipcreated_by_principal_id: Who created the edgeSee references/schema.md for details.
@pytest.fixture
def governance_service(artifact_manager):
return GovernanceService(artifact_manager=artifact_manager)
async def test_branch_creates_new_artifact(governance_service, db_session):
result = await governance_service.branch_resource(...)
assert result["artifact_ref"] != source.artifact_ref
See references/testing.md for patterns.
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs