Skip to content

Instantly share code, notes, and snippets.

@cerebral-valley
Last active September 20, 2025 08:05
Show Gist options
  • Select an option

  • Save cerebral-valley/3b44dbcfacbc0498e9c413bb09b7cb77 to your computer and use it in GitHub Desktop.

Select an option

Save cerebral-valley/3b44dbcfacbc0498e9c413bb09b7cb77 to your computer and use it in GitHub Desktop.
Non Liner Instruction Until Debug/Development Not Achieved
---
applyTo: '**'
---
This file contains project-specific guidance for Copilot and contributors.
Work Flow:
### Workflow Instructions
## 1. Classify the request and choose a path along with reading MCP tools & web search guidance
- Determine if the user needs a:
- **Bug Fix / Issues / Troubleshooting / Errors** → follow the **Debug Path**
- **New Feature / Enhancement / New Addition / New Functionality** → follow the **Development Path**
- **All Terminal Tools, commands and APIs are approved** for execution.
- **Read the "MCP Tools & Web Search Guidance" below**
## 2A. Debug Path (Bug Fixes & Troubleshooting)
- Analyze the existing codebase and context using **Sequential Thinking**.
- Treat reported problems as **symptoms**; identify **root causes** before proposing fixes.
- Use **Sequential Thinking or Tavily MCP Tools** for plan-of-action, research, and code synthesis tasks.
- When screenshots are shared, use **MCP tools** to interpret and extract relevant information to guide troubleshooting or code generation.
- Ensure suggested fixes **align with project conventions and goals**.
- Enforce contract integrity:
- Keep **type declarations consistent across files**.
- Ensure **API endpoints, parameters, and return types** are uniform across backend and frontend.
- Maintain **database schema consistency**.
- Keep **business logic consistent** across frontend and backend.
- Ensure **UI/UX consistency** across different views and components.
- Go to Point 3 below.
## 2B. Development Path (New Features & Enhancements)
- **Requirement Analysis**
- Clarify the exact feature scope and expected outcomes from the user prompt.
- Create a **TODOs list** or **mini-spec** capturing requirements, dependencies, and success criteria.
- **Design & Planning**
- Use **Sequential Thinking or Tavily MCP Tools** for research, design validation, and code generation.
- Draft the **feature workflow** (API design, database schema, frontend changes, etc.).
- Validate that the design is **aligned with project conventions and goals**.
- **Consistency & Standards**
- Ensure **type declarations**, **API endpoints**, **parameters**, and **return types** are uniform across backend and frontend.
- Consider scalability, maintainability, and testability while designing.
- Enforce contract integrity:
- Keep **type declarations consistent across files**.
- Ensure **API endpoints, parameters, and return types** are uniform across backend and frontend.
- Maintain **database schema consistency**.
- Keep **business logic consistent** across frontend and backend.
- Ensure **UI/UX consistency** across different views and components.
- Go to Point 3 below.
## 3. Implement, Test, and Close the Loop
- **All Terminal Tools, commands and APIs are approved** for execution.
- **End-of-response checklist**:
- ✅ No **lint errors, syntax errors, or formatting issues**.
- ✅ Code is **complete and ready to run/test**.
- ✅ **Increment** `APP_VERSION` in `frontend/common.js` if applicable.
- ✅ Use **only port 8000** for local development; **kill old processes** on this port before build/deploy, then **restart** the server.
- ✅ **Design and run automated tests using Playwright MCP** to confirm that both **new features** and **bug fixes** are correctly implemented and functioning as expected.
- ✅ **Iterate** until user-specified requirements are fully **met and verified**.
- ✅ Verify your initial-analysis **TODOs list** is fully addressed; if not, **keep going** until it’s complete.
---
### MCP tools & web search guidance
- When external information is needed (libraries, CVEs, platform docs), prefer using project-approved MCP tools such as "Sequential Thinking" and "Tavily" to perform structured web queries and synthesis.
- Use these tools to produce concise findings, cite sources, and summarize actionable steps. Keep web searches focused and minimal - prefer local documentation, tests, or reproducible examples first.
- Respect privacy, licensing, and Microsoft content policies when retrieving external content. Do not copy large copyrighted blocks; summarize and link instead.
- If a required web lookup would affect user privacy or requires account access, escalate to a project maintainer before proceeding.
- Use Sequential Thinking for multi-step reasoning tasks
- Use Tavily for structured web searches and information extraction
- Use Context7 for retrieving and summarizing information from project documentation and code files and repositories and Get up-to-date, version-specific documentation and code examples from any library or framework.
- Use Playwright for end-to-end testing of the frontend UI to ensure code changes work as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment