Skip to content

Transforms README files into both documentation and executable code using Large Language Models (LLMs). This system allows you to write in natural language, execute functions, and maintain state with context variables like {{previous_output}}.

License

Notifications You must be signed in to change notification settings

TheWhiteWord/READMEs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

READMEs Programming System

System Configuration

version: 1.0
context: enabled
variables:
  readme_content: ""
  previous_output: ""
  system_state: ""
  topic: ""
parser:
  heading_section: ^##\s+(.+)$
  heading_function: ^#\s+(.+)$
  list_item: ^(\s+)-\s+(.+)$
  key_value: ^(\s+)-\s+(\w+):\s*(.+)$
  nested_list: ^(\s+)-\s+(\w+):$
  indentation: 2

Parser Implementation

const parseLibrary = md => md.match(/^#\s+(.+)$/gm)
const parseTemplate = md => md.match(/^###\s+(.+)$/gm)
const parseContext = md => JSON.parse(md.match(/\{[\s\S]+\}/m)[0])

Function Library

## CORE

# system_init
  - description: Bootstrap system from README
  - parameters:
    - content: string
  - returns:
    - system_state: ready
    - functions: loaded
    - templates: parsed

# system_execute
  - description: Run template with context
  - parameters:
    - template: string
    - input: string
    - context: object

# system_compose_program
  - description: Generates a composed program by combining README.md with custom libraries
  - parameters:
    - readme_file: string
    - libraries: [string]
  - returns:
    - composed_readme: string
    - execution_state: ready

## CUSTOM

Program Templates

### Bootstrap
# Execute
  - function: system_init
  - input: "{{readme_content}}"
  - outputs:
    - system_state
    - functions
    - templates

### Program Composing
# Execute
  - function: system_compose_program
  - libraries:
    - my_first_library.md
  - readme_content: "{{readme_content}}"

Execution Context

{
  "previous_output": "",
  "variables": {},
  "state": "ready"
}

Program Execution

Bootstrap

# Execute
  - function: system_init
  - input: "{{readme_content}}"
  - outputs:
    - system_state
    - functions
    - templates

Program Composition

# Execute
  - function: system_compose_program
  - libraries:
    - my_first_library.md
  - readme_content: "{{readme_content}}"

Help Documentation

About

Transforms README files into both documentation and executable code using Large Language Models (LLMs). This system allows you to write in natural language, execute functions, and maintain state with context variables like {{previous_output}}.

Resources

License

Stars

Watchers

Forks

Releases

No releases published