@adityaaria/spark 6.0.22 → 6.0.24
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/package.json
CHANGED
|
@@ -26,25 +26,31 @@ If the repository is extremely large and analyzing all four pillars sequentially
|
|
|
26
26
|
|
|
27
27
|
## Target Extraction Artifacts
|
|
28
28
|
|
|
29
|
-
Your final analysis must thoroughly document these
|
|
29
|
+
Your final analysis must thoroughly document these five pillars:
|
|
30
30
|
|
|
31
|
-
### 1.
|
|
31
|
+
### 1. ARCHITECTURE GRAPH (MERMAID)
|
|
32
|
+
You MUST generate a high-level visual representation of the project's architecture using Mermaid.js syntax.
|
|
33
|
+
- **Format:** Use a standard ````mermaid` code block.
|
|
34
|
+
- **Contents:** Map out the relationships between the Client (Frontend), Gateway, Services, and Database/Storage.
|
|
35
|
+
- **Syntax rules:** You may use standard flowchart arrows (`-->`, `-.->`, `==>`), but ensure the graph represents the actual architecture of the scanned codebase, not a generic template.
|
|
36
|
+
|
|
37
|
+
### 2. API CONTRACT
|
|
32
38
|
Identify how the application communicates internally and externally.
|
|
33
39
|
- **Priority Target:** Actively search for Swagger (`swagger.yaml`, `swagger.json`) or OpenAPI specifications. These are the single source of truth for the API contract.
|
|
34
40
|
- **Secondary Targets:** Discover REST/GraphQL endpoints, gRPC protos, ORM schemas, Data Transfer Objects (DTOs), and core data models.
|
|
35
41
|
- **Legacy Traps:** Flag any endpoints that violate current conventions or bypass standard authentication/validation layers.
|
|
36
42
|
|
|
37
|
-
###
|
|
43
|
+
### 3. WORKFLOW
|
|
38
44
|
Identify how the project is built, run, tested, and deployed.
|
|
39
45
|
- **Targets:** CI/CD pipelines (e.g., `.github/workflows`, `.gitlab-ci.yml`), build scripts (Makefiles, Gradle, NPM scripts), Dockerfiles, and deployment scripts.
|
|
40
46
|
- **Testing:** Identify the test framework, strategy (Unit, Integration, E2E), and explicitly highlight critical areas that lack test coverage.
|
|
41
47
|
|
|
42
|
-
###
|
|
48
|
+
### 4. BUSINESS FLOW & DOMAINS
|
|
43
49
|
Identify the core business logic and user journeys.
|
|
44
50
|
- **Targets:** Core domains, domain services, use cases, and state machines.
|
|
45
51
|
- **Domain Mapping:** Draft a list of business domains (e.g., Auth, Checkout, Inventory). Note their complexity, risk level, and the specific modules/packages that own them. Avoid forcing a domain split if the project is small.
|
|
46
52
|
|
|
47
|
-
###
|
|
53
|
+
### 5. STANDARDS & ANTI-PATTERNS
|
|
48
54
|
Identify conventions, rules, and technical debt enforced or found in the codebase.
|
|
49
55
|
- **Targets:** Code styling conventions, linting rules, architectural patterns (e.g., MVC, Hexagonal, Clean Architecture).
|
|
50
56
|
- **Anti-Pattern Detection (CRITICAL):** Actively search for and document legacy traps:
|
|
@@ -60,6 +66,6 @@ Identify conventions, rules, and technical debt enforced or found in the codebas
|
|
|
60
66
|
- `[ ]` **Step 1:** Announce skill usage exactly as required.
|
|
61
67
|
- `[ ]` **Step 2:** Identify if the workspace contains multiple independent projects (e.g., frontend vs backend). If so, plan to scan and generate `.docs/` for EACH project separately.
|
|
62
68
|
- `[ ]` **Step 3:** Scan root configuration files and prioritize searching for Swagger/OpenAPI specifications.
|
|
63
|
-
- `[ ]` **Step 4:** Scan source directory structures
|
|
69
|
+
- `[ ]` **Step 4:** Scan source directory structures and generate a ````mermaid` architecture graph detailing the core components and their relationships.
|
|
64
70
|
- `[ ]` **Step 5:** Analyze testing frameworks, CI/CD workflows, and actively hunt for anti-patterns and legacy traps.
|
|
65
71
|
- `[ ]` **Step 6 (CRITICAL):** You MUST use your file-writing tools to physically create the `.docs/` directory (inside each project root if multi-repo) and save the markdown files (e.g. `PROJECT_SCAN.md`, `API_CONTRACT.md`) into it. DO NOT just print the summary into the chat! You must physically write the files to disk.
|
|
@@ -54,7 +54,7 @@ Skills speak in actions ("dispatch a subagent", "create a todo", "read a file")
|
|
|
54
54
|
|
|
55
55
|
**Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.
|
|
56
56
|
|
|
57
|
-
**CRITICAL:** If the user
|
|
57
|
+
**CRITICAL:** If the user's prompt matches the purpose of ANY existing skill, or mentions a skill by name, you MUST invoke that skill IMMEDIATELY as your very first tool call. Do not answer conversationally. Do not ask for confirmation. Execute the skill first.
|
|
58
58
|
|
|
59
59
|
## Announcement Format
|
|
60
60
|
When you invoke a skill, you MUST announce it to the developer using exactly this format as the very first thing you say:
|
|
@@ -652,6 +652,18 @@ ${steps}
|
|
|
652
652
|
let l = line.trim();
|
|
653
653
|
if (!l || l.startsWith('graph') || l.startsWith('flowchart') || l.startsWith('subgraph') || l.startsWith('end')) return;
|
|
654
654
|
|
|
655
|
+
// Normalize Mermaid links (dotted, thick, solid without arrow, and inline labels)
|
|
656
|
+
l = l.replace(/-\.->/g, '-->')
|
|
657
|
+
.replace(/==>/g, '-->')
|
|
658
|
+
.replace(/---/g, '-->')
|
|
659
|
+
.replace(/-\.-/g, '-->')
|
|
660
|
+
.replace(/===/g, '-->');
|
|
661
|
+
|
|
662
|
+
// Normalize inline labels like A -- label --> B to A -->|label| B
|
|
663
|
+
l = l.replace(/--\s*([^>]+?)\s*-->/g, '-->|$1|')
|
|
664
|
+
.replace(/-\.\s*([^>]+?)\s*\.->/g, '-->|$1|')
|
|
665
|
+
.replace(/==\s*([^>]+?)\s*==>/g, '-->|$1|');
|
|
666
|
+
|
|
655
667
|
const parts = l.split('-->');
|
|
656
668
|
if (parts.length >= 2) {
|
|
657
669
|
let fromPart = parts[0].trim();
|