Skip to content

Clean slate#13

Merged
clfhhc merged 175 commits into
mainfrom
clean-slate
Jun 27, 2026
Merged

Clean slate#13
clfhhc merged 175 commits into
mainfrom
clean-slate

Conversation

@clfhhc

@clfhhc clfhhc commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Changes

refactor all ts library

clfhhc added 30 commits June 27, 2026 05:24
- Added new package `@graphrefly/ts` with its own `package.json`, `tsconfig.json`, and build configuration using `tsup`.
- Updated `package.json` to include new test scripts for the `@graphrefly/ts` package.
- Enhanced the testing framework with Vitest for the new package, including multiple test files for core functionality and conformance.
- Updated `pnpm-lock.yaml` to reflect new dependencies for TypeScript and testing tools.
- Implemented core functionality in `src/index.ts` and added various test cases to ensure expected behavior.
- Consolidated import statements in `r8-async.test.ts` for better readability.
- Streamlined function signatures in `r8.ts` to improve clarity.
- Reformatted `package.json` to enhance the structure of the "files" array.
- Expanded the `index.ts` file with additional type exports for better type management.
- Introduced new test files for comprehensive coverage of graph functionality, including conformance, graph operations, reentrancy, and upstream control.
- Added detailed test cases to validate the behavior of the graph layer and its operators.
- Removed the `disable-model-invocation` field from both `conformance` and `design-review` SKILL documentation for clarity.
- Updated descriptions to enhance understanding of the behavioral checks and validation processes in the respective skills.
…or clarity

- Revised descriptions in both SKILL documents to reflect the clean-slate GraphReFly redesign.
- Enhanced guidance on usage scenarios and clarified the workflow processes for design reviews and development dispatch.
- Removed outdated references and streamlined the structure for better readability and understanding.
…ode functionality

- Introduced new test suite for intra-graph runtime rewire scenarios, covering various Q-semantics including addDep, removeDep, and setDeps.
- Implemented detailed test cases to validate cache preservation, idempotency, and rejection of invalid rewiring operations.
- Enhanced the Node class to support surgical rewire operations, ensuring efficient dependency management and cycle prevention.
- Updated the internal structure to maintain state across dependency changes, improving performance for high fan-in scenarios.
…onality

- Updated the QA workflow documentation to reflect the clean-slate redesign of GraphReFly, clarifying repo detection and operational context.
- Introduced new tests for rewire functionality, ensuring atomic settles and proper DIRTY/DATA emissions during dependency changes.
- Enhanced the Node class to support atomic two-phase settles after dependency mutations, improving performance and correctness in rewire scenarios.
- Added comprehensive test cases to validate the behavior of the rewire mechanism, including edge cases for dependency management.
- Updated `package.json` to include new linting scripts for async checks.
- Introduced new operators in `graph/operators.ts` for enhanced functionality, including `distinctUntilChanged`, `filter`, `map`, `scan`, `take`, and `merge`.
- Added async source capabilities in `graph/sources.ts`, allowing for timer, interval, promise, and iterable sources.
- Implemented comprehensive tests for new operators and sources in `__tests__` directory, ensuring correct behavior and compliance with async boundaries.
- Enhanced the `Node` class to support new async behaviors and improved buffering logic during pause states.
- Added a script to enforce no raw async usage outside designated boundaries, ensuring code quality and adherence to async design principles.
…ndling

- Renamed test descriptions in `batch-dynamic.test.ts` to clarify behavior regarding unread dependencies and their emissions as DATA occurrences.
- Enhanced assertions in `conformance.test.ts` to reflect the new behavior of occurrences remaining as DATA, ensuring compliance with the updated handling of undirty RESOLVED states.
- Introduced new tests in `dispatcher.test.ts` to validate the proper functioning of the Dispatcher, including handle registration and unregistration, ensuring no memory leaks occur during rewire operations.
- Updated lifecycle tests to confirm that terminal states correctly prevent further emissions after self-emit attempts, maintaining cache integrity.
- Added QA tests to ensure that the system rejects invalid DATA and RESOLVED combinations, reinforcing tier-3 exclusivity rules.
- Added higher-order operators: `switchMap`, `mergeMap`, `concatMap`, `exhaustMap`, and `flatMap` to enhance data handling capabilities.
- Introduced `ctx.rewireNext` for deferred self-rewiring, allowing nodes to modify their dependency sets at the committed wave boundary, preventing mid-run topology changes.
- Updated `index.ts` to export new types and operators, improving type management and usability.
- Created comprehensive tests for the new operators and rewire functionality, ensuring correct behavior and compliance with the deferred rewire mechanism.
- Enhanced the `Node` class to support the new higher-order operations and maintain proper state during rewiring processes.
…nality

- Introduced new combinators: `combine`, `combineLatest`, `withLatestFrom`, `zip`, `concat`, and `race` to facilitate multi-source data handling.
- Added time operators: `delay`, `debounce`, `debounceTime`, `throttle`, and `throttleTime` for wall-clock time management in data streams.
- Updated `index.ts` to export new combinators and time operators, improving usability and type management.
- Created comprehensive tests for the new combinators and time operators, ensuring correct behavior and compliance with the updated functionality.
- Enhanced the `Node` class to support the new operators and maintain proper state during operations.
- Introduced a new `AGENTS.md` file detailing the TypeScript implementation of GraphReFly, outlining the authority, workflow rules, and commands for developers.
- Created multiple SKILL documents for various functionalities, including `conformance`, `dashboard`, `decision-guard`, `design-review`, `dev-dispatch`, `graph-animation`, and `qa`, each providing specific guidance on their respective workflows and usage.
- Enhanced documentation clarity and structure to support the clean-slate redesign, ensuring that users can easily navigate and understand the new processes and skills available in the GraphReFly ecosystem.
- Established a comprehensive framework for maintaining consistency and adherence to design principles across different language implementations.
- Added new types and exports for reactive data structures including `IndexChange`, `ListChange`, `LogChange`, `MapChange`, and their respective implementations in `change.ts`.
- Introduced `reactiveIndex`, `reactiveList`, `reactiveLog`, and `reactiveMap` to support advanced data handling with delta streams and snapshots.
- Implemented time operators: `audit`, `auditTime`, `bufferTime`, and `timeout` to manage time-based data flows effectively.
- Updated `index.ts` to export new types and operators, improving usability and type management.
- Created comprehensive tests for the new data structures and time operators, ensuring correct behavior and compliance with the updated functionality.
- Enhanced the `Node` class to support new reactive behaviors and maintain proper state during operations.
- Changed the reference in AGENTS.md from `~/src/graphrefly/AGENTS.md` to `~/src/graphrefly/CLAUDE.md` to direct users to the correct design index.
- Updated the skills directory path from `.Codex/skills/` to `.claude/skills/` for consistency with the new structure.
- Added new conformance tests (C-18 to C-22) to validate complex routing and batching behaviors in reactive nodes, ensuring correct handling of RESUME, TEARDOWN, and asynchronous emissions.
- Enhanced the batch module to support deferred rewiring and track commit states, improving the integrity of batch operations.
- Updated the Node class to accommodate new routing logic and ensure proper state management during dependency changes and batch commits.
- Introduced new types and functions in `composition.ts` for topology differences and stratification, enhancing graph-layer capabilities.
- Added `topologyDiff`, `stratify`, and `stratifyBranch` functions to support dynamic graph structures and improve data handling.
- Updated `index.ts` to export new types related to composition and stratification, improving usability and type management.
- Created comprehensive tests in `composition.test.ts` to validate the new functionality, ensuring correct behavior and compliance with the updated graph operations.
- Enhanced existing data structures and reactive maps to support new stratification features, improving overall graph performance and flexibility.
…ta structure functionality

- Added `selectRetentionVictims` function to facilitate stable selection of retention candidates based on scores, improving data management in collections.
- Implemented `trimHeadOverflow` and `PolicyInputs` in a new `collection.ts` module to centralize policy handling for various data structures.
- Updated `reactiveLog` and `reactiveMap` to utilize new policy helpers, enhancing their efficiency and maintainability.
- Created tests for `selectRetentionVictims` to ensure correct behavior and compliance with retention policies.
… retention management

- Introduced new types and options for `reactiveList`, `reactiveMap`, and `reactiveIndex` to support head-trimming and retention policies, allowing for dynamic management of data sizes.
- Implemented capacity policies in `reactiveIndex` and `reactiveList` to enforce maximum sizes and eviction strategies based on primary and secondary orders.
- Enhanced `reactiveMap` with a score-based retention policy, enabling selective archiving of entries based on defined criteria.
- Updated tests to validate the new capacity and retention functionalities, ensuring correct behavior under various scenarios.
- Refactored existing data structures to integrate the new policies, improving overall efficiency and maintainability.
…ENTS.md documentation

- Implemented a new maxSize capacity policy in the reactiveIndex, allowing for graph-visible policy/application edges.
- Updated tests to validate the new maxSize functionality, ensuring correct behavior in graph management.
- Added cross-repo notes in AGENTS.md for Rust toolchain usage, improving developer guidance.
…sing

- Added new tests to validate batch processing behavior for `map`, `filter`, `scan`, `take`, `distinctUntilChanged`, and other operators, ensuring they correctly handle multiple data occurrences in a single dependency batch.
- Improved existing tests in `higher-order.test.ts` to cover auto-discovery of transitive unregistered live dependencies, enhancing the robustness of the testing suite.
- Updated the `Graph` class to support recursive emission of auto-discovered nodes, improving the accuracy of dependency tracking in reactive graphs.
…k function

- Introduced new types and the `attachObserveSink` function from `./graph/storage.js` to enhance the reactive data handling capabilities.
- Updated `index.ts` to include these new exports, improving usability and type management for developers working with observe sinks.
- Introduced new rendering functions for DescribeSnapshot, including `describeToMermaid`, `describeToD2`, `describeToPretty`, `describeToAscii`, and `describeToJson`, enhancing visualization capabilities for graph structures.
- Added comprehensive tests in `render.test.ts` to validate the functionality of the new rendering methods, ensuring accurate output for various snapshot configurations.
- Updated `index.ts` to export new types and functions related to rendering, improving usability and type management for developers.
…te management

- Introduced the NodeCore class to centralize slot management and state handling for nodes, enhancing encapsulation and maintainability.
- Refactored the Node class to utilize NodeCore, streamlining dependency bookkeeping and state management.
- Added tests for core-slot migration to ensure proper functionality and adherence to the new structure, validating the removal of old direct-field shims.
- Updated related interfaces and types to support the new architecture, improving overall type safety and usability.
- Integrated NodeCore into the Graph and Node classes to centralize state management and improve encapsulation.
- Refactored node creation methods to utilize the new core, ensuring consistent handling of dependencies and state.
- Added tests for core-slot migration and cross-graph node interactions, validating the new architecture and its functionality.
- Updated related utility functions to support the new structure, enhancing overall type safety and usability.
- Introduced a new boundary task management system within NodeCore to handle deferred tasks more effectively, improving the execution order and encapsulation of tasks.
- Updated the batch processing logic to utilize the new boundary task system, ensuring tasks are queued and executed in a FIFO manner.
- Enhanced the Node class to support the new boundary task functionality, allowing for better management of deferred operations.
- Added tests to validate the behavior of deferred boundary tasks, ensuring correct execution and order during graph operations.
…xt management

- Introduced new interfaces for LifecycleState and SyncCtxState to improve state management within Node and NodeCore.
- Refactored Node class to utilize the new lifecycle and sync context structures, enhancing encapsulation and maintainability.
- Updated NodeCore to manage lifecycle and sync context states, ensuring consistent handling of node states.
- Added tests to validate the behavior of lifecycle management and sync context interactions, ensuring robustness in state handling.
- Introduced a new TypeScript probe (`b49-probe.ts`) to measure local costs associated with B49/D76 calls, providing insights into performance without affecting CI.
- Updated `package.json` to include a new script for running the probe.
- Enhanced documentation in the canonical spec and flowcharts to clarify the context of the old-main reference and its relation to the clean-slate spec system.
- Added tests to validate the behavior of the new probe, ensuring accurate performance metrics are captured.
…agement

- Replaced Map structures with indexed arrays for slots, values, and other state types in NodeCore, improving performance and memory usage.
- Updated related methods to accommodate the new array-based structure, ensuring consistent access patterns.
- Enhanced tests for core-slot migration to validate the new array implementation, confirming correct behavior and state management.
clfhhc added 28 commits June 27, 2026 05:26
… projectors

- Added functionality to diagnose missing durable handoff materials in workspace proposal contexts, enhancing error reporting for missing records and decisions.
- Introduced new audit records and issue tracking for durable handoff diagnostics, ensuring comprehensive feedback during application processing.
- Updated relevant projectors to emit diagnostics when records or decisions are missing, improving the robustness of the workspace proposal handling.
- Enhanced tests to validate the new diagnostic capabilities and ensure accurate reporting of missing durable handoff issues.
…pace proposal family applications

- Introduced new diagnostic classes and interfaces for workspace proposal family applications, enhancing error reporting capabilities.
- Implemented projectors for generating diagnostics and repair review requests based on existing application and outcome statuses.
- Enhanced tests to validate the new diagnostic and repair functionalities, ensuring accurate reporting and handling of workspace proposal issues.
- Updated relevant files to integrate the new diagnostics into the existing framework, improving overall robustness and maintainability.
…d tests

- Added new interfaces and types for workspace proposal repair review statuses and decisions, improving the structure and clarity of the repair review process.
- Implemented projectors for generating repair review statuses based on requests and decisions, enhancing the handling of workspace proposal lifecycle states.
- Expanded test coverage to validate the new functionalities, ensuring accurate projections and state management for repair review requests.
- Updated relevant files to integrate the new repair review features into the existing framework, improving overall robustness and maintainability.
- Updated references from `@graphrefly/pure-ts` to `@graphrefly/ts` across various files, reflecting the transition to a clean-slate TypeScript implementation.
- Added new entries to the `biome.json` to exclude `archive/examples` and `archive/packages` from processing.
- Introduced a new example project `@graphrefly-examples/harness-refine-hello` demonstrating end-to-end integration of harness and refine functionalities.
- Archived the `nestjs/order-flow` example and updated related changelogs to reflect the latest package versions.
- Enhanced README documentation to clarify the current state and usage of the packages.
…ctionalities

- Added new types and interfaces for workspace proposal family application sorting, grouping, and searching, improving data handling capabilities.
- Introduced outcome detail supply request and result interfaces to facilitate better management of workspace proposal outcomes.
- Expanded test coverage for workspace proposal functionalities, ensuring robust validation of new features and their interactions.
- Updated existing files to integrate new functionalities, enhancing overall maintainability and clarity in the workspace proposal framework.
…nctionalities

- Added new types and interfaces for WorkspaceProposalProjectionRelease and its target kinds, enhancing the workspace proposal framework.
- Updated tests to validate the integration of the new projection release functionalities, ensuring accurate behavior and interactions.
- Enhanced existing interfaces to accommodate the new projection release features, improving overall maintainability and clarity in the codebase.
- Introduced a new example project `nestjs-graph-boundary` demonstrating NestJS integration with GraphReFly, showcasing keyed ingress/egress boundary nodes.
- Updated `biome.json` to include configurations for the new NestJS example, enabling specific JavaScript parser settings.
- Modified `pnpm-lock.yaml` and `pnpm-workspace.yaml` to accommodate the new example and its dependencies, ensuring proper workspace structure.
- Enhanced documentation in `examples/README.md` to reflect the addition of the NestJS example, providing clear instructions for usage.
…new Canvas interfaces and methods

- Introduced new interfaces for CanvasWorkspaceProposalProjectionSlot, CanvasWorkspaceProposalProjectionSlotLifecycle, and related release status types, improving the structure of workspace proposal projections.
- Implemented methods for validating and releasing workspace proposal projections from Canvas slots, enhancing the lifecycle management of these projections.
- Expanded test coverage to validate the new Canvas projection functionalities, ensuring accurate behavior and interactions within the workspace proposal framework.
- Updated existing files to integrate the new Canvas functionalities, improving overall maintainability and clarity in the codebase.
…y ergonomics

- Updated the NestJS adapter to include D478 decorator/provider ergonomics, improving the handling of ingress and egress boundary nodes.
- Introduced new functionalities such as `GraphReq`, `GraphHttpReply`, and `createNestGraphBoundaryInterceptor`, enhancing the integration capabilities with existing graph nodes.
- Enhanced documentation to reflect the new D478 features and their usage in the NestJS integration, providing clearer guidance for developers.
- Updated tests to validate the new decorator functionalities and ensure accurate behavior within the NestJS context.
- Updated the NestJS adapter to implement D484 native provider bridges, improving the handling of interceptors, guards, filters, and lifecycle hooks.
- Introduced new functionalities such as `provideGraphBoundaryInterceptor`, `provideGraphGuard`, and `createGraphExceptionFilter`, enhancing integration capabilities with existing graph nodes.
- Enhanced documentation to reflect the new D484 features and their usage in the NestJS integration, providing clearer guidance for developers.
- Updated tests to validate the new native provider functionalities and ensure accurate behavior within the NestJS context.
…uard-denial filter

- Updated the NestJS adapter to implement D486 provider bridges, improving the handling of interceptors, guards, filters, and lifecycle hooks.
- Introduced a targeted guard-denial response filter, allowing for more granular control over guard decisions and responses.
- Enhanced documentation to reflect the new D486 features, including the integration of WebSocket and microservice boundaries.
- Updated tests to validate the new functionalities and ensure accurate behavior within the NestJS context.
…p file

- Deleted the SESSION-blueprint-stacked-pr-ownership.md file, which was a discussion capture without any decisions or implementations.
- This cleanup aligns with the ongoing refinement of documentation and focus on actionable design sessions.
…vice bridges

- Added support for the D488 native phase bridges for WebSocket and microservice/message patterns in the NestJS adapter.
- Introduced new decorators such as `GraphWs`, `GraphWsAck`, `GraphWsReply`, and `GraphMessage`, improving the handling of WebSocket and message interactions.
- Updated package.json and pnpm-lock.yaml to include the latest NestJS microservices version.
- Enhanced documentation to reflect the new D488 features and their usage in the NestJS integration, providing clearer guidance for developers.
- Updated tests to validate the new functionalities and ensure accurate behavior within the NestJS context.
…support

- Added new WebSocket and message-pattern handling capabilities to the NestJS adapter, including decorators like `GraphWs`, `GraphWsAck`, and `GraphMessage`.
- Updated the `nestjs-graph-boundary` example to demonstrate the new functionalities, including WebSocket and TCP microservice patterns.
- Enhanced documentation to clarify the usage of the new features and their integration within the NestJS context.
- Updated tests to validate the new WebSocket and microservice functionalities, ensuring accurate behavior in the NestJS environment.
- Modified `pnpm-lock.yaml` and `package.json` to include the latest NestJS dependencies for microservices and WebSocket support.
…d diagnostics

- Updated the NestJS adapter to implement D494 provider bundle helpers, improving the ergonomics and testability of the integration.
- Introduced explicit diagnostics capabilities, allowing for sanitized data-only payloads and enhanced visibility into adapter behavior.
- Updated the `nestjs-graph-boundary` example to demonstrate the new D494 features, including the addition of a manual cron check endpoint.
- Enhanced documentation to reflect the new D494 features and their usage, providing clearer guidance for developers.
- Updated tests to validate the new functionalities and ensure accurate behavior within the NestJS context.
…iagnostics

- Enhanced the NestJS adapter to implement D495 focused provider bundle helpers, improving ergonomics and testability.
- Updated the `nestjs-graph-boundary` example to demonstrate new D495 features, including WebSocket and message-pattern handling.
- Enhanced documentation to reflect the D495 updates and their usage, providing clearer guidance for developers.
- Updated tests to validate the new functionalities and ensure accurate behavior within the NestJS context.
…D495 provider bundles

- Revised the `nestjs-graph-boundary` example to showcase new D495 focused provider bundles and diagnostics.
- Enhanced documentation across multiple files to clarify the usage of NestJS structural metadata, HTTP/native, WebSocket, and microservice providers.
- Updated tests to validate the integration of new provider functionalities and ensure accurate behavior within the NestJS context.
- Improved clarity on diagnostics handling and the absence of a logging API in the NestJS integration.
…ndencies

- Added compatibility for multiple frameworks (React, Solid, Svelte, Vue) in the compat-matrix demo, utilizing the new `@graphrefly/ts` adapters.
- Updated package dependencies in `pnpm-lock.yaml` and `package.json` to reflect the latest versions of framework-specific packages.
- Refactored demo components to use the new adapter methods for state management and subscriptions, enhancing code clarity and maintainability.
- Introduced a new `demo-shell` utility for managing demo state and layout, improving the overall demo experience.
- Enhanced documentation within the demo to clarify usage and integration of the new features.
- Renamed and reorganized demo directories, replacing `demos/knowledge-graph` and `demos/pagerduty-triage` with new examples under `examples/compat/*` and `examples/basic/*`.
- Updated dependencies in `pnpm-lock.yaml` to reflect changes in demo structure and removed references to retired packages.
- Enhanced documentation to clarify the status of historical examples and their migration to the new structure.
- Retained `examples/inbox-reducer` as a historical reference, indicating it is not an active clean-slate starter.
- Updated website links to reflect the removal of deprecated demos and the introduction of new examples.
- Added a new `wireBridgeProtobuf` helper to facilitate decoding and encoding of canonical protobuf messages within the existing wireBridge framework.
- Implemented comprehensive tests to validate the functionality of the new helper, ensuring it handles both valid and malformed inbound bytes correctly.
- Enhanced the `bridge-types.ts` file with new types related to protobuf data, issues, and status, improving type safety and clarity.
- Updated related documentation to reflect the new features and usage examples for the `wireBridgeProtobuf` integration.
…status tracking

- Introduced new types for inbound and outbound events in the `wireBridgeProtobuf` implementation, improving event management.
- Updated the `wireBridgeProtobuf` function to emit structured inbound and outbound events, enhancing clarity in data processing.
- Implemented comprehensive tests to validate the handling of both valid and malformed inbound bytes, ensuring robust error management.
- Enhanced status tracking for inbound and outbound events, providing better visibility into the processing state and issues.
- Refactored existing code to streamline the handling of protobuf messages and improve maintainability.
…dge group support

- Introduced new `ack-timeout` command type in `bridge-types.ts` to improve acknowledgment handling.
- Implemented `wireEdgeGroup` functionality for managing multiple edges in the wire bridge, enhancing data flow and processing.
- Updated validation logic in `bridge-validation.ts` to ensure proper handling of `ack-timeout` commands.
- Added comprehensive tests for new features, ensuring robust error management and correct behavior in various scenarios.
- Refactored existing code to improve maintainability and clarity in the wire bridge implementation.
…elease handling

- Added `CauseTombstones` class to manage released causes efficiently, limiting the number of stored tombstones.
- Updated `wireEdgeGroup` to handle release operations more robustly, ensuring proper error handling when topology release is blocked.
- Introduced new tests for `wireEdgeGroup` to validate the behavior of release operations and tombstone management, enhancing overall reliability.
- Refactored state management within `gateFn` to incorporate released causes, improving clarity and maintainability.
- Deleted the `knowledge-graph` demo directory and all related files, including configuration, components, and assets.
- Updated the launch configuration to remove references to the now-removed demo.
- Cleaned up the project structure by eliminating deprecated demo content, streamlining the overall codebase.
- Deleted the `@graphrefly/pure-ts` package, including all related files such as README, LICENSE, and configuration files.
- Updated `pnpm-lock.yaml` to reflect the removal of dependencies associated with the deleted package.
- Adjusted CI workflows and documentation to remove references to the deprecated package, streamlining the project structure.
@clfhhc clfhhc merged commit 62a3c40 into main Jun 27, 2026
1 check passed
@clfhhc clfhhc deleted the clean-slate branch June 27, 2026 12:50
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.

1 participant