Skip to content

Latest commit

 

History

History
43 lines (40 loc) · 2.74 KB

agents.md

File metadata and controls

43 lines (40 loc) · 2.74 KB

AGENTS.md

Purpose

This is not just for AI agents, but also for humans that are interested in contributing and want to know what the layout of the project is.

Project Context

  • Stack: React, Typescript, Antd, Blocks
  • Folder Structure:
    • @/backend : contains the backend server running on the robot
    • @/docs : contains documentation about the project
    • @/frontend : contains the frontend website (the majority of the project)
      • @/frontend/assets : files that are needed by the website
      • @/frontend/blocks : contains custom code to extend blockly for our site
        • @/frontend/blocks/utils : contains utilities needed by multiple blocks
        • @/frontend/blocks/tokens.ts : how blocks connects to our i18n solution
        • @/frontend/blocks/mrc_*.ts : our custom blocks
        • @/frontend/blocks/setup_custom_blocks.ts : any new block has to be added here as well
      • @/frontend/editor : contains the code to generate python and to deal with interactions between different modules
      • @/frontend/fields : contains fields for blockly blocks
      • @/frontend/i18n : contains the translations for each locale supported
      • @/frontend/modules : contains what each type of file starts with when created
      • @/frontend/public : contains some items that will be in the root directory of the website
      • @/frontend/reactComponents : contains all react components for the front end
      • @/frontend/storage : contains what files contain as well as how they are upgraded
        • @/frontend/upgrade_project.ts : contains latest version of storage and how to upgrade previous versions to the newest
      • @/frontend/themes : contains the themes available
      • @/frontend/toolbox : contains all of the blockly toolboxes
        • @/frontend/toolbox/toolbox.ts : contains the root toolbox
      • @/frontend/types/ : contains types
        • @/frontend/types/hid_devices : contains the definition of each supported hid device
      • @/oss-attribution/ : automatically generated by npx generate-attribution
      • @/python_tools/ : for generating the json needed for WPILIB blocks
      • @/runtime_python/ : temporary things needed for testing python code on robot
      • @/scripts/: scripts to make a release (for maintainers only), to updateDependencies, and to convert a blocks file to an SVG
      • @/tests/ : where to put newly created tests

Coding Standards

  • Use the Google coding style for typescript

Guardrails & boundaries

  • Safety: Never delete .env or .env.local files.
  • No Hardcoding: Do not hardcode API keys or sensitive URLs; always use process.env.
  • Dependencies: Do not add new packages without explicit permission.