mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 21:11:51 +08:00
Make the repository's primary source tree genuinely Python
The old tracked TypeScript snapshot has been removed from the repository history and the root directory is now a Python porting workspace. README and tests now describe and verify the Python-first layout instead of treating the exposed snapshot as the active source tree. A local archive can still exist outside Git, but the tracked repository now presents only the Python porting surface, related essay context, and OmX workflow artifacts. Constraint: Tracked history should collapse to a single commit while excluding the archived snapshot from Git Rejected: Keep the exposed TypeScript tree in tracked history under an archive path | user explicitly wanted only the Python porting repo state in Git Confidence: medium Scope-risk: broad Reversibility: messy Directive: Keep future tracked additions focused on the Python port itself; do not reintroduce the exposed snapshot into Git history Tested: python3 -m unittest discover -s tests -v; python3 -m src.main summary; git diff --check Not-tested: Behavioral parity with the original TypeScript system beyond the current Python workspace surface
This commit is contained in:
32
src/query_engine.py
Normal file
32
src/query_engine.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from .commands import PORTED_COMMANDS, build_command_backlog
|
||||
from .port_manifest import PortManifest, build_port_manifest
|
||||
from .tools import PORTED_TOOLS, build_tool_backlog
|
||||
|
||||
|
||||
@dataclass
|
||||
class QueryEnginePort:
|
||||
manifest: PortManifest
|
||||
|
||||
@classmethod
|
||||
def from_workspace(cls) -> 'QueryEnginePort':
|
||||
return cls(manifest=build_port_manifest())
|
||||
|
||||
def render_summary(self) -> str:
|
||||
command_backlog = build_command_backlog()
|
||||
tool_backlog = build_tool_backlog()
|
||||
sections = [
|
||||
'# Python Porting Workspace Summary',
|
||||
'',
|
||||
self.manifest.to_markdown(),
|
||||
'',
|
||||
f'{command_backlog.title}: {len(PORTED_COMMANDS)} mirrored entries',
|
||||
*command_backlog.summary_lines()[:10],
|
||||
'',
|
||||
f'{tool_backlog.title}: {len(PORTED_TOOLS)} mirrored entries',
|
||||
*tool_backlog.summary_lines()[:10],
|
||||
]
|
||||
return '\n'.join(sections)
|
||||
Reference in New Issue
Block a user