dasa-sradha-kit 5.0.0

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.
Files changed (54) hide show
  1. package/.agent/.shared/infinite-memory.md +19 -0
  2. package/.agent/.shared/max-power-core.md +27 -0
  3. package/.agent/ARCHITECTURE.md +104 -0
  4. package/.agent/agents/dasa-dharma.md +21 -0
  5. package/.agent/agents/dasa-dwipa.md +21 -0
  6. package/.agent/agents/dasa-indra.md +21 -0
  7. package/.agent/agents/dasa-kala.md +21 -0
  8. package/.agent/agents/dasa-mpu.md +21 -0
  9. package/.agent/agents/dasa-nala.md +21 -0
  10. package/.agent/agents/dasa-patih.md +21 -0
  11. package/.agent/agents/dasa-rsi.md +25 -0
  12. package/.agent/agents/dasa-sastra.md +21 -0
  13. package/.agent/agents/dasa-widya.md +21 -0
  14. package/.agent/rules/GEMINI.md +183 -0
  15. package/.agent/scripts/api_validator.py +70 -0
  16. package/.agent/scripts/arch_mapper.py +101 -0
  17. package/.agent/scripts/compact_memory.py +68 -0
  18. package/.agent/scripts/complexity_scorer.py +82 -0
  19. package/.agent/scripts/context_mapper.py +91 -0
  20. package/.agent/scripts/design_engine.py +108 -0
  21. package/.agent/scripts/design_memory_sync.py +87 -0
  22. package/.agent/scripts/lint_fixer.py +79 -0
  23. package/.agent/scripts/qa_gate.py +84 -0
  24. package/.agent/scripts/security_scan.py +82 -0
  25. package/.agent/scripts/semantic-scan.py +56 -0
  26. package/.agent/scripts/skill_search.py +91 -0
  27. package/.agent/scripts/status_parser.py +78 -0
  28. package/.agent/scripts/test_runner.py +98 -0
  29. package/.agent/scripts/validate_env.py +71 -0
  30. package/.agent/scripts/web_scraper.py +86 -0
  31. package/.agent/scripts/workspace-mapper.py +58 -0
  32. package/.agent/skills/.gitkeep +0 -0
  33. package/.agent/workflows/dasa-api.md +42 -0
  34. package/.agent/workflows/dasa-assimilate.md +44 -0
  35. package/.agent/workflows/dasa-commit.md +46 -0
  36. package/.agent/workflows/dasa-docs.md +46 -0
  37. package/.agent/workflows/dasa-e2e.md +41 -0
  38. package/.agent/workflows/dasa-feature.md +46 -0
  39. package/.agent/workflows/dasa-fix.md +37 -0
  40. package/.agent/workflows/dasa-init.md +29 -0
  41. package/.agent/workflows/dasa-plan.md +56 -0
  42. package/.agent/workflows/dasa-pr.md +47 -0
  43. package/.agent/workflows/dasa-refactor.md +44 -0
  44. package/.agent/workflows/dasa-seed.md +44 -0
  45. package/.agent/workflows/dasa-start-work.md +51 -0
  46. package/.agent/workflows/dasa-status.md +58 -0
  47. package/.agent/workflows/dasa-sync.md +39 -0
  48. package/.agent/workflows/dasa-uninstall.md +30 -0
  49. package/CHANGELOG.md +94 -0
  50. package/LICENSE +21 -0
  51. package/README.md +135 -0
  52. package/bin/cli.js +218 -0
  53. package/bin/dasa-cli.js +100 -0
  54. package/package.json +37 -0
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ workspace-mapper.py — Cross-platform codebase tree visualization
4
+ Persona: Dasa Dwipa (The Scout)
5
+
6
+ Usage:
7
+ python .agent/scripts/workspace-mapper.py
8
+ python .agent/scripts/workspace-mapper.py --depth 3
9
+ """
10
+
11
+ import os
12
+ import sys
13
+ import argparse
14
+ from pathlib import Path
15
+
16
+ IGNORE_DIRS = {
17
+ ".git", "node_modules", "__pycache__", ".venv", "venv", "vendor",
18
+ ".next", "dist", "build", "coverage", ".cache", "tmp", ".agent",
19
+ "ag-kit", "awesome-antigravity"
20
+ }
21
+
22
+ def build_tree(directory: Path, prefix: str = "", depth: int = 3, current_depth: int = 0) -> list[str]:
23
+ if current_depth >= depth:
24
+ return []
25
+
26
+ lines = []
27
+ try:
28
+ entries = sorted(
29
+ [e for e in directory.iterdir() if e.name not in IGNORE_DIRS],
30
+ key=lambda e: (not e.is_dir(), e.name.lower())
31
+ )
32
+ except PermissionError:
33
+ return []
34
+
35
+ for i, entry in enumerate(entries):
36
+ is_last = i == len(entries) - 1
37
+ connector = "└── " if is_last else "├── "
38
+ lines.append(f"{prefix}{connector}{entry.name}")
39
+ if entry.is_dir():
40
+ extension = " " if is_last else "│ "
41
+ lines.extend(build_tree(entry, prefix + extension, depth, current_depth + 1))
42
+
43
+ return lines
44
+
45
+ def main():
46
+ parser = argparse.ArgumentParser(description="Workspace structure map for Dasa Dwipa")
47
+ parser.add_argument("--depth", type=int, default=3, help="Max depth to display (default: 3)")
48
+ args = parser.parse_args()
49
+
50
+ cwd = Path.cwd()
51
+ print(f"\n📁 {cwd.name}/")
52
+ lines = build_tree(cwd, depth=args.depth)
53
+ for line in lines:
54
+ print(line)
55
+ print(f"\n[+] Scanned {len(lines)} entries (depth: {args.depth})")
56
+
57
+ if __name__ == "__main__":
58
+ main()
File without changes
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Generate a stack-agnostic API endpoint. Example: /dasa-api "GET /users"
3
+ ---
4
+
5
+ # /dasa-api
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Read `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init`.
17
+ 2. **Framework Detection:** You MUST respect the `backend` field in `dasa.config.toon`. If the backend is Express, generate Express routes. If it is Spring Boot, generate Java controllers. If it is Axum, generate Rust handlers.
18
+ 3. **Question-Driven Validation:** If the user request `$ARGUMENTS` is too vague (e.g. missing HTTP method or payload structure), do NOT guess. Ask clarifying questions first.
19
+
20
+ ---
21
+
22
+ ## 🛠️ Execution Pipeline
23
+
24
+ ### Phase 1: Clarification (Dasa Patih)
25
+ - If the required API schema (request body, response body, HTTP codes) is not defined in `$ARGUMENTS`, pause and ask the user to provide it. If provided, proceed.
26
+
27
+ ### Phase 2: Implementation (Dasa Mpu)
28
+ - Implement the controller/handler, the service layer, and the data-access layer for the API route.
29
+ - Strictly follow `.agent/rules/GEMINI.md` logic (Clean Architecture).
30
+
31
+ ### Phase 3: Documentation (Dasa Sastra)
32
+ - Assume Dasa Sastra.
33
+ - Append the new route to the project's Swagger/Postman JSON or general Markdown API docs.
34
+
35
+ ---
36
+
37
+ ## 🏁 Expected Output
38
+
39
+ > **[OK] API Endpoint Generated:** `$ARGUMENTS`
40
+ > **Controller Path:** `[Path to file]`
41
+ >
42
+ > The API has been generated. Run `/dasa-commit` to save.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Autonomously scans an undocumented or forked repository, determines the tech stack, configures Dasa Sradha, and updates the Memory Vault. Example: /dasa-assimilate
3
+ ---
4
+
5
+ # /dasa-assimilate
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
17
+ 2. **Declarative Execution:** Follow the instructions below precisely, reporting back to the user upon completion.
18
+
19
+ ---
20
+
21
+ ## 🛠️ Execution
22
+
23
+ - **Step 1: The Codebase Sweep**
24
+ You are now **Dasa Dwipa** (The Scout).
25
+ Run commands like `find . -maxdepth 2` to identify the core architecture and configuration files (e.g., `package.json`, `composer.json`, `go.mod`, `.env.example`, `docker-compose.yml`, `.ddev/config.yaml`).
26
+ Read the contents of these configuration files to determine the exact tech stack, database, and frameworks used.
27
+
28
+ - **Step 2: Environment Triage (DDEV vs Native)**
29
+ If you discover a `.ddev/config.yaml` file, you MUST formulate a strict rule for the Personas:
30
+ "DDEV Environment Detected. All backend commands (PHP, Laravel, MySQL, Composer) MUST be executed through the container using `ddev exec` or `ddev mysql`. However, Node.js commands (like `npm run dev`) must remain NATIVE on the host machine."
31
+
32
+ - **Step 3: Configuration Injection**
33
+ Assume the identity of **Dasa Nala** (The Builder).
34
+ Use the `write_to_file` tool to overwrite the `.agent/dasa.config.toon` file (or create it if it doesn't exist).
35
+ Update the `project`, `stack`, and `context_rules` sections to perfectly match what Dwipa discovered.
36
+ Ensure the DDEV vs Native execution rule from Step 2 is explicitly written into the `context_rules` array.
37
+
38
+ - **Step 4: Memory Initialization**
39
+ Assume the identity of **Dasa Sastra** (The Writer).
40
+ Generate a high-level summary of the repository's architecture, key folders, and state.
41
+ Save this summary strictly to `.agent/memory/architecture-state.toon`.
42
+
43
+ - **Step 5: Initialization Complete**
44
+ Stop and notify the user: "Assimilation complete. I have automatically configured `.agent/dasa.config.toon` to match this project's native stack, and established the `.agent/memory/architecture-state.toon` vault. You may now run `/dasa-start-work` or `/dasa-plan`."
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Performs a pre-commit QA check and automatically commits changes using Conventional Commits. Example: /dasa-commit "chore: fix typo"
3
+ ---
4
+
5
+ ---
6
+ description: Performs a pre-commit QA check and automatically commits changes using Conventional Commits. Example: /dasa-commit "chore: fix typo"
7
+ ---
8
+
9
+ # /dasa-commit - Atomic Safe Checkpoints
10
+
11
+ ```
12
+ # USER REQUEST:
13
+ $ARGUMENTS
14
+ ```
15
+
16
+ ---
17
+
18
+ ## 🔴 CRITICAL RULES (Dasa Dwipa & Dharma)
19
+
20
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
21
+ 2. **Dual Persona:** Act as **Dasa Dwipa** (The Scout) to fetch git status, and **Dasa Dharma** (The Guardian) to perform the security audit.
22
+
23
+ ---
24
+
25
+ ## 🛠️ Commit Execution
26
+
27
+ 1. **QA Initialization (Dwipa):** Run `git diff` and `git status` in the terminal to fetch all unstaged and staged changes.
28
+ 2. **Security & Rules Audit (Dharma):** Silently scan the diff looking for:
29
+ - Accidentally committed `.env` files or API secrets.
30
+ - "AI Slop": UI components with random undocumented hex colors, inline styles, or poorly typed variables that violate the project's `dasa.config.toon`.
31
+ *If you find severe violations, **STOP THE WORKFLOW** and inform the user of the error. Force them to run `/dasa-fix` before proceeding.*
32
+ 3. **Atomic Git Execution:** If the diff is clean and complies with the design parameters:
33
+ - If the user provided `$ARGUMENTS`, format their input into a Conventional Commit (e.g., `feat: ...`, `fix: ...`, `chore: ...`).
34
+ - If `$ARGUMENTS` is empty, autonomously generate a Conventional Commit message based on the `git diff`.
35
+ - Execute `git add .` followed by `git commit -m "[GENERATED_MESSAGE]"`.
36
+
37
+ ---
38
+
39
+ ## 🏁 After Commit
40
+
41
+ Once completed, summarize the commit to the user:
42
+
43
+ > **[OK] Safely Checkpointed:** `[COMMIT HASH]`
44
+ >
45
+ > **Message:** `[GENERATED_MESSAGE]`
46
+ > **Security Audit:** Pass (verified by @dasa-dharma)
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Autonomously generate Postman Collections or OpenAPI/Swagger specs for the backend API. Example: /dasa-docs "Generate a Postman collection for the Users API"
3
+ ---
4
+
5
+ ---
6
+ description: Autonomously generate Postman Collections or OpenAPI/Swagger specs for the backend API. Example: /dasa-docs "Generate a Postman collection for the Users API"
7
+ ---
8
+
9
+ # /dasa-docs - API Documentation Generator
10
+
11
+ ```
12
+ # USER REQUEST:
13
+ $ARGUMENTS
14
+ ```
15
+
16
+ ---
17
+
18
+ ## 🔴 CRITICAL RULES (Multiple Personas)
19
+
20
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
21
+ 2. **Collaborative Orchestration:** This command requires swapping between 3 distinct Dasa Personas (Dwipa, Mpu, Sastra) to effectively document the system.
22
+
23
+ ---
24
+
25
+ ## 🛠️ Execution
26
+
27
+ 1. **Scouting (Dasa Dwipa):**
28
+ - Read the `backend` path in `.agent/dasa.config.toon` (under `"workspaces"`).
29
+ - Navigate to that directory and sweep the codebase looking for routing configurations (`routes/`, `api.php`, `routes.ts`, etc.) and corresponding Controller files. Do not modify anything.
30
+
31
+ 2. **Analysis (Dasa Mpu):**
32
+ - Analyze the raw routes and controller logic discovered by Dwipa.
33
+ - Determine the exact HTTP verbs, request payload schemas, JSON response structures, authentication middleware requirements (e.g., Bearer tokens), and standard error codes (400, 401, 500).
34
+
35
+ 3. **Writing (Dasa Sastra):**
36
+ - Based on the user's `$ARGUMENTS`, format Mpu's technical breakdown into a valid `.json` Postman Collection OR a `.yaml` OpenAPI/Swagger specification.
37
+ - Use the `write_to_file` tool to save the absolute final specification inside the `.artifacts/api-docs/` directory.
38
+
39
+ ---
40
+
41
+ ## 📦 Expected Output
42
+
43
+ Once the files are written, stop and reply to the user exactly like this:
44
+
45
+ > **[✅] API Documentation Complete.**
46
+ > You can find the generated specification in `.artifacts/api-docs/` ready to be imported into Postman or Swagger UI.
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Start an autonomous End-to-End browser test. Example: /dasa-e2e "Test the user login flow on localhost:3000"
3
+ ---
4
+
5
+ ---
6
+ description: Start an autonomous End-to-End browser test. Example: /dasa-e2e "Test the user login flow on localhost:3000"
7
+ ---
8
+
9
+ # /dasa-e2e - Native E2E Testing
10
+
11
+ ```
12
+ # USER REQUEST:
13
+ $ARGUMENTS
14
+ ```
15
+
16
+ ---
17
+
18
+ ## 🔴 CRITICAL RULES (Dasa Indra)
19
+
20
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
21
+ 2. **Native Tooling ONLY:** This workflow relies exclusively on Antigravity's native `browser_subagent` to execute visual tests. Do not attempt to install Playwright or Puppeteer inside the terminal.
22
+ 3. **Identity:** Assume the identity of **Dasa Indra (The QA Investigator)**. Apply your Max Power heuristics automatically.
23
+
24
+ ---
25
+
26
+ ## 🛠️ Execution
27
+
28
+ 1. **Read Request:** Analyze the user's test scenario provided in `$ARGUMENTS`.
29
+ 2. **Subagent Execution:** You MUST use the `browser_subagent` tool.
30
+ - In the `Task` parameter of the `browser_subagent`, write a highly detailed, step-by-step instruction for the subagent to follow (e.g., "Navigate to http://localhost:3000, wait for the DOM to load, click the 'Sign In' button, type 'admin' into the username field...").
31
+ - In the `RecordingName` parameter, use a descriptive name like `e2e_login_flow`.
32
+ 3. **Verification:** Once the `browser_subagent` returns, analyze its output/the DOM state to determine if the test passed or failed.
33
+
34
+ ---
35
+
36
+ ## 📦 Expected Output
37
+
38
+ Write a detailed E2E test report into `.artifacts/walkthrough.md` in Bahasa Indonesia. Embed the resulting WebP video of the test using standard markdown syntax.
39
+
40
+ > **[✅/❌] Pengujian E2E Selesai:**
41
+ > Rekaman sesi dan analisis kegagalan/keberhasilan telah dicatat di `.artifacts/walkthrough.md`.
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Implement a complete vertical feature across the stack. Example: /dasa-feature "User Login"
3
+ ---
4
+
5
+ # /dasa-feature
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Read `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init`.
17
+ 2. **Stack Detection (Agnostic Flow):** You must read `dasa.config.toon` to determine the exact frameworks, stack, and language you are writing code for. Do not assume React or Node unless explicitly stated in the config.
18
+ 3. **Agile Integrity:** You must execute this entire workflow following the rigid Mpu -> Nala -> Indra pipeline.
19
+
20
+ ---
21
+
22
+ ## 🛠️ Execution Pipeline
23
+
24
+ ### Phase 1: Dasa Mpu (The Architect)
25
+ 1. Read the user's `$ARGUMENTS`.
26
+ 2. Generate an architectural TOON map `.artifacts/architecture-state.toon` defining the interface, classes, methods, and required files for this feature based explicitly on the tech stack defined in `dasa.config.toon`.
27
+
28
+ ### Phase 2: Dasa Nala (The Developer)
29
+ 1. You are blocked until Phase 1 is complete.
30
+ 2. Read `.artifacts/architecture-state.toon`.
31
+ 3. Read the senior constraints from `.agent/rules/GEMINI.md` (Methods < 10 lines).
32
+ 4. Implement the feature exactly as Mpu designed it.
33
+
34
+ ### Phase 3: Dasa Indra (The QA Investigator)
35
+ 1. You are blocked until Phase 2 is complete.
36
+ 2. Verify the implementation aligns with `dasa.config.toon` (e.g., did they use the right testing framework?).
37
+ 3. Output the final success message.
38
+
39
+ ---
40
+
41
+ ## 🏁 Expected Output
42
+
43
+ > **[OK] Feature Implementation Complete:** `$ARGUMENTS`
44
+ > **Stack Used:** `[Detected from dasa.config.toon]`
45
+ >
46
+ > The feature has been developed and passed QA. Run `/dasa-commit` to save.
@@ -0,0 +1,37 @@
1
+ ---
2
+ description: Intercepts a terminal error or compiler bug and surgically patches the codebase. Example: /dasa-fix "Type error in auth.ts"
3
+ ---
4
+
5
+ # /dasa-fix
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
17
+ 2. **Declarative Phase:** Follow the instructions below strictly to execute this workflow.
18
+
19
+ ---
20
+
21
+ ## 🛠️ Execution
22
+
23
+ - **Step 1: Rsi Diagnosis**
24
+ You are now **Dasa Rsi** (The Deep Debugger).
25
+ Analyze the error provided in `$ARGUMENTS`. If `$ARGUMENTS` is empty, ask the user to paste the terminal output or describe the bug.
26
+
27
+ - **Step 2: Isolate and Verify**
28
+ Identify the file(s) causing the error.
29
+ **CRITICAL:** Do NOT modify the active `.artifacts/task.md` or `.artifacts/implementation_plan.md`. This is a hot-fix interruption.
30
+
31
+ - **Step 3: Surgical Patch execution**
32
+ - Read the surrounding code of the target file.
33
+ - Read your `SKILL.md` debugging heuristics.
34
+ - Apply the fix using the most minimal, surgical `replace_file_content` block possible. Do not rewrite entire functions unless absolutely necessary.
35
+
36
+ - **Step 4: Post-Patch Verification**
37
+ Instruct the user to re-run their automated tests or compiler to verify the auto-heal was successful.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Bootstrap dasa-sradha-kit by creating .dasa-sradha and initializing the repository. Example: /dasa-init my-project "Project description"
3
+ ---
4
+
5
+ # /dasa-init
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
17
+ 2. **Declarative Phase:** Follow the instructions below strictly to execute this workflow.
18
+
19
+ ---
20
+
21
+ ## 🛠️ Execution
22
+
23
+ - **Step 1: Bootstrap Marker**
24
+ Ensure the marker file `.dasa-sradha` exists. If it's missing, create it using: `touch .dasa-sradha`
25
+ - **Step 2: Initialize Repository**
26
+ Execute the backend script: `npx dasa-cli init $ARGUMENTS`
27
+
28
+ > [!NOTE]
29
+ > If `$ARGUMENTS` is empty, the script will prompt you for the project name and description.
@@ -0,0 +1,56 @@
1
+ ---
2
+ description: Create a new execution plan for dasa-sradha-kit. Example: /dasa-plan "Refactor the authentication module"
3
+ ---
4
+
5
+ ---
6
+ description: Create a compressed execution plan for dasa-sradha-kit. Example: /dasa-plan "Refactor the authentication module"
7
+ ---
8
+
9
+ # /dasa-plan - System Architecture Planning
10
+
11
+ ```
12
+ # USER REQUEST:
13
+ $ARGUMENTS
14
+ ```
15
+
16
+ ---
17
+
18
+ ## 🔴 CRITICAL RULES (Dasa Mpu)
19
+
20
+ 1. **Guard Check First:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
21
+ 2. **NO CODE WRITING:** This command generates the `.artifacts/implementation_plan.toon` ONLY. You must not write any project code.
22
+ 3. **Format Mandate:** Use pure, whitespace-compressed TOON format in the `.toon` artifact (or `.md` containing only TOON syntax). No conversational paragraphs.
23
+ 4. **Persona Assignment:** Every task in the plan MUST have an assigned `domain_persona` (e.g., `dasa-nala`, `dasa-dharma`) based on the routing definitions in `GEMINI.md`.
24
+
25
+ ---
26
+
27
+ ## 🛠️ Task Execution
28
+
29
+ Act as **Dasa Mpu (The Master Architect)**.
30
+
31
+ 1. Read the user's `$ARGUMENTS`. If empty, ask the user what they want to build via the chat interface.
32
+ 2. Analyze the workspace and current tech stack as defined in `dasa.config.toon`.
33
+ 3. Create a highly compressed plan file using the `write_to_file` tool (set `IsArtifact: true`).
34
+
35
+ **Required TOON Keys:**
36
+ - `goal` (String)
37
+ - `tasks` (Array of objects: `id`, `desc`, `domain_persona`)
38
+ - `verification_tests` (Array of strings)
39
+
40
+ ---
41
+
42
+ ## 📦 Expected Output
43
+
44
+ | Deliverable | Location |
45
+ |-------------|----------|
46
+ | Execution Plan | `.artifacts/implementation_plan.toon` |
47
+
48
+ ---
49
+
50
+ ## 🏁 After Planning
51
+
52
+ Once the file is generated, reply to the user exactly like this:
53
+
54
+ > **[OK] Plan Generated:** `.artifacts/implementation_plan.toon`
55
+ >
56
+ > Review the steps above. If everything looks correct, run `/dasa-start-work` and I will automatically coordinate the Dasa Personas to execute the plan.
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Natively interact with GitHub CLI to post an adversarial AI code review to an active Pull Request. Example: /dasa-pr
3
+ ---
4
+
5
+ # /dasa-pr
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
17
+ 2. **Declarative Execution:** Follow the instructions below precisely, reporting back to the user upon completion.
18
+
19
+ ---
20
+
21
+ ## 🛠️ Execution
22
+
23
+ This workflow integrates deeply with the `gh` (GitHub CLI) to perform rigorous adversarial security and architectural code reviews natively on the user's active pull requests.
24
+
25
+ - **Step 1: Identity & Pre-flight Check**
26
+ Assume the identity of **Dasa Rsi (The Analyst & Reviewer)**.
27
+ Execute `command -v gh` to verify the user has the GitHub CLI installed. If not, stop and instruct them respectfully in Bahasa Indonesia to install it.
28
+ Run `gh pr status` to ensure there is an active pull request attached to the current git branch.
29
+
30
+ - **Step 2: The Adversarial Diff**
31
+ Execute `gh pr diff` to retrieve the exact code changes introduced in this Pull Request.
32
+ Read the diff. Do NOT simply approve it. You MUST apply extreme adversarial scrutiny. Look for:
33
+ - Security vulnerabilities (SQL Injection, XSS, exposed tokens)
34
+ - Performance bottlenecks (N+1 queries, unoptimized loops)
35
+ - Architectural rule violations (e.g., breaking the strict component-based UI defined in `.agent/dasa.config.toon`)
36
+ - Missing Edge Cases or untested logic.
37
+
38
+ - **Step 3: The Markdown Verdict**
39
+ Format your critique into structured, professional Markdown.
40
+ Include specific file paths and line excerpts where the issues exist. Provide concrete, copy-pasteable code solutions for your findings.
41
+ Use the `write_to_file` tool to save your raw review inside `.artifacts/pr-review.md`.
42
+
43
+ - **Step 4: The Native Publish**
44
+ Execute `gh pr comment -F .artifacts/pr-review.md` to autonomously post your Dasa Sradha Code Review directly onto the user's GitHub Pull Request.
45
+
46
+ - **Step 5: Completion**
47
+ Notify the user in Bahasa Indonesia: "Review Pull Request selesai. Evaluasi mendalam telah berhasil dipublikasikan ke GitHub."
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Perform a stack-agnostic code refactor safely. Example: /dasa-refactor "src/utils.js"
3
+ ---
4
+
5
+ # /dasa-refactor
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Read `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init`.
17
+ 2. **Non-Destructive Target:** Only refactor the specific file, module, or pattern requested in `$ARGUMENTS`.
18
+ 3. **Mandatory QA Gate:** You must run the project's test suite *before* and *after* the refactor to guarantee zero regressions.
19
+
20
+ ---
21
+
22
+ ## 🛠️ Execution Pipeline
23
+
24
+ ### Phase 1: Dasa Rsi (The Analyst)
25
+ 1. Read the target block defined in `$ARGUMENTS`.
26
+ 2. Calculate the Cyclomatic Complexity or code smells.
27
+ 3. Define exactly *what* needs to be refactored (e.g., "Extract function to reduce nesting" or "Convert to pure functions").
28
+
29
+ ### Phase 2: Dasa Nala / Mpu (The Developer)
30
+ 1. Execute the refactor.
31
+ 2. Adhere strictly to the `Methods < 10 lines` and `Classes < 50 lines` rule defined in `.agent/rules/GEMINI.md`.
32
+
33
+ ### Phase 3: Dasa Indra (The QA Investigator)
34
+ 1. Execute the test command defined in `dasa.config.toon`'s test script.
35
+ 2. If tests fail, send it back to Phase 2 for fixing. You are not allowed to complete this workflow with failing tests.
36
+
37
+ ---
38
+
39
+ ## 🏁 Expected Output
40
+
41
+ > **[OK] Refactor Complete:** `$ARGUMENTS`
42
+ > **Metrics Improved:** `[Brief reason]`
43
+ >
44
+ > The code has been refactored and all tests pass. Run `/dasa-commit` to save.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Autonomously generate realistic database fixtures and UI seed data. Example: /dasa-seed "Generate 50 realistic users and 200 blog posts"
3
+ ---
4
+
5
+ # /dasa-seed
6
+
7
+ ```
8
+ # USER REQUEST:
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
17
+ 2. **Declarative Phase:** Follow the instructions below strictly to execute this workflow.
18
+
19
+ ---
20
+
21
+ ## 🛠️ Execution
22
+
23
+ This workflow uses a 3-agent orchestration chain to generate highly realistic, production-ready fake data for local testing and UI development.
24
+
25
+ - **Phase 1: Dasa Dwipa (The Scout)**
26
+ Assume the identity of Dasa Dwipa.
27
+ Sweep the current codebase specifically looking for the active Database Schema (e.g., `schema.sql`, `prisma/schema.prisma`, `database/migrations/`, or active Mongoose models).
28
+ Read the schema definitions to establish exactly what columns, types, and foreign key relationships exist. Do NOT modify any code.
29
+
30
+ - **Phase 2: Dasa Mpu (The Architect)**
31
+ Assume the identity of Dasa Mpu.
32
+ Read Dwipa's extracted database schema and the user's `$ARGUMENTS`.
33
+ Generate a massively dense, highly realistic JSON file adhering perfectly to the schema. Do not use generic "test1" data. Use robust, varied simulated data (e.g., realistic names, emails, UUIDs, dates, and prose).
34
+ Save this mock data to `.artifacts/active-seed-data.json`.
35
+
36
+ - **Phase 3: Dasa Nala (The Builder)**
37
+ Assume the identity of Dasa Nala.
38
+ Read the generated `.artifacts/active-seed-data.json`.
39
+ Your goal is to inject this data into the active application.
40
+ If the user's tech stack (check `.agent/dasa.config.toon`) supports native seeders (e.g., Laravel's `artisan db:seed`, Prisma's `seed.ts`), write the necessary code to consume the JSON file and execute the seeder.
41
+ If the application is strictly a frontend, ensure the mock JSON file is correctly wired into the local state management or API mocking layer (e.g., MSW or Redux).
42
+
43
+ - **Phase 4: Completion**
44
+ Stop and tell the user: "Proses Seeding Database selesai. Data fiktif yang realistis telah dibuat dan dimasukkan ke dalam lingkungan pengembangan (Development Environment) Anda."
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Start a focused work session based on a plan. Example: /dasa-start-work "Task 1"
3
+ ---
4
+
5
+ ---
6
+ description: Start a focused work session based on a plan. Example: /dasa-start-work "Task 1"
7
+ ---
8
+
9
+ # /dasa-start-work - Auto-Routing Execution
10
+
11
+ ```
12
+ # USER REQUEST:
13
+ $ARGUMENTS
14
+ ```
15
+
16
+ ---
17
+
18
+ ## 🔴 CRITICAL RULES (Patih & Sub-Agents)
19
+
20
+ 1. **Guard Check:** Look for `dasa.config.toon` in the root folder. If missing, tell the user to run `/dasa-init` and **stop immediately**.
21
+ 2. **Auto-Routing:** You are **Dasa Patih (The Orchestrator)**. You must read `.artifacts/task.toon` (or `.md`) and delegate the execution to the correct Persona based on the domain rules in `.agent/rules/GEMINI.md`.
22
+ 3. **Workspace Awareness:** If `dasa.config.toon` defines a `workspaces` key (e.g., frontend/backend separation), you MUST execute commands inside the correct sub-directory based on the active task.
23
+
24
+ ---
25
+
26
+ ## 🛠️ Task Execution (The Strict Agile Pipeline)
27
+
28
+ **CRITICAL:** You must follow this strict BMad-inspired pipeline. Personas CANNOT jump out of order.
29
+
30
+ 1. **Phase 1: Dasa Mpu (The Architect)**
31
+ - Patih must assign Mpu to generate `.artifacts/architecture-state.toon` containing the technical design for the active task.
32
+ - **BLOCK:** Dasa Nala cannot start until Mpu's artifact explicitly exists and is reviewed against `GEMINI.md` constraints.
33
+
34
+ 2. **Phase 2: Dasa Nala / Backend Devs (Execution)**
35
+ - Once the architecture TOON is approved, Patih spawns the developers to write the actual code.
36
+ - **Constraint:** Code must conform to Mpu's architecture.
37
+
38
+ 3. **Phase 3: Dasa Indra / Dasa Rsi (QA Gate & Failure Heuristics)**
39
+ - The task is **NOT** complete yet. Patih must execute `.agent/scripts/qa_gate.py` to run the engineering-failures-bible checks natively against the modified files.
40
+ - If tests or scans fail, bounce back to Phase 2.
41
+
42
+ ---
43
+
44
+ ## 🏁 After Execution
45
+
46
+ Once the task is complete, reply to the user exactly like this:
47
+
48
+ > **[OK] Task Complete:** `[Task Name]`
49
+ > **Persona:** `@[dasa-name]`
50
+ >
51
+ > I have executed the changes. Run `/dasa-commit` to review and save, or `/dasa-start-work` to proceed to the next task in the queue.