refactor: Rename all file/folders to camelCase

This commit is contained in:
2026-04-08 16:09:01 +05:30
parent aa9c875006
commit 02a3fa4cad
15 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
"name": "Debug: Build Graph", "name": "Debug: Build Graph",
"type": "bun", "type": "bun",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/setup/build_graph.ts", "program": "${workspaceFolder}/setup/buildGraph.ts",
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"stopOnEntry": false, "stopOnEntry": false,
"watchMode": false "watchMode": false
+5 -4
View File
@@ -22,12 +22,13 @@ Users ask questions like: *"How does the if statement work?"* or *"Which functio
``` ```
ask262/ ask262/
├── agent.ts # Main ReAct agent - answers user queries ├── agent.ts # Main ReAct agent - answers user queries
├── agentTools/ # Agent tool implementations
├── constants.ts # Directory paths and file locations ├── constants.ts # Directory paths and file locations
├── config.json # API keys and endpoints (user-created) ├── config.json # API keys and endpoints (user-created)
├── setup/ ├── setup/
│ ├── ingest.ts # Ingests spec HTML into vector index │ ├── ingest.ts # Ingests spec HTML into vector index
│ ├── build_graph.ts # Builds knowledge graph (spec → code mappings) │ ├── buildGraph.ts # Builds knowledge graph (spec → code mappings)
│ └── strip-spec-container.ts # Cleans spec HTML files │ └── stripSpecContainer.ts # Cleans spec HTML files
├── spec-built/multipage/ # ECMAScript spec HTML files (ecmarkup output) ├── spec-built/multipage/ # ECMAScript spec HTML files (ecmarkup output)
├── engine262/src/ # JavaScript engine implementation code ├── engine262/src/ # JavaScript engine implementation code
├── storage/ # Vector index persistence (LlamaIndex) ├── storage/ # Vector index persistence (LlamaIndex)
@@ -37,7 +38,7 @@ ask262/
**Key Files:** **Key Files:**
- `agent.ts`: ReAct agent with two tools - `spec_retriever` (vector search) and `graph_explorer` (graph navigation) - `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/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` - `constants.ts`: Defines `STORAGE_DIR`, `SPEC_DIR`, `CODE_DIR`, `GRAPH_FILE`
## Commands ## Commands
@@ -45,7 +46,7 @@ ask262/
**Manual:** **Manual:**
```bash ```bash
bun run setup/ingest.ts # Direct ingest execution 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 bun run agent.ts "Your question here" # Direct agent execution
``` ```
+1 -1
View File
@@ -10,7 +10,7 @@ import {
createGraphExplorerTool, createGraphExplorerTool,
createSectionRetrieverTool, createSectionRetrieverTool,
createSpecRetrieverTool, createSpecRetrieverTool,
} from "./agent_tools"; } from "./agentTools";
import { EMBEDDING_MODEL, GRAPH_FILE, STORAGE_DIR } from "./constants"; import { EMBEDDING_MODEL, GRAPH_FILE, STORAGE_DIR } from "./constants";
const embeddings = new OllamaEmbeddings({ const embeddings = new OllamaEmbeddings({
+9
View File
@@ -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";
-9
View File
@@ -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
View File
@@ -12,7 +12,7 @@
"ingest": "bun run setup/ingest.ts", "ingest": "bun run setup/ingest.ts",
"verify-db": "bun run test/manual/verify-db.ts", "verify-db": "bun run test/manual/verify-db.ts",
"agent": "bun run agent.ts", "agent": "bun run agent.ts",
"build": "bun run setup/build_graph.ts", "build": "bun run setup/buildGraph.ts",
"test": "bun test" "test": "bun test"
}, },
"keywords": [], "keywords": [],
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Add the engine262 repository as a git subtree (squashed) # 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 # This will add the repository at ./engine262 using a squashed subtree
set -euo pipefail set -euo pipefail
+1 -1
View File
@@ -5,7 +5,7 @@
import * as lancedbSdk from "@lancedb/lancedb"; import * as lancedbSdk from "@lancedb/lancedb";
import { OllamaEmbeddings } from "@langchain/ollama"; import { OllamaEmbeddings } from "@langchain/ollama";
import { createSpecRetrieverTool } from "../../agent_tools"; import { createSpecRetrieverTool } from "../../agentTools";
import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants"; import { EMBEDDING_MODEL, STORAGE_DIR } from "../../constants";
async function main() { async function main() {