architext 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/LICENSE +21 -0
- package/README.md +326 -0
- package/README.zh-CN.md +326 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +46 -0
- package/dist/templates/en/briefs/_base.md +115 -0
- package/dist/templates/en/briefs/_modules.md +173 -0
- package/dist/templates/en/docs/global/data_snapshot.json +31 -0
- package/dist/templates/en/docs/global/design_tokens.json +150 -0
- package/dist/templates/en/docs/global/dictionary.json +35 -0
- package/dist/templates/en/docs/global/error_codes.json +19 -0
- package/dist/templates/en/docs/global/map.json +94 -0
- package/dist/templates/en/docs/global/roadmap.json +39 -0
- package/dist/templates/en/docs/global/vision.md +82 -0
- package/dist/templates/en/docs/prompts/audit.md +150 -0
- package/dist/templates/en/docs/prompts/code.md +160 -0
- package/dist/templates/en/docs/prompts/edit.md +87 -0
- package/dist/templates/en/docs/prompts/fix.md +86 -0
- package/dist/templates/en/docs/prompts/help.md +69 -0
- package/dist/templates/en/docs/prompts/inherit.md +270 -0
- package/dist/templates/en/docs/prompts/map.md +131 -0
- package/dist/templates/en/docs/prompts/plan.md +252 -0
- package/dist/templates/en/docs/prompts/remove.md +162 -0
- package/dist/templates/en/docs/prompts/revise.md +160 -0
- package/dist/templates/en/docs/prompts/scope.md +198 -0
- package/dist/templates/en/docs/prompts/start.md +258 -0
- package/dist/templates/en/docs/templates/plan.template.json +113 -0
- package/dist/templates/en/docs/templates/scope-brief.template.md +58 -0
- package/dist/templates/en/docs/templates/spec.template.md +51 -0
- package/dist/templates/en/docs/templates/ui.template.md +51 -0
- package/dist/templates/en/rules/00_system.md +123 -0
- package/dist/templates/en/rules/01_workflow.md +93 -0
- package/dist/templates/en/rules/02_tech_stack.md +197 -0
- package/dist/templates/en/rules/03_data_governance.md +102 -0
- package/dist/templates/en/rules/04_cli_tools.md +50 -0
- package/dist/templates/en/rules/90_custom_rules.md +22 -0
- package/dist/templates/en/rules/99_context_glue.md +53 -0
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +292 -0
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +86 -0
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +364 -0
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +342 -0
- package/dist/templates/zh/briefs/_base.md +116 -0
- package/dist/templates/zh/briefs/_modules.md +173 -0
- package/dist/templates/zh/docs/global/data_snapshot.json +31 -0
- package/dist/templates/zh/docs/global/design_tokens.json +135 -0
- package/dist/templates/zh/docs/global/dictionary.json +35 -0
- package/dist/templates/zh/docs/global/error_codes.json +19 -0
- package/dist/templates/zh/docs/global/map.json +94 -0
- package/dist/templates/zh/docs/global/roadmap.json +39 -0
- package/dist/templates/zh/docs/global/vision.md +82 -0
- package/dist/templates/zh/docs/prompts/audit.md +150 -0
- package/dist/templates/zh/docs/prompts/code.md +160 -0
- package/dist/templates/zh/docs/prompts/edit.md +87 -0
- package/dist/templates/zh/docs/prompts/fix.md +86 -0
- package/dist/templates/zh/docs/prompts/help.md +69 -0
- package/dist/templates/zh/docs/prompts/inherit.md +270 -0
- package/dist/templates/zh/docs/prompts/map.md +131 -0
- package/dist/templates/zh/docs/prompts/plan.md +253 -0
- package/dist/templates/zh/docs/prompts/remove.md +162 -0
- package/dist/templates/zh/docs/prompts/revise.md +160 -0
- package/dist/templates/zh/docs/prompts/scope.md +198 -0
- package/dist/templates/zh/docs/prompts/start.md +258 -0
- package/dist/templates/zh/docs/templates/plan.template.json +88 -0
- package/dist/templates/zh/docs/templates/scope-brief.template.md +58 -0
- package/dist/templates/zh/docs/templates/spec.template.md +51 -0
- package/dist/templates/zh/docs/templates/ui.template.md +51 -0
- package/dist/templates/zh/rules/00_system.md +123 -0
- package/dist/templates/zh/rules/01_workflow.md +93 -0
- package/dist/templates/zh/rules/02_tech_stack.md +192 -0
- package/dist/templates/zh/rules/03_data_governance.md +102 -0
- package/dist/templates/zh/rules/04_cli_tools.md +50 -0
- package/dist/templates/zh/rules/90_custom_rules.md +21 -0
- package/dist/templates/zh/rules/99_context_glue.md +53 -0
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +293 -0
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +86 -0
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +364 -0
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +339 -0
- package/dist/templates/zh-Hant/briefs/_base.md +115 -0
- package/dist/templates/zh-Hant/briefs/_modules.md +173 -0
- package/dist/templates/zh-Hant/docs/global/data_snapshot.json +31 -0
- package/dist/templates/zh-Hant/docs/global/design_tokens.json +135 -0
- package/dist/templates/zh-Hant/docs/global/dictionary.json +35 -0
- package/dist/templates/zh-Hant/docs/global/error_codes.json +19 -0
- package/dist/templates/zh-Hant/docs/global/map.json +94 -0
- package/dist/templates/zh-Hant/docs/global/roadmap.json +39 -0
- package/dist/templates/zh-Hant/docs/global/vision.md +82 -0
- package/dist/templates/zh-Hant/docs/prompts/audit.md +150 -0
- package/dist/templates/zh-Hant/docs/prompts/code.md +160 -0
- package/dist/templates/zh-Hant/docs/prompts/edit.md +87 -0
- package/dist/templates/zh-Hant/docs/prompts/fix.md +86 -0
- package/dist/templates/zh-Hant/docs/prompts/help.md +69 -0
- package/dist/templates/zh-Hant/docs/prompts/inherit.md +270 -0
- package/dist/templates/zh-Hant/docs/prompts/map.md +131 -0
- package/dist/templates/zh-Hant/docs/prompts/plan.md +252 -0
- package/dist/templates/zh-Hant/docs/prompts/remove.md +162 -0
- package/dist/templates/zh-Hant/docs/prompts/revise.md +160 -0
- package/dist/templates/zh-Hant/docs/prompts/scope.md +198 -0
- package/dist/templates/zh-Hant/docs/prompts/start.md +258 -0
- package/dist/templates/zh-Hant/docs/templates/plan.template.json +88 -0
- package/dist/templates/zh-Hant/docs/templates/scope-brief.template.md +58 -0
- package/dist/templates/zh-Hant/docs/templates/spec.template.md +51 -0
- package/dist/templates/zh-Hant/docs/templates/ui.template.md +51 -0
- package/dist/templates/zh-Hant/rules/00_system.md +123 -0
- package/dist/templates/zh-Hant/rules/01_workflow.md +93 -0
- package/dist/templates/zh-Hant/rules/02_tech_stack.md +192 -0
- package/dist/templates/zh-Hant/rules/03_data_governance.md +102 -0
- package/dist/templates/zh-Hant/rules/04_cli_tools.md +50 -0
- package/dist/templates/zh-Hant/rules/90_custom_rules.md +21 -0
- package/dist/templates/zh-Hant/rules/99_context_glue.md +53 -0
- package/dist/templates/zh-Hant/skills/archi-decompose-roadmap/SKILL.md +293 -0
- package/dist/templates/zh-Hant/skills/archi-interview-protocol/SKILL.md +86 -0
- package/dist/templates/zh-Hant/skills/archi-plan-options/SKILL.md +364 -0
- package/dist/templates/zh-Hant/skills/archi-ui-wireframe/SKILL.md +337 -0
- package/package.json +85 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Changelog / 更新日志
|
|
2
|
+
|
|
3
|
+
本文件记录所有重要变更,格式遵循 [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),版本号遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。
|
|
4
|
+
|
|
5
|
+
All notable changes are documented here, following [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [Unreleased](https://github.com/JiuNian3219/architext/compare/v0.0.2...HEAD) / 待发布
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## [0.0.2](https://github.com/JiuNian3219/architext/releases/tag/v0.0.2) - 2026-02-27
|
|
14
|
+
|
|
15
|
+
> 首个正式上线版本(0.0.1 因发布流程问题未能正常上线)
|
|
16
|
+
> First properly released version (0.0.1 failed to publish due to a release process issue)
|
|
17
|
+
|
|
18
|
+
### Added / 新增
|
|
19
|
+
|
|
20
|
+
- Architext CLI 初始发布 / Initial release of Architext CLI
|
|
21
|
+
- `archi init` — 部署框架文件(规则、Prompt、Skills),交互式选择 IDE(支持 Cursor、Windsurf、Trae、VS Code)/ Deploy framework files (rules, prompts, skills) with interactive IDE selection (Cursor, Windsurf, Trae, VS Code)
|
|
22
|
+
- `archi update` — 将已部署的框架文件更新至最新版本 / Update deployed framework files to the latest version
|
|
23
|
+
- `archi doctor` — 项目健康检查 / Project health check
|
|
24
|
+
- `archi render` — 将 JSON 数据文件生成可读 Markdown 视图 / Generate Markdown views from JSON data files
|
|
25
|
+
- `archi task` — 查看、校验并更新 Roadmap 任务状态 / View, validate and update Roadmap task status
|
|
26
|
+
- `archi template` — 获取模板文件到项目根目录 / Fetch template files to project root
|
|
27
|
+
- 三语模板支持:简体中文(zh)、繁体中文(zh-Hant)、英文(en)/ Tri-language template support
|
|
28
|
+
- 完整 `/archi.*` Prompt 协议套件:`start`、`inherit`、`scope`、`plan`、`code`、`edit`、`revise`、`audit`、`fix`、`map`、`remove`、`help`
|
|
29
|
+
- Agent Skills:`archi-decompose-roadmap`、`archi-interview-protocol`、`archi-plan-options`、`archi-ui-wireframe`
|
|
30
|
+
- 全局上下文资产:`roadmap.json`、`vision.md`、`map.json`、`dictionary.json`、`design_tokens.json`、`data_snapshot.json`、`error_codes.json`
|
|
31
|
+
- IDE 规则文件:`00_system`、`01_workflow`、`02_tech_stack`、`03_data_governance`、`04_cli_tools`、`90_custom_rules`、`99_context_glue`
|
|
32
|
+
- 双语文档支持(英文 + 简体中文)/ Bilingual documentation (English + Simplified Chinese)
|
|
33
|
+
- GitHub 社区文件:贡献指南、Issue 模板、PR 模板 / GitHub community files: CONTRIBUTING, issue templates, PR template
|
|
34
|
+
- GitHub Actions CI 与自动发布流程 / GitHub Actions CI and automated release workflow
|
|
35
|
+
- 架构参考文档 `docs/internals.md` / Architecture reference document `docs/internals.md`
|
|
36
|
+
|
|
37
|
+
### Fixed / 修复
|
|
38
|
+
|
|
39
|
+
- 修复 npm 页面 README 链接无法跳转 / Fix README links not working on npm package page
|
|
40
|
+
- 修正 CONTRIBUTING 中的仓库地址 / Fix repository URL in CONTRIBUTING
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## [0.0.1](https://github.com/JiuNian3219/architext/releases/tag/v0.0.1) - 2026-02-26
|
|
45
|
+
|
|
46
|
+
### Added / 新增
|
|
47
|
+
|
|
48
|
+
- Architext CLI 初始发布 / Initial release of Architext CLI
|
|
49
|
+
- `archi init` — 部署框架文件(规则、Prompt、Skills),交互式选择 IDE(支持 Cursor、Windsurf、Trae、VS Code)/ Deploy framework files (rules, prompts, skills) with interactive IDE selection (Cursor, Windsurf, Trae, VS Code)
|
|
50
|
+
- `archi update` — 将已部署的框架文件更新至最新版本 / Update deployed framework files to the latest version
|
|
51
|
+
- `archi doctor` — 项目健康检查 / Project health check
|
|
52
|
+
- `archi render` — 将 JSON 数据文件生成可读 Markdown 视图 / Generate Markdown views from JSON data files
|
|
53
|
+
- `archi task` — 查看、校验并更新 Roadmap 任务状态 / View, validate and update Roadmap task status
|
|
54
|
+
- `archi template` — 获取模板文件到项目根目录 / Fetch template files to project root
|
|
55
|
+
- 三语模板支持:简体中文(zh)、繁体中文(zh-Hant)、英文(en)/ Tri-language template support
|
|
56
|
+
- 完整 `/archi.*` Prompt 协议套件:`start`、`inherit`、`scope`、`plan`、`code`、`edit`、`revise`、`audit`、`fix`、`map`、`remove`、`help`
|
|
57
|
+
- Agent Skills:`archi-decompose-roadmap`、`archi-interview-protocol`、`archi-plan-options`、`archi-ui-wireframe`
|
|
58
|
+
- 全局上下文资产:`roadmap.json`、`vision.md`、`map.json`、`dictionary.json`、`design_tokens.json`、`data_snapshot.json`、`error_codes.json`
|
|
59
|
+
- IDE 规则文件:`00_system`、`01_workflow`、`02_tech_stack`、`03_data_governance`、`04_cli_tools`、`90_custom_rules`、`99_context_glue`
|
|
60
|
+
- 双语文档支持(英文 + 简体中文)/ Bilingual documentation (English + Simplified Chinese)
|
|
61
|
+
- GitHub 社区文件:贡献指南、Issue 模板、PR 模板 / GitHub community files: CONTRIBUTING, issue templates, PR template
|
|
62
|
+
- GitHub Actions CI 与自动发布流程 / GitHub Actions CI and automated release workflow
|
|
63
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JiuNian3219
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
[简体中文](https://github.com/JiuNian3219/architext/blob/main/README.zh-CN.md) · **English**
|
|
4
|
+
|
|
5
|
+
# 🏛️ Architext
|
|
6
|
+
|
|
7
|
+
**The AI Architecture Protocol. Define first, build right.**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/architext)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://nodejs.org)
|
|
12
|
+
|
|
13
|
+
**Supported IDEs:** Cursor *(recommended)* · Windsurf · Trae · VS Code
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
> **🚧 Early-stage notice**
|
|
18
|
+
>
|
|
19
|
+
> Architext is in early development. The core workflow (init → start → plan → code) is functional, but rough edges remain. If you run into any issues, please [open an Issue](../../issues) — I'll address it quickly. Every piece of feedback directly shapes the project, and I'm grateful you're willing to try it at this stage.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## What is Architext?
|
|
24
|
+
|
|
25
|
+
Architext is a **Document-Driven AI Development (DDAD)** protocol that upgrades your AI coding assistant from a "random code generator" into a "rigorous world-class architect."
|
|
26
|
+
|
|
27
|
+
Before a single line of code is written, Architext forces you and your AI to align on: **what** you're building, **why** it matters, and **exactly how** it should be implemented — through structured documents that persist across every chat session.
|
|
28
|
+
|
|
29
|
+
> **No Docs, No Code.** Code is just a downstream artifact of documents.
|
|
30
|
+
|
|
31
|
+
Architext operates in two layers:
|
|
32
|
+
|
|
33
|
+
| Layer | How to trigger | Responsibility |
|
|
34
|
+
|:---|:---|:---|
|
|
35
|
+
| **CLI Tool Layer** | `npx archi <command>` | Deploy rule files, prompts, and skills into your project |
|
|
36
|
+
| **AI Command Layer** | `/archi.<command>` in AI chat | Generate documents, plan features, write code, audit |
|
|
37
|
+
|
|
38
|
+
The CLI layer bootstraps the project once. The AI command layer drives all development work on top of those files.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Why Architext?
|
|
43
|
+
|
|
44
|
+
| | AI Full-Agency Mode<br>*(Trae Solo / Bolt / v0)* | **Architext** |
|
|
45
|
+
|:---|:---|:---|
|
|
46
|
+
| **Core Assumption** | AI knows what you want | You know what you want, but haven't thought it through yet |
|
|
47
|
+
| **AI's Role** | Full agent — decides and executes | Product consultant + strict executor |
|
|
48
|
+
| **Your Role** | Reviewer (see it after it's done) | Decision-maker (see the full picture before build) |
|
|
49
|
+
| **Information Flow** | AI → You ("does this work?") | You → AI ("here's exactly what I need") |
|
|
50
|
+
| **Ownership** | AI implicitly decides the logic | You explicitly define, AI strictly executes |
|
|
51
|
+
|
|
52
|
+
> Other tools let AI make decisions for you. Architext helps you make better decisions with AI.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
**Step 1 — CLI: deploy the framework**
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install -g architext
|
|
62
|
+
npx archi init
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
✔ Select language › English
|
|
67
|
+
✔ Select IDE(s) › Cursor (multiselect — Cursor / Windsurf / Trae / VS Code)
|
|
68
|
+
✔ Select project type › Web SPA / PWA
|
|
69
|
+
|
|
70
|
+
● Deploying Architext...
|
|
71
|
+
✔ Docs deployed → .architext/
|
|
72
|
+
prompts/ global/ templates/ tasks/
|
|
73
|
+
✔ Rules deployed → .cursor/rules/ (Cursor: .mdc)
|
|
74
|
+
00_system · 01_workflow · 02_tech_stack · 03_data_governance
|
|
75
|
+
04_cli_tools · 90_custom_rules · 99_context_glue
|
|
76
|
+
✔ Commands deployed → .cursor/commands/ (Cursor only)
|
|
77
|
+
archi.start · archi.scope · archi.plan · archi.code · archi.audit · ...
|
|
78
|
+
✔ Skills deployed → .cursor/skills/ (Cursor)
|
|
79
|
+
archi-decompose-roadmap · archi-interview-protocol · archi-plan-options · archi-ui-wireframe
|
|
80
|
+
✔ project-brief.md generated → project root
|
|
81
|
+
|
|
82
|
+
◆ Done! Fill in project-brief.md, then run /archi.start in your AI editor.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Step 2 — AI chat: initialize your project**
|
|
86
|
+
|
|
87
|
+
`archi init` generates a tailored `project-brief.md` at your project root. Fill it in, then run:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
/archi.start project-brief.md
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The AI reads the brief, interviews you on key decisions, and generates the project's foundation documents (`vision.md`, `roadmap.json`, `tech_stack`, etc.).
|
|
94
|
+
|
|
95
|
+
> **Existing codebase?** Skip `/archi.start` and use `/archi.inherit` instead — it reverse-engineers your project and registers existing features as `LEG-xx` tasks.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## How It Works
|
|
100
|
+
|
|
101
|
+
The main trunk of a project lifecycle. Everything happens in your AI chat window.
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
project-brief.md → /archi.start → [/archi.scope] → /archi.plan → /archi.code → /archi.audit
|
|
105
|
+
↑
|
|
106
|
+
use when you have extra requirements to decompose
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Stage 1 — Initialize**
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
You: /archi.start project-brief.md
|
|
113
|
+
|
|
114
|
+
AI: [Analyzing project brief...]
|
|
115
|
+
[Interviewing you on tech stack, architecture style, project type...]
|
|
116
|
+
|
|
117
|
+
✔ ADDED: .architext/global/vision.md
|
|
118
|
+
✔ ADDED: .architext/global/roadmap.json
|
|
119
|
+
✔ ADDED: .architext/global/dictionary.json
|
|
120
|
+
✔ ADDED: .architext/global/error_codes.json
|
|
121
|
+
✔ ADDED: .architext/global/ui_context.md (UI projects only)
|
|
122
|
+
✔ ADDED: .architext/global/ui_concept.html (UI projects only)
|
|
123
|
+
✔ MODIFIED: .cursor/rules/02_tech_stack.mdc (filled with project tech decisions)
|
|
124
|
+
✔ MODIFIED: .cursor/rules/90_custom_rules.mdc (filled with team conventions)
|
|
125
|
+
|
|
126
|
+
Next: run /archi.scope to decompose requirements into tasks.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
> **Existing codebase?** Use `/archi.inherit` instead — it reverse-engineers your project and registers existing features as `LEG-xx` tasks. Also generates `map.json`.
|
|
130
|
+
|
|
131
|
+
**Stage 2 — Decompose (optional)**
|
|
132
|
+
|
|
133
|
+
> Use `/archi.scope` when you have requirements beyond what's in the initial brief. If the brief already covers everything, go straight to Stage 3.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
You: /archi.scope scope-brief.md ← provide a file, or run bare to trigger an interview
|
|
137
|
+
|
|
138
|
+
AI: [Reading vision.md, roadmap.json, map.json, tech_stack...]
|
|
139
|
+
[Scanning existing tasks for impact analysis...]
|
|
140
|
+
|
|
141
|
+
Decomposed into 3 tasks:
|
|
142
|
+
✔ MODIFIED: .architext/global/roadmap.json
|
|
143
|
+
ADDED task FEAT-001 · auth-login (status: pending)
|
|
144
|
+
ADDED task FEAT-002 · auth-session (status: pending, deps: FEAT-001)
|
|
145
|
+
ADDED task FEAT-003 · user-profile (status: pending, deps: FEAT-001)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Stage 3 — Plan**
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
You: /archi.plan FEAT-001
|
|
152
|
+
|
|
153
|
+
AI: [Reading vision.md, tech_stack.md, map.json, dep specs...]
|
|
154
|
+
[Interviewing you on logic, data flow, edge cases...]
|
|
155
|
+
|
|
156
|
+
Q1. Authentication method? [A] JWT [B] Session Cookie [C] OAuth [Recommended: A]
|
|
157
|
+
Q2. Should sessions persist across devices? [Y/N]
|
|
158
|
+
Q3. ...
|
|
159
|
+
|
|
160
|
+
You: A | N | ...
|
|
161
|
+
|
|
162
|
+
AI: ✔ ADDED: .architext/tasks/FEAT-001_auth-login/spec.md
|
|
163
|
+
✔ ADDED: .architext/tasks/FEAT-001_auth-login/plan.json
|
|
164
|
+
✔ ADDED: .architext/tasks/FEAT-001_auth-login/ui.md (UI projects only)
|
|
165
|
+
✔ MODIFIED: .architext/global/roadmap.json (FEAT-001: pending → active)
|
|
166
|
+
✔ MODIFIED: .architext/global/map.json
|
|
167
|
+
✔ MODIFIED: .architext/global/dictionary.json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Before any code is written, review the generated documents:
|
|
171
|
+
- `spec.md` — Feature logic, Gherkin acceptance criteria, interface contracts
|
|
172
|
+
- `plan.json` — Implementation phases, file-level task breakdown, decisions
|
|
173
|
+
- `ui.md` — Interaction spec, references screens defined in `ui_context.md` (UI projects only)
|
|
174
|
+
|
|
175
|
+
Confirm "this is exactly what I want" — then proceed to implementation.
|
|
176
|
+
|
|
177
|
+
**Stage 4 — Implement**
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
You: /archi.code FEAT-001
|
|
181
|
+
|
|
182
|
+
AI: [Reading spec.md, plan.json, tech_stack.md...]
|
|
183
|
+
[Status Gate: FEAT-001 is active ✔]
|
|
184
|
+
[Running Silent Audit Loop: deps / tech rules / arch boundaries...]
|
|
185
|
+
|
|
186
|
+
Implementing Phase A: Core Auth Logic
|
|
187
|
+
✔ ADDED: src/features/auth/auth.service.ts
|
|
188
|
+
✔ ADDED: src/features/auth/auth.controller.ts
|
|
189
|
+
✔ MODIFIED: src/app.module.ts
|
|
190
|
+
✔ MODIFIED: .architext/tasks/FEAT-001_auth-login/plan.json (Phase A → done)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Stage 5 — Audit (optional, strongly recommended)**
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
You: /archi.audit FEAT-001 ← with ID: audits that task; without ID: project-level health check
|
|
197
|
+
|
|
198
|
+
AI: [Reading code + spec + plan + vision + tech_stack...]
|
|
199
|
+
|
|
200
|
+
✔ ADDED: .architext/tasks/FEAT-001_auth-login/audit.md
|
|
201
|
+
|
|
202
|
+
Findings: 2 issues
|
|
203
|
+
[MEDIUM] Missing rate-limit on /auth/login → suggest /archi.fix
|
|
204
|
+
[LOW] Token expiry not configurable via env var → suggest /archi.edit
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
> **Daily development between commands** is driven by natural language Chat Mode — ask questions, tweak code, debug — no slash commands needed. Four of the seven rule files act as always-on base rules: `00_system`, `02_tech_stack`, `90_custom_rules`, `99_context_glue`.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Commands
|
|
212
|
+
|
|
213
|
+
### AI Chat Commands
|
|
214
|
+
|
|
215
|
+
| Command | Description |
|
|
216
|
+
|:---|:---|
|
|
217
|
+
| `/archi.start [brief]` | Read a project brief and generate foundation docs (vision / roadmap / tech_stack etc.) |
|
|
218
|
+
| `/archi.inherit` | Reverse-engineer an existing codebase; register features as `LEG-xx` tasks |
|
|
219
|
+
| `/archi.scope [file_path]` | Decompose extra requirements into roadmap tasks; omit file to trigger an interview |
|
|
220
|
+
| `/archi.plan <ID> [context]` | Deep architecture interview → spec / plan ([?UI] also ui.md + ui_concept.html); supply context to reduce questions |
|
|
221
|
+
| `/archi.code <ID>` | Implement from plan phase by phase; only `active` tasks are allowed |
|
|
222
|
+
| `/archi.edit <ID> [context]` | Update feature spec → append new dev phase; history is preserved |
|
|
223
|
+
| `/archi.revise [context]` | Global arch/stack change → impact assessment → cascade update on confirm |
|
|
224
|
+
| `/archi.audit [ID]` | Deep code audit; with ID audits a task, without ID does a project-wide health check |
|
|
225
|
+
| `/archi.fix [ID] <context>` | Root-cause diagnosis and bug fix; ID optional, context describes the symptom |
|
|
226
|
+
| `/archi.map` | Diff map.json against actual file tree and sync |
|
|
227
|
+
| `/archi.remove <ID>` | Decommission a feature: remove code + docs, clean roadmap/map refs |
|
|
228
|
+
| `/archi.help [question]` | No question: recommend next action; with question: locate relevant files and answer |
|
|
229
|
+
|
|
230
|
+
### CLI Commands
|
|
231
|
+
|
|
232
|
+
| Command | Purpose |
|
|
233
|
+
|:---|:---|
|
|
234
|
+
| `npx archi init` | Deploy framework files (rules, prompts, skills) |
|
|
235
|
+
| `npx archi update` | Update deployed files to latest version |
|
|
236
|
+
| `npx archi doctor` | Check project health |
|
|
237
|
+
| `npx archi render` | Generate Markdown views from JSON data |
|
|
238
|
+
| `npx archi task [--check]` | View / validate roadmap task status |
|
|
239
|
+
| `npx archi plan <id>` | Check plan completion status for a feature |
|
|
240
|
+
| `npx archi template <name>` | Fetch a template file to project root |
|
|
241
|
+
| `npx archi uninstall` | Remove Architext files from project |
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Core Philosophy
|
|
246
|
+
|
|
247
|
+
**① Document-Driven AI Development (DDAD)**
|
|
248
|
+
|
|
249
|
+
Code is a downstream artifact of documents. Every change starts with a document update — spec first, code second. This makes every decision traceable and every AI output predictable.
|
|
250
|
+
|
|
251
|
+
**② User Agency**
|
|
252
|
+
|
|
253
|
+
AI's job is to surface and clarify your intent — not replace your judgment. You see the complete feature logic, data flow, and interaction model *before* development begins. All critical decisions stay in your hands.
|
|
254
|
+
|
|
255
|
+
**③ Meta-Framework**
|
|
256
|
+
|
|
257
|
+
Architext doesn't impose an architecture. It enforces *whichever* architecture you choose — MFA, FSD, DDD, Clean Architecture — through rules and boundaries that the AI cannot ignore.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## A Note on Vision
|
|
262
|
+
|
|
263
|
+
The AI development landscape is evolving at a pace none of us fully anticipated. New models, new tools, new paradigms — every few months, the ground shifts again.
|
|
264
|
+
|
|
265
|
+
Architext is my attempt to bring some structure to how we work *with* AI in software development. It's not a claim to have found the definitive answer. It's one direction that made sense to me — grounded in the idea that clear thinking before coding leads to better outcomes, regardless of how powerful the AI becomes.
|
|
266
|
+
|
|
267
|
+
If it's useful to you, great. If you see a better way, I genuinely want to hear it.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## FAQ
|
|
272
|
+
|
|
273
|
+
**Q: How is this different from Cursor's Agent mode or built-in planning?**
|
|
274
|
+
|
|
275
|
+
Agent mode is great for single sessions. Architext provides persistent context that survives across sessions, team members, and even AI tool switches. Your specs live in the repo — they don't disappear when you close the chat.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
**Q: Can I use this on an existing codebase?**
|
|
280
|
+
|
|
281
|
+
Yes. Run `/archi.inherit` — Architext analyzes your existing code and generates a document skeleton. Existing features are registered as `LEG-xx` tasks with stub specs, so you can gradually adopt the workflow without a big-bang rewrite.
|
|
282
|
+
|
|
283
|
+
> **Note**: `/archi.inherit` is still early-stage. Analysis results for large or complex repos may be incomplete and require manual cleanup. Feel free to open an Issue if you hit problems.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
**Q: Which IDEs are supported?**
|
|
288
|
+
|
|
289
|
+
Four IDEs are currently supported. During `archi init` you manually select which ones to deploy (multiselect, any combination):
|
|
290
|
+
|
|
291
|
+
| IDE | Rules directory | Extension | Status |
|
|
292
|
+
|:---|:---|:---|:---|
|
|
293
|
+
| Cursor | `.cursor/rules/` | `.mdc` | Recommended — most thoroughly tested |
|
|
294
|
+
| Windsurf | `.windsurf/rules/` | `.md` | Supported |
|
|
295
|
+
| Trae | `.trae/rules/` | `.md` | Supported |
|
|
296
|
+
| VS Code | `.github/instructions/` | `.instructions.md` | Supported |
|
|
297
|
+
|
|
298
|
+
Support for additional editors is planned.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
**Q: Does this work for non-web projects?**
|
|
303
|
+
|
|
304
|
+
Yes. Architext is architecture-agnostic and project-type-agnostic. It works for CLI tools, Web apps, mini-programs, APIs, backend services, and embedded systems. The templates adapt to your project type during initialization.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
**Q: Do I have to use every command?**
|
|
309
|
+
|
|
310
|
+
No. You can start with just `/archi.plan` + `/archi.code` and gradually adopt the rest as your team gets comfortable. The system is designed to be incrementally adoptable.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
**Q: Is token consumption high?**
|
|
315
|
+
|
|
316
|
+
Yes. Each command loads multiple context files and performs deep analysis — **token usage is noticeably higher than casual prompting**. This is an inherent cost of document-driven development; the tradeoff is more predictable outputs and far fewer "wait, that's not what I meant" cycles.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
<div align="center">
|
|
321
|
+
|
|
322
|
+
**[Contributing](https://github.com/JiuNian3219/architext/blob/main/CONTRIBUTING.md) · [Changelog](https://github.com/JiuNian3219/architext/blob/main/CHANGELOG.md) · [Issues](https://github.com/JiuNian3219/architext/issues)**
|
|
323
|
+
|
|
324
|
+
> This is Architext: a meta-framework protocol that makes AI work like a senior architect.
|
|
325
|
+
|
|
326
|
+
</div>
|