Skip to content

wired87/debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

coder

Create a ray remote based actor to analyze and debug an existing codebase. To do that:

legend: "::" next jump in local wf "->" next pathway step "-->" edge connect

extend the following prompt with a clearer workflow definition and detailed tasks to form a currect code pathway:

  • create nx.Graph -> walk local dir -> extract content each file add_node file with id=abs filepath includ e entire fiel content-> use ast: identify all present datatypes in each file -> extract its content -> add_node for each with the "parent=[parent file id(abs path.replace(trailing slash all os with __))]" and type=datatype(class, def, comment etc) content=allcontent for specific datatype(e.g. for def the entire runnable codebase) -> add_edge identified data-type-nodes --> parent0, child components --> parents (e.g. methods --> classes ->

Link components --> imports

loop all component nodes :: loop for each all import statements within the graph :: connect comonent entry --> import (if import imports the component)

Link import --> components that uses them

  • for each import: get edge-attrs from nid and parent0 -> loop compoennts connected to this parent(file-node) -> analyze the content of each specific component (saved in the graph) :: add_edge "imort --> component id" if used by the datatype (e.g. a class uses a imported variable inside its init def) -> add edge "import --> (component of the file provides them)"

  • Step 2 (Query pipe): input: filedir, text query -> gem request prompt(improve)="generate 10 keywords to find the requested component within the provided id list(loop thotugh nx graph and provide all ids as list) using a similarity search(ss). -> embed queries and (all node ids (nid_embed_struct) of the nx.graph (nid_embed_struct)) -> save in two sepparate dicts with format "key:embedding" -> for each component of nid_embed_struct :: perform a similarity search -> save the resutl in (sum the results ) -> return top 5 nid_embed_struct of the with highest score

extras:

  • use clear oneliner comments before each fuction/method call and at the start of each method to intepret
  • use creative emojicons
  • include a r.txt (requiremens)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages