architext 0.0.5 → 0.0.6
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/CHANGELOG.md +29 -1
- package/README.md +18 -16
- package/README.zh-CN.md +15 -14
- package/dist/index.js +43 -29
- package/dist/templates/en/briefs/_base.md +13 -6
- package/dist/templates/en/briefs/_modules.md +2 -2
- package/dist/templates/en/docs/global/error_memory.json +40 -0
- package/dist/templates/en/docs/global/map.json +46 -90
- package/dist/templates/en/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +6 -13
- package/dist/templates/en/{rules/02_tech_stack.md → docs/global/tech_stack.md} +7 -18
- package/dist/templates/en/docs/global/vision.md +1 -1
- package/dist/templates/en/docs/prompts/audit.md +5 -5
- package/dist/templates/en/docs/prompts/code.md +23 -11
- package/dist/templates/en/docs/prompts/edit.md +21 -7
- package/dist/templates/en/docs/prompts/fix.md +11 -2
- package/dist/templates/en/docs/prompts/inherit.md +18 -13
- package/dist/templates/en/docs/prompts/map.md +4 -3
- package/dist/templates/en/docs/prompts/plan.md +11 -5
- package/dist/templates/en/docs/prompts/remove.md +13 -8
- package/dist/templates/en/docs/prompts/revise.md +10 -2
- package/dist/templates/en/docs/prompts/scope.md +4 -3
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +20 -14
- package/dist/templates/en/docs/prompts/ui.md +113 -0
- package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/en/docs/templates/spec.template.md +1 -1
- package/dist/templates/en/docs/templates/ui.template.md +8 -8
- package/dist/templates/en/rules/00_system.md +245 -51
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +26 -12
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +137 -208
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -2
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +1 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -302
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +131 -306
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +17 -10
- package/dist/templates/zh/briefs/_modules.md +2 -2
- package/dist/templates/zh/docs/global/error_memory.json +40 -0
- package/dist/templates/zh/docs/global/map.json +39 -109
- package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
- package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
- package/dist/templates/zh/docs/global/vision.md +1 -1
- package/dist/templates/zh/docs/prompts/audit.md +5 -5
- package/dist/templates/zh/docs/prompts/code.md +22 -10
- package/dist/templates/zh/docs/prompts/edit.md +20 -6
- package/dist/templates/zh/docs/prompts/fix.md +10 -1
- package/dist/templates/zh/docs/prompts/inherit.md +18 -13
- package/dist/templates/zh/docs/prompts/map.md +5 -4
- package/dist/templates/zh/docs/prompts/plan.md +11 -5
- package/dist/templates/zh/docs/prompts/remove.md +13 -8
- package/dist/templates/zh/docs/prompts/revise.md +12 -4
- package/dist/templates/zh/docs/prompts/scope.md +4 -3
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +19 -15
- package/dist/templates/zh/docs/prompts/ui.md +113 -0
- package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/zh/docs/templates/spec.template.md +1 -1
- package/dist/templates/zh/docs/templates/ui.template.md +8 -8
- package/dist/templates/zh/rules/00_system.md +243 -49
- package/dist/templates/zh/rules/90_custom_rules.md +2 -1
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -204
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +1 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -302
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +131 -306
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -95
- package/dist/templates/en/rules/03_data_governance.md +0 -106
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -95
- package/dist/templates/zh/rules/03_data_governance.md +0 -106
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-plan-options
|
|
3
|
-
|
|
4
|
-
description: Architext architecture decision option library. Defines candidate approaches and AI+/AI- analysis for five core dimensions (Core Structure / Interaction Pattern / Data Flow / Error Handling / Access & Scope), covering Web/CLI/API/Lib/Mobile/MiniApp/Extension/Desktop/AI Agent project types. Includes convention inheritance rules, project tag routing logic, and recommend vs. expand criteria. Referenced by /archi.plan step_2 Part 2 (architecture recommendation phase).
|
|
3
|
+
description: Generate architecture decision options by project type. Use when planning and need guidance on technical choices.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Architecture Decision Option Library
|
|
@@ -11,355 +10,131 @@ description: Architext architecture decision option library. Defines candidate a
|
|
|
11
10
|
```
|
|
12
11
|
/archi.plan step_2 Part 2
|
|
13
12
|
↓
|
|
14
|
-
[This Skill]
|
|
13
|
+
[This Skill] Extract core question list by project tag
|
|
15
14
|
↓
|
|
16
|
-
Direct recommendation
|
|
15
|
+
Per-question judgment: Direct recommendation or Expand Q-table
|
|
17
16
|
↓
|
|
18
|
-
|
|
17
|
+
Write into Task Proposal architecture recommendation table
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
> **
|
|
22
|
-
> - Responsible for: candidate option content per dimension, convention inheritance rules, recommend vs. expand judgment
|
|
23
|
-
> - Not responsible for: Q-table format rules (see `archi-interview-protocol` Skill), Unified Proposal output format (see plan.md step_2)
|
|
20
|
+
> **Responsibility boundary**: Handles core question list per project type, candidate options, recommend vs. expand decisions; Not responsible for Q-table format (see `archi-interview-protocol`).
|
|
24
21
|
|
|
25
22
|
---
|
|
26
23
|
|
|
27
|
-
## Selection Logic (3 Steps
|
|
24
|
+
## Selection Logic (3 Steps)
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
**Step 1 · Convention Inheritance Check**
|
|
27
|
+
Read `tech_stack.md` §9. If project convention exists → inherit directly, do not expand (unless feature explicitly needs to deviate).
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| Situation | Action |
|
|
34
|
-
|:---|:---|
|
|
35
|
-
| This dimension has a project convention | Inherit directly as recommendation, mark source as `Project Convention`, **do not expand option table** (unless this feature has a clear specific need to deviate) |
|
|
36
|
-
| This dimension has no project convention | Proceed to Step 2 |
|
|
37
|
-
|
|
38
|
-
### Step 2 · Project Tag Routing
|
|
39
|
-
|
|
40
|
-
Use project tags activated in step_1_load (`ui` / `data` / `cli` / `lib` / `api` / `mobile` / `miniapp` / `extension` / `desktop` / `ai`) to select applicable dimensions; skip inapplicable ones. Routing rules are in each dimension's heading.
|
|
41
|
-
|
|
42
|
-
### Step 3 · Recommend vs. Expand
|
|
29
|
+
**Step 2 · Extract Core Questions**
|
|
30
|
+
Based on project tags, extract the list of core questions that must be answered for that type from the table below.
|
|
43
31
|
|
|
32
|
+
**Step 3 · Per-Question Judgment**
|
|
44
33
|
| Condition | Action |
|
|
45
34
|
|:---|:---|
|
|
46
|
-
|
|
|
47
|
-
| 2+ viable options
|
|
48
|
-
|
|
49
|
-
**Feature Contextualization (Critical)**: Whether recommending or expanding, use entity names, operation names, and business flow confirmed in the feature design. Never copy-paste generic descriptions.
|
|
35
|
+
| Answer is clear (sufficient context) | Recommend directly with 1-2 sentence rationale |
|
|
36
|
+
| 2+ viable options with significant implementation impact | Expand Q-table (format: see `archi-interview-protocol` Skill standard output format) |
|
|
50
37
|
|
|
51
38
|
---
|
|
52
39
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
Route to the applicable option library by project tag:
|
|
56
|
-
|
|
57
|
-
### [?Data] Data Model & Relationship Strategy
|
|
58
|
-
|
|
59
|
-
> Determines how this feature's data is stored and organized.
|
|
60
|
-
|
|
61
|
-
| ID | Option | Description | AI+ | AI- |
|
|
62
|
-
|:---|:---|:---|:---|:---|
|
|
63
|
-
| A | Flat / Single Entity | All data in a single table/document, no foreign keys. Suited for independent entities with fixed fields and no cross-table relations | Context concentrated in one file; AI generates CRUD without cross-file relationship tracking — lowest error rate | Forcing flat structure when data has natural hierarchy causes field redundancy; splitting later is costly |
|
|
64
|
-
| B | 1:N Relation | One parent entity owns multiple children via foreign keys. Suited for clear parent-child relationships where children depend on the parent | Most common relational pattern; AI has ample training data; high accuracy for JOIN queries and cascade operations | Must maintain two Models and association logic; AI may miss cascaded deletes/updates or nested serialization |
|
|
65
|
-
| C | M:N Relation | Many-to-many between two entities requiring a junction table. Suited for entities that aren't subordinate but need association | Junction table structure is standardized; relationship semantics are clear | Extremely easy to miss junction table creation and transaction logic; junction tables often need extra fields that AI frequently forgets |
|
|
66
|
-
| D | Recursive / Tree | Entity self-references to form a tree. Suited for hierarchies of unknown depth: categories, directories, comment trees | A single table can represent any depth; schema is concise | Recursive queries/rendering easily cause infinite loops or stack overflow; AI-generated recursion termination conditions are often incomplete |
|
|
67
|
-
| E | JSON / EAV | Stores dynamic fields in a JSON column or EAV pattern. Suited for uncertain schemas or fields that vary by user/context | Schema is flexible; adding fields requires no database migration | Loses DB-level type validation and indexing; AI cannot infer field structure from schema; prone to runtime type errors |
|
|
68
|
-
| F | Virtual / Computed | Data is not stored directly; computed from other fields at runtime. Suited for derived data, aggregate stats, formatted display | No data migration needed; data always stays consistent with source | Computation logic scattered across query layer; AI easily writes N+1 queries or inefficient aggregation |
|
|
69
|
-
| Z | Custom | (describe your data structure approach) | - | - |
|
|
70
|
-
|
|
71
|
-
### [?CLI] Input/Output & Configuration Design
|
|
72
|
-
|
|
73
|
-
> Determines how this feature receives input and presents output.
|
|
74
|
-
|
|
75
|
-
| ID | Option | Description | AI+ | AI- |
|
|
76
|
-
|:---|:---|:---|:---|:---|
|
|
77
|
-
| A | Pure Args/Flags | All input via command-line arguments. Suited for automated script calls, CI/CD pipelines | Input structure is explicit; AI can infer parsing code and help docs directly from argument definitions | High memory cost for users when there are many flags; complex nested config is hard to express on the command line |
|
|
78
|
-
| B | Interactive Prompts | Guided input via interactive Q&A after launch. Suited for init wizards, config generators, and other guided scenarios | Each prompt step is independent; AI can generate handling logic one by one in sequence | Must handle Ctrl+C cancel, back-navigation, and defaults; testing requires mocking stdin |
|
|
79
|
-
| C | Hybrid (Args + Prompts) | Reads CLI args first; prompts only for missing inputs. Suited for both script calls and manual use | Balances automation and interactivity; best practice for modern CLIs | Must maintain two logic paths (arg parsing + interactive prompts); AI must ensure both paths behave consistently |
|
|
80
|
-
| D | Config File | Reads input from a config file. Suited for many parameters that benefit from version-controlled configuration | Config can be strictly validated with JSON Schema; AI can generate parsing code from the schema | Must handle file-not-found, malformed format, and schema version migration edge cases |
|
|
81
|
-
| E | Stdin / Pipe | Receives data from stdin or pipe. Suited for data processing pipelines and combining with Unix commands | Input format can define a clear Parser contract | Streaming reads and encoding handling are error-prone; must handle empty input and very large files |
|
|
82
|
-
| Z | Custom | (describe your input/output approach) | - | - |
|
|
83
|
-
|
|
84
|
-
### [?Lib] Public API & Type Design
|
|
85
|
-
|
|
86
|
-
> Determines the interface shape this feature exposes to consumers.
|
|
87
|
-
|
|
88
|
-
| ID | Option | Description | AI+ | AI- |
|
|
89
|
-
|:---|:---|:---|:---|:---|
|
|
90
|
-
| A | Single Function | Exports one or a few independent functions. Suited for single-purpose, stateless utility functions | Simplest interface; AI achieves highest accuracy generating usage examples and unit tests | Function signatures may bloat when features expand |
|
|
91
|
-
| B | Class / Instance | Exports a class; consumers create instances and call methods. Suited for modules maintaining internal state with multiple related operations | Clear constructor + methods structure; AI easily understands object lifecycle | Deep inheritance increases context complexity; AI often makes mistakes tracking `this` binding |
|
|
92
|
-
| C | Builder / Fluent | Configuration built via method chaining. Suited for many optional configs and progressive construction | In TypeScript, chaining can progressively narrow types — good type safety | Call order constraints and generic gymnastics are complex; AI often generates incorrect type definitions |
|
|
93
|
-
| D | Config Object | Accepts a config object as primary input. Suited for many init params needing unified management | Config object can be strictly defined with interface/Zod; AI infers behavior from types very accurately | Heavy docs and validation logic when config options proliferate; merging defaults for optional fields is error-prone |
|
|
94
|
-
| E | Plugin / Middleware | Lean core; features extended via plugins/middleware. Suited for highly extensible framework-level libraries | Simple core code; AI can generate each plugin independently | Plugin interactions, execution order, and type safety are hard to guarantee; AI easily generates conflicting plugins |
|
|
95
|
-
| Z | Custom | (describe your API design approach) | - | - |
|
|
96
|
-
|
|
97
|
-
### [?API] Interface Contract & Route Design
|
|
98
|
-
|
|
99
|
-
> Determines the API endpoint structure and invocation pattern for this feature.
|
|
100
|
-
|
|
101
|
-
| ID | Option | Description | AI+ | AI- |
|
|
102
|
-
|:---|:---|:---|:---|:---|
|
|
103
|
-
| A | RESTful CRUD | Standard REST resource routes. Suited for entities with clear CRUD operations | REST is the most prevalent API pattern; AI has extensive training data; highest accuracy for routes + controllers | Complex queries and cross-resource operations have limited expressiveness in pure REST; non-standard endpoints proliferate |
|
|
104
|
-
| B | RPC-Style Actions | Action-oriented endpoints, e.g. `POST /send-invite`. Suited for business actions that can't map cleanly to CRUD verbs | Endpoint semantics are explicit; AI can infer implementation logic directly from the action name | No unified convention; endpoint naming is inconsistent; hard to maintain as count grows |
|
|
105
|
-
| C | GraphQL | Single endpoint + schema query language. Suited for frontends with varying data needs that need to reduce round trips | Schema is documentation; strong typing; frontend freely composes queries | Resolver N+1 issues and fine-grained auth are complex; AI-generated DataLoader code often has caching bugs |
|
|
106
|
-
| D | Nested Sub-resource | Nested routes express parent-child relationships, e.g. `GET /users/:id/posts`. Suited for resources with clear hierarchy | Route structure mirrors data relationships; AI can infer query logic from routes | Nesting beyond 2 levels makes routes verbose; auth checks must verify parent resource ownership at each level |
|
|
107
|
-
| Z | Custom | (describe your API design approach) | - | - |
|
|
108
|
-
|
|
109
|
-
### [?Mobile] Navigation Architecture Strategy
|
|
110
|
-
|
|
111
|
-
> Determines where this feature sits in the mobile navigation hierarchy and how it is reached.
|
|
112
|
-
|
|
113
|
-
| ID | Option | Description | AI+ | AI- |
|
|
114
|
-
|:---|:---|:---|:---|:---|
|
|
115
|
-
| A | Stack Navigator | Hierarchical page stack; users navigate deeper and can go back. Suited for flows with clear depth | Most common mobile navigation pattern; AI generates push/pop with high accuracy | Deep nesting requires complex route parameter passing; parameter type safety easily lost |
|
|
116
|
-
| B | Tab Navigator | Fixed bottom/top tab bar switching between feature entry points. Suited for parallel features users switch frequently | Tab structure is fixed and explicit; AI can generate each Tab independently without interference | State isolation between Tabs and shared data sync require extra handling; AI easily misses data refresh on Tab switch |
|
|
117
|
-
| C | Drawer Navigator | Side-drawer navigation menu. Suited for many features that don't fit a Tab bar, like admin-style apps | Drawer menu structure is clear; AI accurately generates list items and route mappings | Drawer gesture conflicts with inner list scroll; cross-platform behavior differences AI often ignores |
|
|
118
|
-
| D | Modal / Bottom Sheet | Modal page or bottom slide-up panel without leaving the current context. Suited for quick actions, filters, confirmations | Context is localized; no root navigation needed; AI generates conditional rendering accurately | Focus Trap, gesture-close, keyboard-raise adaptation AI often handles incompletely; iOS/Android behavior differences |
|
|
119
|
-
| Z | Custom | (describe your mobile navigation approach) | - | - |
|
|
120
|
-
|
|
121
|
-
### [?MiniApp] Page Architecture & Request Strategy
|
|
122
|
-
|
|
123
|
-
> Determines the organization of this feature within the mini-program page structure and network request encapsulation.
|
|
124
|
-
|
|
125
|
-
| ID | Option | Description | AI+ | AI- |
|
|
126
|
-
|:---|:---|:---|:---|:---|
|
|
127
|
-
| A | Single Page | Feature is completed within a single mini-program page with no cross-page navigation. Suited for focused, low-step features | Page context is concentrated; AI can generate the full logic in a single file with low error rate | Logic bloats as features grow, reducing maintainability |
|
|
128
|
-
| B | Page + Sub-page Flow | Main page + navigated detail/edit sub-pages passing params via `navigateTo`. Suited for clear parent-child relationships | Each page has clear responsibility; AI can generate pages independently without context overlap | Cross-page parameter passing requires serialization; large data needs EventBus or global store, which AI easily misses |
|
|
129
|
-
| C | Tabbar + Module | Bottom Tabbar framework + independent module pages. Suited for parallel-feature main application shells | Tabbar structure is stable; AI can generate each Tab's content modularly | Cross-Tab data sharing requires global state management; mini-program store ecosystems are fragmented, AI's choice often confused |
|
|
130
|
-
| D | WebView Hybrid | Embeds H5 pages in WebView for complex rich-text editing or reusing existing web assets | Can reuse web tech stack; high feature completeness | WebView-to-native communication via bridge; AI-generated message protocols easily have compatibility issues; limited by platform sandbox |
|
|
131
|
-
| Z | Custom | (describe your mini-program page approach) | - | - |
|
|
132
|
-
|
|
133
|
-
### [?Extension] Architecture Layer Assignment Strategy
|
|
134
|
-
|
|
135
|
-
> Determines whether the core logic lives in the Background Service Worker, Content Script, or Popup layer.
|
|
136
|
-
|
|
137
|
-
| ID | Option | Description | AI+ | AI- |
|
|
138
|
-
|:---|:---|:---|:---|:---|
|
|
139
|
-
| A | Background-Centric | Core logic in Background Service Worker; other layers only do UI display and message forwarding. Suited for features needing persistent execution and cross-tab shared state | Logic centralized; message protocol is one-way and clear; AI can generate main logic in a single file | Service Worker lifespan is short (MV3); must handle wake-up and state persistence |
|
|
140
|
-
| B | Content-Centric | Main logic injected into the page's Content Script for deep DOM interaction. Suited for page enhancement, text selection, content modification | Can directly manipulate the page DOM without message relay | JS environments are isolated (isolated world); must communicate via window.postMessage; AI often confuses isolation boundaries |
|
|
141
|
-
| C | Popup-Centric | Main interaction and logic in the Popup page; Background only acts as minimal permission proxy. Suited for simple, click-to-use tool extensions | Popup is just a regular webpage; AI generates UI code identical to web | State lost when Popup closes; must persist to chrome.storage; Popup and Background have independent lifecycles |
|
|
142
|
-
| D | Full Architecture | Background + Content + Popup each handle specific responsibilities, coordinated via a message bus. Suited for complex multi-function extensions | Clear layer separation; each layer can be developed and tested independently | Three-layer message protocol is complex; AI easily misses message routing or confuses sender/receiver |
|
|
143
|
-
| Z | Custom | (describe your extension architecture approach) | - | - |
|
|
144
|
-
|
|
145
|
-
### [?Desktop] Process Model & IPC Strategy
|
|
146
|
-
|
|
147
|
-
> Determines how this feature's business logic is distributed between the Main process and Renderer process.
|
|
40
|
+
## Core Questions by Project Type
|
|
148
41
|
|
|
149
|
-
|
|
150
|
-
|:---|:---|:---|:---|:---|
|
|
151
|
-
| A | Main-Centric | Core business logic in the Main process; Renderer only handles display and user input. Suited for frequent system API calls (filesystem, native menus, system notifications) | Logic centralized in Main; AI generates business logic in one place; types constrained via IPC contract | Main process blocking makes the entire app unresponsive; Renderer must await IPC responses; AI easily forgets async handling |
|
|
152
|
-
| B | Renderer-Centric | Business logic primarily in Renderer; Main only exposes minimal system API proxies. Suited for UI-centric apps with few system calls | Renderer can use browser standard APIs; AI generates code identical to web development | System calls require contextBridge preloading; AI often forgets to declare preload whitelist, causing security issues |
|
|
153
|
-
| C | Worker Thread | Computation-heavy logic moved to Worker Thread to avoid blocking the UI thread. Suited for file processing, data transformation, heavy tasks | Decouples heavy tasks from UI; good responsiveness | Worker Thread cannot directly access DOM or IPC; must communicate via MessageChannel; AI easily misses serialization constraints |
|
|
154
|
-
| Z | Custom | (describe your desktop process distribution approach) | - | - |
|
|
42
|
+
### `data` Projects: Data Layer Design
|
|
155
43
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
| ID | Option | Description | AI+ | AI- |
|
|
161
|
-
|:---|:---|:---|:---|:---|
|
|
162
|
-
| A | Direct API Call | Calls LLM Provider API (OpenAI/Claude/Gemini, etc.) directly. Suited for simple features with no need to switch providers | Simplest implementation; AI generates SDK call code with high accuracy | Tightly coupled to provider; switching models requires code changes; streaming output handling inconsistent across providers |
|
|
163
|
-
| B | Provider Abstraction | Wraps a unified LLM client interface with swappable provider backends. Suited for supporting multiple models or local models | Interface is stable; AI can generate call code targeting the abstraction without caring about the underlying provider | Abstraction design is complex; capability differences between providers (context window, tool calling format) are hard to fully unify |
|
|
164
|
-
| C | Tool / Function Calling | Defines Tool Schema for the LLM; LLM decides when to invoke tools. Suited for AI actively calling external capabilities (search, code execution, DB queries) | Tool Schema is structured; AI can generate call adapter code from type definitions | Retry strategies for tool execution errors and state management for concurrent multi-tool calls are easily missed |
|
|
165
|
-
| D | Multi-Agent Orchestration | Multiple specialized Agents collaborate on complex tasks with a router/orchestrator role. Suited for workflows too complex for a single conversation | Each Agent has a single responsibility; AI can independently generate each Agent's Prompt and toolset | State passing between Agents, cycle detection, and cost control are extremely hard to design correctly; AI-generated orchestration logic easily produces infinite loops |
|
|
166
|
-
| Z | Custom | (describe your AI integration approach) | - | - |
|
|
44
|
+
**Entity Relationships** — Flat | 1:N | M:N | Recursive | JSON/EAV | Virtual
|
|
45
|
+
**Consistency** — ACID | Eventual Consistency | Optimistic Locking | None
|
|
46
|
+
**Access Patterns** — Read-Heavy | Balanced Read/Write | Write-Heavy | Real-time Query
|
|
47
|
+
**Security & Backup** — Encryption at Rest | Encryption in Transit | Backup & Recovery | PII Handling
|
|
167
48
|
|
|
168
49
|
---
|
|
169
50
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
### [?UI] Display & Interaction Mode
|
|
173
|
-
|
|
174
|
-
> Determines what the user sees and how they interact.
|
|
175
|
-
|
|
176
|
-
| ID | Option | Description | AI+ | AI- |
|
|
177
|
-
|:---|:---|:---|:---|:---|
|
|
178
|
-
| A | CRUD Table/List | Data in table or list with filter/sort/pagination, click to detail. Suited for admin panels, resource lists | Table component is the most AI-trained UI pattern; highest code generation accuracy | Large datasets require combined pagination+sorting+filtering logic; interaction state management is heavy |
|
|
179
|
-
| B | Wizard / Stepper | Splits complex operations into multi-step pages with progress bar and step indicator. Suited for registration flows, config wizards, multi-step forms | Each step's state is independently clear; AI can generate Step components one by one | Cross-step data sharing and validation are complex; AI easily misses state passing between steps |
|
|
180
|
-
| C | Dashboard / Kanban | Displays data as cards/columns with drag-and-drop. Suited for task management, status workflows, project boards | Visually intuitive; each card is an independent context unit | Drag-and-drop depends on third-party libs; AI has high hallucination risk for drag logic; many cross-browser compatibility issues |
|
|
181
|
-
| D | Modal / Drawer | Clicking a list item opens a floating modal or side drawer for detail/edit. Suited for quick edits that don't warrant a dedicated page | Context is localized; no route navigation needed | Z-index stacking, Focus Trap, Escape-to-close, and background scroll lock details frequently have bugs |
|
|
182
|
-
| E | Infinite Scroll / Feed | Auto-loads more content when scrolling to bottom, forming an endless feed. Suited for content consumption | Basic "load more" logic is simple | Virtual scrolling is extremely hard to get right; scroll position restoration and fast-scroll blank frames are very difficult for AI |
|
|
183
|
-
| F | Editor / Canvas | Rich text editor or free-form canvas interaction area. Suited for content creation / visual editing | High feature ceiling; great user freedom | Canvas is an imperative API, much harder to generate than declarative DOM; Selection API is extremely complex |
|
|
184
|
-
| Z | Custom | (describe your interaction approach) | - | - |
|
|
185
|
-
|
|
186
|
-
### [?CLI] User Interaction Mode
|
|
187
|
-
|
|
188
|
-
> Determines how users interact with this CLI feature and what feedback they see.
|
|
189
|
-
|
|
190
|
-
| ID | Option | Description | AI+ | AI- |
|
|
191
|
-
|:---|:---|:---|:---|:---|
|
|
192
|
-
| A | Silent / Batch | No interaction; pure silent execution — success to stdout, failure to stderr. Suited for scripts/pipeline steps | Simplest implementation; no I/O side effects; testing only requires asserting stdout | User gets no progress feedback during execution |
|
|
193
|
-
| B | Progress / Spinner | Shows progress bar or spinner during execution; prints result summary when done. Suited for time-consuming operations | Standard pattern; clack/ora libs have great support; a few lines to integrate | Must handle non-TTY environment degradation and terminal width changes |
|
|
194
|
-
| C | Interactive Menu | Shows a menu for the user to select actions. Suited for many feature entry points where users need to browse and choose | Menu structure is clear; AI can generate each option's handling logic individually | Deep menu hierarchies give poor UX; must handle fallback for non-interactive terminals |
|
|
195
|
-
| D | REPL / Shell | Enters a continuous interactive loop. Suited for exploratory tools, debuggers | Each interaction round is independent; AI can handle commands one by one | Must maintain session state, command history, and tab completion; high implementation complexity |
|
|
196
|
-
| E | Watch / Daemon | Runs continuously and watches for changes, automatically triggering actions. Suited for dev tools, file sync, auto-build | Event-driven model is clear; each trigger is handled independently | Cross-platform file watcher compatibility, debounce logic, and graceful shutdown are all pain points |
|
|
197
|
-
| Z | Custom | (describe your interaction approach) | - | - |
|
|
198
|
-
|
|
199
|
-
### [?API] Client Integration Mode
|
|
200
|
-
|
|
201
|
-
> Determines how callers integrate with and use this API.
|
|
202
|
-
|
|
203
|
-
| ID | Option | Description | AI+ | AI- |
|
|
204
|
-
|:---|:---|:---|:---|:---|
|
|
205
|
-
| A | Direct HTTP Call | Client sends HTTP requests directly. Simplest integration | No extra abstraction layer; AI generates request code most simply and directly | Type safety must be maintained manually; clients easily drift out of sync when interfaces change |
|
|
206
|
-
| B | SDK / Client Lib | Provides a packaged client SDK; callers use typed method calls | Strong type safety; interface changes caught at compile time | Must maintain SDK code and release versioning separately, adding overhead |
|
|
207
|
-
| C | Code Generation | Generates client code and type definitions automatically from OpenAPI/GraphQL schema | Schema is the contract; types auto-generated with zero manual maintenance | Generated code has limited customizability; schema changes require regeneration and compatibility checks |
|
|
208
|
-
| D | Webhook / Event | API proactively notifies clients via webhook callbacks. Suited for async event-driven scenarios | Decoupled; async notification requires no polling | Webhook signature verification, retry idempotency, and timeout handling are frequently missed by AI |
|
|
209
|
-
| Z | Custom | (describe your integration approach) | - | - |
|
|
210
|
-
|
|
211
|
-
### [?Lib] Consumer Usage Mode
|
|
212
|
-
|
|
213
|
-
> Determines how consumers use this library's features.
|
|
214
|
-
|
|
215
|
-
| ID | Option | Description | AI+ | AI- |
|
|
216
|
-
|:---|:---|:---|:---|:---|
|
|
217
|
-
| A | Import & Call | Directly import functions/classes and call them. Most direct; zero-config to get started | Simplest usage; AI achieves highest accuracy for example code and tests | May require frequent public signature changes when features expand, affecting downstream consumers |
|
|
218
|
-
| B | Register & Use | Register configuration first, then use. Suited for libraries needing initialization and lifecycle management | Init and usage phases are separated; AI can generate logic in stages | Registration order and lifecycle constraints need clear docs; AI may generate incorrect call sequences |
|
|
219
|
-
| C | Decorator / Annotation | Declare behavior via decorators. Suited for framework-level libs; declarative config reduces boilerplate | Declarative code is concise; intent is clear | TS decorator proposal is still evolving; AI may confuse old and new decorator syntax |
|
|
220
|
-
| Z | Custom | (describe your consumer usage approach) | - | - |
|
|
221
|
-
|
|
222
|
-
### [?Mobile] Mobile Interaction Mode
|
|
223
|
-
|
|
224
|
-
> Determines how users operate this feature on mobile devices and what feedback they see.
|
|
51
|
+
### `cli` Projects: Command Line Interaction Design
|
|
225
52
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
| C | Gesture-Driven | Relies on swipe, long-press gestures (e.g., swipe-to-delete, drag-to-reorder). Suited for lightweight, high-frequency interactions | Gesture semantics are intuitive; user interactions feel smooth | Gesture conflicts (inner scroll vs. outer gesture) are extremely hard to debug; cross-platform gesture lib API differences AI easily confuses |
|
|
231
|
-
| D | Bottom Sheet / Action Sheet | Tap triggers a bottom slide-up panel or action menu. Suited for secondary actions, filters, quick selections | No route navigation; context is localized | Gesture-to-close, keyboard coordination, and nested scroll need careful handling; iOS/Android behavioral differences AI often ignores |
|
|
232
|
-
| Z | Custom | (describe your mobile interaction approach) | - | - |
|
|
53
|
+
**Input Reception** — Pure Args | Interactive Prompts | Hybrid | Config File | Stdin/Pipe
|
|
54
|
+
**Output Presentation** — Silent | Progress/Spinner | Structured | Human-readable
|
|
55
|
+
**Execution Mode** — One-shot | REPL | Watch/Daemon | Batch
|
|
56
|
+
**Error Handling** — Exit Code Only | Stderr Message | Retry Logic | Interactive Recovery
|
|
233
57
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
> Determines how users interact with this feature inside the mini-program.
|
|
237
|
-
|
|
238
|
-
| ID | Option | Description | AI+ | AI- |
|
|
239
|
-
|:---|:---|:---|:---|:---|
|
|
240
|
-
| A | Native Components | Uses platform native components (button, input, scroll-view) following platform UI guidelines. Suited for most standard features | Native components are platform-guaranteed; AI generates standard mini-program code with high accuracy | Native component style customization is limited; CSS support less complete than web |
|
|
241
|
-
| B | Custom Component | Encapsulates reusable UI units as custom components. Suited for high customization or multi-use scenarios | Component encapsulation improves context locality; AI can generate each component independently | Mini-program custom components have slot/properties/triggerEvent nuances different from web components; AI easily confuses them |
|
|
242
|
-
| C | Half-Screen / Full-Screen Popup | Half-screen popup or full-screen overlay. Suited for detail viewing, confirmation actions, filter panels | Popup structure is clear; AI generates conditional rendering logic accurately | z-index management and animation transitions need attention due to WeChat mini-program's renderer layer behavior |
|
|
243
|
-
| Z | Custom | (describe your mini-program interaction approach) | - | - |
|
|
244
|
-
|
|
245
|
-
### [?Extension] Extension Interaction Entry Mode
|
|
246
|
-
|
|
247
|
-
> Determines through which entry point users interact with the extension feature.
|
|
248
|
-
|
|
249
|
-
| ID | Option | Description | AI+ | AI- |
|
|
250
|
-
|:---|:---|:---|:---|:---|
|
|
251
|
-
| A | Browser Action Popup | Clicking the extension icon opens a small Popup window. Suited for config panels, quick actions, status displays | Popup is a standalone HTML page; AI generates code identical to regular web | Popup dimensions are limited (~600×600px); state is destroyed on close; data must be persisted to chrome.storage |
|
|
252
|
-
| B | Context Menu | Injects options into the right-click context menu. Suited for quick processing of selected text/links/images | Menu item registration logic is simple; AI can generate it in one pass | Menu display conditions must be precisely declared; operation results must be relayed to users via messages |
|
|
253
|
-
| C | Content Injection | Injects buttons, floating icons, or toolbars into target pages. Suited for page enhancement features | The injected UI's HTML/CSS is self-contained; AI can generate it independently | Must handle page style pollution (using Shadow DOM isolation); injection points may break when target page's DOM changes |
|
|
254
|
-
| D | Side Panel | Browser sidebar (Chrome sidePanel API), always present on the right. Suited for persistent tool panels | Full page space available; natural browser-native integration UX | sidePanel API is relatively new; limited cross-browser compatibility; requires user to manually enable |
|
|
255
|
-
| Z | Custom | (describe your extension interaction approach) | - | - |
|
|
256
|
-
|
|
257
|
-
### [?Desktop] Desktop Interaction Mode
|
|
58
|
+
---
|
|
258
59
|
|
|
259
|
-
|
|
60
|
+
### `lib` Projects: Library API Design
|
|
260
61
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
| D | Native Dialogs | Uses system native file pickers, dialogs, and notifications. Suited for file operations and system-level alerts | Zero style maintenance cost; users are familiar | Native dialog API calls differ between Electron and Tauri; must consult docs |
|
|
267
|
-
| Z | Custom | (describe your desktop interaction approach) | - | - |
|
|
62
|
+
**Exposure Pattern** — Functions | Class/Instance | Builder/Fluent | Config Object | Plugin System
|
|
63
|
+
**Consumer Access** — Import & Call | Register & Use | Decorator | Global Registration
|
|
64
|
+
**Public Boundary** — Full Public | Facade | Internal Heavy
|
|
65
|
+
**Error Handling** — Throw on Error | Return Result Type | Error Callback | Event Emitter
|
|
66
|
+
**Documentation Strategy** — JSDoc/TSDoc | README Quick Start | API Reference | Examples & Recipes
|
|
268
67
|
|
|
269
|
-
|
|
68
|
+
---
|
|
270
69
|
|
|
271
|
-
|
|
70
|
+
### `api` Projects: Interface Contract Design
|
|
272
71
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
| D | Autonomous Agent | AI autonomously plans and executes multi-step tasks, returning complete results. Suited for complex workflow automation | No need for users to intervene step-by-step; end-to-end task completion | Observability of intermediate steps (progress display), partial rollback on failure, and cost control are extremely hard to implement correctly |
|
|
279
|
-
| Z | Custom | (describe your AI interaction output approach) | - | - |
|
|
72
|
+
**Protocol Style** — RESTful | RPC-Style | GraphQL | gRPC | WebSocket
|
|
73
|
+
**Client Access** — Direct HTTP | SDK | CodeGen | Webhook
|
|
74
|
+
**Version Evolution** — URL Versioning | Header Versioning | No Versioning | Deprecation Window
|
|
75
|
+
**Security & Auth** — API Key | JWT Token | OAuth 2.0 | mTLS
|
|
76
|
+
**Rate Limiting & Protection** — Rate Limiting | Quota System | IP Whitelist | Request Signing
|
|
280
77
|
|
|
281
78
|
---
|
|
282
79
|
|
|
283
|
-
|
|
80
|
+
### `mobile` Projects: Mobile Navigation & Interaction
|
|
284
81
|
|
|
285
|
-
**
|
|
286
|
-
**
|
|
82
|
+
**Navigation Structure** — Stack | Tab | Drawer | Hybrid
|
|
83
|
+
**Interaction Pattern** — List/Card | Form/Wizard | Gesture-Driven | Bottom Sheet
|
|
84
|
+
**State Management** — Local State | Global Store | React Query/SWR | Offline-First
|
|
85
|
+
**Offline Support** — Online Only | Cache for Offline | Full Offline Support | Background Sync
|
|
86
|
+
**Performance Optimization** — Lazy Loading | Image Optimization | Code Splitting | Native Modules
|
|
287
87
|
|
|
288
|
-
|
|
88
|
+
---
|
|
289
89
|
|
|
290
|
-
|
|
90
|
+
### `miniapp` Projects: Mini-Program Architecture
|
|
291
91
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
| C | Polling / SWR | Periodically re-fetches data, or refreshes on window focus. Suited for near-real-time data that doesn't need millisecond updates | React Query/SWR libs are mature; AI only needs to configure staleTime/refetchInterval | Polling interval and cache invalidation strategy need balancing; misconfiguration causes pointless request storms |
|
|
297
|
-
| D | Realtime (Socket/SSE) | Server proactively pushes data to client. Suited for live chat, real-time collaboration, stock tickers | Lowest latency; data syncs in real time; best user experience | Reconnect logic, heartbeat keep-alive, and message ordering guarantees are extremely hard to implement correctly; AI-generated WebSocket code often has connection leaks |
|
|
298
|
-
| E | Local-First / Offline | Data stored locally first; synced to server when online. Suited for weak network or offline-required scenarios | Works offline; unaffected by network | Conflict resolution algorithms (CRDT/OT) are advanced problems; AI struggles to correctly implement multi-client concurrent conflict merging |
|
|
299
|
-
| F | Background Job | Returns immediately after user trigger; background processes async work. Suited for long operations (batch processing, file generation) | Decoupled from main thread; API response is fast | Requires extra task queue, status querying, and completion notification mechanisms |
|
|
300
|
-
| Z | Custom | (describe your data flow approach) | - | - |
|
|
92
|
+
**Page Organization** — Single Page | Multi-Page | Tabbar | WebView Hybrid
|
|
93
|
+
**Platform Authorization** — Anonymous | Silent Auth | Phone Binding | Full Profile
|
|
94
|
+
**Data Communication** — Request | WebSocket | EventBus | Storage Sync
|
|
95
|
+
**Performance Optimization** — Lazy Load | Skeleton Screen | Preload Data | Reduce SetData
|
|
301
96
|
|
|
302
97
|
---
|
|
303
98
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
**Convention inheritance**: If `02_tech_stack.md` §9 Error Handling has an established project-level strategy → auto-inherit, do not expand option table.
|
|
307
|
-
Only add supplementary handling if this feature has **special exception scenarios not covered by the project convention** (e.g., this feature needs Undo/Redo but the project convention only has Fail Fast).
|
|
99
|
+
### `extension` Projects: Browser Extension Architecture
|
|
308
100
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
| C | Retry / Recovery | Auto-retry on failure or provides a manual retry button. Suited for unstable networks or intermittently failing external services | Retry logic can be encapsulated as a general utility function; highly reusable | Operation must be idempotent (no side effects from repeated execution); AI struggles to verify idempotency |
|
|
314
|
-
| D | Fallback / Skeleton | Shows degraded UI (skeleton screen, empty state) instead of blank page when loading fails or data is empty | Skeleton screen is a standard UI pattern; high AI generation accuracy | Must maintain parallel UI structures for each state (loading/empty/error); component count doubles |
|
|
315
|
-
| E | Draft / Auto-save | Automatically saves drafts periodically during user editing to prevent accidental data loss | Save logic can be abstracted into a reusable Hook/utility function | Save throttling (debounce/throttle) and conflict detection need careful handling |
|
|
316
|
-
| F | Undo / Redo | Supports undo/redo after operations. Suited for scenarios where users might make consequential mistakes | Increases user confidence; reduces anxiety about mistakes | State snapshot and history stack management logic is complex; AI-generated undo stacks often have memory leaks or state inconsistency |
|
|
317
|
-
| Z | Custom | (describe your error handling approach) | - | - |
|
|
101
|
+
**Logic Deployment** — Background | Content Script | Popup | Full Architecture
|
|
102
|
+
**Interaction Entry** — Browser Action | Context Menu | Content Injection | Side Panel | Keyboard Shortcut
|
|
103
|
+
**Cross-Layer Communication** — Message Passing | Shared Storage | Native Messaging
|
|
104
|
+
**Distribution & Updates** — Manual Update | Auto Update | Chrome Web Store | Enterprise Policy
|
|
318
105
|
|
|
319
106
|
---
|
|
320
107
|
|
|
321
|
-
|
|
108
|
+
### `desktop` Projects: Desktop Application Architecture
|
|
322
109
|
|
|
323
|
-
**
|
|
324
|
-
**
|
|
110
|
+
**Process Division** — Main-Centric | Renderer-Centric | Worker Thread | Multi-Process
|
|
111
|
+
**Window Management** — Single Window | Multi Window | Tray/Menu Bar | Global Hotkey
|
|
112
|
+
**System Integration** — Native Dialogs | File System Access | Hardware Integration | Auto Updater
|
|
113
|
+
**Packaging & Distribution** — Electron Builder | Tauri CLI | Code Signing | Auto-Update Server
|
|
325
114
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
> Who can perform this feature's operations and see its data. Auth mechanism inherits project convention; this only decides the permission level for this feature.
|
|
115
|
+
---
|
|
329
116
|
|
|
330
|
-
|
|
331
|
-
|:---|:---|:---|:---|:---|
|
|
332
|
-
| A | Public | Fully open; no login required. Suited for public content accessible to anonymous users | No auth middleware needed; simplest API layer | Must add rate limiting to prevent abuse; public endpoints are easy targets for scrapers and malicious calls |
|
|
333
|
-
| B | Authenticated | Logged-in users only. Suited for personal pages, order lists, and other identity-required scenarios | Standard JWT/Session middleware; AI's most mature implementation | Must handle token expiry refresh, multi-device session eviction, and other session management logic |
|
|
334
|
-
| C | Owner Only | Only the resource creator can act on it. Suited for "only edit your own content" scenarios | Simple ownership check; one line of code | If resources can be transferred or have delegated operation scenarios, a simple owner check isn't enough |
|
|
335
|
-
| D | Role Based (RBAC) | Permissions by role: admin/editor/viewer. Suited for admin panels, multi-role collaboration systems | Permission rules are explicit and enumerable; AI can generate guard logic from a role matrix | Guard logic scattered across every endpoint; high context load; role nesting makes permission inheritance complex |
|
|
336
|
-
| E | Team / Shared | Team/org members can access. Suited for collaboration, multi-tenant systems | Permission boundary is at team granularity; appropriate scope | Must query team membership table with complex JOINs; cross-team sharing adds further complexity |
|
|
337
|
-
| F | Tier / Subscription | Feature-gated by subscription tier. Suited for SaaS products with tiered features | Rules can be config-driven; decoupled from business logic | Mocking payment state and billing logic is difficult; tests require large volumes of fixture data |
|
|
338
|
-
| Z | Custom | (describe your access control approach) | - | - |
|
|
117
|
+
### `ai` Projects: LLM Integration & Agent Design
|
|
339
118
|
|
|
340
|
-
|
|
119
|
+
**Provider Supply** — Direct API | Provider Abstraction | Local Model | Hybrid Cloud-Edge
|
|
120
|
+
**Interaction Pattern** — Chat | Command-Driven | Streaming | Autonomous Agent
|
|
121
|
+
**Tools & Extensions** — No Tools | Function Calling | Code Execution | Multi-Agent | RAG
|
|
122
|
+
**Context Management** — Full History | Sliding Window | Summarization | Session-Based
|
|
123
|
+
**Cost Monitoring** — Token Budgeting | Usage Quota | Request Logging | Performance Metrics
|
|
341
124
|
|
|
342
|
-
|
|
125
|
+
---
|
|
343
126
|
|
|
344
|
-
|
|
345
|
-
|:---|:---|:---|:---|:---|
|
|
346
|
-
| A | Anonymous | No authorization needed; anonymous access. Suited for browse-only features | No auth flow; AI generates the simplest implementation | Must add rate limiting to prevent abuse; no user identity means no ability to associate history data |
|
|
347
|
-
| B | Platform Auth (openid) | Silent authorization obtains openid without showing a permission dialog. Suited for most features needing user distinction but not full profile data | No user action required; code2session flow is standard; AI generation accuracy is high | openid is unique only within the same mini-program/platform; cross-platform or cross-mini-program scenarios need unionid |
|
|
348
|
-
| C | Phone Binding | Dialog authorization to obtain phone number, bound to business account. Suited for real identity association or integration with existing account systems | Platform handles authenticity verification; business side only needs to store the association | Phone number authorization has strict UI restrictions (must use button component, JS trigger forbidden); AI easily generates non-compliant trigger methods |
|
|
349
|
-
| D | Full Profile Auth | Requests full user profile authorization (nickname/avatar). Suited for social features or scenarios requiring user info display | Single authorization obtains complete user information | WeChat tightened this authorization in 2022; must use new getUserProfile API; deprecated getUserInfo is common in AI training data causing confusion |
|
|
350
|
-
| Z | Custom | (describe your mini-program authorization approach) | - | - |
|
|
127
|
+
### `ui` Projects: Interface Interaction Design (General Addition)
|
|
351
128
|
|
|
352
|
-
|
|
129
|
+
**Data Flow** — Standard Request | Optimistic UI | Realtime | Offline-First
|
|
130
|
+
**Error Handling** — Fail Fast | Retry/Recovery | Fallback UI | Undo/Redo
|
|
131
|
+
**Access Control** — Public | Authenticated | Role-Based | Owner-Only
|
|
132
|
+
**Internationalization** — i18n Support | RTL Layout | Accessibility | Screen Reader
|
|
353
133
|
|
|
354
|
-
|
|
134
|
+
---
|
|
355
135
|
|
|
356
|
-
|
|
357
|
-
|:---|:---|:---|:---|:---|
|
|
358
|
-
| A | Full Public | All features and types exported publicly. Suited for small, transparent utility libraries | AI doesn't need to guess which APIs are public; all types are traceable | Oversized public surface; any internal refactor is potentially a breaking change |
|
|
359
|
-
| B | Facade / Entry Point | Curated public API exported through a single entry file (index.ts); internals not exposed directly | Small, explicit public surface; AI can understand all available APIs from index.ts | Must continuously maintain the export list; new features must be explicitly added to the facade |
|
|
360
|
-
| C | Internal / Private | Only minimal public interface exposed; most implementation marked internal. Suited for core libs, security-sensitive modules | Smallest public surface; lowest risk of breaking changes | AI lacks context when modifying internal code; must frequently read source code |
|
|
361
|
-
| Z | Custom | (describe your encapsulation approach) | - | - |
|
|
136
|
+
## Output Format
|
|
362
137
|
|
|
363
|
-
|
|
138
|
+
**Recommendation Row**: `Project Type @ Core Question: Decision (Source: Convention/Recommendation) — Rationale: ...`
|
|
364
139
|
|
|
365
|
-
> **Intermediate artifact**:
|
|
140
|
+
> **Intermediate artifact**: After producing recommendation row or Q-table, control returns to `/archi.plan` where the caller assembles output into the Task Proposal.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-silent-audit
|
|
3
|
-
|
|
4
|
-
description: Embedded lightweight review. In an isolated context, reviews main Agent output, filters review dimensions by mode, returns finding list. Must not generate report files. Shares dimension definitions with audit.md but differs in responsibility: audit.md is user-triggered standalone deep review; this Skill is protocol-triggered lightweight check.
|
|
3
|
+
description: Lightweight code and document review. **Must run in isolated context/subagent.** Use when verifying outputs or checking compliance with specifications.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Embedded Lightweight Review
|
|
@@ -36,7 +35,7 @@ Review global file quality for new/inherited projects.
|
|
|
36
35
|
| # | Dimension | Review Points |
|
|
37
36
|
|:---|:---|:---|
|
|
38
37
|
| 1 | **Vision-Roadmap alignment** | Roadmap task direction aligns with vision.md north star |
|
|
39
|
-
| 2 | **Tech Stack consistency** | `
|
|
38
|
+
| 2 | **Tech Stack consistency** | `tech_stack.md` matches actual deps/config |
|
|
40
39
|
| 3 | **Global file completeness** | Required global files present (vision, roadmap, map, dictionary, tech_stack, custom_rules) |
|
|
41
40
|
| 4 | **Zero info omission** | All Brief/code info routed to corresponding files |
|
|
42
41
|
| 5 | [?UI] **Design Tokens** | `design_tokens.json` has base colors/fonts/spacing |
|
|
@@ -49,7 +48,7 @@ Review planning doc (spec/ui/plan) quality.
|
|
|
49
48
|
|:---|:---|:---|
|
|
50
49
|
| 1 | **Design Fidelity** | spec § 2 fully covers confirmed functional design |
|
|
51
50
|
| 2 | **Dimension Match** | spec § 2 dimension format matches Task Type |
|
|
52
|
-
| 3 | **Tech Consistency** | No tech not declared in `
|
|
51
|
+
| 3 | **Tech Consistency** | No tech not declared in `tech_stack.md` |
|
|
53
52
|
| 4 | **WBS Coverage** | plan.json 100% covers each AC in spec |
|
|
54
53
|
| 5 | **Notes Quality** | plan.json each task notes has deliverable+constraint+executable verification |
|
|
55
54
|
| 6 | **Interface Exports** | INF task § 4 filled; interface declared when downstream deps exist |
|
|
@@ -65,7 +64,7 @@ Review code implementation quality.
|
|
|
65
64
|
|
|
66
65
|
| # | Dimension | Review Points |
|
|
67
66
|
|:---|:---|:---|
|
|
68
|
-
| 1 | **Tech Consistency** | Matches `
|
|
67
|
+
| 1 | **Tech Consistency** | Matches `tech_stack.md` (libs/patterns/API style) |
|
|
69
68
|
| 2 | **SOTA** | Reject outdated patterns; use tech_stack best practices |
|
|
70
69
|
| 3 | **Security** | No sensitive info leak; input validated |
|
|
71
70
|
| 4 | **Performance** | Avoid unnecessary large deps/full imports/useless computation/memory leaks |
|