Skip to content

Latest commit

 

History

History
129 lines (76 loc) · 7.22 KB

Development-notes.md

File metadata and controls

129 lines (76 loc) · 7.22 KB

Development Notes

For agentic coding, the following development notes are provided to assist in understanding the architecture and coding standards of the project. These notes are intended to be concise and provide a high-level overview of the key components and practices used in the development process.

  1. Created blank Agent.md file in root directory of the project and used below prompt to generate the content for it.

    Build out the content for this agent instructions file for this project. This is an instructions file specifically for LLM's to adhere to the coding standards for this project. agent instructions will be separated out into separate .md markdown files located in the /docs directory.
  2. Deleted all .md file created automatically by agent and instead created custom agents and prompts.

  3. Created new agent called "instruction-generator" and prompt called "create-instructions" to generate agent instructions files for the /docs directory. The prompt is designed to take information about a specific layer of architecture or coding standards and generate a concise .md file with instructions for LLMs to follow.

  4. to support agent, custom prompt "create-instructions" was created in .github/prompts directory. The prompt is designed to take information about a specific layer of architecture or coding standards and generate a concise .md file with instructions for LLMs to follow.

  5. The agent instructions files generated by the "instruction-generator" agent are intended to be modular and focused on specific areas of the project, such as authentication standards, UI component standards, and API guidelines. This allows for easy reference and adherence to best practices when working on different parts of the codebase.

    /create-instructions everything to do with auth in this app is handled by clerk. NO OTHER AUTH METHODS SHOULD BE USED. All pages in app are protected route and must require the user to be logged in to be able to access this page. If the user is logged in and trying to access the homepage, they should be redirected to the /dashboard page. sign in and sign up via clerk should always launch as a modal.
    /create-instructions enhance #file:authentication-standards.md by adding below additional details
    
    Route Protection & Redirects
    Do and DO NOT
    Clerk Integration checklist
    Security best practices and troubleshooting
    /create-instructions ALL UI elements in this app use blazor NeoUI. DO NOT create any custom components, ALWAYS use NeoUI components.
  6. Using coplit - implemented clerk auth in the app and created a protected route for the dashboard page. Implemented redirect to /dashboard for logged in users trying to access the homepage. Implemented sign in and sign up via clerk as a modal.

    Create a /dashboard page in Web App. DO NOT add any content or data fetching just yet, just add a Dashboard h1 tag as a placeholder.
    
    Fix InteractiveServer is not in scope error
    
    make sure UI page adheres to the auth coding standards
    
    implement and integrate Clerk modal sign-in/sign-up flow
    
    Change - implement custom login page for app instead of cleark
    
    Google Gemini suggested this approach that do not need npm install
    https://share.google/aimode/W4UpuTWG2PUJJHiNz
    
    can you check suggestion for cleark implementation by gemini --> https://share.google/aimode/u0AgDEYGMDFUp1VgQ, can this be implemented in similar pattern
    
    turn the current app back from the custom local login page to a Clerk modal flow in that style.
    
    add the exact user-secrets command plus the Clerk dashboard value to set
    
    sign in and sign up not working
    
  7. Using copilot - implemented NeoUI components in the app and created a protected route for the dashboard page. Implemented redirect to /dashboard for logged in users trying to access the homepage. Implemented sign in and sign up via clerk as a modal.

  8. Updated Agent.md file with the following content:

    # Agent Instructions — UrlTrimmer
    
    These are the ground rules for any AI coding agent (or human) working in this repository.
    This file is intentionally short. Detailed, topic-specific standards live under [docs/](docs/) —
    read the relevant doc(s) before making changes in that area.
    
    Update the agents.md file to make sure that it's incredibly important to ALWAYS read the relevant individual instructions files within the /docs directory BEFORE generating ANY code.
    
    Update tech stack and architecture details as well
    
  9. Implemented additional security measures for the app, including route protection and Clerk integration checks. Updated documentation to reflect these changes.

  10. Reviewed and refactored the app's authentication flow to ensure compliance with the updated security standards and Clerk integration guidelines.

  11. Few more additional prompt to improve the application

    implement the homepage which should be a landing page highlighting the features of this app
    
    App doesn't looks professional
    
    when application load it should show the high level features offered by app and option to login - after login user should see the urls
    
    update the docs and agent instructions
    
  12. Implement db schema and integration for the application, ensuring proper relationships and constraints are in place.

    [plan mode]: 
    
    Plan a very simple table schema to store shortened links
    
    Do not need any click tracking and deletes will be permanent i.e. NO soft deletes.
    Need a createdAt, updatedAt, clerk user id, short code, and url to store.
    All dates must store the timezone data.
    Revise plan accordingly
    
  13. Created new branch "Github-copilot/agentic-development" for implementing Agent as per Github Copilot requirements.

    • created new folder"instructions" and added data-fetching instructions for the agent.
    • moved old agent instructions to the new "instructions" folder and deleted old docs folder.
    • Updated Agent.md file references to point to the new "instructions" folder instead of the old "docs" folder.
  14. In prompts folder - new prompts create-copilot-instructions created for server actions instructions.

  15. New server instructions added for handling data mutations through server actions.

    /create-copilot.instructions ALL data mutations in this app should be done via server actions. Server actions must be called from client components. Server action files MUST be named actions.ts and be colocated in the directory of the component that calls the server action. ALL data passed to server actions must have appropriate script types (DO NOT use the FormData script type for razor pages). ALL data MUST be validated in server actions. ALL server actions MUST first check for a logged in user before continuing with database operations. Database operations must be done via helper functions that wrap queries. These helper functions are located in the /data directory and server actions should NOT directly use queries within them.
    
    App do not use type script as app frontend is PWA razor - update server instruction to align to architecture
    
    Add example, validation, database operations and summary checklist