Skip to content

epic: internal AI guardrails thin distribution for Cor-Incorporated #1

Closed as not planned

Description

@terisuke

Summary

Build the Cor-Incorporated internal distribution on top of upstream-friendly OpenCode without turning the fork into a deep product fork.

Why

This follows the philosophy established in claude-code-skills epic #130 and its README/ADRs:

  • mechanism over prose for quality and safety
  • fastest reliable feedback layer first
  • pointer-based instructions instead of bloated always-loaded prompts
  • "implemented" is not "working" unless deployment/runtime behavior is verified as a system
  • explicit workflow gates for review, CI, and release-sensitive actions

Scope

  • wrapper distribution and packaged profile
  • managed config for enterprise defaults
  • Claude-compatible skill/rule migration strategy
  • plugin- and command-based guardrails
  • scenario coverage for critical behavior
  • provider admission policy

Planning docs in repo

  • docs/ai-guardrails/README.md
  • docs/ai-guardrails/adr/
  • docs/ai-guardrails/issues/
  • docs/ai-guardrails/migration/claude-code-skills-inventory.md

Success criteria

  • OpenCode core stays close to upstream
  • direct-reuse SKILL.md assets remain usable during migration
  • org-specific control lives in config/profile/plugins/commands/CI layers
  • critical guardrails are scenario-tested or CI-enforced
  • no critical workflow depends on hidden local hook deployment steps

Planned workstreams

  1. Bootstrap thin distribution
  2. Claude asset inventory and import
  3. Guardrail plugin MVP
  4. Safe agents and commands
  5. Provider admission policy
  6. Scenario and replay harness

Activity

  1. terisuke commented on Apr 3, 2026

    @terisuke
    Author

    Child issues:

  2. terisuke commented on Apr 3, 2026

    @terisuke
    Author

    Child issues:

  3. terisuke commented on Apr 3, 2026

    @terisuke
    Author

    Added README/doc positioning guidance in the working branch so future sessions use the same framing:

    • this repository should be described as a Cor-Incorporated fork of OpenCode
    • compatibility with upstream should be preserved where practical
    • guardrails should ship as a thin internal distribution layer, not a deep rewrite
    • renaming the repository or published package should be treated as a separate branding/distribution decision, after install paths, package names, and release ownership are ready together

    This keeps the fork legible without breaking the current upstream-compatible shape of the repo.

  4. terisuke commented on Apr 3, 2026

    @terisuke
    Author

    MVP readiness is now tracked explicitly in #16. The current planning split is:

    The local planning mirrors this in docs/ai-guardrails/mvp-readiness.md and the expanded issue pack under docs/ai-guardrails/issues/.

  5. terisuke commented on Apr 8, 2026

    @terisuke
    Author

    PR #139 progress update

    PR #139 (fix/guardrail-review-findings-phase7) addresses:

    Phase 6 (Dogfooding fixes):

    • Merge gate regex tightened — git merge-base no longer falsely blocked
    • Version baseline regression test added

    Phase 7 (Bug fixes / Test coverage):

    Verification: 34 tests / 255 expect() / all pass. Build + typecheck + deploy firing verified.

  6. terisuke commented on Apr 8, 2026

    @terisuke
    Author

    Epic progress update (2026-04-08)

    Closed today (4 issues)

    Remaining open (3 issues)

    Metrics

    • guardrail.ts: 1541 lines
    • team.ts: 835 lines
    • Agents: 31 | Commands: 30
    • Tests: 34 scenario tests / 255 expect() / 192 hook tests
    • Issues: 31 closed / 3 remaining (2 external deps + this epic)
    • Roadmap: ~85%
  7. terisuke commented on Apr 11, 2026

    @terisuke
    Author

    Issue Sweep 進捗 (2026-04-11 Session 2)

    クローズ済み

    PR オープン (CI 検証中)

    残り

    ロードマップ進捗

    • Guardrails plugin: ✅ 568L → delegation enforcement 追加
    • Scenario tests: ✅ 37/37 pass (3 new delegation tests)
    • CC parity: ✅ 100% (agents/commands/config)
    • Hooks: ~93%
    • CI stability: unit ✅ 常時 green, e2e 🔄 修正中
  8. terisuke commented on Oct 25, 2026

    @terisuke
    Author

    Closed by owner decision (Terada Kousuke, 2026-10-25), posted verbatim:

    古い issue 13 件(gov #172/#166/#148/#147/#145、ccs anomalyco#390/#279/#270、opencode #340/#339/#325/#294/#1)は「運用で見る」として閉じてください。理由をコメントに残してください。

    Context: the AIDD H17 work moved to an operate-and-observe phase on 2026-10-24 (H17 control 216a955e accepted in aidd-governance#216, the report contract shipped to every entry in claude-code-skills#441, the design rule for shell state guards recorded as ADR-012). This issue was not on the H17 path, had no activity since its last update, and will be watched through real use (the guard ledger and the weekly tally in the operations guide) instead of as an open item. Reopen if real operation shows the problem.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions