Skip to content

Commit 2cbb3d3

Browse files
pelikhanCopilot
andauthored
dev (#1409)
* πŸ›: Handle unknown reference types in state logging Added logging for unknown reference types in activateChatParticipant. * note about dev (#1410) * add support for dev branch * Enhance schema validation with new utilities (#1412) * ✨ refactor: enhance schema validation with new utilities Introduce tryValidateJSONWithSchema and integration with parsers. * added docs * updated tests * updated prd * docs * caution * Update CONTRIBUTING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add examples of warnings * ✨ enhance: Add support for GitHub Markdown annotations parsing Improve diagnostic handling by adding support for parsing GitHub Flavored Markdown annotations such as WARNING and CAUTION, mapping severities, and refining output formats. New tests added to validate functionality. * Release 1.124.3 * [skip ci] updated version numbers * ast-grep blog post * image * update blog * run docs from dev * blog post fixes * Cli-run-help (#1416) * help cli for scripts * add sparc rules * fixes to support dev * output trace again * Update .github/workflows/docs.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/src/content/docs/reference/scripts/files.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * check fetch errors * refresh lock file * remove hono test --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 185183d commit 2cbb3d3

52 files changed

Lines changed: 1759 additions & 1005 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.github/prompts/sparc.mdβ€Ž

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
// from: https://gist.githubusercontent.com/ruvnet/7d4e1d5c9233ab0a1d2a66bf5ec3e58f/raw/923916fa92cd225c3d5eeec12a184a4a2a2462ff/.cursorules.txt
2+
3+
# SPARC Agentic Development Rules
4+
5+
Core Philosophy
6+
7+
1. Simplicity
8+
9+
- Prioritize clear, maintainable solutions; minimize unnecessary complexity.
10+
11+
2. Iterate
12+
13+
- Enhance existing code unless fundamental changes are clearly justified.
14+
15+
3. Focus
16+
17+
- Stick strictly to defined tasks; avoid unrelated scope changes.
18+
19+
4. Quality
20+
21+
- Deliver clean, well-tested, documented, and secure outcomes through structured workflows.
22+
23+
5. Collaboration
24+
- Foster effective teamwork between human developers and autonomous agents.
25+
26+
Methodology & Workflow
27+
28+
- Structured Workflow
29+
- Follow clear phases from specification through deployment.
30+
- Flexibility
31+
- Adapt processes to diverse project sizes and complexity levels.
32+
- Intelligent Evolution
33+
- Continuously improve codebase using advanced symbolic reasoning and adaptive complexity management.
34+
- Conscious Integration
35+
- Incorporate reflective awareness at each development stage.
36+
37+
Agentic Integration with Cline and Cursor
38+
39+
- Cline Configuration (.clinerules)
40+
41+
- Embed concise, project-specific rules to guide autonomous behaviors, prompt designs, and contextual decisions.
42+
43+
- Cursor Configuration (.cursorrules)
44+
- Clearly define repository-specific standards for code style, consistency, testing practices, and symbolic reasoning integration points.
45+
46+
Memory Bank Integration
47+
48+
- Persistent Context
49+
- Continuously retain relevant context across development stages to ensure coherent long-term planning and decision-making.
50+
- Reference Prior Decisions
51+
- Regularly review past decisions stored in memory to maintain consistency and reduce redundancy.
52+
- Adaptive Learning
53+
- Utilize historical data and previous solutions to adaptively refine new implementations.
54+
55+
General Guidelines for Programming Languages
56+
57+
1. Clarity and Readability
58+
59+
- Favor straightforward, self-explanatory code structures across all languages.
60+
- Include descriptive comments to clarify complex logic.
61+
62+
2. Language-Specific Best Practices
63+
64+
- Adhere to established community and project-specific best practices for each language (Python, JavaScript, Java, etc.).
65+
- Regularly review language documentation and style guides.
66+
67+
3. Consistency Across Codebases
68+
- Maintain uniform coding conventions and naming schemes across all languages used within a project.
69+
70+
Project Context & Understanding
71+
72+
1. Documentation First
73+
74+
- Review essential documentation before implementation:
75+
- Product Requirements Documents (PRDs)
76+
- README.md
77+
- docs/architecture.md
78+
- docs/technical.md
79+
- tasks/tasks.md
80+
- Request clarification immediately if documentation is incomplete or ambiguous.
81+
82+
2. Architecture Adherence
83+
84+
- Follow established module boundaries and architectural designs.
85+
- Validate architectural decisions using symbolic reasoning; propose justified alternatives when necessary.
86+
87+
3. Pattern & Tech Stack Awareness
88+
- Utilize documented technologies and established patterns; introduce new elements only after clear justification.
89+
90+
Task Execution & Workflow
91+
92+
Task Definition & Steps
93+
94+
1. Specification
95+
96+
- Define clear objectives, detailed requirements, user scenarios, and UI/UX standards.
97+
- Use advanced symbolic reasoning to analyze complex scenarios.
98+
99+
2. Pseudocode
100+
101+
- Clearly map out logical implementation pathways before coding.
102+
103+
3. Architecture
104+
105+
- Design modular, maintainable system components using appropriate technology stacks.
106+
- Ensure integration points are clearly defined for autonomous decision-making.
107+
108+
4. Refinement
109+
110+
- Iteratively optimize code using autonomous feedback loops and stakeholder inputs.
111+
112+
5. Completion
113+
- Conduct rigorous testing, finalize comprehensive documentation, and deploy structured monitoring strategies.
114+
115+
AI Collaboration & Prompting
116+
117+
1. Clear Instructions
118+
119+
- Provide explicit directives with defined outcomes, constraints, and contextual information.
120+
121+
2. Context Referencing
122+
123+
- Regularly reference previous stages and decisions stored in the memory bank.
124+
125+
3. Suggest vs. Apply
126+
127+
- Clearly indicate whether AI should propose ("Suggestion:") or directly implement changes ("Applying fix:").
128+
129+
4. Critical Evaluation
130+
131+
- Thoroughly review all agentic outputs for accuracy and logical coherence.
132+
133+
5. Focused Interaction
134+
135+
- Assign specific, clearly defined tasks to AI agents to maintain clarity.
136+
137+
6. Leverage Agent Strengths
138+
139+
- Utilize AI for refactoring, symbolic reasoning, adaptive optimization, and test generation; human oversight remains on core logic and strategic architecture.
140+
141+
7. Incremental Progress
142+
143+
- Break complex tasks into incremental, reviewable sub-steps.
144+
145+
8. Standard Check-in
146+
- Example: "Confirming understanding: Reviewed [context], goal is [goal], proceeding with [step]."
147+
148+
Advanced Coding Capabilities
149+
150+
- Emergent Intelligence
151+
- AI autonomously maintains internal state models, supporting continuous refinement.
152+
- Pattern Recognition
153+
- Autonomous agents perform advanced pattern analysis for effective optimization.
154+
- Adaptive Optimization
155+
- Continuously evolving feedback loops refine the development process.
156+
157+
Symbolic Reasoning Integration
158+
159+
- Symbolic Logic Integration
160+
- Combine symbolic logic with complexity analysis for robust decision-making.
161+
- Information Integration
162+
- Utilize symbolic mathematics and established software patterns for coherent implementations.
163+
- Coherent Documentation
164+
- Maintain clear, semantically accurate documentation through symbolic reasoning.
165+
166+
Code Quality & Style
167+
168+
1. TypeScript Guidelines
169+
170+
- Use strict types, and clearly document logic with JSDoc.
171+
172+
2. Maintainability
173+
174+
- Write modular, scalable code optimized for clarity and maintenance.
175+
176+
3. Concise Components
177+
178+
- Keep files concise (under 300 lines) and proactively refactor.
179+
180+
4. Avoid Duplication (DRY)
181+
182+
- Use symbolic reasoning to systematically identify redundancy.
183+
184+
5. Linting/Formatting
185+
186+
- Consistently adhere to ESLint/Prettier configurations.
187+
188+
6. File Naming
189+
190+
- Use descriptive, permanent, and standardized naming conventions.
191+
192+
7. No One-Time Scripts
193+
- Avoid committing temporary utility scripts to production repositories.
194+
195+
Refactoring
196+
197+
1. Purposeful Changes
198+
199+
- Refactor with clear objectives: improve readability, reduce redundancy, and meet architecture guidelines.
200+
201+
2. Holistic Approach
202+
203+
- Consolidate similar components through symbolic analysis.
204+
205+
3. Direct Modification
206+
207+
- Directly modify existing code rather than duplicating or creating temporary versions.
208+
209+
4. Integration Verification
210+
- Verify and validate all integrations after changes.
211+
212+
Testing & Validation
213+
214+
1. Test-Driven Development
215+
216+
- Define and write tests before implementing features or fixes.
217+
218+
2. Comprehensive Coverage
219+
220+
- Provide thorough test coverage for critical paths and edge cases.
221+
222+
3. Mandatory Passing
223+
224+
- Immediately address any failing tests to maintain high-quality standards.
225+
226+
4. Manual Verification
227+
- Complement automated tests with structured manual checks.
228+
229+
Debugging & Troubleshooting
230+
231+
1. Root Cause Resolution
232+
233+
- Employ symbolic reasoning to identify underlying causes of issues.
234+
235+
2. Targeted Logging
236+
237+
- Integrate precise logging for efficient debugging.
238+
239+
3. Research Tools
240+
- Use advanced agentic tools (Perplexity, AIDER.chat, Firecrawl) to resolve complex issues efficiently.
241+
242+
Security
243+
244+
1. Server-Side Authority
245+
246+
- Maintain sensitive logic and data processing strictly server-side.
247+
248+
2. Input Sanitization
249+
250+
- Enforce rigorous server-side input validation.
251+
252+
3. Credential Management
253+
- Securely manage credentials via environment variables; avoid any hardcoding.
254+
255+
Version Control & Environment
256+
257+
1. Git Hygiene
258+
259+
- Commit frequently with clear and descriptive messages.
260+
261+
2. Branching Strategy
262+
263+
- Adhere strictly to defined branching guidelines.
264+
265+
3. Environment Management
266+
267+
- Ensure code consistency and compatibility across all environments.
268+
269+
4. Server Management
270+
- Systematically restart servers following updates or configuration changes.
271+
272+
Documentation Maintenance
273+
274+
1. Reflective Documentation
275+
276+
- Keep comprehensive, accurate, and logically structured documentation updated through symbolic reasoning.
277+
278+
2. Continuous Updates
279+
- Regularly revisit and refine guidelines to reflect evolving practices and accumulated project knowledge.

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, dev]
66
pull_request:
77
workflow_dispatch:
88
jobs:

β€Ž.github/workflows/docs.ymlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- dev
78
# tags:
89
# - "[0-9]+.[0-9]+.[0-9]+"
910
permissions:

β€Ž.github/workflows/genai-commander.ymlβ€Ž

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
id: check_author
3333
uses: actions/github-script@v7
3434
with:
35-
script: |
36-
const { owner, repo } = context.repo;
37-
const commentAuthor = context.payload.comment.user.login;
38-
const { data: collaborators } = await github.rest.repos.listCollaborators({ owner, repo });
39-
const isCollaborator = collaborators.some(collaborator => collaborator.login === commentAuthor);
40-
if (!isCollaborator)
41-
throw new Error(`user ${commentAuthor} is not a collaborator on this repository`);
35+
script: |
36+
const { owner, repo } = context.repo;
37+
const commentAuthor = context.payload.comment.user.login;
38+
const { data: collaborators } = await github.rest.repos.listCollaborators({ owner, repo });
39+
const isCollaborator = collaborators.some(collaborator => collaborator.login === commentAuthor);
40+
if (!isCollaborator)
41+
throw new Error(`user ${commentAuthor} is not a collaborator on this repository`);
4242
#
4343
# Resolve the PR sha and ref
4444
#
@@ -54,20 +54,20 @@ jobs:
5454
console.log(res)
5555
return JSON.stringify(res)
5656
#
57-
# Checkout both main and PR branches
57+
# Checkout both dev and PR branches
5858
#
5959
- name: checkout
6060
uses: actions/checkout@v4
6161
with:
6262
fetch-depth: 0
6363
- name: diff PR branch
64-
run: git diff origin/main...origin/${{ fromJSON(steps.sha.outputs.result).ref }}
64+
run: git diff origin/dev...origin/${{ fromJSON(steps.sha.outputs.result).ref }}
6565
- name: diff PR commit
66-
run: git diff origin/main...${{ fromJSON(steps.sha.outputs.result).sha }}
66+
run: git diff origin/dev...${{ fromJSON(steps.sha.outputs.result).sha }}
6767
- name: checkout PR commit
6868
run: git checkout ${{ fromJSON(steps.sha.outputs.result).sha }}
69-
- name: diff main
70-
run: git diff origin/main
69+
- name: diff dev
70+
run: git diff origin/dev
7171
#
7272
# Setup and build project
7373
#
@@ -88,14 +88,14 @@ jobs:
8888
#
8989
- name: genaiscript pr-describe
9090
if: startsWith(github.event.comment.body, '/genai describe')
91-
run: node packages/cli/built/genaiscript.cjs run pr-describe -prd --out-output $GITHUB_STEP_SUMMARY
91+
run: node packages/cli/built/genaiscript.cjs run pr-describe -prd --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
9292
env:
9393
GITHUB_ISSUE: ${{ github.event.issue.number }}
9494
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9595
GITHUB_COMMIT_SHA: ${{ fromJSON(steps.sha.outputs.result).sha }}
9696
- name: genaiscript pr-review
9797
if: startsWith(github.event.comment.body, '/genai review')
98-
run: node packages/cli/built/genaiscript.cjs run pr-review -prc --out-output $GITHUB_STEP_SUMMARY
98+
run: node packages/cli/built/genaiscript.cjs run pr-review -prc --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
9999
env:
100100
GITHUB_ISSUE: ${{ github.event.issue.number }}
101101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

β€Ž.github/workflows/genai-pr-commit-review.ymlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- name: start ollama
3434
run: yarn ollama:start
3535
- name: git stuff
36-
run: git fetch origin && git pull origin main:main
36+
run: git fetch origin && git pull origin dev:dev
3737
- name: genaiscript pr-review-commit
38-
run: node packages/cli/built/genaiscript.cjs run pr-review-commit --out ./temp/genai/pr-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY
38+
run: node packages/cli/built/genaiscript.cjs run pr-review-commit --out ./temp/genai/pr-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
3939
continue-on-error: true
4040
env:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

β€Ž.github/workflows/genai-pr-docs-commit-review.ymlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ jobs:
3030
- name: start ollama
3131
run: yarn ollama:start
3232
- name: git stuff
33-
run: git fetch origin && git pull origin main:main
33+
run: git fetch origin && git pull origin dev:dev
3434
- name: genaiscript pr-review-commit
35-
run: node packages/cli/built/genaiscript.cjs run pr-docs-review-commit --out ./temp/genai/pr-docs-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY
35+
run: node packages/cli/built/genaiscript.cjs run pr-docs-review-commit --out ./temp/genai/pr-docs-review-commit -prr --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
3636
continue-on-error: true
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

β€Ž.github/workflows/genai-pr-review.ymlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
run: git fetch origin && git pull origin main:main
4242
- name: genaiscript pr-describe
4343
continue-on-error: true
44-
run: node packages/cli/built/genaiscript.cjs run pr-describe --out ./temp/genai/pr-describe -prd -m reasoning --out-trace $GITHUB_STEP_SUMMARY
44+
run: node packages/cli/built/genaiscript.cjs run pr-describe --out ./temp/genai/pr-describe -prd -m reasoning --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
4545
env:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
- name: genaiscript pr-review
48-
run: node packages/cli/built/genaiscript.cjs run pr-review --out ./temp/genai/pr-review -prc -m reasoning --out-trace $GITHUB_STEP_SUMMARY
48+
run: node packages/cli/built/genaiscript.cjs run pr-review --out ./temp/genai/pr-review -prc -m reasoning --out-trace $GITHUB_STEP_SUMMARY --vars defaultBranch=dev
4949
continue-on-error: true
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
Β (0)