apt-mcp-agent-setup 3.0.0 → 3.0.2

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 (53) hide show
  1. package/bin/cli.js +1 -1
  2. package/bundle/NOTICES.md +0 -0
  3. package/bundle/core.enc +0 -0
  4. package/bundle/mcp-rules.enc +0 -0
  5. package/bundle/skills-aso.enc +0 -0
  6. package/bundle/skills-ba.enc +0 -0
  7. package/bundle/skills-base.enc +0 -0
  8. package/bundle/skills-be.enc +0 -0
  9. package/bundle/skills-design.enc +0 -0
  10. package/bundle/skills-fe.enc +0 -0
  11. package/bundle/skills-mobile.enc +0 -0
  12. package/bundle/skills-pm.enc +0 -0
  13. package/integrity-manifest.json +63 -28
  14. package/package.json +1 -1
  15. package/src/core/catalog.js +1 -1
  16. package/src/core/context-metrics.js +1 -0
  17. package/src/core/doctor.js +1 -1
  18. package/src/core/execution.js +1 -1
  19. package/src/core/hook-bridge.js +1 -1
  20. package/src/core/host-adapters.js +1 -1
  21. package/src/core/memory-store.js +1 -1
  22. package/src/core/model-routing.js +1 -0
  23. package/src/core/owned-lock.js +1 -0
  24. package/src/core/session.js +1 -1
  25. package/src/core/skill-names.js +1 -1
  26. package/src/installer/context-legacy-hashes.json +42 -0
  27. package/src/installer/global-setup.js +1 -1
  28. package/src/installer/host-hooks.js +1 -1
  29. package/src/installer/managed-config.js +1 -1
  30. package/src/installer/platform-config.js +1 -1
  31. package/src/installer/prerequisites.js +1 -1
  32. package/src/installer/project-setup.js +1 -1
  33. package/src/installer/runtime-launcher.js +1 -0
  34. package/src/installer/runtime-lock.js +1 -0
  35. package/src/installer/runtime-store.js +1 -0
  36. package/src/installer/setup-wizard.js +1 -1
  37. package/src/license/crypto.js +1 -1
  38. package/src/license/fingerprint.js +1 -1
  39. package/src/license/terms.js +1 -1
  40. package/src/license/verify.js +1 -1
  41. package/src/presets/index.js +1 -1
  42. package/src/proxy/backends.js +1 -1
  43. package/src/proxy/core-tools.js +1 -1
  44. package/src/proxy/pipeline.js +1 -1
  45. package/src/proxy/router.config.js +1 -1
  46. package/src/proxy/router.js +1 -1
  47. package/src/proxy/server.js +1 -1
  48. package/src/templates/AGENTS.md +13 -132
  49. package/src/templates/CLAUDE.md +13 -180
  50. package/src/templates/GEMINI.md +13 -196
  51. package/src/templates/copilot-instructions.md +13 -141
  52. package/src/templates/cursorrules.mdc +18 -166
  53. package/src/templates/windsurfrules.md +13 -141
@@ -1,180 +1,13 @@
1
- ## Agent skills
2
-
3
- ### Support & issues
4
-
5
- For bug reports, feature requests, or licensing questions, contact: `info.alphatechs.ai@gmail.com`
6
-
7
- ### Issue tracker
8
-
9
- Issues are tracked in GitLab Issues. See `docs/agents/issue-tracker.md`.
10
-
11
- ### Triage labels
12
-
13
- Default label vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix). See `docs/agents/triage-labels.md`.
14
-
15
- ### Domain docs
16
-
17
- Single-context layout — one `CONTEXT.md` + `docs/adr/` at the repo root. See `docs/agents/domain.md`.
18
-
19
- ### FE Web design (taste-skill)
20
-
21
- Anti-slop frontend design skill for landing pages, portfolios, and redesigns.
22
-
23
- - `ui-style-rules` — anti-slop design rules, typography, color calibration, layout discipline for code generation.
24
- - `web-mockup-gen` — web design image/mockup generation (image-only, no code).
25
-
26
- ### FE Mobile design
27
-
28
- - `mobile-mockup-gen` — mobile app screen mockup generation (image-only, no code).
29
- - `mobile-rules` — mobile-first design thinking (touch, performance, platform conventions).
30
-
31
- ### Flutter development
32
-
33
- Skills for Flutter architecture, testing, layout, routing, localization, and serialization.
34
-
35
- Skills: `flutter-add-integration-test`, `flutter-add-widget-preview`, `flutter-add-widget-test`, `flutter-apply-architecture-best-practices`, `flutter-build-responsive-layout`, `flutter-fix-layout-issues`, `flutter-implement-json-serialization`, `flutter-setup-declarative-routing`, `flutter-setup-localization`, `flutter-use-http-package`.
36
-
37
- ### MCP tools
38
-
39
- Tool selection rules, index policies, memory conventions, and auto-skill activation. See `docs/agents/mcp-tools.md`.
40
-
41
- **Quick reference:**
42
- - Code search: `code_search` (default), `grep_search` (non-code only)
43
- - Impact: `impact_analysis` (always update index first)
44
- - Memory: `remember` / `recall` / `read_knowledge` (see conventions in mcp-tools.md)
45
-
46
- ## APT session and execution contract
47
-
48
- 1. Call `session_bootstrap` at session start and after context recovery. Read project conventions from `.agents/memory/MEMORY.md`; retrieve only relevant dynamic knowledge. Report unavailable backends once and use available fallbacks.
49
- 2. Call `route_request` for a new request or changed intent, including target package/stack and explicit skills. Load the selected specialist and companion skills with `skill_load`. Do not read the complete trigger catalog into the model context.
50
- 3. Read-only questions, reviews and running existing tests do not require a code-change pipeline. Before executable changes, inspect `pipeline_status` and bind `pipeline_start` or `pipeline_use` with canonical task/run identity and an explicit workspace.
51
- 4. Small changes use scope, fix/check and review. Features use clarification only where needed, a plan with acceptance criteria, implementation, verification, review and acceptance. Bug fixes start with diagnosis and regression coverage. Do not require three questions, a PRD or external issues when the task is already clear.
52
- 5. Use `pipeline_next` to reserve work before dispatch. Delegate useful independent research and reviews to native host subagents, with at most four active actors including the coordinator. Only one writer per workspace. Workers must not start/reset/rebind the parent pipeline.
53
- 6. Record verification with `pipeline_verify` and report results with `pipeline_checkpoint`. Commands remain subject to host permissions and Plan Mode. Include current code and acceptance fingerprints; a free-form summary or skill-load receipt cannot prove completion.
54
- 7. Review staged, unstaged and relevant untracked changes. Resolve in-scope findings, rerun affected checks and invalidate stale evidence. Review-only requests produce findings, not unsolicited edits or MR comments.
55
- 8. Stop after ten repair/check attempts per work item or three repeated outcomes without progress. Preserve budgets and blocked/paused states across resume. User interruption always wins over continuation hooks.
56
- 9. Native tool enforcement and automatic continuation depend on observed host capability. If unavailable, use sequential execution and state that limitation. Never claim independent review without an independent reviewer.
57
- 10. Keep prose short and clear, reuse existing code, and load only current-step references. Strong caveman style is opt-in. Publishing, merging and external communication require authorization for those actions.
58
-
59
- `pipeline_reset(task, runId, confirm=true)` cancels a run while preserving history. Legacy runs retain their legacy definitions. Content-only documentation does not require PRD, issue or TDD steps; AGENTS.md, SKILL.md, trigger maps and runtime configuration are operational contracts.
60
-
61
- Read `docs/agents/mcp-tools.md` for interfaces. Run `npx apt-mcp-agent-setup doctor` to inspect configuration. A registered MCP server or installed hook is not proof of successful activation. Health must show successful initialization and functional probes, not only a running process.
62
-
63
-
64
- ## Auto-Trigger Skills (MANDATORY)
65
-
66
- ### Workflow Skills — auto-trigger based on request type:
67
-
68
- | Skill | Trigger Conditions | Agent Action |
69
- |---|---|---|
70
- | `spec-clarification` | Design decision, architecture choice, plan review, "should we X or Y?" | Load SKILL.md → Start alignment session |
71
- | `bug-diagnostics` | Bug report, error log, "fails", "crashes", "/debug" | Load SKILL.md → Reproduce → minimise → hypothesise → fix |
72
- | `task-breakdown` | Plan/PRD just completed, "break down", "create tickets" | Load SKILL.md → Convert plan to vertical-slice issues |
73
- | `prd-gen` | New feature/product description with enough context for spec | Load SKILL.md → Extract PRD from conversation context |
74
- | `prototype` | "mockup", "explore options", unclear UI/logic | Load SKILL.md → Pick branch (logic vs UI) → Build throwaway prototype |
75
- | `tdd-loop` | Feature implementation, bug fix, "write tests", "red-green" | Load SKILL.md → Apply RED-GREEN-REFACTOR loop |
76
-
77
- ### UI/UX Design Skills — auto-trigger when touching UI/design:
78
-
79
- | Skill | Trigger Conditions | Agent Action |
80
- |---|---|---|
81
- | `ui-style-rules` | Any web UI task: page layout, component styling, redesign | Load SKILL.md → Apply anti-slop design rules |
82
- | `web-mockup-gen` | "mockup web", "design page", web UI concept needed before coding | Load SKILL.md → Generate web design reference images (no code) |
83
- | `mobile-mockup-gen` | "mockup app", "design screen", mobile UI concept needed before coding | Load SKILL.md → Generate mobile screen mockups in phone frames |
84
- | `mobile-rules` | Any mobile UI implementation: Flutter widget, screen, touch interaction | Load SKILL.md → Apply platform conventions, touch patterns |
85
- | `stitch-design-flow` | "stitch", "tạo trên stitch", "/stitch-flow", design UI (khi stitch preset active) | Load SKILL.md → Collaborative 8-step Stitch design flow |
86
- | `figma-handoff` | Figma URL detected (`figma.com/...`), "figma", "/figma", "code theo Figma" (khi figma preset active) | Load SKILL.md → Extract design → generate code |
87
- | `design-to-code` | "code theo design", "pull code", "/design-to-code", design-to-code conversion | Load SKILL.md → Auto-detect input → route to correct design tool |
88
- | `flutter-fix-layout-issues` | "overflow", "unbounded height", `RenderFlex`, layout constraint error | Load SKILL.md → Fix overflow/constraint issues |
89
- | `flutter-build-responsive-layout` | "responsive", "tablet", "media query", adaptive layout | Load SKILL.md → Build adaptive layout |
90
- | `flutter-setup-declarative-routing` | "routing", "deep link", "go_router", URL navigation | Load SKILL.md → Configure declarative routing |
91
- | `flutter-add-widget-test` | "widget test", "test component", "verify UI rendering" | Load SKILL.md → Write widget test |
92
- | `flutter-add-integration-test` | "integration test", "e2e", "app test", "Flutter Driver" | Load SKILL.md → Add integration test |
93
- | `flutter-implement-json-serialization` | "fromJson", "toJson", "model class", "API response mapping" | Load SKILL.md → Create JSON serialization |
94
- | `flutter-setup-localization` | "localization", "i18n", "intl", "translation", ".arb" | Load SKILL.md → Setup l10n |
95
- | `flutter-apply-architecture-best-practices` | "architecture", "clean arch", "layer", project structure | Load SKILL.md → Apply layered architecture |
96
- | `flutter-add-widget-preview` | "preview", "widget catalog", "golden test" | Load SKILL.md → Add widget preview |
97
- | `flutter-use-http-package` | "http request", "REST API", "fetch data", "GET/POST" | Load SKILL.md → Use http package |
98
-
99
- ### Productivity & Utility Skills — auto-trigger based on task context:
100
-
101
- | Skill | Trigger Conditions | Agent Action |
102
- |---|---|---|
103
- | `stress-test-plan` | "grill me", "challenge my plan", stress testing proposed plan | Load SKILL.md → Start interactive plan stress-testing session |
104
- | `skill-generator` | "write skill", "create skill", building a new custom agent skill | Load SKILL.md → Generate new skill stub/directory |
105
- | `git-safety-guardrails` | "git guardrails", "block dangerous git", protect git hooks | Load SKILL.md → Deploy Claude Code hooks to block push/hard-reset |
106
- | `git-hook-setup` | "setup pre-commit", "configure husky", install pre-commit hooks | Load SKILL.md → Install Husky, lint-staged, Prettier hooks |
107
- | `test-type-migration` | "migrate as in tests", "replace as assertions", shoehorn refactoring | Load SKILL.md → Refactor tests to remove unsafe type assertions |
108
- | `exercise-scaffold` | "scaffold exercises", "exercise stubs", coding course setup | Load SKILL.md → Create problems, solutions, and tests stubs |
109
- | `interactive-teaching` | "teach me", "tutorial", "learn Y", stateful workspace learning | Load SKILL.md → Create mission, lessons, and learning records |
110
- | `writing-flow` | "writing beats", "narrative journey", write article step-by-step | Load SKILL.md → Guide user through choice of narrative beats |
111
- | `raw-idea-collector` | "collect ideas", "writing fragments", ideate outline | Load SKILL.md → Collect heterogeneous claims, vignettes, and thoughts |
112
- | `draft-shaper` | "shape draft", "edit notes", clean draft to publishable quality | Load SKILL.md → Iterate paragraph by paragraph to edit draft |
113
- | `humanizer` | "humanize", "remove AI writing", "anti-slop", "viết tự nhiên hơn" | Load SKILL.md → Scrub 33 AI-writing patterns, rewrite to human voice |
114
-
115
- ### BA/QC Skills — auto-trigger for requirements analysis and testing:
116
-
117
- | Skill | Trigger Conditions | Agent Action |
118
- |---|---|---|
119
- | `ba-urd-decomposer` | "URD", "phân rã URD", "danh sách tính năng", "feature list", .pdf file (BA context) | Load SKILL.md → Parse URD → output structured feature list |
120
- | `ba-clarification-session` | "làm rõ yêu cầu", "clarify", "hỏi PO", "session làm rõ", "clarification" | Load SKILL.md → Generate Q&A questions for PO session |
121
- | `ba-specs-writer` | "viết specs", "đặc tả", "chi tiết tính năng", "tạo specs", "PTTK" | Load SKILL.md → Generate detailed Specs document |
122
- | `ba-feature-tracker` | "tiến độ BA", "feature tracker", "trạng thái tính năng", "BA progress" | Load SKILL.md → Show BA progress dashboard |
123
- | `ba-template-parser` | "mẫu BA", "import template", "learn template", .docx file (BA context) | Load SKILL.md → Learn customer template structure |
124
- | `ba-requirements-generator` | "BRD", "user story", "viết yêu cầu", "sinh BRD", "tạo BRD" | Load SKILL.md → Generate BRD/User Story document |
125
- | `pdf-specs-parser` | "parse PDF specs", "đọc PTTK", .pdf file (specs context) | Load SKILL.md → Extract API/UI field definitions |
126
- | `qc-template-parser` | "mẫu QC", "import QC template", "mẫu testcase", .xlsx file (QC context) | Load SKILL.md → Learn Excel testcase template |
127
- | `qc-bidv-workflow` | "tạo testcase BIDV", "QC workflow", "sinh test case từ specs" | Load SKILL.md → Run BIDV QC pipeline end-to-end |
128
- | `testcase-generator` | "sinh test case", "generate TCs", "tạo testcase", "xuất Excel testcase" | Load SKILL.md → Generate Excel testcase from JSON |
129
- | `mindmap-reader` | "mindmap", "xmind", "đọc mindmap", .xmind/.mm file | Load SKILL.md → Parse mindmap → Normalized Test Scenario JSON |
130
- | `specs-to-mindmap` | "specs sang mindmap", "tạo outline từ specs", "test hierarchy" | Load SKILL.md → Convert Specs → Markdown outline |
131
- | `requirement-coverage` | "bao phủ yêu cầu", "traceability", "coverage report" | Load SKILL.md → Cross-reference user stories vs test cases |
132
- | `webapp-testing` | "E2E test", "Playwright", "test trình duyệt", "test tự động web" | Load SKILL.md → E2E/Playwright deep audit |
133
-
134
- **Failure Conditions:**
135
- - ❌ Writing UI code without loading design skill = **SLOP RISK**
136
- - ❌ Creating mobile screen without `mobile-rules` = **PLATFORM VIOLATION**
137
-
138
- ### ⚠️ DOMAIN SKILL LOADING (CRITICAL — DO NOT SKIP)
139
-
140
- Before writing ANY UI, design, or visual code:
141
- 1. **Web UI** → READ `.agents/skills/ui-style-rules/SKILL.md` — MANDATORY
142
- 2. **Mobile UI** → READ `.agents/skills/mobile-rules/SKILL.md` — MANDATORY
143
- 3. **Image/asset gen (web)** → READ `.agents/skills/web-mockup-gen/SKILL.md`
144
- 4. **Image/asset gen (mobile)** → READ `.agents/skills/mobile-mockup-gen/SKILL.md`
145
- 5. **Architecture decision** → READ `.agents/skills/stress-test-plan/SKILL.md`
146
-
147
- **Violation = SLOP output. Writing UI code without design skill = P0 violation.**
148
-
149
- ---
150
-
151
- ## Clarification
152
-
153
- Ask only questions that resolve material uncertainty. Reuse established answers.
154
-
155
- ## Universal Rules
156
-
157
- ### Clean Code (Global Mandatory)
158
- - **Code**: Concise, direct, no over-engineering. Self-documenting.
159
- - **Laziness Ladder**: Before writing code, stop at the first rung that holds: YAGNI → Reuse existing → Stdlib → Native platform → Installed dep → One-liner → Minimum viable. The ladder runs AFTER understanding the problem.
160
- - **Bug Fix**: Root cause, not symptom. Grep every caller, fix the shared function once.
161
- - **No Bloat**: No unrequested abstractions, no scaffolding "for later", deletion > addition, fewest files.
162
- - **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
163
- - **Performance**: Measure first. Adhere to current Core Web Vitals standards.
164
-
165
- ### Anti-Slop Writing (Global Mandatory)
166
-
167
- When generating **any prose content** (.md, .docx, PRDs, specs, articles, BA docs, commit messages, PR descriptions), automatically avoid AI-writing patterns:
168
- - **Ban list**: delve, tapestry, landscape (abstract), vibrant, crucial, foster, underscore, showcase, pivotal, testament, interplay, intricacies, garner, enhance, enduring
169
- - **No copula avoidance**: use "is/are/has" not "serves as/stands as/boasts/features"
170
- - **No em dashes**: replace with periods, commas, colons, or parentheses
171
- - **No signposting**: no "Let's dive in", "Here's what you need to know"
172
- - **No filler**: "In order to" → "To", "Due to the fact that" → "Because"
173
- - **No sycophancy**: no "Great question!", "Absolutely!", "I hope this helps!"
174
- - **Prefer**: plain verbs, specific details, varied sentence length, active voice
175
-
176
- Full 33-pattern reference: `.agents/skills/humanizer/references/patterns.md`
177
-
178
- ### Quick Reference
179
- - **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
180
- - **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `stitch-design-flow`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `humanizer`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
1
+ # APT workspace contract
2
+
3
+ At session start and after context recovery, call `session_bootstrap` for this workspace and read `docs/agents/apt-runtime.md` once per context. Read project conventions in `.agents/memory/MEMORY.md`; retrieve only relevant dynamic memory. Report unavailable backends once and use available fallbacks.
4
+
5
+ For new or changed intent, call `route_request` with the target, stack and explicit skills. Use `skill_load` for selected skills and current-step references. Do not load the full trigger catalog or repeat rules on every tool call.
6
+
7
+ Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
+
9
+ Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
+
11
+ Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
+
13
+ Tool interfaces: `docs/agents/mcp-tools.md`. Project/domain and issue conventions: `docs/agents/domain.md` and `docs/agents/issue-tracker.md`. Support: info.alphatechs.ai@gmail.com.
@@ -1,196 +1,13 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # GEMINI.md - AG Kit
6
-
7
- > This file defines how the AI behaves in this workspace.
8
-
9
- ---
10
-
11
- ## Agent skills
12
-
13
- ### Support & issues
14
-
15
- For bug reports, feature requests, or licensing questions, contact: `info.alphatechs.ai@gmail.com`
16
-
17
- ### Issue tracker
18
-
19
- Issues are tracked in GitLab Issues. See `docs/agents/issue-tracker.md`.
20
-
21
- ### Triage labels
22
-
23
- Default label vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix). See `docs/agents/triage-labels.md`.
24
-
25
- ### Domain docs
26
-
27
- Single-context layout — one `CONTEXT.md` + `docs/adr/` at the repo root. See `docs/agents/domain.md`.
28
-
29
- ---
30
-
31
- ## APT session and execution contract
32
-
33
- 1. Call `session_bootstrap` at session start and after context recovery. Read project conventions from `.agents/memory/MEMORY.md`; retrieve only relevant dynamic knowledge. Report unavailable backends once and use available fallbacks.
34
- 2. Call `route_request` for a new request or changed intent, including target package/stack and explicit skills. Load the selected specialist and companion skills with `skill_load`. Do not read the complete trigger catalog into the model context.
35
- 3. Read-only questions, reviews and running existing tests do not require a code-change pipeline. Before executable changes, inspect `pipeline_status` and bind `pipeline_start` or `pipeline_use` with canonical task/run identity and an explicit workspace.
36
- 4. Small changes use scope, fix/check and review. Features use clarification only where needed, a plan with acceptance criteria, implementation, verification, review and acceptance. Bug fixes start with diagnosis and regression coverage. Do not require three questions, a PRD or external issues when the task is already clear.
37
- 5. Use `pipeline_next` to reserve work before dispatch. Delegate useful independent research and reviews to native host subagents, with at most four active actors including the coordinator. Only one writer per workspace. Workers must not start/reset/rebind the parent pipeline.
38
- 6. Record verification with `pipeline_verify` and report results with `pipeline_checkpoint`. Commands remain subject to host permissions and Plan Mode. Include current code and acceptance fingerprints; a free-form summary or skill-load receipt cannot prove completion.
39
- 7. Review staged, unstaged and relevant untracked changes. Resolve in-scope findings, rerun affected checks and invalidate stale evidence. Review-only requests produce findings, not unsolicited edits or MR comments.
40
- 8. Stop after ten repair/check attempts per work item or three repeated outcomes without progress. Preserve budgets and blocked/paused states across resume. User interruption always wins over continuation hooks.
41
- 9. Native tool enforcement and automatic continuation depend on observed host capability. If unavailable, use sequential execution and state that limitation. Never claim independent review without an independent reviewer.
42
- 10. Keep prose short and clear, reuse existing code, and load only current-step references. Strong caveman style is opt-in. Publishing, merging and external communication require authorization for those actions.
43
-
44
- `pipeline_reset(task, runId, confirm=true)` cancels a run while preserving history. Legacy runs retain their legacy definitions. Content-only documentation does not require PRD, issue or TDD steps; AGENTS.md, SKILL.md, trigger maps and runtime configuration are operational contracts.
45
-
46
- Read `docs/agents/mcp-tools.md` for interfaces. Run `npx apt-mcp-agent-setup doctor` to inspect configuration. A registered MCP server or installed hook is not proof of successful activation. Health must show successful initialization and functional probes, not only a running process.
47
-
48
-
49
- ## 🤖 INTELLIGENT AGENT ROUTING
50
-
51
- ### Agent Routing Checklist
52
- | Step | Check | If Unchecked |
53
- |------|-------|--------------|
54
- | 1 | Did I identify the correct agent for this domain? | → STOP. Analyze request domain first. |
55
- | 2 | Did I READ the agent's `.md` file (or recall its rules)? | → STOP. Open `.agents/agent/{agent}.md` |
56
- | 3 | Did I announce `🤖 Applying knowledge of @[agent]...`? | → STOP. Add announcement before response. |
57
- | 4 | Did I load required skills from agent's frontmatter? | → STOP. Check `skills:` field and read them. |
58
- | 5 | Did I check MCP tool selection rules? | → STOP. Read `docs/agents/mcp-tools.md` |
59
- | 6 | Is this a UI task? Did I load design skill? | → STOP. Load appropriate design skill first |
60
-
61
- ---
62
-
63
- ## 🎯 AUTO-TRIGGER SKILLS (MANDATORY)
64
-
65
- Workflow Skills — tự trigger theo request type:
66
-
67
- | Skill | Trigger Conditions | Agent Action |
68
- |---|---|---|
69
- | `spec-clarification` | Design decision, architecture choice, plan review, "should we X or Y?", "/plan" | Load SKILL.md → Start alignment session |
70
- | `bug-diagnostics` | Bug report, error log, "bị lỗi", "không hoạt động", "fails", "crashes", "/debug" | Load SKILL.md → Reproduce → minimise → hypothesise → fix |
71
- | `task-breakdown` | Plan/PRD just completed, "break down", "tách task", "create tickets", "/task-breakdown" | Load SKILL.md → Convert plan to vertical-slice issues |
72
- | `prd-gen` | New feature/product description with enough context for spec, "/prd-gen" | Load SKILL.md → Extract PRD from conversation context |
73
- | `prototype` | "thử xem", "mockup", "explore options", unclear UI/logic, "/prototype" | Load SKILL.md → Pick branch (logic vs UI) → Build throwaway prototype |
74
- | `tdd-loop` | Feature implementation, bug fix, "write tests", "red-green", "/tdd" | Load SKILL.md → Apply RED-GREEN-REFACTOR loop |
75
-
76
- UI/UX Design Skills — tự trigger khi touch UI/design:
77
-
78
- | Skill | Trigger Conditions | Agent Action |
79
- |---|---|---|
80
- | `ui-style-rules` | Any web UI task: page layout, component styling, redesign, landing page | Load SKILL.md → Apply anti-slop design rules |
81
- | `web-mockup-gen` | "mockup web", "design page", web UI concept needed before coding | Load SKILL.md → Generate web design reference images (no code) |
82
- | `mobile-mockup-gen` | "mockup app", "design screen", mobile UI concept needed before coding | Load SKILL.md → Generate mobile screen mockups in phone frames |
83
- | `mobile-rules` | Any mobile UI implementation: Flutter widget, screen, touch interaction | Load SKILL.md → Apply platform conventions, touch patterns, performance |
84
- | `stitch-design-flow` | "stitch", "tạo trên stitch", "/stitch-flow", design UI (khi stitch preset active) | Load SKILL.md → Collaborative 8-step Stitch design flow |
85
- | `figma-handoff` | Figma URL detected (`figma.com/...`), "figma", "/figma", "code theo Figma" (khi figma preset active) | Load SKILL.md → Extract design → generate code |
86
- | `design-to-code` | "code theo design", "pull code", "/design-to-code", design-to-code conversion | Load SKILL.md → Auto-detect input → route to correct design tool |
87
- | `flutter-fix-layout-issues` | "overflow", "unbounded height", `RenderFlex`, layout error | Load SKILL.md → Fix overflow/constraint issues |
88
- | `flutter-build-responsive-layout` | "responsive", "tablet", "media query", adaptive layout | Load SKILL.md → Build adaptive layout |
89
- | `flutter-setup-declarative-routing` | "routing", "deep link", "go_router", URL navigation | Load SKILL.md → Configure declarative routing |
90
- | `flutter-add-widget-test` | "widget test", "test component", "verify UI rendering" | Load SKILL.md → Write widget test |
91
- | `flutter-add-integration-test` | "integration test", "e2e", "Flutter Driver" | Load SKILL.md → Add integration test |
92
- | `flutter-implement-json-serialization` | "fromJson", "toJson", "model class", API mapping | Load SKILL.md → Create JSON serialization |
93
- | `flutter-setup-localization` | "localization", "i18n", "intl", ".arb" | Load SKILL.md → Setup l10n |
94
- | `flutter-apply-architecture-best-practices` | "architecture", "layer", project structure | Load SKILL.md → Apply layered architecture |
95
- | `flutter-add-widget-preview` | "preview", "widget catalog", "golden test" | Load SKILL.md → Add widget preview |
96
- | `flutter-use-http-package` | "http request", "REST API", "fetch data" | Load SKILL.md → Use http package |
97
-
98
- Productivity & Utility Skills — tự trigger theo task context:
99
-
100
- | Skill | Trigger Conditions | Agent Action |
101
- |---|---|---|
102
- | `stress-test-plan` | "grill me", "challenge my plan", stress testing proposed plan | Load SKILL.md → Start interactive plan stress-testing session |
103
- | `skill-generator` | "write skill", "create skill", building a new custom agent skill | Load SKILL.md → Generate new skill stub/directory |
104
- | `git-safety-guardrails` | "git guardrails", "block dangerous git", protect git hooks | Load SKILL.md → Deploy Claude Code hooks to block push/hard-reset |
105
- | `git-hook-setup` | "setup pre-commit", "configure husky", install pre-commit hooks | Load SKILL.md → Install Husky, lint-staged, Prettier hooks |
106
- | `test-type-migration` | "migrate as in tests", "replace as assertions", shoehorn refactoring | Load SKILL.md → Refactor tests to remove unsafe type assertions |
107
- | `exercise-scaffold` | "scaffold exercises", "exercise stubs", coding course setup | Load SKILL.md → Create problems, solutions, and tests stubs |
108
- | `interactive-teaching` | "teach me", "tutorial", "learn Y", stateful workspace learning | Load SKILL.md → Create mission, lessons, and learning records |
109
- | `writing-flow` | "writing beats", "narrative journey", write article step-by-step | Load SKILL.md → Guide user through choice of narrative beats |
110
- | `raw-idea-collector` | "collect ideas", "writing fragments", ideate outline | Load SKILL.md → Collect heterogeneous claims, vignettes, and thoughts |
111
- | `draft-shaper` | "shape draft", "edit notes", clean draft to publishable quality | Load SKILL.md → Iterate paragraph by paragraph to edit draft |
112
- | `humanizer` | "humanize", "remove AI writing", "anti-slop", "viết tự nhiên hơn" | Load SKILL.md → Scrub 33 AI-writing patterns, rewrite to human voice |
113
-
114
- BA/QC Skills — tự trigger cho phân tích yêu cầu và testing:
115
-
116
- | Skill | Trigger Conditions | Agent Action |
117
- |---|---|---|
118
- | `ba-urd-decomposer` | "URD", "phân rã URD", "danh sách tính năng", "feature list", .pdf file (BA context) | Load SKILL.md → Parse URD → output structured feature list |
119
- | `ba-clarification-session` | "làm rõ yêu cầu", "clarify", "hỏi PO", "session làm rõ", "clarification" | Load SKILL.md → Generate Q&A questions for PO session |
120
- | `ba-specs-writer` | "viết specs", "đặc tả", "chi tiết tính năng", "tạo specs", "PTTK" | Load SKILL.md → Generate detailed Specs document |
121
- | `ba-feature-tracker` | "tiến độ BA", "feature tracker", "trạng thái tính năng", "BA progress" | Load SKILL.md → Show BA progress dashboard |
122
- | `ba-template-parser` | "mẫu BA", "import template", "learn template", .docx file (BA context) | Load SKILL.md → Learn customer template structure |
123
- | `ba-requirements-generator` | "BRD", "user story", "viết yêu cầu", "sinh BRD", "tạo BRD" | Load SKILL.md → Generate BRD/User Story document |
124
- | `pdf-specs-parser` | "parse PDF specs", "đọc PTTK", .pdf file (specs context) | Load SKILL.md → Extract API/UI field definitions |
125
- | `qc-template-parser` | "mẫu QC", "import QC template", "mẫu testcase", .xlsx file (QC context) | Load SKILL.md → Learn Excel testcase template |
126
- | `qc-bidv-workflow` | "tạo testcase BIDV", "QC workflow", "sinh test case từ specs" | Load SKILL.md → Run BIDV QC pipeline end-to-end |
127
- | `testcase-generator` | "sinh test case", "generate TCs", "tạo testcase", "xuất Excel testcase" | Load SKILL.md → Generate Excel testcase from JSON |
128
- | `mindmap-reader` | "mindmap", "xmind", "đọc mindmap", .xmind/.mm file | Load SKILL.md → Parse mindmap → Normalized Test Scenario JSON |
129
- | `specs-to-mindmap` | "specs sang mindmap", "tạo outline từ specs", "test hierarchy" | Load SKILL.md → Convert Specs → Markdown outline |
130
- | `requirement-coverage` | "bao phủ yêu cầu", "traceability", "coverage report" | Load SKILL.md → Cross-reference user stories vs test cases |
131
- | `webapp-testing` | "E2E test", "Playwright", "test trình duyệt", "test tự động web" | Load SKILL.md → E2E/Playwright deep audit |
132
-
133
- ### UI/UX Auto-Detection Rules
134
- - **mobile-flutter preset**: Load `mobile-rules` + `ui-style-rules` (adapted) + `mobile-mockup-gen` + matching flutter skill from table above
135
- - **fe-react / fe-angular / fe-vue presets**: Load `ui-style-rules` + `web-mockup-gen`
136
- - **aso preset**: Load `aso-router` + matching `aso-*` skills
137
- - **system preset**: All of the above based on file context
138
-
139
- **Failure Condition:**
140
- - ❌ Writing UI code without loading design skill = **SLOP RISK**
141
- - ❌ Creating mobile screen without `mobile-rules` = **PLATFORM VIOLATION**
142
- - ❌ Designing web page without `ui-style-rules` = **GENERIC OUTPUT**
143
-
144
- ### ⚠️ DOMAIN SKILL LOADING (CRITICAL — DO NOT SKIP)
145
-
146
- Before writing ANY UI, design, or visual code:
147
- 1. **Web UI** → READ `.agents/skills/ui-style-rules/SKILL.md` — MANDATORY
148
- 2. **Mobile UI** → READ `.agents/skills/mobile-rules/SKILL.md` — MANDATORY
149
- 3. **Image/asset gen (web)** → READ `.agents/skills/web-mockup-gen/SKILL.md`
150
- 4. **Image/asset gen (mobile)** → READ `.agents/skills/mobile-mockup-gen/SKILL.md`
151
- 5. **Architecture decision** → READ `.agents/skills/stress-test-plan/SKILL.md`
152
-
153
- **Violation = SLOP output. Writing UI code without design skill = P0 violation.**
154
-
155
- ---
156
-
157
- ## Clarification
158
-
159
- Ask only questions that resolve material uncertainty. Reuse established answers.
160
-
161
- ## TIER 0: UNIVERSAL RULES
162
-
163
- ### 🧹 Clean Code (Global Mandatory)
164
- - **Code**: Concise, direct, no over-engineering. Self-documenting.
165
- - **Laziness Ladder**: Before writing code, stop at the first rung that holds: YAGNI → Reuse existing → Stdlib → Native platform → Installed dep → One-liner → Minimum viable. The ladder runs AFTER understanding the problem.
166
- - **Bug Fix**: Root cause, not symptom. Grep every caller, fix the shared function once.
167
- - **No Bloat**: No unrequested abstractions, no scaffolding "for later", deletion > addition, fewest files.
168
- - **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
169
- - **Performance**: Measure first. Adhere to current Core Web Vitals standards.
170
-
171
- ### ✍️ Anti-Slop Writing (Global Mandatory)
172
-
173
- When generating **any prose content** (.md, .docx, PRDs, specs, articles, BA docs, commit messages, PR descriptions), automatically apply these rules. No user invocation needed.
174
-
175
- **Always avoid:**
176
- - **AI vocabulary**: delve, tapestry, landscape (abstract), vibrant, crucial, foster, underscore, showcase, pivotal, testament, interplay, intricacies, garner, enhance, enduring
177
- - **Significance inflation**: "marking a pivotal moment", "serves as a testament", "setting the stage for"
178
- - **Copula avoidance**: use "is/are/has" not "serves as/stands as/boasts/features"
179
- - **Em dashes**: replace with periods, commas, colons, or parentheses
180
- - **Rule of three**: don't force ideas into groups of three
181
- - **Sycophantic tone**: no "Great question!", "Absolutely!", "I hope this helps!"
182
- - **Signposting**: no "Let's dive in", "Here's what you need to know", "Without further ado"
183
- - **Filler phrases**: "In order to" → "To", "Due to the fact that" → "Because", "It is important to note that" → cut
184
- - **Promotional language**: no "groundbreaking", "nestled", "breathtaking", "stunning"
185
- - **Boldface overuse**: don't mechanically bold every key term
186
- - **Generic positive conclusions**: end on the last concrete fact, not a send-off
187
-
188
- **Always prefer:** plain verbs, specific details over vague claims, varied sentence length, active voice when clearer.
189
-
190
- **Scope:** Applies to all prose output. Does NOT apply to code, data, or quoted text. For dedicated rewriting of existing text, use the full `/humanizer` skill with its 33-pattern audit.
191
-
192
- > Full pattern reference: `.agents/skills/humanizer/references/patterns.md`
193
-
194
- ### 🗺️ Quick Reference
195
- - **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `aso-specialist`, `debugger`
196
- - **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `stitch-design-flow`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `aso-router`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `humanizer`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
1
+ # APT workspace contract
2
+
3
+ At session start and after context recovery, call `session_bootstrap` for this workspace and read `docs/agents/apt-runtime.md` once per context. Read project conventions in `.agents/memory/MEMORY.md`; retrieve only relevant dynamic memory. Report unavailable backends once and use available fallbacks.
4
+
5
+ For new or changed intent, call `route_request` with the target, stack and explicit skills. Use `skill_load` for selected skills and current-step references. Do not load the full trigger catalog or repeat rules on every tool call.
6
+
7
+ Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
+
9
+ Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
+
11
+ Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
+
13
+ Tool interfaces: `docs/agents/mcp-tools.md`. Project/domain and issue conventions: `docs/agents/domain.md` and `docs/agents/issue-tracker.md`. Support: info.alphatechs.ai@gmail.com.
@@ -1,141 +1,13 @@
1
- # AG Kit — Copilot Custom Instructions
2
-
3
- > This file defines how GitHub Copilot behaves in this workspace.
4
-
5
- ## Agent skills
6
-
7
- ### Support & issues
8
-
9
- For bug reports, feature requests, or licensing questions, contact: `info.alphatechs.ai@gmail.com`
10
-
11
- ### Issue tracker
12
-
13
- Issues are tracked in GitLab Issues. See `docs/agents/issue-tracker.md`.
14
-
15
- ### Triage labels
16
-
17
- Default label vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix). See `docs/agents/triage-labels.md`.
18
-
19
- ### Domain docs
20
-
21
- Single-context layout — one `CONTEXT.md` + `docs/adr/` at the repo root. See `docs/agents/domain.md`.
22
-
23
- ---
24
-
25
- ## APT session and execution contract
26
-
27
- 1. Call `session_bootstrap` at session start and after context recovery. Read project conventions from `.agents/memory/MEMORY.md`; retrieve only relevant dynamic knowledge. Report unavailable backends once and use available fallbacks.
28
- 2. Call `route_request` for a new request or changed intent, including target package/stack and explicit skills. Load the selected specialist and companion skills with `skill_load`. Do not read the complete trigger catalog into the model context.
29
- 3. Read-only questions, reviews and running existing tests do not require a code-change pipeline. Before executable changes, inspect `pipeline_status` and bind `pipeline_start` or `pipeline_use` with canonical task/run identity and an explicit workspace.
30
- 4. Small changes use scope, fix/check and review. Features use clarification only where needed, a plan with acceptance criteria, implementation, verification, review and acceptance. Bug fixes start with diagnosis and regression coverage. Do not require three questions, a PRD or external issues when the task is already clear.
31
- 5. Use `pipeline_next` to reserve work before dispatch. Delegate useful independent research and reviews to native host subagents, with at most four active actors including the coordinator. Only one writer per workspace. Workers must not start/reset/rebind the parent pipeline.
32
- 6. Record verification with `pipeline_verify` and report results with `pipeline_checkpoint`. Commands remain subject to host permissions and Plan Mode. Include current code and acceptance fingerprints; a free-form summary or skill-load receipt cannot prove completion.
33
- 7. Review staged, unstaged and relevant untracked changes. Resolve in-scope findings, rerun affected checks and invalidate stale evidence. Review-only requests produce findings, not unsolicited edits or MR comments.
34
- 8. Stop after ten repair/check attempts per work item or three repeated outcomes without progress. Preserve budgets and blocked/paused states across resume. User interruption always wins over continuation hooks.
35
- 9. Native tool enforcement and automatic continuation depend on observed host capability. If unavailable, use sequential execution and state that limitation. Never claim independent review without an independent reviewer.
36
- 10. Keep prose short and clear, reuse existing code, and load only current-step references. Strong caveman style is opt-in. Publishing, merging and external communication require authorization for those actions.
37
-
38
- `pipeline_reset(task, runId, confirm=true)` cancels a run while preserving history. Legacy runs retain their legacy definitions. Content-only documentation does not require PRD, issue or TDD steps; AGENTS.md, SKILL.md, trigger maps and runtime configuration are operational contracts.
39
-
40
- Read `docs/agents/mcp-tools.md` for interfaces. Run `npx apt-mcp-agent-setup doctor` to inspect configuration. A registered MCP server or installed hook is not proof of successful activation. Health must show successful initialization and functional probes, not only a running process.
41
-
42
-
43
- ## MCP Tool Selection
44
-
45
- | Situation | Use Tool | NOT | Why |
46
- |---|---|---|---|
47
- | Find symbol definition, function, class | `code_search` | `grep_search` | Semantic search, understands code structure |
48
- | Find all callers of a function | `find_callers` | `grep_search` | Follows call graph, not just text match |
49
- | Find all functions called by a function | `find_callees` | — | Call graph traversal |
50
- | Explore file structure & dependencies | `explore_code` | `list_dir` | Understands imports, exports, relationships |
51
- | Search in config/docs (YAML, JSON, .env, markdown) | `grep_search` | `code_search` | Non-code files, literal string match |
52
- | "What breaks if I change this?" | `impact_analysis` | — | Blast radius — always update index first |
53
- | Save a decision/bug-fix/convention | `remember` | — | Cross-session persistence |
54
- | Recall what was decided about X | `recall` | — | Search by keyword |
55
- | Load full knowledge graph | `read_knowledge` | — | Session start, get full context |
56
-
57
- **Rule: DEFAULT to `code_search` for code. Fall back to `grep_search` ONLY for non-code files or literal strings.**
58
-
59
- ---
60
-
61
- ## Auto-Trigger Skills (MANDATORY)
62
-
63
- ### Workflow Skills
64
-
65
- | Skill | Trigger Conditions | Agent Action |
66
- |---|---|---|
67
- | `spec-clarification` | Design decision, architecture choice, plan review | Load SKILL.md → Start alignment session |
68
- | `bug-diagnostics` | Bug report, error log, "fails", "crashes" | Load SKILL.md → Reproduce → minimise → hypothesise → fix |
69
- | `task-breakdown` | Plan/PRD completed, "break down", "create tickets" | Load SKILL.md → Convert plan to vertical-slice issues |
70
- | `prd-gen` | New feature/product description with enough context | Load SKILL.md → Extract PRD from conversation context |
71
- | `prototype` | "mockup", "explore options", unclear UI/logic | Load SKILL.md → Build throwaway prototype |
72
- | `tdd-loop` | Feature implementation, bug fix, "write tests" | Load SKILL.md → Apply RED-GREEN-REFACTOR loop |
73
-
74
- ### UI/UX Design Skills
75
-
76
- | Skill | Trigger Conditions | Agent Action |
77
- |---|---|---|
78
- | `ui-style-rules` | Any web UI task: page layout, component styling | Load SKILL.md → Apply anti-slop design rules |
79
- | `web-mockup-gen` | Web UI concept needed before coding | Load SKILL.md → Generate web design reference images |
80
- | `mobile-mockup-gen` | Mobile UI concept needed before coding | Load SKILL.md → Generate mobile screen mockups |
81
- | `mobile-rules` | Any mobile UI implementation: Flutter, touch interaction | Load SKILL.md → Apply platform conventions |
82
- | `stitch-design-flow` | "stitch", "tạo trên stitch", "/stitch-flow", design UI (khi stitch preset active) | Load SKILL.md → Collaborative 8-step Stitch design flow |
83
- | `figma-handoff` | Figma URL detected (`figma.com/...`), "figma", "/figma", "code theo Figma" (khi figma preset active) | Load SKILL.md → Extract design → generate code |
84
- | `design-to-code` | "code theo design", "pull code", "/design-to-code", design-to-code conversion | Load SKILL.md → Auto-detect input → route to correct design tool |
85
- | `flutter-fix-layout-issues` | "overflow", "unbounded height", `RenderFlex`, layout error | Load SKILL.md → Fix overflow/constraint issues |
86
- | `flutter-build-responsive-layout` | "responsive", "tablet", "media query", adaptive layout | Load SKILL.md → Build adaptive layout |
87
- | `flutter-setup-declarative-routing` | "routing", "deep link", "go_router", URL navigation | Load SKILL.md → Configure declarative routing |
88
- | `flutter-add-widget-test` | "widget test", "test component", "verify UI rendering" | Load SKILL.md → Write widget test |
89
- | `flutter-add-integration-test` | "integration test", "e2e", "Flutter Driver" | Load SKILL.md → Add integration test |
90
- | `flutter-implement-json-serialization` | "fromJson", "toJson", "model class", API mapping | Load SKILL.md → Create JSON serialization |
91
- | `flutter-setup-localization` | "localization", "i18n", "intl", ".arb" | Load SKILL.md → Setup l10n |
92
- | `flutter-apply-architecture-best-practices` | "architecture", "layer", project structure | Load SKILL.md → Apply layered architecture |
93
- | `flutter-add-widget-preview` | "preview", "widget catalog", "golden test" | Load SKILL.md → Add widget preview |
94
- | `flutter-use-http-package` | "http request", "REST API", "fetch data" | Load SKILL.md → Use http package |
95
-
96
- ### BA/QC Skills — auto-trigger for requirements and testing:
97
-
98
- | Skill | Trigger Conditions | Agent Action |
99
- |---|---|---|
100
- | `ba-urd-decomposer` | "URD", "phân rã URD", "feature list", .pdf (BA context) | Load SKILL.md → Parse URD → feature list |
101
- | `ba-clarification-session` | "làm rõ yêu cầu", "clarify", "hỏi PO" | Load SKILL.md → Generate Q&A questions |
102
- | `ba-specs-writer` | "viết specs", "đặc tả", "tạo specs", "PTTK" | Load SKILL.md → Generate Specs document |
103
- | `ba-feature-tracker` | "tiến độ BA", "feature tracker", "BA progress" | Load SKILL.md → Show BA dashboard |
104
- | `ba-requirements-generator` | "BRD", "user story", "sinh BRD", "tạo BRD" | Load SKILL.md → Generate BRD/User Story |
105
- | `pdf-specs-parser` | "parse PDF specs", "đọc PTTK", .pdf (specs context) | Load SKILL.md → Extract API/UI definitions |
106
- | `qc-template-parser` | "mẫu QC", "import QC template", .xlsx (QC context) | Load SKILL.md → Learn Excel template |
107
- | `qc-bidv-workflow` | "tạo testcase BIDV", "QC workflow" | Load SKILL.md → Run BIDV QC pipeline |
108
- | `testcase-generator` | "sinh test case", "generate TCs", "tạo testcase" | Load SKILL.md → Generate Excel testcase |
109
- | `mindmap-reader` | "mindmap", "xmind", .xmind/.mm file | Load SKILL.md → Parse mindmap → JSON |
110
- | `specs-to-mindmap` | "specs sang mindmap", "tạo outline từ specs" | Load SKILL.md → Specs → outline |
111
- | `requirement-coverage` | "bao phủ yêu cầu", "traceability", "coverage" | Load SKILL.md → Requirements vs test cases |
112
- | `webapp-testing` | "E2E test", "Playwright", "test trình duyệt" | Load SKILL.md → E2E/Playwright audit |
113
-
114
- ### ⚠️ DOMAIN SKILL LOADING (CRITICAL — DO NOT SKIP)
115
-
116
- Before writing ANY UI, design, or visual code:
117
- 1. **Web UI** → READ `.agents/skills/ui-style-rules/SKILL.md` — MANDATORY
118
- 2. **Mobile UI** → READ `.agents/skills/mobile-rules/SKILL.md` — MANDATORY
119
- 3. **Image/asset gen (web)** → READ `.agents/skills/web-mockup-gen/SKILL.md`
120
- 4. **Image/asset gen (mobile)** → READ `.agents/skills/mobile-mockup-gen/SKILL.md`
121
- 5. **Architecture decision** → READ `.agents/skills/stress-test-plan/SKILL.md`
122
-
123
- **Violation = SLOP output. Writing UI code without design skill = P0 violation.**
124
-
125
- ## Clarification
126
-
127
- Ask only questions that resolve material uncertainty. Reuse established answers.
128
-
129
- ## Universal Rules
130
-
131
- ### Clean Code (Global Mandatory)
132
- - **Code**: Concise, direct, no over-engineering. Self-documenting.
133
- - **Laziness Ladder**: Before writing code, stop at the first rung that holds: YAGNI → Reuse existing → Stdlib → Native platform → Installed dep → One-liner → Minimum viable. The ladder runs AFTER understanding the problem.
134
- - **Bug Fix**: Root cause, not symptom. Grep every caller, fix the shared function once.
135
- - **No Bloat**: No unrequested abstractions, no scaffolding "for later", deletion > addition, fewest files.
136
- - **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
137
- - **Performance**: Measure first. Adhere to current Core Web Vitals standards.
138
-
139
- ### Quick Reference
140
- - **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
141
- - **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `stitch-design-flow`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
1
+ # APT workspace contract
2
+
3
+ At session start and after context recovery, call `session_bootstrap` for this workspace and read `docs/agents/apt-runtime.md` once per context. Read project conventions in `.agents/memory/MEMORY.md`; retrieve only relevant dynamic memory. Report unavailable backends once and use available fallbacks.
4
+
5
+ For new or changed intent, call `route_request` with the target, stack and explicit skills. Use `skill_load` for selected skills and current-step references. Do not load the full trigger catalog or repeat rules on every tool call.
6
+
7
+ Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
+
9
+ Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
+
11
+ Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
+
13
+ Tool interfaces: `docs/agents/mcp-tools.md`. Project/domain and issue conventions: `docs/agents/domain.md` and `docs/agents/issue-tracker.md`. Support: info.alphatechs.ai@gmail.com.