mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 21:31:46 +00:00
refactor: Rename all file/folders to camelCase
This commit is contained in:
Vendored
+1
-1
@@ -34,7 +34,7 @@
|
||||
"name": "Debug: Build Graph",
|
||||
"type": "bun",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/setup/build_graph.ts",
|
||||
"program": "${workspaceFolder}/setup/buildGraph.ts",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"stopOnEntry": false,
|
||||
"watchMode": false
|
||||
|
||||
@@ -22,12 +22,13 @@ Users ask questions like: *"How does the if statement work?"* or *"Which functio
|
||||
```
|
||||
ask262/
|
||||
├── agent.ts # Main ReAct agent - answers user queries
|
||||
├── agentTools/ # Agent tool implementations
|
||||
├── constants.ts # Directory paths and file locations
|
||||
├── config.json # API keys and endpoints (user-created)
|
||||
├── setup/
|
||||
│ ├── ingest.ts # Ingests spec HTML into vector index
|
||||
│ ├── build_graph.ts # Builds knowledge graph (spec → code mappings)
|
||||
│ └── strip-spec-container.ts # Cleans spec HTML files
|
||||
│ ├── buildGraph.ts # Builds knowledge graph (spec → code mappings)
|
||||
│ └── stripSpecContainer.ts # Cleans spec HTML files
|
||||
├── spec-built/multipage/ # ECMAScript spec HTML files (ecmarkup output)
|
||||
├── engine262/src/ # JavaScript engine implementation code
|
||||
├── storage/ # Vector index persistence (LlamaIndex)
|
||||
@@ -37,7 +38,7 @@ ask262/
|
||||
**Key Files:**
|
||||
- `agent.ts`: ReAct agent with two tools - `spec_retriever` (vector search) and `graph_explorer` (graph navigation)
|
||||
- `setup/ingest.ts`: Parses HTML files, extracts `emu-clause` sections, chunks them, creates embeddings
|
||||
- `setup/build_graph.ts`: Parses spec sections and code functions, creates nodes/edges showing which functions implement which spec sections
|
||||
- `setup/buildGraph.ts`: Parses spec sections and code functions, creates nodes/edges showing which functions implement which spec sections
|
||||
- `constants.ts`: Defines `STORAGE_DIR`, `SPEC_DIR`, `CODE_DIR`, `GRAPH_FILE`
|
||||
|
||||
## Commands
|
||||
@@ -45,7 +46,7 @@ ask262/
|
||||
**Manual:**
|
||||
```bash
|
||||
bun run setup/ingest.ts # Direct ingest execution
|
||||
bun run setup/build_graph.ts # Direct graph build
|
||||
bun run setup/buildGraph.ts # Direct graph build
|
||||
bun run agent.ts "Your question here" # Direct agent execution
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
createGraphExplorerTool,
|
||||
createSectionRetrieverTool,
|
||||
createSpecRetrieverTool,
|
||||
} from "./agent_tools";
|
||||
} from "./agentTools";
|
||||
import { EMBEDDING_MODEL, GRAPH_FILE, STORAGE_DIR } from "./constants";
|
||||
|
||||
const embeddings = new OllamaEmbeddings({
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Agent tools index file.
|
||||
* Exports all tool factory functions and utilities.
|
||||
*/
|
||||
|
||||
export { createGraphExplorerTool } from "./graphExplorer";
|
||||
export { type RerankResult, rerankDocuments } from "./reranker";
|
||||
export { createSectionRetrieverTool } from "./sectionRetriever";
|
||||
export { createSpecRetrieverTool } from "./specRetriever";
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Agent tools index file.
|
||||
* Exports all tool factory functions and utilities.
|
||||
*/
|
||||
|
||||
export { createGraphExplorerTool } from "./graph_explorer";
|
||||
export { type RerankResult, rerankDocuments } from "./reranker";
|
||||
export { createSectionRetrieverTool } from "./section_retriever";
|
||||
export { createSpecRetrieverTool } from "./spec_retriever";
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
"ingest": "bun run setup/ingest.ts",
|
||||
"verify-db": "bun run test/manual/verify-db.ts",
|
||||
"agent": "bun run agent.ts",
|
||||
"build": "bun run setup/build_graph.ts",
|
||||
"build": "bun run setup/buildGraph.ts",
|
||||
"test": "bun test"
|
||||
},
|
||||
"keywords": [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Add the engine262 repository as a git subtree (squashed)
|
||||
# Usage: ./setup/init_engine262.sh
|
||||
# Usage: ./setup/initEngine262.sh
|
||||
# This will add the repository at ./engine262 using a squashed subtree
|
||||
|
||||
set -euo pipefail
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as lancedbSdk from "@lancedb/lancedb";
|
||||
import { OllamaEmbeddings } from "@langchain/ollama";
|
||||
import { createSpecRetrieverTool } from "../../agent_tools";
|
||||
import { createSpecRetrieverTool } from "../../agentTools";
|
||||
import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants";
|
||||
|
||||
async function main() {
|
||||
|
||||
Reference in New Issue
Block a user