Name: [ADD] viin_ai_ops: Operating Layer foundation (P-OPS-1)

State: Failed finished in 140m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #36

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: 465849d1fed3bb4efd32dd42b83421b13e1e7d5c

Description:

                                            [ADD] viin_ai_ops: Operating Layer foundation (P-OPS-1)

New Community-compatible module sitting between the AI capability layer
(viin_ai_agent) and external approval/workflow systems. Provides four
operating objects and the side-effect flow lock from operating-model.md §3.

Models:
- viin.ai.goal: typed operational goal (KPI / initiative / routine / risk_control)
- viin.ai.work.item: authoritative task state (draft -> in_progress -> done/cancelled)
- viin.ai.action.proposal: a side-effecting action awaiting governance routing
- viin.ai.control.policy: sequence-ordered rule routing proposals to
  auto_execute / require_approval / block

Side-effect flow lock: medium/high risk proposals can never auto-execute;
action_route() forces them to 'pending' regardless of policy, and an
unmatched proposal defaults to 'pending' (safe default).

Smart buttons: Work Items count on viin.ai.agent; Proposals count on
viin.ai.trace. Multi-company ir.rule on all four models; control.policy is
read-only for standard users.

Also marks the viin.ai.schedule / viin.ai.approval.chain stub anchors in
viin_ai_agent as deprecated (docstring + registry warning) and adds a
non-destructive migration scaffold. FK anchors are intentionally kept intact
until the relations are migrated in a later phase.

Tests: 46 (viin_ai_ops) + stub-deprecation contract; full suite green.
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time: