apt-mcp-agent-setup 2.0.1 → 3.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.
- package/bin/cli.js +1 -1
- package/bundle/NOTICES.md +0 -0
- package/bundle/core.enc +0 -0
- package/bundle/mcp-rules.enc +0 -0
- package/bundle/skills-aso.enc +0 -0
- package/bundle/skills-ba.enc +0 -0
- package/bundle/skills-base.enc +0 -0
- package/bundle/skills-be.enc +0 -0
- package/bundle/skills-design.enc +0 -0
- package/bundle/skills-fe.enc +0 -0
- package/bundle/skills-mobile.enc +0 -0
- package/bundle/skills-pm.enc +0 -0
- package/integrity-manifest.json +28 -17
- package/package.json +1 -1
- package/src/core/catalog.js +1 -0
- package/src/core/doctor.js +1 -0
- package/src/core/execution.js +1 -0
- package/src/core/hook-bridge.js +1 -0
- package/src/core/host-adapters.js +1 -0
- package/src/core/memory-store.js +1 -0
- package/src/core/session.js +1 -0
- package/src/core/skill-names.js +1 -0
- package/src/installer/global-setup.js +1 -1
- package/src/installer/host-hooks.js +1 -0
- package/src/installer/managed-config.js +1 -0
- package/src/installer/platform-config.js +1 -1
- package/src/installer/prerequisites.js +1 -1
- package/src/installer/project-setup.js +1 -1
- package/src/installer/setup-wizard.js +1 -1
- package/src/license/crypto.js +1 -1
- package/src/license/fingerprint.js +1 -1
- package/src/license/terms.js +1 -1
- package/src/license/verify.js +1 -1
- package/src/presets/index.js +1 -1
- package/src/proxy/backends.js +1 -1
- package/src/proxy/core-tools.js +1 -0
- package/src/proxy/pipeline.js +1 -1
- package/src/proxy/router.config.js +1 -1
- package/src/proxy/router.js +1 -1
- package/src/proxy/server.js +1 -1
- package/src/templates/AGENTS.md +15 -64
- package/src/templates/CLAUDE.md +180 -254
- package/src/templates/GEMINI.md +17 -115
- package/src/templates/apt-runtime.md +16 -0
- package/src/templates/copilot-instructions.md +141 -214
- package/src/templates/cursorrules.mdc +166 -232
- package/src/templates/mcp-tools.md +176 -175
- package/src/templates/windsurfrules.md +141 -214
package/src/templates/GEMINI.md
CHANGED
|
@@ -28,106 +28,23 @@ Single-context layout — one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
##
|
|
32
|
-
|
|
33
|
-
**You have `apt-mcp-agent` MCP tools available. You MUST use them:**
|
|
34
|
-
- **Before ANY code search**: use `explore_code` or `code_search` — NOT grep_search for code symbols
|
|
35
|
-
- **Before executable changes**: call `pipeline_status`, then `pipeline_start` or `pipeline_use`
|
|
36
|
-
- **After each pipeline step**: call `pipeline_checkpoint` with the required `task` and `runId`
|
|
37
|
-
- **Session start**: call `read_knowledge` + `pipeline_status`
|
|
38
|
-
|
|
39
|
-
Ignoring these tools and using only built-in IDE tools is a **P0 protocol violation**.
|
|
40
|
-
|
|
41
|
-
## CRITICAL: AGENT & SKILL PROTOCOL (START HERE)
|
|
42
|
-
|
|
43
|
-
> **MANDATORY:** You MUST read the appropriate agent file and its skills BEFORE performing any implementation. This is the highest priority rule.
|
|
44
|
-
|
|
45
|
-
### 🗺️ System Map & Memory Read (MANDATORY at session start)
|
|
46
|
-
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
47
|
-
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
48
|
-
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
49
|
-
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
50
|
-
5. **Read `.agents/skill-triggers.json` to load auto-routing rules for all skills/workflows/tools.**
|
|
51
|
-
|
|
52
|
-
### 🔄 Context Recovery (MANDATORY after any context truncation/compression)
|
|
53
|
-
If your conversation context was truncated, compressed, or you are resuming after a checkpoint:
|
|
54
|
-
1. **Call `pipeline_status()` immediately** — it returns recovery instructions and tool reminders
|
|
55
|
-
2. Re-read the session start files above if not already in context
|
|
56
|
-
3. Classify the current user request before taking any code action
|
|
57
|
-
|
|
58
|
-
### ⚠️ MCP TOOL ACCESSIBILITY & FALLBACK WARNING (CRITICAL)
|
|
59
|
-
If the specialized MCP tool `code_search` or other core MCP tools (e.g., `recall`, `remember`, `impact_analysis`) are not in your available tools list:
|
|
60
|
-
- **DO NOT silently fall back to basic text search or skip debugging workflows.**
|
|
61
|
-
- **STOP immediately, warn the user** that the `apt-mcp-agent` server did not start successfully or has been disabled in the IDE settings, and recommend they run `npx apt-mcp-agent-setup status` to check their setup.
|
|
62
|
-
- Only proceed with fallback tools (e.g. `grep_search`) if the user explicitly approves it.
|
|
63
|
-
|
|
64
|
-
### 🛠️ ENFORCED DEVELOPER PIPELINES (MANDATORY — MCP TOOL GATE)
|
|
65
|
-
|
|
66
|
-
Before writing any code or implementing features, you MUST follow one of the three enforced pipelines below.
|
|
67
|
-
**Start or bind a run with `pipeline_start(pipeline, task, workspace)` or `pipeline_use(task, runId)`.**
|
|
68
|
-
**After each step call `pipeline_checkpoint(task, runId, step, status="completed", summary)`.**
|
|
69
|
-
|
|
70
|
-
Content-only documentation changes that do not affect executable behavior are exempt from PRD, issue, and TDD pipeline steps. Agent contracts such as `AGENTS.md`, `SKILL.md`, trigger maps, pipeline definitions, and runtime configuration are operational and are not exempt.
|
|
71
|
-
Skipping steps or executing out-of-order is a **P0 protocol violation** — the tool will REJECT invalid transitions.
|
|
72
|
-
|
|
73
|
-
#### 🚀 Feature Development Pipeline (5 steps — NO EXCEPTIONS, NO SKIP)
|
|
74
|
-
```
|
|
75
|
-
/grill-me → /to-prd → /to-issues → /tdd → /improve-codebase-architecture
|
|
76
|
-
```
|
|
77
|
-
1. **`/grill-me`** → Stress-test the plan/design with relentless Socratic questions. Challenge edge cases, security, performance.
|
|
78
|
-
2. **`/to-prd`** → Synthesize the grill-me session and conversation context into a formal PRD document.
|
|
79
|
-
3. **`/to-issues`** → Break PRD into vertical-slice issues on the issue tracker. Create `{task-slug}.md` for tracking.
|
|
80
|
-
4. **`/tdd`** → Implement code test-first using RED-GREEN-REFACTOR cycle.
|
|
81
|
-
5. **`/improve-codebase-architecture`** → Review and deepen architecture. Generate HTML report + grill-me session on codebase quality.
|
|
82
|
-
|
|
83
|
-
#### 🐛 Bug Fix Pipeline (5 steps — NO EXCEPTIONS, NO SKIP)
|
|
84
|
-
```
|
|
85
|
-
/diagnose → /grill-me → /to-prd → /to-issues → /tdd
|
|
86
|
-
```
|
|
87
|
-
1. **`/diagnose`** → Build feedback loop: reproduce → minimize → hypothesize → fix.
|
|
88
|
-
2. **`/grill-me`** → Challenge the fix design. Stress-test the proposed solution.
|
|
89
|
-
3. **`/to-prd`** → Document the fix as a formal PRD with root cause analysis.
|
|
90
|
-
4. **`/to-issues`** → Create tracking issues for the fix and any follow-up work.
|
|
91
|
-
5. **`/tdd`** → Write regression tests first, then implement the fix.
|
|
92
|
-
|
|
93
|
-
#### 🔧 Hotfix Pipeline (2 steps — for small, isolated changes ≤3 files)
|
|
94
|
-
```
|
|
95
|
-
/verify-scope → /fix-and-test
|
|
96
|
-
```
|
|
97
|
-
1. **`/verify-scope`** → Confirm change is small (≤3 files, no new API, no dependency changes). Provide scope justification in summary.
|
|
98
|
-
2. **`/fix-and-test`** → Apply fix + write regression test if applicable.
|
|
99
|
-
|
|
100
|
-
**When to use hotfix:** typos, config values, minor CSS, off-by-one errors, missing imports, small bug fixes with obvious root cause. If the change grows beyond scope, reset and escalate to `bugfix` or `feature` pipeline.
|
|
101
|
-
|
|
102
|
-
**ENFORCEMENT PROTOCOL:**
|
|
103
|
-
- After each step completion → call `pipeline_checkpoint(task, runId, step, "completed", summary)`
|
|
104
|
-
- Before each step start → call `pipeline_status(task, runId)`
|
|
105
|
-
- To cancel an active run → call `pipeline_reset(task, runId, confirm=true)`; history is preserved
|
|
106
|
-
- To run the same task again → call `pipeline_start` and use the new `runId`
|
|
107
|
-
- The MCP tool enforces ordering at runtime — out-of-order calls are **rejected with error**
|
|
108
|
-
- **Pipeline responses are terse. Follow `memory_action` and `skill_directive` fields immediately.**
|
|
109
|
-
|
|
110
|
-
### 🧠 Memory Auto-Save (MANDATORY after pipeline steps)
|
|
111
|
-
|
|
112
|
-
After completing pipeline steps, the checkpoint response includes a `memory_action` field.
|
|
113
|
-
**You MUST call the `remember` tool immediately** to save key decisions. Do NOT wait for user to ask.
|
|
114
|
-
|
|
115
|
-
| After Step | What to Save |
|
|
116
|
-
|---|---|
|
|
117
|
-
| `grill-me` | Design decisions + constraints |
|
|
118
|
-
| `diagnose` | Root cause + reproduction steps |
|
|
119
|
-
| `tdd` | Implementation decisions + test patterns |
|
|
120
|
-
| `improve-architecture` | Architecture improvements |
|
|
121
|
-
|
|
122
|
-
Also auto-save when: user states preference, non-trivial bug resolved, architecture decision made.
|
|
123
|
-
|
|
124
|
-
### 📖 Skill Auto-Loading (MANDATORY at pipeline step transitions)
|
|
125
|
-
|
|
126
|
-
Checkpoint responses include `skill_directive` field pointing to the SKILL.md for the **next** step.
|
|
127
|
-
**You MUST read that SKILL.md BEFORE starting the next step.** Skipping = P0 violation.
|
|
31
|
+
## APT session and execution contract
|
|
128
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.
|
|
129
47
|
|
|
130
|
-
---
|
|
131
48
|
|
|
132
49
|
## 🤖 INTELLIGENT AGENT ROUTING
|
|
133
50
|
|
|
@@ -237,24 +154,9 @@ Before writing ANY UI, design, or visual code:
|
|
|
237
154
|
|
|
238
155
|
---
|
|
239
156
|
|
|
240
|
-
##
|
|
241
|
-
|
|
242
|
-
Every user request must pass through the Socratic Gate before ANY tool use or implementation:
|
|
157
|
+
## Clarification
|
|
243
158
|
|
|
244
|
-
|
|
245
|
-
|---|---|---|
|
|
246
|
-
| **New Feature / Build** | Deep Discovery | ASK minimum 3 strategic questions |
|
|
247
|
-
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
248
|
-
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
249
|
-
| **Full Orchestration** | Gatekeeper | **STOP** subagents until user confirms plan details |
|
|
250
|
-
| **Direct "Proceed"** | Validation | **STOP** → Even if answers are given, ask 2 "Edge Case" questions |
|
|
251
|
-
|
|
252
|
-
> [!IMPORTANT]
|
|
253
|
-
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
254
|
-
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
255
|
-
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
256
|
-
|
|
257
|
-
---
|
|
159
|
+
Ask only questions that resolve material uncertainty. Reuse established answers.
|
|
258
160
|
|
|
259
161
|
## TIER 0: UNIVERSAL RULES
|
|
260
162
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# APT session and execution contract
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
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.
|
|
5
|
+
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.
|
|
6
|
+
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.
|
|
7
|
+
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.
|
|
8
|
+
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.
|
|
9
|
+
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.
|
|
10
|
+
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.
|
|
11
|
+
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.
|
|
12
|
+
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.
|
|
13
|
+
|
|
14
|
+
`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.
|
|
15
|
+
|
|
16
|
+
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.
|
|
@@ -1,214 +1,141 @@
|
|
|
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
|
-
##
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
|
106
|
-
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
| `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 |
|
|
143
|
-
| `figma-handoff` | Figma URL detected (`figma.com/...`), "figma", "/figma", "code theo Figma" (khi figma preset active) | Load SKILL.md → Extract design → generate code |
|
|
144
|
-
| `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 |
|
|
145
|
-
| `flutter-fix-layout-issues` | "overflow", "unbounded height", `RenderFlex`, layout error | Load SKILL.md → Fix overflow/constraint issues |
|
|
146
|
-
| `flutter-build-responsive-layout` | "responsive", "tablet", "media query", adaptive layout | Load SKILL.md → Build adaptive layout |
|
|
147
|
-
| `flutter-setup-declarative-routing` | "routing", "deep link", "go_router", URL navigation | Load SKILL.md → Configure declarative routing |
|
|
148
|
-
| `flutter-add-widget-test` | "widget test", "test component", "verify UI rendering" | Load SKILL.md → Write widget test |
|
|
149
|
-
| `flutter-add-integration-test` | "integration test", "e2e", "Flutter Driver" | Load SKILL.md → Add integration test |
|
|
150
|
-
| `flutter-implement-json-serialization` | "fromJson", "toJson", "model class", API mapping | Load SKILL.md → Create JSON serialization |
|
|
151
|
-
| `flutter-setup-localization` | "localization", "i18n", "intl", ".arb" | Load SKILL.md → Setup l10n |
|
|
152
|
-
| `flutter-apply-architecture-best-practices` | "architecture", "layer", project structure | Load SKILL.md → Apply layered architecture |
|
|
153
|
-
| `flutter-add-widget-preview` | "preview", "widget catalog", "golden test" | Load SKILL.md → Add widget preview |
|
|
154
|
-
| `flutter-use-http-package` | "http request", "REST API", "fetch data" | Load SKILL.md → Use http package |
|
|
155
|
-
|
|
156
|
-
### BA/QC Skills — auto-trigger for requirements and testing:
|
|
157
|
-
|
|
158
|
-
| Skill | Trigger Conditions | Agent Action |
|
|
159
|
-
|---|---|---|
|
|
160
|
-
| `ba-urd-decomposer` | "URD", "phân rã URD", "feature list", .pdf (BA context) | Load SKILL.md → Parse URD → feature list |
|
|
161
|
-
| `ba-clarification-session` | "làm rõ yêu cầu", "clarify", "hỏi PO" | Load SKILL.md → Generate Q&A questions |
|
|
162
|
-
| `ba-specs-writer` | "viết specs", "đặc tả", "tạo specs", "PTTK" | Load SKILL.md → Generate Specs document |
|
|
163
|
-
| `ba-feature-tracker` | "tiến độ BA", "feature tracker", "BA progress" | Load SKILL.md → Show BA dashboard |
|
|
164
|
-
| `ba-requirements-generator` | "BRD", "user story", "sinh BRD", "tạo BRD" | Load SKILL.md → Generate BRD/User Story |
|
|
165
|
-
| `pdf-specs-parser` | "parse PDF specs", "đọc PTTK", .pdf (specs context) | Load SKILL.md → Extract API/UI definitions |
|
|
166
|
-
| `qc-template-parser` | "mẫu QC", "import QC template", .xlsx (QC context) | Load SKILL.md → Learn Excel template |
|
|
167
|
-
| `qc-bidv-workflow` | "tạo testcase BIDV", "QC workflow" | Load SKILL.md → Run BIDV QC pipeline |
|
|
168
|
-
| `testcase-generator` | "sinh test case", "generate TCs", "tạo testcase" | Load SKILL.md → Generate Excel testcase |
|
|
169
|
-
| `mindmap-reader` | "mindmap", "xmind", .xmind/.mm file | Load SKILL.md → Parse mindmap → JSON |
|
|
170
|
-
| `specs-to-mindmap` | "specs sang mindmap", "tạo outline từ specs" | Load SKILL.md → Specs → outline |
|
|
171
|
-
| `requirement-coverage` | "bao phủ yêu cầu", "traceability", "coverage" | Load SKILL.md → Requirements vs test cases |
|
|
172
|
-
| `webapp-testing` | "E2E test", "Playwright", "test trình duyệt" | Load SKILL.md → E2E/Playwright audit |
|
|
173
|
-
|
|
174
|
-
### ⚠️ DOMAIN SKILL LOADING (CRITICAL — DO NOT SKIP)
|
|
175
|
-
|
|
176
|
-
Before writing ANY UI, design, or visual code:
|
|
177
|
-
1. **Web UI** → READ `.agents/skills/ui-style-rules/SKILL.md` — MANDATORY
|
|
178
|
-
2. **Mobile UI** → READ `.agents/skills/mobile-rules/SKILL.md` — MANDATORY
|
|
179
|
-
3. **Image/asset gen (web)** → READ `.agents/skills/web-mockup-gen/SKILL.md`
|
|
180
|
-
4. **Image/asset gen (mobile)** → READ `.agents/skills/mobile-mockup-gen/SKILL.md`
|
|
181
|
-
5. **Architecture decision** → READ `.agents/skills/stress-test-plan/SKILL.md`
|
|
182
|
-
|
|
183
|
-
**Violation = SLOP output. Writing UI code without design skill = P0 violation.**
|
|
184
|
-
|
|
185
|
-
## Socratic Gate
|
|
186
|
-
|
|
187
|
-
Every user request must pass through the Socratic Gate before ANY implementation:
|
|
188
|
-
|
|
189
|
-
| Request Type | Strategy | Required Action |
|
|
190
|
-
|---|---|---|
|
|
191
|
-
| **New Feature / Build** | Deep Discovery | ASK minimum 3 strategic questions |
|
|
192
|
-
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
193
|
-
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
194
|
-
|
|
195
|
-
> [!IMPORTANT]
|
|
196
|
-
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
197
|
-
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
198
|
-
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Universal Rules
|
|
203
|
-
|
|
204
|
-
### Clean Code (Global Mandatory)
|
|
205
|
-
- **Code**: Concise, direct, no over-engineering. Self-documenting.
|
|
206
|
-
- **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.
|
|
207
|
-
- **Bug Fix**: Root cause, not symptom. Grep every caller, fix the shared function once.
|
|
208
|
-
- **No Bloat**: No unrequested abstractions, no scaffolding "for later", deletion > addition, fewest files.
|
|
209
|
-
- **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
|
|
210
|
-
- **Performance**: Measure first. Adhere to current Core Web Vitals standards.
|
|
211
|
-
|
|
212
|
-
### Quick Reference
|
|
213
|
-
- **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
|
|
214
|
-
- **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
|
+
# 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`
|