Skip to content

docs: P-023 architecture guard proposal (Own.Arch) - #171

Merged
PhysShell merged 1 commit into
mainfrom
claude/architecture-drift-detection-n2b257
Jul 4, 2026
Merged

docs: P-023 architecture guard proposal (Own.Arch)#171
PhysShell merged 1 commit into
mainfrom
claude/architecture-drift-detection-n2b257

Conversation

@PhysShell

@PhysShell PhysShell commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Что и зачем

Новый proposal P-023 — architecture guard (Own.Arch): гейт архитектурного дрейфа, который валит PR только на новых нарушениях зависимостей. Дизайн: intent-модель architecture.rules.yaml vs фактический граф зависимостей из .sln/.csproj, drift = actual − allowed, baseline-ratchet для существующего долга (fingerprint без file/line, канонический sort, rulesHash), tiered-диагностики ARCH### (детерминированные / эвристики / report-only), SARIF + markdown-отчёт. Жёсткие Non-goals: C4 только как renderer, без runtime-телеметрии, без dead-code гейтов, без второго rule-DSL. Плюс строка в индексе docs/proposals/README.md.

Тип изменения

  • feat — новая возможность
  • fix — исправление бага
  • docs — документация
  • refactor / chore / test / ci — без изменения поведения

Как проверено

  • python tests/run_tests.py
  • ruff check . и mypy
  • селфтесты затронутых скриптов (python scripts/<...>.py --selftest)

Docs-only изменение: два markdown-файла, код не затронут — тесты/линтеры не применимы. Проверены относительные ссылки внутри proposal (P-001/P-013/P-015, notes/sarif-export.md) и формат индекса.

Связанные issue

Нет связанных issue. Proposal вырос из design-обсуждения детекции архитектурного дрейфа.

Чеклист

  • изменение покрыто тестом/селфтестом (или объяснено, почему нет) — docs-only, тестируемого поведения нет
  • README/docs обновлены при необходимости — индекс docs/proposals/README.md дополнен
  • коммиты в conventional-commit стиле (feat:, fix:, docs: …)

🤖 Generated with Claude Code

https://claude.ai/code/session_01JvV8eSjV4R1Qi1vGw6fDg2


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a new architecture proposal describing an “architecture guard” approach for detecting and reporting dependency violations.
    • Documented the configuration format, baseline workflow, CI behavior, reporting outputs, and phased rollout plan.
    • Updated the proposals index to include the new draft entry.

Intent model (architecture.rules.yaml) vs actual dependency graph, with a
baseline ratchet: only new violations fail the build. Fingerprint policy,
CI decision table, SARIF/markdown reporting, tiered ARCH### diagnostics
(deterministic / heuristic / report-only), explicit non-goals (no C4 as
source of truth, no runtime telemetry, no dead-code gates).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JvV8eSjV4R1Qi1vGw6fDg2
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ad1b342-8766-482b-9c9d-2299e50b8ae9

📥 Commits

Reviewing files that changed from the base of the PR and between 368c7ba and e0ab584.

📒 Files selected for processing (2)
  • docs/proposals/P-023-architecture-guard.md
  • docs/proposals/README.md

📝 Walkthrough

Walkthrough

This PR adds a new architecture proposal document, P-023, defining the "Own.Arch" architecture guard concept—an architecture-drift gate that fails PRs only on new dependency violations while baselining pre-existing ones—and registers it in the proposals index.

Changes

Architecture Guard Proposal

Layer / File(s) Summary
Motivation and phased scope
docs/proposals/P-023-architecture-guard.md
Introduces the proposal's dependencies, motivation for the drift gate, the three-artefact model (intent, actual graph, verdict), MVP project-level scope (ARCH001ARCH003, ARCH030), phase-3 heuristics, and explicit non-goals.
Pipeline, rules schema, and baseline ratchet
docs/proposals/P-023-architecture-guard.md
Documents the extraction/evaluation pipeline, architecture.rules.yaml schema for layer/dependency/API rules, and the architecture-baseline.json ratchet mechanism with fingerprinting, --reason suppression, and CI decision table.
Reporting, implementation plan, and open questions
docs/proposals/P-023-architecture-guard.md, docs/proposals/README.md
Describes SARIF/markdown reporting outputs, a phased week-by-week implementation plan, open design questions, and adds the P-023 entry to the proposals index.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly identifies the new P-023 architecture guard proposal in Own.Arch.
Description check ✅ Passed All required sections are present and filled with relevant details, including type, checks, related issue, and checklist notes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/architecture-drift-detection-n2b257

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Owner Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

@PhysShell I'll review the PR now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@PhysShell
PhysShell merged commit 33a7302 into main Jul 4, 2026
30 checks passed
PhysShell pushed a commit that referenced this pull request Jul 4, 2026
PR #171 (architecture guard, Own.Arch) merged to main first and took
P-023; the security audit profile proposal moves to the next free
number. Index row re-linked accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0113xowoaqfUnPEXxxi15Gpm
PhysShell added a commit that referenced this pull request Jul 4, 2026
…wn scanner engine (#169)

Records the design-discussion verdict on the Own.SecurityChecks idea:
do not build a custom security scanner engine — it duplicates Nuclei/
testssl.sh/ZAP/Trivy and violates the audit charter in Plan.md
(orchestrator-not-analyzer, no regex heuristics, take ready tools).

Instead: a security profile for the existing audit fleet — tool-run
manifests + thin raw→SARIF adapters (v0.1), a typed .NET config analyzer
as the only own-code niche (v0.2), cross-tool correlation reusing the
oracle scorer (v0.3). Non-goals section pins the rejected engine.

Renumbered P-023 -> P-024 after #171 took P-023 (architecture guard).
Review fixes: MD040 fence label (CodeRabbit), --include-transitive on
the NuGet vulnerability scan (Codex).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants