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

@@ -736,7 +736,7 @@ TodoWrite({
## Post-Completion Expansion
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 project-guidelines + project-tech。
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 specs/*.md + project-tech。
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`

View File

@@ -403,7 +403,7 @@ Task(
3. Validate file access: bash(ls -la ${targetFiles.join(' ')})
4. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
5. Read: .workflow/project-tech.json (technology stack and architecture context)
6. Read: .workflow/project-guidelines.json (user-defined constraints and conventions to validate against)
6. Read: .workflow/specs/*.md (user-defined constraints and conventions to validate against)
## Review Context
- Review Type: module (independent)
@@ -507,7 +507,7 @@ Task(
4. Read test files: bash(find ${projectDir}/tests -name "*${basename(file, '.ts')}*" -type f)
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
6. Read: .workflow/project-tech.json (technology stack and architecture context)
7. Read: .workflow/project-guidelines.json (user-defined constraints for remediation compliance)
7. Read: .workflow/specs/*.md (user-defined constraints for remediation compliance)
## CLI Configuration
- Tool Priority: gemini → qwen → codex

View File

@@ -414,7 +414,7 @@ Task(
4. Read review state: ${reviewStateJsonPath}
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
6. Read: .workflow/project-tech.json (technology stack and architecture context)
7. Read: .workflow/project-guidelines.json (user-defined constraints and conventions to validate against)
7. Read: .workflow/specs/*.md (user-defined constraints and conventions to validate against)
## Session Context
- Session ID: ${sessionId}
@@ -518,7 +518,7 @@ Task(
4. Read test files: bash(find ${workflowDir}/tests -name "*${basename(file, '.ts')}*" -type f)
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
6. Read: .workflow/project-tech.json (technology stack and architecture context)
7. Read: .workflow/project-guidelines.json (user-defined constraints for remediation compliance)
7. Read: .workflow/specs/*.md (user-defined constraints for remediation compliance)
## CLI Configuration
- Tool Priority: gemini → qwen → codex

View File

@@ -338,7 +338,8 @@ Session: <session-folder>
│ ├── plan.json
│ └── .task/TASK-*.json
├── explorations/ # Explorer output (cached)
├── architecture/ # Architect assessments
├── architecture/ # Architect assessments + design-tokens.json
├── analysis/ # analyst design-intelligence.json (UI mode)
├── qa/ # QA audit reports
├── wisdom/ # Cross-task knowledge
│ ├── learnings.md

View File

@@ -93,9 +93,14 @@ EXPECTED: JSON with: problem_statement, target_users[], domain, constraints[], e
**discovery-context.json**`<session-folder>/spec/discovery-context.json`:
- session_id, phase=1, seed_analysis (all fields), codebase_context (or null), recommendations
**design-intelligence.json**`<session-folder>/analysis/design-intelligence.json` (UI mode only):
- Produced when frontend keywords detected (component, page, UI, React, Vue, CSS, 前端) in seed_analysis
- Fields: industry, style_direction, ux_patterns, color_strategy, typography, component_patterns
- Consumed by architect (for design-tokens.json) and fe-developer
**Report**: complexity, codebase presence, problem statement, exploration dimensions, output paths.
**Success**: Both JSON files created, report sent.
**Success**: Both JSON files created; design-intelligence.json created if UI mode.
---

View File

@@ -78,7 +78,11 @@ For complex questions → Gemini CLI with architecture review rule.
Output to `<session-folder>/architecture/arch-<slug>.json`. Contribute decisions to wisdom/decisions.md.
**Report**: mode, verdict, concern count, recommendations, output path.
**Frontend project outputs** (when frontend tech stack detected in shared-memory or discovery-context):
- `<session-folder>/architecture/design-tokens.json` — color, spacing, typography, shadow tokens
- `<session-folder>/architecture/component-specs/*.md` — per-component design spec
**Report**: mode, verdict, concern count, recommendations, output path(s).
---

View File

@@ -105,6 +105,17 @@ Delegate to `commands/critique.md` -- launches parallel CLI calls per perspectiv
Write discussion record to `<session-folder>/discussions/<output-file>`.
**Output file naming convention**:
| Round | Output File |
|-------|------------|
| DISCUSS-001 | discuss-001-scope.md |
| DISCUSS-002 | discuss-002-brief.md |
| DISCUSS-003 | discuss-003-requirements.md |
| DISCUSS-004 | discuss-004-architecture.md |
| DISCUSS-005 | discuss-005-epics.md |
| DISCUSS-006 | discuss-006-signoff.md |
---
## Error Handling

View File

@@ -15,14 +15,14 @@
**Spec document phases** (matched by filename/directory):
| Phase | Expected Path |
|-------|--------------|
| product-brief | spec/product-brief.md |
| prd | spec/requirements/*.md |
| architecture | spec/architecture/_index.md + ADR-*.md |
| user-stories | spec/epics/*.md |
| implementation-plan | plan/plan.json |
| test-strategy | spec/test-strategy.md |
| Phase | Expected Path | Required |
|-------|--------------|---------|
| product-brief | spec/product-brief.md | Yes |
| prd | spec/requirements/*.md | Yes |
| architecture | spec/architecture/_index.md + ADR-*.md | Yes |
| user-stories | spec/epics/*.md | Yes |
| implementation-plan | plan/plan.json | No (impl-only/full-lifecycle) |
| test-strategy | spec/test-strategy.md | No (optional, not generated by pipeline) |
## Phase 3: 5-Dimension Scoring
@@ -51,7 +51,8 @@ Check each spec document for required sections.
| architecture | System Overview, Component Design, Data Models, API Specifications, Technology Stack |
| user-stories | Story List, Acceptance Criteria, Priority, Estimation |
| implementation-plan | Task Breakdown, Dependencies, Timeline, Resource Allocation |
| test-strategy | Test Scope, Test Cases, Coverage Goals, Test Environment |
> **Note**: `test-strategy` is optional — skip scoring if `spec/test-strategy.md` is absent. Do not penalize completeness score for missing optional phases.
**Scoring formula**:
- Section present: 50% credit

View File

@@ -150,6 +150,8 @@
"plan": "plan/",
"explorations": "explorations/",
"architecture": "architecture/",
"analysis": "analysis/",
"qa": "qa/",
"wisdom": "wisdom/",
"messages": ".msg/"
}

View File

@@ -213,6 +213,15 @@ Skill(skill="team-planex", args="-y --text '添加日志'")
|---------|--------|
| `check` / `status` | 输出执行状态图,不推进 |
| `resume` / `continue` | 检查 worker 状态,推进下一步 |
| `add <issue-ids or --text '...' or --plan path>` | 追加新任务到 planner 队列,不影响已有任务 |
**`add` 命令处理逻辑**:
1. 解析输入Issue IDs / `--text` / `--plan`
2. 获取当前最大 PLAN-* 序号(`TaskList` 筛选 `PLAN-*` prefix计算下一个序号 N
3. `TaskCreate({ subject: "PLAN-00N: ...", owner: "planner", status: "pending" })`description 写入新 issue IDs 或需求文本
4. 若 planner 已发送 `all_planned`(检查 team_msg 日志),额外 `SendMessage` 通知 planner 有新任务,使其重新进入 Loop Check
5. 若 executor 已退出等待,同样发送消息唤醒 executor 继续轮询 `EXEC-*` 任务
### Coordinator Spawn Template

View File

@@ -361,7 +361,7 @@ if (autoYes) {
### Post-Completion Expansion
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 project-guidelines + project-tech。
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 specs/*.md + project-tech。
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`

View File

@@ -96,7 +96,7 @@ rg "eval|exec|innerHTML|dangerouslySetInnerHTML" -g "*.{ts,js,tsx}"
ccw cli -p "
PURPOSE: Security audit of completed implementation
TASK: Review code for security vulnerabilities, insecure patterns, auth/authz issues
CONTEXT: @.summaries/IMPL-*.md,../.. @../../project-tech.json @../../project-guidelines.json
CONTEXT: @.summaries/IMPL-*.md,../.. @../../project-tech.json @../../specs/*.md
EXPECTED: Security findings report with severity levels
RULES: Focus on OWASP Top 10, authentication, authorization, data validation, injection risks
" --tool gemini --mode write --cd ${sessionPath}
@@ -107,7 +107,7 @@ RULES: Focus on OWASP Top 10, authentication, authorization, data validation, in
ccw cli -p "
PURPOSE: Architecture compliance review
TASK: Evaluate adherence to architectural patterns, identify technical debt, review design decisions
CONTEXT: @.summaries/IMPL-*.md,../.. @../../project-tech.json @../../project-guidelines.json
CONTEXT: @.summaries/IMPL-*.md,../.. @../../project-tech.json @../../specs/*.md
EXPECTED: Architecture assessment with recommendations
RULES: Check for patterns, separation of concerns, modularity, scalability
" --tool qwen --mode write --cd ${sessionPath}
@@ -118,7 +118,7 @@ RULES: Check for patterns, separation of concerns, modularity, scalability
ccw cli -p "
PURPOSE: Code quality and best practices review
TASK: Assess code readability, maintainability, adherence to best practices
CONTEXT: @.summaries/IMPL-*.md,../.. @../../project-tech.json @../../project-guidelines.json
CONTEXT: @.summaries/IMPL-*.md,../.. @../../project-tech.json @../../specs/*.md
EXPECTED: Quality assessment with improvement suggestions
RULES: Check for code smells, duplication, complexity, naming conventions
" --tool gemini --mode write --cd ${sessionPath}
@@ -139,7 +139,7 @@ done
ccw cli -p "
PURPOSE: Verify all requirements and acceptance criteria are met
TASK: Cross-check implementation summaries against original requirements
CONTEXT: @.task/IMPL-*.json,.summaries/IMPL-*.md,../.. @../../project-tech.json @../../project-guidelines.json
CONTEXT: @.task/IMPL-*.json,.summaries/IMPL-*.md,../.. @../../project-tech.json @../../specs/*.md
EXPECTED:
- Requirements coverage matrix
- Acceptance criteria verification

View File

@@ -126,26 +126,16 @@ if (autoYes) {
After collecting preferences, enhance context and dispatch:
```javascript
// Step 0: Parse --from-analysis handoff (from analyze-with-file)
const fromAnalysisMatch = args.match(/--from-analysis\s+(\S+)/)
if (fromAnalysisMatch) {
const handoffPath = fromAnalysisMatch[1]
workflowPreferences.analysisHandoff = JSON.parse(Read(handoffPath))
workflowPreferences.forceExplore = false
// Strip flag from args, keep task description
args = args.replace(/--from-analysis\s+\S+\s*/, '').trim()
}
// Step 1: Check for project context files
const hasProjectTech = fileExists('.workflow/project-tech.json')
const hasProjectGuidelines = fileExists('.workflow/project-guidelines.json')
const hasProjectGuidelines = fileExists('.workflow/specs/*.md')
// Step 2: Log available context
if (hasProjectTech) {
console.log('Project tech context available: .workflow/project-tech.json')
}
if (hasProjectGuidelines) {
console.log('Project guidelines available: .workflow/project-guidelines.json')
console.log('Project guidelines available: .workflow/specs/*.md')
}
// Step 3: Dispatch to phase (workflowPreferences available as context)

View File

@@ -106,36 +106,19 @@ bash(`mkdir -p ${sessionFolder} && test -d ${sessionFolder} && echo "SUCCESS: ${
**Exploration Decision Logic**:
```javascript
// Analysis handoff: reconstruct exploration from upstream analysis artifacts
if (workflowPreferences.analysisHandoff) {
const handoff = workflowPreferences.analysisHandoff
Write(`${sessionFolder}/exploration-from-analysis.json`, JSON.stringify({
relevant_files: handoff.exploration_digest.relevant_files || [],
patterns: handoff.exploration_digest.patterns || [],
key_findings: handoff.exploration_digest.key_findings || [],
clarification_needs: [], // analysis already did multi-round discussion
_metadata: { exploration_angle: "from-analysis", source_session: handoff.source_session, reconstructed: true }
}, null, 2))
Write(`${sessionFolder}/explorations-manifest.json`, JSON.stringify({
session_id: sessionId, task_description: task_description, timestamp: getUtc8ISOString(),
complexity: complexity, exploration_count: 1, from_analysis: handoff.source_session,
explorations: [{ angle: "from-analysis", file: "exploration-from-analysis.json",
path: `${sessionFolder}/exploration-from-analysis.json`, index: 1 }]
}, null, 2))
needsExploration = false
// clarification_needs=[] → Phase 2 naturally skipped → proceed to Phase 3
}
// Check if task description already contains prior analysis context (from analyze-with-file)
const hasPriorAnalysis = /##\s*Prior Analysis/i.test(task_description)
needsExploration = needsExploration ?? (
workflowPreferences.forceExplore ||
task.mentions_specific_files ||
task.requires_codebase_context ||
task.needs_architecture_understanding ||
task.modifies_existing_code
)
needsExploration = workflowPreferences.forceExplore ? true
: hasPriorAnalysis ? false
: (task.mentions_specific_files ||
task.requires_codebase_context ||
task.needs_architecture_understanding ||
task.modifies_existing_code)
if (!needsExploration) {
// Skip to Phase 2 (Clarification) or Phase 3 (Planning)
// Skip exploration — analysis context already in task description (or not needed)
// manifest is absent; Phase 3 loads it with safe fallback
proceed_to_next_phase()
}
```
@@ -185,12 +168,12 @@ const selectedAngles = selectAngles(task_description, complexity === 'High' ? 4
// Planning strategy determination
// Agent trigger: anything beyond trivial single-file change
// - analysisHandoff → always agent (analysis validated non-trivial task)
// - hasPriorAnalysis → always agent (analysis validated non-trivial task)
// - multi-angle exploration → agent (complexity warranted multiple angles)
// - Medium/High complexity → agent
// Direct Claude planning ONLY for truly trivial Low + no analysis + single angle
const planningStrategy = (
complexity === 'Low' && !workflowPreferences.analysisHandoff && selectedAngles.length <= 1
complexity === 'Low' && !hasPriorAnalysis && selectedAngles.length <= 1
) ? 'Direct Claude Planning'
: 'cli-lite-planning-agent'
@@ -233,7 +216,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
- **Exploration Index**: ${index + 1} of ${selectedAngles.length}
## Agent Initialization
cli-explore-agent autonomously handles: project structure discovery, schema loading, project context loading (project-tech.json, project-guidelines.json), and keyword search. These steps execute automatically.
cli-explore-agent autonomously handles: project structure discovery, schema loading, project context loading (project-tech.json, specs/*.md), and keyword search. These steps execute automatically.
## Exploration Strategy (${angle} focus)
@@ -338,8 +321,10 @@ Angles explored: ${explorationManifest.explorations.map(e => e.angle).join(', ')
**Aggregate clarification needs from all exploration angles**:
```javascript
// Load manifest and all exploration files
const manifest = JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
// Load manifest and all exploration files (may not exist if exploration was skipped)
const manifest = file_exists(`${sessionFolder}/explorations-manifest.json`)
? JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
: { exploration_count: 0, explorations: [] }
const explorations = manifest.explorations.map(exp => ({
angle: exp.angle,
data: JSON.parse(Read(exp.path))
@@ -432,8 +417,10 @@ taskFiles.forEach(taskPath => {
// Step 1: Read schema
const schema = Bash(`cat ~/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json`)
// Step 2: ⚠️ MANDATORY - Read and review ALL exploration files
const manifest = JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
// Step 2: Read exploration files if available
const manifest = file_exists(`${sessionFolder}/explorations-manifest.json`)
? JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
: { explorations: [] }
manifest.explorations.forEach(exp => {
const explorationData = Read(exp.path)
console.log(`\n### Exploration: ${exp.angle}\n${explorationData}`)
@@ -509,9 +496,9 @@ Execute: cat ~/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.js
## Project Context (MANDATORY - Read Both Files)
1. Read: .workflow/project-tech.json (technology stack, architecture, key components)
2. Read: .workflow/project-guidelines.json (user-defined constraints and conventions)
2. Read: .workflow/specs/*.md (user-defined constraints and conventions)
**CRITICAL**: All generated tasks MUST comply with constraints in project-guidelines.json
**CRITICAL**: All generated tasks MUST comply with constraints in specs/*.md
## Task Description
${task_description}
@@ -669,8 +656,10 @@ if (autoYes) {
**Step 5.1: Build executionContext**
```javascript
// Load manifest and all exploration files
const manifest = JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
// Load manifest and all exploration files (may not exist if exploration was skipped)
const manifest = file_exists(`${sessionFolder}/explorations-manifest.json`)
? JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
: { exploration_count: 0, explorations: [] }
const explorations = {}
manifest.explorations.forEach(exp => {

View File

@@ -485,7 +485,7 @@ ${(t.test?.success_metrics || []).length > 0 ? `\n**Success metrics**: ${t.test.
context.push(`### Artifacts\nPlan: ${executionContext.session.artifacts.plan}`)
}
// Project guidelines (user-defined constraints from /workflow:session:solidify)
context.push(`### Project Guidelines\n@.workflow/project-guidelines.json`)
context.push(`### Project Guidelines\n@.workflow/specs/*.md`)
if (context.length > 0) sections.push(`## Context\n${context.join('\n\n')}`)
sections.push(`Complete each task according to its "Done when" checklist.`)
@@ -672,7 +672,7 @@ if (hasUnresolvedIssues(reviewResult)) {
**Trigger**: After all executions complete (regardless of code review)
**Operation**: Execute `/workflow:session:sync -y "{summary}"` to update both `project-guidelines.json` and `project-tech.json` in one shot.
**Operation**: Execute `/workflow:session:sync -y "{summary}"` to update both `specs/*.md` and `project-tech.json` in one shot.
Summary 取值优先级:`originalUserInput``planObject.summary` → git log 自动推断。
@@ -767,7 +767,7 @@ Appended to `previousExecutionResults` array for context continuity in multi-exe
## Post-Completion Expansion
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 project-guidelines + project-techStep 6 已触发,此处不重复)。
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 specs/*.md + project-techStep 6 已触发,此处不重复)。
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`

View File

@@ -102,14 +102,14 @@ After collecting preferences, enhance context and dispatch:
```javascript
// Step 1: Check for project context files
const hasProjectTech = fileExists('.workflow/project-tech.json')
const hasProjectGuidelines = fileExists('.workflow/project-guidelines.json')
const hasProjectGuidelines = fileExists('.workflow/specs/*.md')
// Step 2: Log available context
if (hasProjectTech) {
console.log('Project tech context available: .workflow/project-tech.json')
}
if (hasProjectGuidelines) {
console.log('Project guidelines available: .workflow/project-guidelines.json')
console.log('Project guidelines available: .workflow/specs/*.md')
}
// Step 3: Dispatch to phase (workflowPreferences available as context)

View File

@@ -373,7 +373,7 @@ ${JSON.stringify(contextPackage, null, 2)}
## Execution Process
1. Read plan-overview-base-schema.json + task-schema.json for output structure
2. Read project-tech.json and project-guidelines.json
2. Read project-tech.json and specs/*.md
3. Parse context-package fields:
- solution: name, feasibility, summary
- implementation_plan: tasks[], execution_flow, milestones

View File

@@ -487,7 +487,7 @@ ${(t.test?.success_metrics || []).length > 0 ? `\n**Success metrics**: ${t.test.
context.push(`### Artifacts\nPlan: ${executionContext.session.artifacts.plan}`)
}
// Project guidelines (user-defined constraints from /workflow:session:solidify)
context.push(`### Project Guidelines\n@.workflow/project-guidelines.json`)
context.push(`### Project Guidelines\n@.workflow/specs/*.md`)
if (context.length > 0) sections.push(`## Context\n${context.join('\n\n')}`)
sections.push(`Complete each task according to its "Done when" checklist.`)
@@ -672,7 +672,7 @@ if (hasUnresolvedIssues(reviewResult)) {
**Trigger**: After all executions complete (regardless of code review)
**Operation**: Execute `/workflow:session:sync -y "{summary}"` to update both `project-guidelines.json` and `project-tech.json` in one shot.
**Operation**: Execute `/workflow:session:sync -y "{summary}"` to update both `specs/*.md` and `project-tech.json` in one shot.
Summary 取值优先级:`originalUserInput``planObject.summary` → git log 自动推断。
@@ -767,7 +767,7 @@ Appended to `previousExecutionResults` array for context continuity in multi-exe
## Post-Completion Expansion
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 project-guidelines + project-techStep 6 已触发,此处不重复)。
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 specs/*.md + project-techStep 6 已触发,此处不重复)。
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`

View File

@@ -203,10 +203,10 @@ This is the PRIMARY context source - all subsequent analysis must align with use
Execute complete context-search-agent workflow (Phase 1-3) for implementation planning.
Key emphasis:
- Load project-tech.json and project-guidelines.json FIRST (per your spec Phase 1.1b)
- Load project-tech.json and specs/*.md FIRST (per your spec Phase 1.1b)
- Synthesize exploration results with project context
- Generate prioritized_context with user_intent alignment
- Apply project-guidelines.json constraints during conflict detection
- Apply specs/*.md constraints during conflict detection
Input priority: User Intent > project-tech.json > Exploration results > Code discovery > Web examples

View File

@@ -178,13 +178,13 @@ These files provide project-level constraints that apply to ALL tasks:
- Usage: Populate plan.json shared_context, align task tech choices, set correct test commands
- If missing: Fall back to context-package.project_context
2. **.workflow/project-guidelines.json** (user-maintained rules and constraints)
2. **.workflow/specs/*.md** (user-maintained rules and constraints)
- Contains: coding_conventions, naming_rules, forbidden_patterns, quality_gates, custom_constraints
- Usage: Apply as HARD CONSTRAINTS on all generated tasks — task implementation steps,
acceptance criteria, and convergence.verification MUST respect these guidelines
- If empty/missing: No additional constraints (proceed normally)
Loading order: project-tech.json → project-guidelines.json → planning-notes.md → context-package.json
Loading order: project-tech.json → specs/*.md → planning-notes.md → context-package.json
## USER CONFIGURATION (from Step 4.0)
Execution Method: ${userConfig.executionMethod} // agent|hybrid|cli

View File

@@ -222,7 +222,7 @@ Execute complete context-search-agent workflow for TDD implementation planning:
### Phase 1: Initialization & Pre-Analysis
1. **Project State Loading**:
- Read and parse .workflow/project-tech.json. Use its overview section as the foundational project_context.
- Read and parse .workflow/project-guidelines.json. Load conventions, constraints, and learnings into a project_guidelines section.
- Read and parse .workflow/specs/*.md. Load conventions, constraints, and learnings into a project_guidelines section.
- If files don't exist, proceed with fresh analysis.
2. **Detection**: Check for existing context-package (early exit if valid)
3. **Foundation**: Initialize CodexLens, get project structure, load docs
@@ -257,7 +257,7 @@ Execute all discovery tracks (WITH USER INTENT INTEGRATION):
c. Generate dependency_order: Based on dependency graph + user goal sequence
d. Document sorting_rationale: Explain prioritization logic
4. **Populate project_context**: Directly use the overview from project-tech.json
5. **Populate project_guidelines**: Load from project-guidelines.json
5. **Populate project_guidelines**: Load from specs/*.md
6. Integrate brainstorm artifacts (if .brainstorming/ exists, read content)
7. Perform conflict detection with risk assessment
8. **Inject historical conflicts** from archive analysis into conflict_detection
@@ -279,7 +279,7 @@ Execute all discovery tracks (WITH USER INTENT INTEGRATION):
Complete context-package.json with:
- **metadata**: task_description, keywords, complexity, tech_stack, session_id
- **project_context**: description, technology_stack, architecture, key_components (from project-tech.json)
- **project_guidelines**: {conventions, constraints, quality_rules, learnings} (from project-guidelines.json)
- **project_guidelines**: {conventions, constraints, quality_rules, learnings} (from specs/*.md)
- **assets**: {documentation[], source_code[], config[], tests[]} with relevance scores
- **dependencies**: {internal[], external[]} with dependency graph
- **brainstorm_artifacts**: {guidance_specification, role_analyses[], synthesis_output} with content

View File

@@ -236,13 +236,13 @@ These files provide project-level constraints that apply to ALL tasks:
- Usage: Populate plan.json shared_context, align task tech choices, set correct test commands
- If missing: Fall back to context-package.project_context
2. **.workflow/project-guidelines.json** (user-maintained rules and constraints)
2. **.workflow/specs/*.md** (user-maintained rules and constraints)
- Contains: coding_conventions, naming_rules, forbidden_patterns, quality_gates, custom_constraints
- Usage: Apply as HARD CONSTRAINTS on all generated tasks — task implementation steps,
acceptance criteria, and convergence.verification MUST respect these guidelines
- If empty/missing: No additional constraints (proceed normally)
Loading order: project-tech.json → project-guidelines.json → planning-notes.md → context-package.json
Loading order: project-tech.json → specs/*.md → planning-notes.md → context-package.json
## USER CONFIGURATION (from Phase 0)
Execution Method: ${userConfig.executionMethod} // agent|hybrid|cli

View File

@@ -396,7 +396,7 @@ Automatic commits at key checkpoints:
## Post-Completion Expansion
**Auto-sync**: Execute `/workflow:session:sync -y "{summary}"` to update project-guidelines + project-tech.
**Auto-sync**: Execute `/workflow:session:sync -y "{summary}"` to update specs/*.md + project-tech.
After completion, ask user if they want to expand into issues (test/enhance/refactor/doc). Selected items call `/issue:new "{summary} - {dimension}"`.

View File

@@ -346,7 +346,7 @@ Execute complete context-search-agent workflow for implementation planning:
### Phase 1: Initialization & Pre-Analysis
1. **Project State Loading**:
- Read and parse .workflow/project-tech.json. Use its overview section as the foundational project_context.
- Read and parse .workflow/project-guidelines.json. Load conventions, constraints, and learnings into a project_guidelines section.
- Read and parse .workflow/specs/*.md. Load conventions, constraints, and learnings into a project_guidelines section.
- If files don't exist, proceed with fresh analysis.
2. **Detection**: Check for existing context-package (early exit if valid)
3. **Foundation**: Initialize CodexLens, get project structure, load docs
@@ -381,7 +381,7 @@ Execute all discovery tracks (WITH USER INTENT INTEGRATION):
c. Generate dependency_order: Based on dependency graph + user goal sequence
d. Document sorting_rationale: Explain prioritization logic
4. **Populate project_context**: Directly use the overview from project-tech.json
5. **Populate project_guidelines**: Load from project-guidelines.json
5. **Populate project_guidelines**: Load from specs/*.md
6. Integrate brainstorm artifacts (if .brainstorming/ exists, read content)
7. Perform conflict detection with risk assessment
8. **Inject historical conflicts** from archive analysis into conflict_detection
@@ -403,7 +403,7 @@ Execute all discovery tracks (WITH USER INTENT INTEGRATION):
Complete context-package.json with:
- **metadata**: task_description, keywords, complexity, tech_stack, session_id
- **project_context**: description, technology_stack, architecture, key_components (from project-tech.json)
- **project_guidelines**: {conventions, constraints, quality_rules, learnings} (from project-guidelines.json)
- **project_guidelines**: {conventions, constraints, quality_rules, learnings} (from specs/*.md)
- **assets**: {documentation[], source_code[], config[], tests[]} with relevance scores
- **dependencies**: {internal[], external[]} with dependency graph
- **brainstorm_artifacts**: {guidance_specification, role_analyses[], synthesis_output} with content

View File

@@ -245,7 +245,7 @@ Task(
## PROJECT CONTEXT (MANDATORY)
1. Read: .workflow/project-tech.json (tech stack, test framework, build system)
2. Read: .workflow/project-guidelines.json (constraints — apply as HARD CONSTRAINTS on fixes)
2. Read: .workflow/specs/*.md (constraints — apply as HARD CONSTRAINTS on fixes)
## MANDATORY FIRST STEPS
1. Read test results: ${session.test_results_path}
@@ -454,7 +454,7 @@ The orchestrator automatically creates git commits at key checkpoints to enable
#### Post-Completion Expansion
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 project-guidelines + project-tech。
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 specs/*.md + project-tech。
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`