@nomos-arc/arc 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +10 -0
- package/.nomos-config.json +5 -0
- package/CLAUDE.md +108 -0
- package/LICENSE +190 -0
- package/README.md +569 -0
- package/dist/cli.js +21120 -0
- package/docs/auth/googel_plan.yaml +1093 -0
- package/docs/auth/google_task.md +235 -0
- package/docs/auth/hardened_blueprint.yaml +1658 -0
- package/docs/auth/red_team_report.yaml +336 -0
- package/docs/auth/session_state.yaml +162 -0
- package/docs/certificate/cer_enhance_plan.md +605 -0
- package/docs/certificate/certificate_report.md +338 -0
- package/docs/dev_overview.md +419 -0
- package/docs/feature_assessment.md +156 -0
- package/docs/how_it_works.md +78 -0
- package/docs/infrastructure/map.md +867 -0
- package/docs/init/master_plan.md +3581 -0
- package/docs/init/red_team_report.md +215 -0
- package/docs/init/report_phase_1a.md +304 -0
- package/docs/integrity-gate/enhance_drift.md +703 -0
- package/docs/integrity-gate/overview.md +108 -0
- package/docs/management/manger-task.md +99 -0
- package/docs/management/scafffold.md +76 -0
- package/docs/map/ATOMIC_BLUEPRINT.md +1349 -0
- package/docs/map/RED_TEAM_REPORT.md +159 -0
- package/docs/map/map_task.md +147 -0
- package/docs/map/semantic_graph_task.md +792 -0
- package/docs/map/semantic_master_plan.md +705 -0
- package/docs/phase7/TEAM_RED.md +249 -0
- package/docs/phase7/plan.md +1682 -0
- package/docs/phase7/task.md +275 -0
- package/docs/prompts/USAGE.md +312 -0
- package/docs/prompts/architect.md +165 -0
- package/docs/prompts/executer.md +190 -0
- package/docs/prompts/hardener.md +190 -0
- package/docs/prompts/red_team.md +146 -0
- package/docs/verification/goveranance-overview.md +396 -0
- package/docs/verification/governance-overview.md +245 -0
- package/docs/verification/verification-arc-ar.md +560 -0
- package/docs/verification/verification-architecture.md +560 -0
- package/docs/very_next.md +52 -0
- package/docs/whitepaper.md +89 -0
- package/overview.md +1469 -0
- package/package.json +63 -0
- package/src/adapters/__tests__/git.test.ts +296 -0
- package/src/adapters/__tests__/stdio.test.ts +70 -0
- package/src/adapters/git.ts +226 -0
- package/src/adapters/pty.ts +159 -0
- package/src/adapters/stdio.ts +113 -0
- package/src/cli.ts +83 -0
- package/src/commands/apply.ts +47 -0
- package/src/commands/auth.ts +301 -0
- package/src/commands/certificate.ts +89 -0
- package/src/commands/discard.ts +24 -0
- package/src/commands/drift.ts +116 -0
- package/src/commands/index.ts +78 -0
- package/src/commands/init.ts +121 -0
- package/src/commands/list.ts +75 -0
- package/src/commands/map.ts +55 -0
- package/src/commands/plan.ts +30 -0
- package/src/commands/review.ts +58 -0
- package/src/commands/run.ts +63 -0
- package/src/commands/search.ts +147 -0
- package/src/commands/show.ts +63 -0
- package/src/commands/status.ts +59 -0
- package/src/core/__tests__/budget.test.ts +213 -0
- package/src/core/__tests__/certificate.test.ts +385 -0
- package/src/core/__tests__/config.test.ts +191 -0
- package/src/core/__tests__/preflight.test.ts +24 -0
- package/src/core/__tests__/prompt.test.ts +358 -0
- package/src/core/__tests__/review.test.ts +161 -0
- package/src/core/__tests__/state.test.ts +362 -0
- package/src/core/auth/__tests__/manager.test.ts +166 -0
- package/src/core/auth/__tests__/server.test.ts +220 -0
- package/src/core/auth/gcp-projects.ts +160 -0
- package/src/core/auth/manager.ts +114 -0
- package/src/core/auth/server.ts +141 -0
- package/src/core/budget.ts +119 -0
- package/src/core/certificate.ts +502 -0
- package/src/core/config.ts +212 -0
- package/src/core/errors.ts +54 -0
- package/src/core/factory.ts +49 -0
- package/src/core/graph/__tests__/builder.test.ts +272 -0
- package/src/core/graph/__tests__/contract-writer.test.ts +175 -0
- package/src/core/graph/__tests__/enricher.test.ts +299 -0
- package/src/core/graph/__tests__/parser.test.ts +200 -0
- package/src/core/graph/__tests__/pipeline.test.ts +202 -0
- package/src/core/graph/__tests__/renderer.test.ts +128 -0
- package/src/core/graph/__tests__/resolver.test.ts +185 -0
- package/src/core/graph/__tests__/scanner.test.ts +231 -0
- package/src/core/graph/__tests__/show.test.ts +134 -0
- package/src/core/graph/builder.ts +303 -0
- package/src/core/graph/constraints.ts +94 -0
- package/src/core/graph/contract-writer.ts +93 -0
- package/src/core/graph/drift/__tests__/classifier.test.ts +215 -0
- package/src/core/graph/drift/__tests__/comparator.test.ts +335 -0
- package/src/core/graph/drift/__tests__/drift.test.ts +453 -0
- package/src/core/graph/drift/__tests__/reporter.test.ts +203 -0
- package/src/core/graph/drift/classifier.ts +165 -0
- package/src/core/graph/drift/comparator.ts +205 -0
- package/src/core/graph/drift/reporter.ts +77 -0
- package/src/core/graph/enricher.ts +251 -0
- package/src/core/graph/grammar-paths.ts +30 -0
- package/src/core/graph/html-template.ts +493 -0
- package/src/core/graph/map-schema.ts +137 -0
- package/src/core/graph/parser.ts +336 -0
- package/src/core/graph/pipeline.ts +209 -0
- package/src/core/graph/renderer.ts +92 -0
- package/src/core/graph/resolver.ts +195 -0
- package/src/core/graph/scanner.ts +145 -0
- package/src/core/logger.ts +46 -0
- package/src/core/orchestrator.ts +792 -0
- package/src/core/plan-file-manager.ts +66 -0
- package/src/core/preflight.ts +64 -0
- package/src/core/prompt.ts +173 -0
- package/src/core/review.ts +95 -0
- package/src/core/state.ts +294 -0
- package/src/core/worktree-coordinator.ts +77 -0
- package/src/search/__tests__/chunk-extractor.test.ts +339 -0
- package/src/search/__tests__/embedder-auth.test.ts +124 -0
- package/src/search/__tests__/embedder.test.ts +267 -0
- package/src/search/__tests__/graph-enricher.test.ts +178 -0
- package/src/search/__tests__/indexer.test.ts +518 -0
- package/src/search/__tests__/integration.test.ts +649 -0
- package/src/search/__tests__/query-engine.test.ts +334 -0
- package/src/search/__tests__/similarity.test.ts +78 -0
- package/src/search/__tests__/vector-store.test.ts +281 -0
- package/src/search/chunk-extractor.ts +167 -0
- package/src/search/embedder.ts +209 -0
- package/src/search/graph-enricher.ts +95 -0
- package/src/search/indexer.ts +483 -0
- package/src/search/lexical-searcher.ts +190 -0
- package/src/search/query-engine.ts +225 -0
- package/src/search/vector-store.ts +311 -0
- package/src/types/index.ts +572 -0
- package/src/utils/__tests__/ansi.test.ts +54 -0
- package/src/utils/__tests__/frontmatter.test.ts +79 -0
- package/src/utils/__tests__/sanitize.test.ts +229 -0
- package/src/utils/ansi.ts +19 -0
- package/src/utils/context.ts +44 -0
- package/src/utils/frontmatter.ts +27 -0
- package/src/utils/sanitize.ts +78 -0
- package/test/e2e/lifecycle.test.ts +330 -0
- package/test/fixtures/mock-planner-hang.ts +5 -0
- package/test/fixtures/mock-planner.ts +26 -0
- package/test/fixtures/mock-reviewer-bad.ts +8 -0
- package/test/fixtures/mock-reviewer-retry.ts +34 -0
- package/test/fixtures/mock-reviewer.ts +18 -0
- package/test/fixtures/sample-project/src/circular-a.ts +6 -0
- package/test/fixtures/sample-project/src/circular-b.ts +6 -0
- package/test/fixtures/sample-project/src/config.ts +15 -0
- package/test/fixtures/sample-project/src/main.ts +19 -0
- package/test/fixtures/sample-project/src/services/product-service.ts +20 -0
- package/test/fixtures/sample-project/src/services/user-service.ts +18 -0
- package/test/fixtures/sample-project/src/types.ts +14 -0
- package/test/fixtures/sample-project/src/utils/index.ts +14 -0
- package/test/fixtures/sample-project/src/utils/validate.ts +12 -0
- package/tsconfig.json +20 -0
- package/vitest.config.ts +12 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
# nomos-arc.ai Verification Architecture
|
|
2
|
+
|
|
3
|
+
> ### *Compiler for AI Intent*
|
|
4
|
+
>
|
|
5
|
+
> **Engineering Integrity over Stochastic Generation**
|
|
6
|
+
> Specification Version: 1.0 — Draft
|
|
7
|
+
> Status: Phase 2 Architectural Manifesto
|
|
8
|
+
> Last Updated: 2026-04-12
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 0. Document Purpose
|
|
13
|
+
|
|
14
|
+
This document codifies the **architectural manifesto** for Phase 2 of `nomos-arc.ai`. It elevates the project from a CLI helper into an **Engineering Integrity System** that provides a deterministic **Verifiable Layer** over stochastic generators (LLMs).
|
|
15
|
+
|
|
16
|
+
This is not an implementation plan. It is a **Specification** defining the semantic and mathematical boundaries of the system, to be referenced by every subsequent design or implementation decision.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Foundational Philosophy
|
|
21
|
+
|
|
22
|
+
### 1.1 The Stochastic-Deterministic Duality
|
|
23
|
+
|
|
24
|
+
Large Language Models (LLMs) are inherently **stochastic** systems:
|
|
25
|
+
|
|
26
|
+
$$P(t_n \mid t_1, t_2, \ldots, t_{n-1})$$
|
|
27
|
+
|
|
28
|
+
Each emitted token is a conditional probability distribution over prior context. Therefore, any LLM output is a **sample** drawn from a space of possibilities — never a proof.
|
|
29
|
+
|
|
30
|
+
`nomos-arc.ai` is built on the inverse axiom: **software engineering demands verifiable guarantees**. The role of nomos-arc is not to generate code, but to **impose deterministic constraints on probabilistic outputs**:
|
|
31
|
+
|
|
32
|
+
$$\text{Output}_{\text{final}} = \mathcal{V}(\text{LLM}(\text{Intent}))$$
|
|
33
|
+
|
|
34
|
+
where $\mathcal{V}$ is a deterministic **Verifier Function** that accepts only outputs satisfying the constraint set $\mathcal{C}$.
|
|
35
|
+
|
|
36
|
+
### 1.2 Terminology: "Verifiable" not "Exact"
|
|
37
|
+
|
|
38
|
+
**Exactness** in computer science is a concept bounded by Formal Methods (Coq, Agda, TLA+), and is practically expensive. Instead, this system adopts the term **Verifiable**:
|
|
39
|
+
|
|
40
|
+
> Every output is subject to a machine-checkable constraint set, and any violation is rejected.
|
|
41
|
+
|
|
42
|
+
What we guarantee is therefore not "absolute semantic correctness" — it is **Constraint Conformance**.
|
|
43
|
+
|
|
44
|
+
### 1.3 Role Assignment
|
|
45
|
+
|
|
46
|
+
| Role | Entity | Nature |
|
|
47
|
+
|------|--------|--------|
|
|
48
|
+
| **Generator** | LLM (Gemini 1.5 Pro) | Stochastic |
|
|
49
|
+
| **Validator** | nomos-arc Governance Core | Deterministic |
|
|
50
|
+
| **Profiler** | Risk Profiler (async) | Statistical (separated) |
|
|
51
|
+
|
|
52
|
+
The strict separation between these roles is the **backbone** of the architecture.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 2. Core Architectural Principles
|
|
57
|
+
|
|
58
|
+
### 2.1 Principle I — Constraint Conformance over Output Correctness
|
|
59
|
+
|
|
60
|
+
The system does not judge the "correctness" of code; it judges **conformance to declared constraints** (structural, syntactic, behavioral).
|
|
61
|
+
|
|
62
|
+
### 2.2 Principle II — Separation of Planning and Execution
|
|
63
|
+
|
|
64
|
+
The classical failure mode of AI coding tools is conflating **planning** and **execution** in a single call. `nomos-arc` separates them:
|
|
65
|
+
|
|
66
|
+
- **Planning Phase** — produces a **Contract** (an intent contract).
|
|
67
|
+
- **Validation Gate** — verifies the contract before any code generation.
|
|
68
|
+
- **Execution Phase** — begins only after the contract is approved.
|
|
69
|
+
|
|
70
|
+
### 2.3 Principle III — Baseline-Relative Verification
|
|
71
|
+
|
|
72
|
+
The system does not demand absolute perfection; it demands that **the state not regress**:
|
|
73
|
+
|
|
74
|
+
$$\text{Accept}(S_{\text{after}}) \iff \Delta(S_{\text{before}}, S_{\text{after}}) \leq 0$$
|
|
75
|
+
|
|
76
|
+
where $\Delta$ measures state degradation (errors, warnings, failing tests). This allows nomos-arc to be used for fixing already-broken projects without being rejected at Preflight.
|
|
77
|
+
|
|
78
|
+
### 2.4 Principle IV — Probabilistic Inputs, Deterministic Gates
|
|
79
|
+
|
|
80
|
+
Statistical data (Risk Profiler, Pattern Mining) is used as **input** to threshold calibration, but **the gates themselves** remain deterministic. Probabilistic values never sit on the final decision path.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 3. Confidence-Tiered Rule System
|
|
85
|
+
|
|
86
|
+
### 3.1 Rule Source Taxonomy
|
|
87
|
+
|
|
88
|
+
| Source | Authority | Example |
|
|
89
|
+
|--------|-----------|---------|
|
|
90
|
+
| **Declared** | Written manually by the user (`rules/global.md`, `rules/domain/*.md`) | "Do not use `any`" |
|
|
91
|
+
| **Derived** | Mined by nomos-arc from `project_map.json` via Pattern Mining | "All Controllers return `ResponseDTO`" |
|
|
92
|
+
| **Inferred** | Inferred by nomos-arc from Co-Change History | "This file always changes with that one" |
|
|
93
|
+
|
|
94
|
+
### 3.2 Confidence Function
|
|
95
|
+
|
|
96
|
+
For any candidate pattern $p$, its confidence score is:
|
|
97
|
+
|
|
98
|
+
$$\text{Conf}(p) = \frac{|\{x \in \mathcal{X} : p(x) = \text{true}\}|}{|\mathcal{X}|}$$
|
|
99
|
+
|
|
100
|
+
where $\mathcal{X}$ is the relevant population (e.g. all Controller methods).
|
|
101
|
+
|
|
102
|
+
### 3.3 Tier Assignment
|
|
103
|
+
|
|
104
|
+
$$\text{Tier}(p) = \begin{cases}
|
|
105
|
+
\text{Hard Rule} & \text{if } \text{Conf}(p) \geq 0.90 \\
|
|
106
|
+
\text{Soft Rule} & \text{if } 0.70 \leq \text{Conf}(p) < 0.90 \\
|
|
107
|
+
\text{Observation} & \text{if } \text{Conf}(p) < 0.70
|
|
108
|
+
\end{cases}$$
|
|
109
|
+
|
|
110
|
+
| Tier | Enforcement | Effect on Score |
|
|
111
|
+
|------|-------------|-----------------|
|
|
112
|
+
| **Hard Rule** | Auto-enforced | Violation → Hard Fail |
|
|
113
|
+
| **Soft Rule** | Warned + penalized | Violation → $-0.1$ to $-0.2$ per occurrence |
|
|
114
|
+
| **Observation** | Informational only | No scoring impact — feeds Planner context |
|
|
115
|
+
|
|
116
|
+
This tiering prevents **Architectural Stagnation**: legitimate minority patterns (refactors) are not suppressed, merely documented.
|
|
117
|
+
|
|
118
|
+
### 3.4 Threshold Calibration
|
|
119
|
+
|
|
120
|
+
The thresholds $0.90$ and $0.70$ are defaults. They must be configurable via `.nomos-config.json`:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"governance": {
|
|
125
|
+
"hard_rule_threshold": 0.90,
|
|
126
|
+
"soft_rule_threshold": 0.70,
|
|
127
|
+
"min_sample_size": 10
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`min_sample_size` prevents rule derivation from tiny samples (statistical noise).
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 4. AST Projection Model
|
|
137
|
+
|
|
138
|
+
### 4.1 Problem Statement
|
|
139
|
+
|
|
140
|
+
Pre-execution validation on a plan faces a **chicken-and-egg** problem: a plan may reference symbols that do not yet exist, because they will be introduced by the plan itself.
|
|
141
|
+
|
|
142
|
+
### 4.2 Symbol Reference Classification
|
|
143
|
+
|
|
144
|
+
While analyzing the Contract, every symbol reference is classified into one of three categories:
|
|
145
|
+
|
|
146
|
+
$$\text{Ref}(s) \in \{\text{Existing}, \text{Declared}, \text{Forward}\}$$
|
|
147
|
+
|
|
148
|
+
| Category | Validation Source |
|
|
149
|
+
|----------|-------------------|
|
|
150
|
+
| **Existing** | Checked against the **Current AST** (from `project_map.json`) |
|
|
151
|
+
| **Declared** | A new definition introduced by the plan — added to the **Projected AST** |
|
|
152
|
+
| **Forward** | A reference to a symbol that will be defined later in the same plan — checked against the **Projected AST** |
|
|
153
|
+
|
|
154
|
+
### 4.3 Projected AST Construction
|
|
155
|
+
|
|
156
|
+
$$\text{AST}_{\text{projected}} = \text{AST}_{\text{current}} \oplus \text{Declared}(\text{Plan})$$
|
|
157
|
+
|
|
158
|
+
where $\oplus$ is a merge operator that injects the new declarations before forward references are resolved. Conceptually, this structure resembles a **Virtual DOM** in React — an intermediate layer between intent and actual application.
|
|
159
|
+
|
|
160
|
+
### 4.4 Hallucination Detection
|
|
161
|
+
|
|
162
|
+
$$\text{Hallucinated}(s) \iff \text{Ref}(s) = \text{Existing} \land s \notin \text{AST}_{\text{current}}$$
|
|
163
|
+
|
|
164
|
+
When a hallucination is detected, the Contract is returned to the Planner with a specific message:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Planner claimed: AuthService.validate()
|
|
168
|
+
AST evidence: AuthService has methods [verify, revoke, refresh]
|
|
169
|
+
Action: Re-plan with corrected symbol reference
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 5. Dynamic Convergence Threshold
|
|
175
|
+
|
|
176
|
+
### 5.1 Blast Radius Definition
|
|
177
|
+
|
|
178
|
+
For any file $f$, the Blast Radius is the number of entities that depend on it directly or transitively:
|
|
179
|
+
|
|
180
|
+
$$BR(f) = |\{g \in \mathcal{G} : g \xrightarrow{*} f\}|$$
|
|
181
|
+
|
|
182
|
+
where $\mathcal{G}$ is the Dependency Graph and $\xrightarrow{*}$ is the transitive closure of the dependency relation.
|
|
183
|
+
|
|
184
|
+
### 5.2 Convergence Threshold Formula
|
|
185
|
+
|
|
186
|
+
$$\theta(f) = \theta_{\text{base}} + \alpha \cdot \log(1 + BR(f)) + \beta \cdot R(f)$$
|
|
187
|
+
|
|
188
|
+
| Symbol | Meaning | Default |
|
|
189
|
+
|--------|---------|---------|
|
|
190
|
+
| $\theta_{\text{base}}$ | Base threshold | $0.85$ |
|
|
191
|
+
| $\alpha$ | Blast Radius sensitivity coefficient | $0.02$ |
|
|
192
|
+
| $\beta$ | Risk Profile sensitivity coefficient | $0.05$ |
|
|
193
|
+
| $R(f)$ | Risk score from Risk Profiler (see §7) | $\in [0, 1]$ |
|
|
194
|
+
|
|
195
|
+
A hard cap is applied: $\theta(f) \leq 0.99$, to avoid practical impossibility.
|
|
196
|
+
|
|
197
|
+
**Operational meaning:**
|
|
198
|
+
- A file with no dependents, stable → $\theta \approx 0.85$
|
|
199
|
+
- A file with 50 dependents, stable → $\theta \approx 0.93$
|
|
200
|
+
- A file with 50 dependents, unstable → $\theta \approx 0.98$
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 6. The 8-Step Orchestration Pipeline
|
|
205
|
+
|
|
206
|
+
### 6.1 Pipeline Overview
|
|
207
|
+
|
|
208
|
+
$$\text{Task} \xrightarrow{S_1} \text{Baseline} \xrightarrow{S_2} \text{Contract} \xrightarrow{S_3} \text{Validated Contract} \xrightarrow{S_4} \text{Candidate} \xrightarrow{S_5} \text{Runnable} \xrightarrow{S_6} \text{Scored} \xrightarrow{S_7} \text{Delta-Checked} \xrightarrow{S_8} \text{Certified}$$
|
|
209
|
+
|
|
210
|
+
### 6.2 Step-by-Step Specification
|
|
211
|
+
|
|
212
|
+
#### **Step 1: Baseline Capture**
|
|
213
|
+
|
|
214
|
+
**Input:** Current repository state
|
|
215
|
+
**Output:** `baseline.json`
|
|
216
|
+
|
|
217
|
+
Captures a deterministic snapshot of the present state:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"timestamp": "ISO-8601",
|
|
222
|
+
"compile_errors": 0,
|
|
223
|
+
"type_errors": 3,
|
|
224
|
+
"lint_warnings": 12,
|
|
225
|
+
"lint_errors": 0,
|
|
226
|
+
"test_pass_rate": 0.87,
|
|
227
|
+
"test_count": 367,
|
|
228
|
+
"hash": "sha256:..."
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Does not read Git history. Fast, lightweight, deterministic.
|
|
233
|
+
|
|
234
|
+
#### **Step 2: Contract Drafting**
|
|
235
|
+
|
|
236
|
+
**Input:** Task + Rules + Context + Risk Profile
|
|
237
|
+
**Output:** Structured Contract (JSON)
|
|
238
|
+
|
|
239
|
+
The LLM emits a structured **intent**, not code:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"intent": "Add rate limiting to auth endpoints",
|
|
244
|
+
"affected_modules": ["src/auth/*.ts"],
|
|
245
|
+
"symbol_changes": [
|
|
246
|
+
{ "type": "add", "symbol": "RateLimiter", "kind": "class" },
|
|
247
|
+
{ "type": "modify", "symbol": "AuthService.login", "kind": "method" }
|
|
248
|
+
],
|
|
249
|
+
"expected_delta": {
|
|
250
|
+
"files_modified": 2,
|
|
251
|
+
"files_added": 1
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### **Step 3: Contract Validation Gate**
|
|
257
|
+
|
|
258
|
+
**Input:** Contract + Current AST + Derived Rules
|
|
259
|
+
**Output:** Pass / Fail-with-feedback
|
|
260
|
+
|
|
261
|
+
Applies:
|
|
262
|
+
1. **AST Projection** (§4) to verify reference validity.
|
|
263
|
+
2. **Hard Rules Check** (§3) to reject pre-known violations.
|
|
264
|
+
3. **Structural Feasibility:** do the declared `affected_modules` actually exist?
|
|
265
|
+
|
|
266
|
+
On failure → return to Planner with targeted feedback (max $N$ iterations).
|
|
267
|
+
|
|
268
|
+
#### **Step 4: Execution**
|
|
269
|
+
|
|
270
|
+
**Input:** Validated Contract
|
|
271
|
+
**Output:** Shadow worktree containing generated code
|
|
272
|
+
|
|
273
|
+
Performed in an isolated **git worktree**. No effect on the main branch.
|
|
274
|
+
|
|
275
|
+
#### **Step 5: Hard Gates**
|
|
276
|
+
|
|
277
|
+
**Input:** Candidate code
|
|
278
|
+
**Output:** Compiler + Critical Linter verdict
|
|
279
|
+
|
|
280
|
+
$$\text{Gate}_{\text{hard}} = \bigwedge_{g \in G_H} g(\text{code})$$
|
|
281
|
+
|
|
282
|
+
where $G_H$ is the set of strict gates: `tsc --noEmit`, `eslint --max-warnings=0 --rule-severity=error`, critical static analysis.
|
|
283
|
+
|
|
284
|
+
**On failure → return to Planner or Discard.** No tokens are spent on Soft Gates.
|
|
285
|
+
|
|
286
|
+
#### **Step 6: Soft Gates + Scoring**
|
|
287
|
+
|
|
288
|
+
**Input:** Code that passed Hard Gates
|
|
289
|
+
**Output:** Composite Score $\in [0, 1]$
|
|
290
|
+
|
|
291
|
+
$$\text{Score} = w_1 \cdot S_{\text{AI}} + w_2 \cdot S_{\text{lint}} + w_3 \cdot S_{\text{coverage}} + w_4 \cdot S_{\text{style}}$$
|
|
292
|
+
|
|
293
|
+
with:
|
|
294
|
+
- $S_{\text{AI}}$: Reviewer AI score $\in [0, 1]$
|
|
295
|
+
- $S_{\text{lint}} = 1 - \frac{\text{warnings}}{\text{warning\_budget}}$
|
|
296
|
+
- $S_{\text{coverage}}$: coverage ratio for new code
|
|
297
|
+
- $S_{\text{style}}$: Soft Rule conformance
|
|
298
|
+
- $\sum w_i = 1$
|
|
299
|
+
|
|
300
|
+
#### **Step 7: Delta Comparison**
|
|
301
|
+
|
|
302
|
+
**Input:** Baseline + Candidate state + Original Contract
|
|
303
|
+
**Output:** Delta verdict
|
|
304
|
+
|
|
305
|
+
Verified along three dimensions:
|
|
306
|
+
|
|
307
|
+
**(a) No Regression:**
|
|
308
|
+
$$\Delta_{\text{state}} = S_{\text{after}} - S_{\text{baseline}} \leq 0$$
|
|
309
|
+
|
|
310
|
+
**(b) Plan Conformance:**
|
|
311
|
+
$$\Delta_{\text{plan}} = |\text{expected\_delta} - \text{actual\_delta}| \leq \epsilon$$
|
|
312
|
+
|
|
313
|
+
Any significant deviation from the contract's `expected_delta` → fail (the AI may have done more or less than promised).
|
|
314
|
+
|
|
315
|
+
**(c) Improvement Direction:** For fix tasks, the delta must strictly improve: $\Delta_{\text{state}} < 0$, not merely $\leq 0$.
|
|
316
|
+
|
|
317
|
+
#### **Step 8: Certificate Issuance**
|
|
318
|
+
|
|
319
|
+
**Input:** Artifacts from all prior steps
|
|
320
|
+
**Output:** `certificate.json` (signed)
|
|
321
|
+
|
|
322
|
+
```json
|
|
323
|
+
{
|
|
324
|
+
"task_hash": "sha256:...",
|
|
325
|
+
"contract_hash": "sha256:...",
|
|
326
|
+
"diff_hash": "sha256:...",
|
|
327
|
+
"gates_passed": ["ast_projection", "hard_gates", "soft_gates", "delta"],
|
|
328
|
+
"score": 0.94,
|
|
329
|
+
"threshold_required": 0.91,
|
|
330
|
+
"iterations": 3,
|
|
331
|
+
"baseline_ref": "sha256:...",
|
|
332
|
+
"verifiable_claims": [
|
|
333
|
+
"No new compile errors",
|
|
334
|
+
"No hard rule violations",
|
|
335
|
+
"Expected delta matches actual delta (±1 file)"
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
The certificate **does not claim semantic correctness**. It claims **conformance to specific constraints**.
|
|
341
|
+
|
|
342
|
+
### 6.3 Conditional Execution Invariant
|
|
343
|
+
|
|
344
|
+
**Strict rule:** Step $S_{i+1}$ is never executed unless $S_i$ succeeded. This prevents spending resources (API calls, compute) on already-broken outputs.
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## 7. Risk Profiler (Asynchronous Layer)
|
|
349
|
+
|
|
350
|
+
### 7.1 Separation Rationale
|
|
351
|
+
|
|
352
|
+
The Risk Profiler **is not part of the synchronous pipeline**. It is an independent layer:
|
|
353
|
+
|
|
354
|
+
- **Pipeline** = synchronous, per-task, deterministic
|
|
355
|
+
- **Risk Profiler** = asynchronous, periodic, statistical
|
|
356
|
+
|
|
357
|
+
Merging them would turn every `arc run` into a Git log analysis operation — destroying user experience on large repositories.
|
|
358
|
+
|
|
359
|
+
### 7.2 Architecture
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
┌─────────────────────┐
|
|
363
|
+
│ Risk Profiler │ Async, periodic (daily / on-demand)
|
|
364
|
+
│ │ Outputs: risk_profile.json
|
|
365
|
+
└──────────┬──────────┘
|
|
366
|
+
│ consumed by
|
|
367
|
+
↓
|
|
368
|
+
┌─────────────────────────────────────────────┐
|
|
369
|
+
│ 8-Step Pipeline (Sync) │
|
|
370
|
+
│ S2: Planner reads risk context │
|
|
371
|
+
│ S3: Threshold $\theta(f)$ uses $R(f)$ │
|
|
372
|
+
│ S6: Scoring weights modulated │
|
|
373
|
+
└─────────────────────────────────────────────┘
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### 7.3 Core Metrics
|
|
377
|
+
|
|
378
|
+
| Metric | Formula | Data Source |
|
|
379
|
+
|--------|---------|-------------|
|
|
380
|
+
| **Churn Rate** | $C(f) = \frac{\|\text{commits}_{f, \Delta t}\|}{\Delta t}$ | `git log --follow` |
|
|
381
|
+
| **Revert Density** | $RD(f) = \frac{\|\text{reverted commits}_f\|}{\|\text{commits}_f\|}$ | `git log --grep=revert` |
|
|
382
|
+
| **Bug-Fix Ratio** | $BF(f) = \frac{\|\text{fix-tagged commits}_f\|}{\|\text{commits}_f\|}$ | commit message parsing |
|
|
383
|
+
| **Co-Change Coupling** | $CC(f_i, f_j) = \frac{\|\text{commits containing both}\|}{\|\text{commits containing either}\|}$ (Jaccard) | `git log` pair analysis |
|
|
384
|
+
| **Ownership Dilution** | $OD(f) = \frac{H(\text{authors}_f)}{\log\|\text{authors}_f\|}$ (normalized entropy) | `git blame` |
|
|
385
|
+
|
|
386
|
+
### 7.4 Composite Risk Score
|
|
387
|
+
|
|
388
|
+
$$R(f) = \sigma\left( \gamma_1 \cdot C(f) + \gamma_2 \cdot RD(f) + \gamma_3 \cdot BF(f) + \gamma_4 \cdot OD(f) \right)$$
|
|
389
|
+
|
|
390
|
+
where $\sigma$ is a sigmoid, producing $R(f) \in [0, 1]$. Weights $\gamma_i$ are configurable.
|
|
391
|
+
|
|
392
|
+
### 7.5 Co-Change as Implicit Coupling Detector
|
|
393
|
+
|
|
394
|
+
$CC(f_i, f_j) > 0.80$ in the absence of any visible `import` or AST-level dependency suggests an **implicit hidden coupling** — likely an undocumented contract, shared schema, or duplicated constant. This class of coupling is invisible to the AST, yet breaks under modification.
|
|
395
|
+
|
|
396
|
+
### 7.6 Probabilistic Outputs, Never Verdicts
|
|
397
|
+
|
|
398
|
+
Outputs are phrased as **probabilities**, never verdicts:
|
|
399
|
+
|
|
400
|
+
> ❌ "Module X is fragile"
|
|
401
|
+
> ✅ "Module X has 73% regression likelihood based on 6-month history (n=47 commits)"
|
|
402
|
+
|
|
403
|
+
This preserves the **Verifiable** promise: deterministic facts stay in the Pipeline, statistics stay in the Profiler — each in its own lane.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## 8. Incremental Map Invalidation
|
|
408
|
+
|
|
409
|
+
### 8.1 Problem
|
|
410
|
+
|
|
411
|
+
`project_map.json` is currently built by `arc map` as a full scan. Post-Phase-2, after every successful `arc apply`, the map must be updated. A full re-scan on a large project costs **seconds to minutes of latency**.
|
|
412
|
+
|
|
413
|
+
### 8.2 Incremental Scanner Design
|
|
414
|
+
|
|
415
|
+
$$\text{AST}_{\text{new}} = (\text{AST}_{\text{old}} \setminus \text{Nodes}(F_{\text{changed}})) \cup \text{Parse}(F_{\text{changed}})$$
|
|
416
|
+
|
|
417
|
+
where $F_{\text{changed}}$ is the set of files modified by the apply.
|
|
418
|
+
|
|
419
|
+
**Invalidation Cascade:**
|
|
420
|
+
1. Remove the nodes belonging to $F_{\text{changed}}$ from the Graph.
|
|
421
|
+
2. Re-parse only those files.
|
|
422
|
+
3. Rebuild edges originating from / pointing into those files.
|
|
423
|
+
4. Recompute Blast Radius only for affected nodes (not the entire graph).
|
|
424
|
+
|
|
425
|
+
### 8.3 Cache Consistency Guarantee
|
|
426
|
+
|
|
427
|
+
After any `arc apply`:
|
|
428
|
+
$$\text{Hash}(\text{AST}_{\text{new}}) = \text{Hash}(\text{FullScan}(\text{repo}))$$
|
|
429
|
+
|
|
430
|
+
A periodic **integrity test** must compare both outputs to ensure the incremental path has not drifted from the full-scan ground truth.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## 9. System-Level Invariants
|
|
435
|
+
|
|
436
|
+
The system must uphold the following invariants under all conditions:
|
|
437
|
+
|
|
438
|
+
**I1 — No Generation Without Validation:**
|
|
439
|
+
$$\nexists\, \text{code output} \text{ such that } \text{Contract Validation} = \text{Fail} \land \text{Generation proceeds}$$
|
|
440
|
+
|
|
441
|
+
**I2 — No Scoring Without Hard Gates:**
|
|
442
|
+
$$\text{Score computed} \implies \text{Hard Gates} = \text{Pass}$$
|
|
443
|
+
|
|
444
|
+
**I3 — No Apply Without Delta Check:**
|
|
445
|
+
$$\text{Merge to main} \implies \Delta_{\text{state}} \leq 0 \land \Delta_{\text{plan}} \leq \epsilon$$
|
|
446
|
+
|
|
447
|
+
**I4 — No Certificate Without Full Pipeline:**
|
|
448
|
+
$$\text{Certificate issued} \implies \bigwedge_{i=1}^{8} S_i = \text{Pass}$$
|
|
449
|
+
|
|
450
|
+
**I5 — Probabilistic ∉ Decision Path:**
|
|
451
|
+
Deterministic decisions (pass/fail, merge/reject) never depend directly on probabilistic values. Statistics adjust gate **thresholds** — they never replace gates.
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## 10. Implementation Roadmap
|
|
456
|
+
|
|
457
|
+
### Phase 2.1 — Governance Core (MVP)
|
|
458
|
+
- [ ] Step 1: Baseline Capture (`arc baseline`)
|
|
459
|
+
- [ ] Step 7: Delta Comparison
|
|
460
|
+
- [ ] Basic Certificate field extension
|
|
461
|
+
- **Rationale:** Smallest scope, immediate value; shifts `apply` from "trust" to "evidence-based".
|
|
462
|
+
|
|
463
|
+
### Phase 2.2 — Contract Validation
|
|
464
|
+
- [ ] Step 2: Structured Contract schema
|
|
465
|
+
- [ ] Step 3: AST Projection + Hard Rule checking
|
|
466
|
+
- [ ] Hallucination feedback loop
|
|
467
|
+
- **Rationale:** Eliminates ~80% of LLM errors before code generation.
|
|
468
|
+
|
|
469
|
+
### Phase 2.3 — Dynamic Thresholds
|
|
470
|
+
- [ ] Blast Radius computation from the existing graph
|
|
471
|
+
- [ ] $\theta(f)$ formula integration
|
|
472
|
+
- **Rationale:** Uses already-available data; scoring-logic modification only.
|
|
473
|
+
|
|
474
|
+
### Phase 2.4 — Auto-Derived Rules
|
|
475
|
+
- [ ] Pattern Mining engine on `project_map.json`
|
|
476
|
+
- [ ] Confidence-tiered rule emission
|
|
477
|
+
- [ ] Soft / Hard / Observation categorization
|
|
478
|
+
- **Rationale:** Reduces the need for hand-written rules.
|
|
479
|
+
|
|
480
|
+
### Phase 2.5 — Risk Profiler
|
|
481
|
+
- [ ] Git history analyzer
|
|
482
|
+
- [ ] Core metrics computation
|
|
483
|
+
- [ ] `risk_profile.json` emission
|
|
484
|
+
- [ ] Integration of $R(f)$ into $\theta(f)$
|
|
485
|
+
- **Rationale:** Largest scope; depends on stability of prior layers.
|
|
486
|
+
|
|
487
|
+
### Phase 2.6 — Incremental Map
|
|
488
|
+
- [ ] Incremental AST scanner
|
|
489
|
+
- [ ] Invalidation cascade
|
|
490
|
+
- [ ] Consistency verification tests
|
|
491
|
+
- **Rationale:** Optimization; improves performance, not functionality.
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## 11. What This System Does *Not* Claim
|
|
496
|
+
|
|
497
|
+
Engineering honesty requires stating the boundaries:
|
|
498
|
+
|
|
499
|
+
- **Does not guarantee semantic correctness.** Code passing every gate may still be logically wrong.
|
|
500
|
+
- **Does not replace human review** for high-risk tasks.
|
|
501
|
+
- **Does not fully eliminate hallucination** — it measurably reduces it via AST Projection.
|
|
502
|
+
- **Does not produce mathematical proofs** in the Formal Verification sense. It produces **auditable evidence**.
|
|
503
|
+
- **Does not suit projects lacking tests or lint rules** — the system feeds on the outputs of existing tooling.
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
## 12. Positioning & Terminology
|
|
508
|
+
|
|
509
|
+
### 12.1 Headline
|
|
510
|
+
|
|
511
|
+
Under this manifesto, `nomos-arc.ai` is not "yet another AI coding tool". It is:
|
|
512
|
+
|
|
513
|
+
> # **Compiler for AI Intent**
|
|
514
|
+
>
|
|
515
|
+
> A verification layer that forces probabilistic LLM outputs to conform to machine-checkable engineering contracts — making every code change **evidence-backed**, not **trust-based**.
|
|
516
|
+
|
|
517
|
+
The closest product category: **Professional Tooling** (alongside debuggers, profilers, static analyzers), not **AI Assistants**.
|
|
518
|
+
|
|
519
|
+
### 12.2 Layered Terminology
|
|
520
|
+
|
|
521
|
+
Terminology is not interchangeable. Each layer has its own vocabulary:
|
|
522
|
+
|
|
523
|
+
| Layer | Term | Usage |
|
|
524
|
+
|-------|------|-------|
|
|
525
|
+
| **Marketing / Positioning** | *Engineering Integrity System* | Conveys the value to the developer: "your code is sound, certified, free of AI hallucination" |
|
|
526
|
+
| **Technical / Architectural** | *Verification Layer* / *Verifiable Pipeline* | Conveys technical precision to engineers; matches what the system actually does |
|
|
527
|
+
| **Code / Internal** | `src/core/governance/` | Internal module name bundling rules + validators + audit emitter |
|
|
528
|
+
| **Conceptual / Headline** | *Compiler for AI Intent* | A communication metaphor that creates correct expectations (deterministic, error-before-runtime, toolchain-native) |
|
|
529
|
+
|
|
530
|
+
**Usage rule:** do not use "Governance" in external communication (docs, README, pitch). Keep it as an internal subsystem name only. Use **Verification** for technical prose, **Integrity** for value framing, and **Compiler for AI Intent** as the headline.
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## Appendix A — Symbol Reference Table
|
|
535
|
+
|
|
536
|
+
| Symbol | Meaning |
|
|
537
|
+
|--------|---------|
|
|
538
|
+
| $\mathcal{V}$ | Verifier Function |
|
|
539
|
+
| $\mathcal{C}$ | Constraint Set |
|
|
540
|
+
| $\text{Conf}(p)$ | Rule confidence score |
|
|
541
|
+
| $BR(f)$ | Blast Radius of file $f$ |
|
|
542
|
+
| $R(f)$ | Risk score of file $f$ from Risk Profiler |
|
|
543
|
+
| $\theta(f)$ | Convergence threshold for file $f$ |
|
|
544
|
+
| $\Delta$ | Delta between two states |
|
|
545
|
+
| $\oplus$ | AST merge operator |
|
|
546
|
+
| $S_i$ | Pipeline Step $i$ |
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## Appendix B — Related Documents
|
|
551
|
+
|
|
552
|
+
- [governance-overview.md](./governance-overview.md) — Original philosophical framing
|
|
553
|
+
- [../dev_overview.md](../dev_overview.md) — Project overview
|
|
554
|
+
- [../how_it_works.md](../how_it_works.md) — Current Phase 1 mechanics
|
|
555
|
+
- [../integrity-gate/](../integrity-gate/) — Existing integrity certificate design
|
|
556
|
+
- [../map/](../map/) — Dependency graph specification
|
|
557
|
+
|
|
558
|
+
---
|
|
559
|
+
|
|
560
|
+
*End of Specification v1.0*
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
بصفتي **CEO** و**Lead Architect**، أرى أننا قد انتهينا للتو من بناء "المحرك" و"نظام الملاحة" لـ **nomos-arc.ai**. لكي يكتمل المشروع في نفس الاتجاه الاستراتيجي (الرقابة، النزاهة، والفهم الشامل)، هناك 5 مسارات تطويرية ستحول هذه الأداة من "مساعد للمبرمج" إلى **"نظام تشغيل لإدارة المشاريع البرمجية"**:
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## 1. بوابات الحوكمة الأوتوماتيكية (CI/CD Integrity Gates)
|
|
6
|
+
بما أننا نمتلك الآن "خريطة دلالية" و"شهادة نزاهة"، يجب أن نمنع أي كود من الوصول للإنتاج إذا لم يحترم المعايير.
|
|
7
|
+
* **المهمة:** تطوير **GitHub Action / GitLab CI Component**.
|
|
8
|
+
* **الوظيفة:** عند عمل "Pull Request"، يقوم النظام بتشغيل `arc map` ومقارنته بالخريطة السابقة. إذا وجد انحرافاً معمارياً (**Architectural Drift**) أو كسرًا لعقد دلالي دون مراجعة، يتم إيقاف الـ Pipeline فوراً.
|
|
9
|
+
* **الأثر:** تحويل nomos-arc من أداة "اختيارية" إلى "حارس بوابة" (Gatekeeper) إلزامي.
|
|
10
|
+
|
|
11
|
+
## 2. البحث الدلالي العالمي (Global Semantic Search)
|
|
12
|
+
حالياً، نحن نبحث عن "الرموز" (Symbols). الخطوة التالية هي البحث عن "المعنى" (Intent).
|
|
13
|
+
* **المهمة:** دمج **Vector Embeddings** لخريطة المشروع.
|
|
14
|
+
* **الوظيفة:** بدلاً من البحث عن كلمة `Payment` في الملفات، يمكنك سؤال الأداة: "أين يتم معالجة منطق استرداد الأموال في هذا المشروع؟".
|
|
15
|
+
* **التقنية:** تحويل محتويات `project_map.json` و `.semantic.md` إلى متجهات (Vectors) مخزنة محلياً، مما يتيح استعلامات طبيعية (Natural Language Queries) عابرة للملفات.
|
|
16
|
+
|
|
17
|
+
## 3. الربط الديناميكي (Static-to-Runtime Linkage)
|
|
18
|
+
الخريطة الحالية "ساكنة" (Static). لكي تكتمل الصورة، يجب أن ترى الخريطة ما يحدث أثناء التشغيل.
|
|
19
|
+
* **المهمة:** دمج بيانات **OpenTelemetry** أو سجلات الأخطاء (Logs).
|
|
20
|
+
* **الوظيفة:** في خريطة `arc show map` التفاعلية، تظهر العقد (Nodes) التي تسبب أخطاء متكررة في بيئة الإنتاج بلون "وامض".
|
|
21
|
+
* **الفائدة:** عند الضغط على ملف "أحمر" (عالي الخطورة)، ترى ليس فقط من يعتمد عليه كودياً، بل من تسبب في تعطيله برمجياً في آخر 24 ساعة.
|
|
22
|
+
|
|
23
|
+
## 4. دعم تعدد اللغات (Polyglot Support)
|
|
24
|
+
لكي يكون nomos-arc "منصة فهم شاملة"، يجب ألا يقتصر على TypeScript/JavaScript.
|
|
25
|
+
* **المهمة:** إضافة Grammars لـ **Python, Go, Rust** في محرك `tree-sitter`.
|
|
26
|
+
* **التحدي التقني:** ستحتاج لتحديث الـ `ImportResolver` ليفهم فلسفة كل لغة في إدارة التبعيات (مثل `go.mod` أو `requirements.txt`).
|
|
27
|
+
|
|
28
|
+
## 5. مقياس "الدين التقني" (AI-Driven Technical Debt Scoring)
|
|
29
|
+
تحويل الخريطة إلى أداة اتخاذ قرار للـ CTO والـ Project Manager.
|
|
30
|
+
* **المهمة:** تنفيذ خوارزمية قياس جودة الكود الآلي.
|
|
31
|
+
* **الرياضيات:** حساب مؤشر القابلية للصيانة ($MI$) لكل عقدة في الجراف:
|
|
32
|
+
$$MI = \text{MAX}(0, (171 - 5.2 \ln(V) - 0.23(G) - 16.2 \ln(L)) \times 100 / 171)$$
|
|
33
|
+
*حيث $V$ هو حجم Halstead، و $G$ هو التعقيد الدوري (Cyclomatic Complexity)، و $L$ هو عدد الأسطر.*
|
|
34
|
+
* **النتيجة:** تلوين الخريطة بناءً على "الدين التقني". الملفات التي تحتاج "Refactoring" تظهر بوضوح للمديرين.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## ملخص خارطة الطريق القادمة (Strategic Roadmap)
|
|
39
|
+
|
|
40
|
+
| المسار | الأداة/التقنية | الهدف الاستراتيجي |
|
|
41
|
+
| :--- | :--- | :--- |
|
|
42
|
+
| **Automation** | CI/CD Actions | فرض النزاهة المعمارية برمجياً. |
|
|
43
|
+
| **Intelligence** | Vector DB (Local) | البحث بالمعنى وليس بالكلمة. |
|
|
44
|
+
| **Observability** | OpenTelemetry | ربط الكود الساكن بحالة التشغيل الحية. |
|
|
45
|
+
| **Expansion** | Tree-sitter Grammars | دعم كافة لغات البرمجة في المؤسسة. |
|
|
46
|
+
| **Governance** | Tech Debt Metric | تحديد أولويات الإصلاح بناءً على أرقام حقيقية. |
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
بصفتي CEO، أرى أن **المسار الأول (CI/CD Gates)** هو الأهم حالياً لأنه سيحول nomos-arc من "مشروع ممتع" إلى "بنية تحتية حيوية" للشركات.
|
|
51
|
+
|
|
52
|
+
**أي من هذه المسارات تعتقد أنه يمثل "النقلة النوعية" التالية لـ nomos-arc.ai في سوق العمل؟**
|