beaver-build 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +65 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -795,6 +795,71 @@ These are the project-wide conventions GitHub Copilot must follow. Match the str
|
|
|
795
795
|
|
|
796
796
|
Path-specific rules live in \`.github/instructions/*.instructions.md\` \u2014 those files apply automatically to the files their \`applyTo\` glob matches.
|
|
797
797
|
|
|
798
|
+
## Behavioral Guidelines
|
|
799
|
+
|
|
800
|
+
Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
|
|
801
|
+
|
|
802
|
+
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
|
|
803
|
+
|
|
804
|
+
### 1. Think Before Coding
|
|
805
|
+
|
|
806
|
+
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
807
|
+
|
|
808
|
+
Before implementing:
|
|
809
|
+
- State your assumptions explicitly. If uncertain, ask.
|
|
810
|
+
- If multiple interpretations exist, present them - don't pick silently.
|
|
811
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
812
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
813
|
+
|
|
814
|
+
### 2. Simplicity First
|
|
815
|
+
|
|
816
|
+
**Minimum code that solves the problem. Nothing speculative.**
|
|
817
|
+
|
|
818
|
+
- No features beyond what was asked.
|
|
819
|
+
- No abstractions for single-use code.
|
|
820
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
821
|
+
- No error handling for impossible scenarios.
|
|
822
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
823
|
+
|
|
824
|
+
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
825
|
+
|
|
826
|
+
### 3. Surgical Changes
|
|
827
|
+
|
|
828
|
+
**Touch only what you must. Clean up only your own mess.**
|
|
829
|
+
|
|
830
|
+
When editing existing code:
|
|
831
|
+
- Don't "improve" adjacent code, comments, or formatting.
|
|
832
|
+
- Don't refactor things that aren't broken.
|
|
833
|
+
- Match existing style, even if you'd do it differently.
|
|
834
|
+
- If you notice unrelated dead code, mention it - don't delete it.
|
|
835
|
+
|
|
836
|
+
When your changes create orphans:
|
|
837
|
+
- Remove imports/variables/functions that YOUR changes made unused.
|
|
838
|
+
- Don't remove pre-existing dead code unless asked.
|
|
839
|
+
|
|
840
|
+
The test: Every changed line should trace directly to the user's request.
|
|
841
|
+
|
|
842
|
+
### 4. Goal-Driven Execution
|
|
843
|
+
|
|
844
|
+
**Define success criteria. Loop until verified.**
|
|
845
|
+
|
|
846
|
+
Transform tasks into verifiable goals:
|
|
847
|
+
- "Add validation" \u2192 "Write tests for invalid inputs, then make them pass"
|
|
848
|
+
- "Fix the bug" \u2192 "Write a test that reproduces it, then make it pass"
|
|
849
|
+
- "Refactor X" \u2192 "Ensure tests pass before and after"
|
|
850
|
+
|
|
851
|
+
For multi-step tasks, state a brief plan:
|
|
852
|
+
|
|
853
|
+
\`\`\`
|
|
854
|
+
1. [Step] \u2192 verify: [check]
|
|
855
|
+
2. [Step] \u2192 verify: [check]
|
|
856
|
+
3. [Step] \u2192 verify: [check]
|
|
857
|
+
\`\`\`
|
|
858
|
+
|
|
859
|
+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
860
|
+
|
|
861
|
+
**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
|
|
862
|
+
|
|
798
863
|
## Stack
|
|
799
864
|
${stackLines}
|
|
800
865
|
|