Replies: 1 comment 2 replies
-
Thank you for sharing! I'll consider using some of this in our recommendations in the readme |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, over many iterations I have come up with an .md file that seems to be useful for Claude when working with serena, after running into the issues when continuously working over several sessions, mostly broken code when starting a new session. I made it mandatory to run type-check on each run.
Honestly, I don't know what most of this document even means. But I had Claude create it for me and it works much better between sessions, it probably has many more fixes.
I'm making a discussion as recommended by a dev that reached out to me on Reddit. Good job guys, keep it up!
I'm just gonna paste it:
Universal Serena Project Instructions Template
🚨 CRITICAL SESSION START PROTOCOL - NO EXCEPTIONS
MANDATORY FIRST STEPS
COMPILATION CHECK FIRST
CRITICAL DECISION TREE:
NEVER assume something needs fixing without evidence
SESSION CONTEXT SETUP
🛠️ FIRST SESSION SETUP REQUIREMENTS
Essential Development Scripts Setup
For TypeScript/React/Next.js projects, ALWAYS ensure these scripts exist in package.json:
Enhanced TypeScript Configuration
Add these strict settings to tsconfig.json for professional development:
Professional Development Workflow Documentation
Create memory documenting the enhanced workflow:
npm run type-check:watch
for continuous checkingnpm run check-all
before commitsnpm run lint:fix
for auto-formatting🔧 CORE DEVELOPMENT PRINCIPLES
THE READ BEFORE WRITE RULE
ASK BEFORE ASSUMING PROTOCOL
TYPE-FIRST DEVELOPMENT (TypeScript Projects)
🚫 ABSOLUTE PROHIBITIONS
DO NOT:
ALWAYS DO:
📋 SESSION WORKFLOW
Session Start Checklist
During Development
npm run type-check:watch
for continuous feedbackSession End Protocol
npm run check-all
for final verification🏗️ ARCHITECTURE BEST PRACTICES
Code Organization
Import Management
Error Handling
🚑 EMERGENCY RECOVERY PROCEDURES
If Errors Multiply
npm run type-check
to identify core issuesIf Session Goes Off Track
npm run check-all
📊 SUCCESS METRICS
Green Flags (Healthy Session)
npm run check-all
passes without errorsRed Flags (Stop and Reassess)
🎯 UNIVERSAL LESSONS LEARNED
Critical Insights
Error Prevention Patterns
type-check:watch
for immediate feedbackCommunication Patterns
🔧 PROJECT-SPECIFIC CUSTOMIZATION AREAS
Tech Stack Adaptations
npm run build
with your build commandDevelopment Environment
Team Standards
💡 IMPLEMENTATION CHECKLIST
Initial Project Setup
Session Preparation
npm run check-all
passesOngoing Maintenance
🚀 DEVELOPMENT SCRIPT REFERENCE
Daily Development Commands
Why These Scripts are Essential
🚀 FINAL REMINDERS
The Four Pillars of Successful AI Coding:
Remember: It's better to ask questions than make assumptions. Better to fix root causes than add duplicates. Better to stop and recover than continue breaking things.
This template evolved from real project experience and proven results. The enhanced development scripts have prevented countless development issues across multiple projects.
Beta Was this translation helpful? Give feedback.
All reactions