feat: add SpecDialog component for editing spec frontmatter

- Implement SpecDialog for managing spec details including title, read mode, priority, and keywords.
- Add validation and keyword management functionality.
- Integrate SpecDialog into SpecsSettingsPage for editing specs.

feat: create index file for specs components

- Export SpecCard, SpecDialog, and related types from a new index file for better organization.

feat: implement SpecsSettingsPage for managing specs and hooks

- Create main settings page with tabs for Project Specs, Personal Specs, Hooks, Injection, and Settings.
- Integrate SpecDialog and HookDialog for editing specs and hooks.
- Add search functionality and mock data for specs and hooks.

feat: add spec management API routes

- Implement API endpoints for listing specs, getting spec details, updating frontmatter, rebuilding indices, and initializing the spec system.
- Handle errors and responses appropriately for each endpoint.
This commit is contained in:
catlog22
2026-02-26 22:03:13 +08:00
parent 430d817e43
commit 6155fcc7b8
115 changed files with 4883 additions and 21127 deletions

View File

@@ -23,8 +23,8 @@ Check these items. Report results as a checklist.
- **project-tech.json**: Check `{projectRoot}/.workflow/project-tech.json`
- If missing: Read `package.json` / `tsconfig.json` / `pyproject.toml` and generate a minimal version. Ask user: "检测到项目使用 [tech stack], 是否正确?需要补充什么?"
- **project-guidelines.json**: Check `{projectRoot}/.workflow/project-guidelines.json`
- If missing: Scan for `.eslintrc`, `.prettierrc`, `ruff.toml` etc. Ask user: "未找到 project-guidelines.json, 是否有特定的编码规范需要遵循?"
- **specs/*.md**: Check `{projectRoot}/.workflow/specs/*.md`
- If missing: Scan for `.eslintrc`, `.prettierrc`, `ruff.toml` etc. Ask user: "未找到 specs/*.md, 是否有特定的编码规范需要遵循?"
- **Test framework**: Detect from config files (jest.config, vitest.config, pytest.ini, etc.)
- If missing: Ask user: "未检测到测试框架配置,请指定测试命令(如 `npm test`, `pytest`),或输入 'skip' 跳过测试验证"
@@ -39,7 +39,7 @@ Print formatted checklist:
✓ 工作空间: .workflow/.cycle/ 就绪
⚠ Git: 3 个未提交变更
✓ project-tech.json: 已检测 (Express + TypeORM + PostgreSQL)
project-guidelines.json: 未找到 (已跳过)
specs/*.md: 未找到 (已跳过)
✓ 测试框架: jest (npm test)
```
@@ -173,7 +173,7 @@ Read the user's `$TASK` and score each dimension:
For dimensions still at score 1 after Q&A, auto-enhance from codebase:
- **Scope**: Use `Glob` and `Grep` to find related files, list them
- **Context**: Read `project-tech.json` and key config files
- **Constraints**: Infer from `project-guidelines.json` and existing patterns
- **Constraints**: Infer from `specs/*.md` and existing patterns
### 2.5 Assemble Refined Task

View File

@@ -23,7 +23,7 @@ Check these items. Report results as a checklist.
- **project-tech.json**: Check `{projectRoot}/.workflow/project-tech.json`
- If missing: WARN — Phase 1 will call `workflow:init` to generate it. Ask user: "检测到项目使用 [tech stack from package.json], 是否正确?需要补充什么?"
- **project-guidelines.json**: Check `{projectRoot}/.workflow/project-guidelines.json`
- **specs/*.md**: Check `{projectRoot}/.workflow/specs/*.md`
- If missing: WARN — will be generated as empty scaffold. Ask: "有特定的编码规范需要遵循吗?"
- **Test framework**: Detect from config files (jest.config, vitest.config, pytest.ini, etc.)
- If missing: Ask: "未检测到测试框架,请指定测试命令(如 `npm test`),或输入 'skip' 跳过"
@@ -39,7 +39,7 @@ Print formatted checklist:
✓ .workflow/ 目录就绪
⚠ Git: 3 个未提交变更
✓ project-tech.json: 已检测 (Express + TypeORM + PostgreSQL)
project-guidelines.json: 未找到 (Phase 1 将生成空模板)
specs/*.md: 未找到 (Phase 1 将生成空模板)
✓ 测试框架: jest (npm test)
```
@@ -163,7 +163,7 @@ Each dimension scores 0-2 (0=missing, 1=vague, 2=clear). **Total minimum: 6/10 t
For dimensions still at score 1 after Q&A, auto-enhance from codebase:
- **Scope**: Use `Glob` and `Grep` to find related files
- **Context**: Read `project-tech.json` and key config files
- **Constraints**: Infer from `project-guidelines.json`
- **Constraints**: Infer from `specs/*.md`
### 2.5 Assemble Structured Description