Skip to content

Develop - #31

Merged
jeremiepas merged 17 commits into
mainfrom
develop
Sep 8, 2026
Merged

Develop#31
jeremiepas merged 17 commits into
mainfrom
develop

Conversation

@jeremiepas

Copy link
Copy Markdown
Owner

No description provided.

homelab-dev and others added 17 commits September 7, 2026 04:06
Domain types + pure classifier complete and tested (727 examples, 0 failures):
- FileClass/DetectionMode/DetectionConfig in Pipeline.hs; thread detectionClassification
- classifyFile (Vendored>Generated>Minified>Source) + FileMeta leading-content reader
- categorizeFilesWithConfig drops non-source before Extract
- DetectClassificationSpec + Detect/Export spec adaptations

Remaining per openspec/changes/detect-generated-vendored-code/tasks.md:
- Task 2 config loader block + CLI flags
- Task 3.3 INFO detection summary after Detect
- Task 4.2 collapse mode (one node w/ childCount) - architecture-sensitive
- Move DetectionMode/DetectionConfig into a new leaf module
  Graphos.Domain.Config.Detection to break the Domain.Config <-> Pipeline
  module cycle (Pipeline imported GraphosConfig from Config, which imported
  Core, which imported DetectionConfig back from Pipeline).
- Thread DetectionConfig through detectFiles* as an explicit parameter instead
  of hardcoding defaultDetectionConfig.
- Wire gcDetection into GraphosConfig (default + project-overrides-global
  merge) and expose the YAML "detection" key via cfDetection.
- Log the classification breakdown in the pipeline summary.
- Update DetectClassificationSpec import for the relocated types.
Implement --detect-mode (exclude|collapse|off), --no-detect, and
--minified-threshold CLI flags folded over the on-disk detection config
via applyDetectionOverrides (validating smart constructor guards the
threshold).

Add Collapse mode: collapseDetectedFiles produces one representative node
per detected non-Source file with childCount = the node count from an
isolated extraction (countExtractedNodes), so a large generated/vendored/
minified file occupies a single node instead of bloating the graph. Off
mode routes all files to extraction; Exclude/Collapse drop non-source
from the main graph.
…ction

Move applyDetectionOverrides from Graphos.UseCase.Pipeline.Core into the
leaf Domain/Config.Detection module so detection config lives in one place
and both the detect and collapse passes consume a single validated config.

The domain function takes primitive args (base config, effective mode,
optional minified-line-threshold) to preserve leaf status; the CLI-field
interpretation stays in Core.hs. Behavior is identical: same --no-detect
precedence, same threshold override, same fail-fast on an invalid threshold.

Verified: cabal build --flag dev clean; cabal test 783 examples, 0 failures.
…kpoint-controls spec/archive, agent def; ignore .paperclip/worktrees

- Commit updated openspec-* skill definitions (generatedBy 1.7.0, store-selection logic)
- Commit archived change + checkpoint-controls spec from checkpoint-and-cluster-only-controls
- Commit .opencode/agent/core/goal-orch.md (agent definition, tracked per .gitignore intent)
- Ignore .paperclip/worktrees/ (local-only Paperclip worktree copies)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…s context graph

Math-requirements doc grounded in Domain.Community/Graph/Query types and openspec
specs (community-detection, leiden-scalability, 09-merge, bounded-edge-inference).

- Formal definitions (weighted multigraph + unweighted support graph G_s)
- Modularity theorem: local moving never decreases Q within a phase (deltaQ == 2*DeltaQ)
- Termination argument: capped by maxIter + stability predicate SP-1/SP-2
- Complexity bounds per phase + O(N+C+E) scale guard with NFData thunk discipline
- Partition invariants INV-1..INV-6 with property/invariant tests
- Arbitration flag: cohesion spec (avg internal-neighbor ratio) vs code (cluster density);
  settle on spec definition with pinning property tests; escalated w/ CT Expert
- Determinism lens: tie-break in maximumBySnd, order-independent cohesion

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ayer for Graphos context graph

Head-of-R&D consolidation for AVI-508: one notation/glossary, unified REQ-ID
register (GT-/CT-/JOINT-), proven/assumed/open classification, arbitration log
(cohesion_spec settled; new-wins policy; non-natural detection mandate),
cross-domain consistency matrix, open-items table with owners/actions, and a
full surface map. No Haskell written; all behavior rows carry a Graphos Dev loop.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ve-ci

AVI-512: CI check for openspec change finished & archived
- haskell.yml: trigger push/pull_request on main and develop
- graphos-analyze.yml: add push/pull_request triggers and a lightweight
  ci job so pull_request/push events report a check-run; heavy analyze
  job remains workflow_dispatch-only

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ell) (#30)

* AVI-518: shortest-path reachability & SCC decomposition requirements doc for Graphos context graph

- Formal definitions: reachability (reflexive-transitive closure of E), hop-minimal
  shortest path, SCC partition + condensation (DAG)
- Theorems 2.1-2.4 with proof sketches; invariants INV-7/8/9/10 (QuickCheck-ready)
- Termination: strictly-decreasing measure (unvisited-node count) for Tarjan/Kosarajan/BFS
- Complexity: O(N+E) SCC/reachability; all-pairs guarded at repo scale
- Feasibility answers + arbitration flags (unweighted shortestPath, undirected traversal
  directedness, SCC vs biconnected distinction); worked golden-file example
- Mapped to 05-path, fgl-adapter, neighbor-expansion, query-scoping,
  query-relevance-scoring,iden-scalability, bounded-edge-inference, domain-types

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* Add graph theory requirements: incremental edge updates under node churn (AVI-519)

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* docs(math): add AVI-520 context similarity scoring (embedding + cosine) requirements

Formal definitions, invariants (INV-A..H), seven theorems with proof sketches,
complexity bound O(N_d*N_c*(d+log N_c)), and acceptance criteria mapped to
semantic-edge-inference scenarios. Grounded in inferSemanticCodeDocEdges.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* docs(math): add AVI-521 hot-reload cost model & cache invalidation requirements

Co-Authored-By: Paperclip <noreply@paperclip.ing>

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* AVI-530: preserve shortest-path reachability + SCC implementation

Preserve uncommitted work left dangling when devhaskell run
ec2fa684 went silent (process terminated ~9.5h after last output).

Implemented per AVI-530 requirements:
- shortestPathReachable / shortestPathReachableWithCached (Thm 2.4)
- stronglyConnectedComponents / SCCWithCached (iterative Tarjan, O(N+E))

Provenance: code authored by devhaskell in dead run ec2fa684;
committed by head-of-dev during AVI-541 silent-run review so the
work is not lost on workspace cleanup.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* docs(math): add AVI-529 colimit-modularity consistency / unified query interface requirements

Joint requirements doc (head-rnd synthesis) defining the unified query
interface over both representations: single-object determinacy, projection
independence, combinatorial grounding of G_s on the colimit, community-query
freshness (operational non-naturality), monotonicity boundary, cohesion
cross-reading consistency, cost model, and order-independence/dependence.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* docs(math): add AVI-523 cycle detection & connectivity decomposition requirements

Graph theory edge cases for Graphos context graph: undirected cycle
detection, directed acyclicity, connected/weakly-connected components,
isolated nodes, self-loops. 8 theorems w/ proof sketches, 8 invariants
(QuickCheck-ready), O(N+E) bounds against the 75k/80k budget, and 7
golden-file fixtures (F1-F7) as the concrete deliverable.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* AVI-530: fix SCC implementation and add AVI-518 acceptance tests

Repairs the dangling SCC work preserved in d0785ef:
- Tarjan tree-edge lowlink propagation used idx[u] instead of low[u]
  (relow), which split cycles like a->b->c->a into wrong components;
  back/cross edges keep index-based relowIdx per spec 3.1.
- Component flattening zipped ids over nodes instead of components;
  SCC result now maps component id -> sorted member NodeIds, ids
  assigned by ascending minimum NodeId (deterministic, INV-9).
- sccIndices now returns [[Int]] directly (no runST at call site);
  restored subgraph type signature lost in the interrupted edit.

Adds tests/Graphos/Domain/Graph/SCCSpec.hs per AVI-530 acceptance:
- 8 golden test on the worked example (SCCs, condensation chain,
  shortestPath answers, reachability)
- INV-7 partition property over random graphs
- INV-8 E-walk + hop-minimality + arc/self-loop properties
- INV-9 determinism (repeat-call equality; key order independence)
- INV-10 coarsening under addEdges (golden + property)

Verified: cabal build lib + test suite compile; full cabal test
781 examples, 0 failures, 3 pending.

Refs: AVI-518 (math spec), AVI-530 (implementation follow-up)

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* docs(math): add AVI-534 structural-analysis complexity bounds & scale guards requirements

Co-Authored-By: Paperclip <noreply@paperclip.ing>

---------

Co-authored-by: local <local>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: local <local@local>
@jeremiepas
jeremiepas merged commit ddec5a6 into main Sep 8, 2026
9 of 10 checks passed
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