cc-devflow 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/flow/CLAUDE.md +0 -4
- package/.claude/docs/examples/design-inspiration-pool.md +59 -0
- package/.claude/docs/examples/ui-prototype-constitution-checklist.md +75 -0
- package/.claude/docs/implementation-summary-v7.md +449 -0
- package/.claude/docs/spec-format-guide.md +349 -0
- package/.claude/docs/state-consolidation-design.md +323 -0
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +85 -386
- package/.claude/docs/templates/DESIGN_TEMPLATE.md +157 -0
- package/.claude/docs/templates/PROPOSAL_TEMPLATE.md +91 -0
- package/.claude/docs/templates/SPEC_TEMPLATE_DELTA.md +139 -0
- package/.claude/docs/templates/SPEC_TEMPLATE_PROJECT.md +93 -0
- package/.claude/docs/templates/STYLE_TEMPLATE.md +114 -901
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +143 -1205
- package/.claude/hooks/inject-agent-context.ts +9 -9
- package/.claude/scripts/.claude/commands/flow/export-openspec.md +221 -0
- package/.claude/scripts/.claude/commands/flow/import-openspec.md +171 -0
- package/.claude/scripts/__tests__/openspec.test.js +212 -0
- package/.claude/scripts/delta-parser.ts +112 -2
- package/.claude/scripts/export-openspec.js +222 -0
- package/.claude/scripts/import-openspec.js +272 -0
- package/.claude/scripts/validate-scope.sh +200 -0
- package/.claude/skills/{workflow/flow-init → flow-init}/SKILL.md +25 -4
- package/.claude/skills/{workflow/flow-release → flow-release}/SKILL.md +14 -3
- package/.claude/skills/{workflow/flow-spec → flow-spec}/SKILL.md +30 -2
- package/.claude/skills/utility/npm-release/CLAUDE.md +55 -0
- package/.claude/skills/utility/npm-release/SKILL.md +111 -46
- package/.claude/skills/utility/npm-release/references/version-decision-guide.md +134 -0
- package/.claude/skills/utility/npm-release/scripts/atomic-version-bump.sh +95 -0
- package/.claude/skills/utility/npm-release/scripts/validate-version-sync.sh +82 -0
- package/.claude/skills/utility/npm-release/scripts/version-decision-tree.sh +44 -0
- package/.claude/tsc-cache/70d2fc6d-2936-429b-b529-429f1aae8c88/affected-repos.txt +1 -0
- package/.claude/tsc-cache/70d2fc6d-2936-429b-b529-429f1aae8c88/edited-files.log +2 -0
- package/CHANGELOG.md +40 -0
- package/README.md +2 -1
- package/README.zh-CN.md +2 -1
- package/docs/v4.3.0-migration-guide.md +276 -0
- package/lib/harness/CLAUDE.md +5 -4
- package/lib/harness/__tests__/planner.tdd.test.js +125 -0
- package/lib/harness/index.js +4 -2
- package/lib/harness/operations/dispatch.js +13 -0
- package/lib/harness/operations/plan.js +55 -1
- package/lib/harness/operations/release.js +87 -0
- package/lib/harness/operations/verify.js +14 -0
- package/lib/harness/planner.js +131 -0
- package/lib/harness/query.js +126 -0
- package/lib/harness/schemas.js +22 -1
- package/package.json +1 -1
- package/.claude/commands/flow/checklist.md +0 -18
- package/.claude/commands/flow/clarify.md +0 -18
- package/.claude/commands/flow/new.md +0 -23
- package/.claude/commands/flow/quality.md +0 -21
- package/.claude/docs/templates/EPIC_TEMPLATE.md +0 -805
- package/.claude/docs/templates/PRD_TEMPLATE.md +0 -562
- package/.claude/docs/templates/TASKS_TEMPLATE.md +0 -523
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +0 -1019
- package/.claude/skills/workflow/CLAUDE.md +0 -24
- /package/.claude/skills/{domain/attention-refresh → attention-refresh}/SKILL.md +0 -0
- /package/.claude/skills/{domain/brainstorming → brainstorming}/SKILL.md +0 -0
- /package/.claude/skills/{guardrail/constitution-guardian → constitution-guardian}/SKILL.md +0 -0
- /package/.claude/skills/{utility/constitution-quick-ref → constitution-quick-ref}/SKILL.md +0 -0
- /package/.claude/skills/{domain/debugging → debugging}/SKILL.md +0 -0
- /package/.claude/skills/{utility/file-standards → file-standards}/SKILL.md +0 -0
- /package/.claude/skills/{domain/finishing-branch → finishing-branch}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/CLAUDE.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/dev-implementer.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/scripts/entry-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/scripts/exit-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/scripts/task-orchestrator.sh +0 -0
- /package/.claude/skills/{workflow/flow-fix → flow-fix}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-fix → flow-fix}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-fix → flow-fix}/references/bug-analyzer.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/assets/BRAINSTORM_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/assets/INIT_FLOW_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/assets/RESEARCH_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/references/flow-researcher.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/check-prerequisites.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/consolidate-research.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/create-requirement.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/generate-research-tasks.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/populate-research-tasks.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/validate-research.sh +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/code-quality-reviewer.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/qa-tester.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/security-reviewer.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/spec-reviewer.md +0 -0
- /package/.claude/skills/{workflow/flow-release → flow-release}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-release → flow-release}/references/release-manager.md +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/CLAUDE.md +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/entry-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/exit-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/parallel-orchestrator.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/team-communication.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/team-init.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/test-team-mode.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/team-config.json +0 -0
- /package/.claude/skills/{workflow/flow-verify → flow-verify}/CLAUDE.md +0 -0
- /package/.claude/skills/{workflow/flow-verify → flow-verify}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-verify → flow-verify}/context.jsonl +0 -0
- /package/.claude/skills/{utility/fractal-docs → fractal-docs}/SKILL.md +0 -0
- /package/.claude/skills/{utility/journey-checker → journey-checker}/SKILL.md +0 -0
- /package/.claude/skills/{utility/journey-checker → journey-checker}/pressure-scenarios.md +0 -0
- /package/.claude/skills/{domain/receiving-review → receiving-review}/SKILL.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/LICENSE.txt +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/SKILL.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/references/output-patterns.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/references/workflows.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/scripts/init_skill.py +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/scripts/package_skill.py +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/scripts/quick_validate.py +0 -0
- /package/.claude/skills/{domain/tdd → tdd}/SKILL.md +0 -0
- /package/.claude/skills/{guardrail/tdd-enforcer → tdd-enforcer}/SKILL.md +0 -0
- /package/.claude/skills/{domain/verification → verification}/SKILL.md +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Version Decision Reference
|
|
2
|
+
|
|
3
|
+
## Semantic Versioning Rules
|
|
4
|
+
|
|
5
|
+
**Format**: `MAJOR.MINOR.PATCH` (e.g., 4.2.0)
|
|
6
|
+
|
|
7
|
+
### When to Bump Each Number
|
|
8
|
+
|
|
9
|
+
| Version | Increment When | Examples |
|
|
10
|
+
|---------|---------------|----------|
|
|
11
|
+
| **MAJOR** | Breaking changes that require user action | API redesign, removed features, incompatible changes |
|
|
12
|
+
| **MINOR** | New features, backward compatible | New commands, new options, enhanced functionality |
|
|
13
|
+
| **PATCH** | Bug fixes, minor improvements | Fix crashes, improve error messages, documentation |
|
|
14
|
+
|
|
15
|
+
### Decision Tree
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Is this a breaking change?
|
|
19
|
+
├─ YES → MAJOR bump (X.0.0)
|
|
20
|
+
└─ NO → Is this a new feature?
|
|
21
|
+
├─ YES → MINOR bump (X.Y.0)
|
|
22
|
+
└─ NO → PATCH bump (X.Y.Z)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Common Scenarios
|
|
26
|
+
|
|
27
|
+
### Scenario 1: Bug Fix
|
|
28
|
+
**Current**: 4.2.0
|
|
29
|
+
**Change**: Fix login crash
|
|
30
|
+
**Decision**: PATCH → **4.2.1**
|
|
31
|
+
|
|
32
|
+
### Scenario 2: New Feature (Compatible)
|
|
33
|
+
**Current**: 4.2.1
|
|
34
|
+
**Change**: Add `/flow:export` command
|
|
35
|
+
**Decision**: MINOR → **4.3.0**
|
|
36
|
+
|
|
37
|
+
### Scenario 3: Breaking Change
|
|
38
|
+
**Current**: 4.3.0
|
|
39
|
+
**Change**: Remove deprecated `/flow-new` command
|
|
40
|
+
**Decision**: MAJOR → **5.0.0**
|
|
41
|
+
|
|
42
|
+
### Scenario 4: Multiple Changes
|
|
43
|
+
**Current**: 4.3.0
|
|
44
|
+
**Changes**:
|
|
45
|
+
- Fix 3 bugs (PATCH)
|
|
46
|
+
- Add 2 new features (MINOR)
|
|
47
|
+
- No breaking changes
|
|
48
|
+
|
|
49
|
+
**Decision**: Take highest level → MINOR → **4.4.0**
|
|
50
|
+
|
|
51
|
+
## Anti-Patterns (FORBIDDEN)
|
|
52
|
+
|
|
53
|
+
### ❌ Arbitrary Jumps
|
|
54
|
+
```
|
|
55
|
+
3.0.1 → 7.0.0 # WRONG: No justification for jumping 4 major versions
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Correct**:
|
|
59
|
+
```
|
|
60
|
+
3.0.1 → 4.0.0 # If breaking change
|
|
61
|
+
3.0.1 → 3.1.0 # If new feature
|
|
62
|
+
3.0.1 → 3.0.2 # If bug fix
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### ❌ Skipping Versions
|
|
66
|
+
```
|
|
67
|
+
4.2.0 → 4.4.0 # WRONG: Skipped 4.3.0
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Correct**:
|
|
71
|
+
```
|
|
72
|
+
4.2.0 → 4.3.0 → 4.4.0 # Sequential
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### ❌ Inconsistent Formats
|
|
76
|
+
```
|
|
77
|
+
v1.0 # WRONG: Missing patch
|
|
78
|
+
1.0.0 # WRONG: Missing 'v' prefix in git tag
|
|
79
|
+
release-1.0 # WRONG: Non-standard format
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Correct**:
|
|
83
|
+
```
|
|
84
|
+
Git tag: v4.2.0
|
|
85
|
+
package.json: "version": "4.2.0"
|
|
86
|
+
CHANGELOG: ## [4.2.0] - 2026-03-12
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Version Validation Checklist
|
|
90
|
+
|
|
91
|
+
Before bumping version, verify:
|
|
92
|
+
|
|
93
|
+
- [ ] Change type is clear (patch/minor/major)
|
|
94
|
+
- [ ] Version increment follows SemVer rules
|
|
95
|
+
- [ ] No arbitrary jumps (e.g., 3.x → 7.x)
|
|
96
|
+
- [ ] All version markers will be updated atomically
|
|
97
|
+
- [ ] CHANGELOG.md entry prepared
|
|
98
|
+
- [ ] Git tag format will be `vX.Y.Z`
|
|
99
|
+
|
|
100
|
+
## Breaking Change Examples
|
|
101
|
+
|
|
102
|
+
**Breaking changes require MAJOR bump**:
|
|
103
|
+
|
|
104
|
+
- Removing commands or options
|
|
105
|
+
- Changing command syntax
|
|
106
|
+
- Changing output format (breaking scripts)
|
|
107
|
+
- Removing configuration options
|
|
108
|
+
- Changing default behavior significantly
|
|
109
|
+
- Requiring new dependencies
|
|
110
|
+
- Dropping support for Node versions
|
|
111
|
+
|
|
112
|
+
**NOT breaking changes** (MINOR or PATCH):
|
|
113
|
+
|
|
114
|
+
- Adding new commands (MINOR)
|
|
115
|
+
- Adding new options with defaults (MINOR)
|
|
116
|
+
- Deprecation warnings (MINOR)
|
|
117
|
+
- Bug fixes (PATCH)
|
|
118
|
+
- Performance improvements (PATCH)
|
|
119
|
+
- Documentation updates (PATCH)
|
|
120
|
+
|
|
121
|
+
## Version History Analysis
|
|
122
|
+
|
|
123
|
+
Use this to understand past version decisions:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# View version history
|
|
127
|
+
git tag --sort=v:refname
|
|
128
|
+
|
|
129
|
+
# View changes between versions
|
|
130
|
+
git log v4.1.0..v4.2.0 --oneline
|
|
131
|
+
|
|
132
|
+
# Check CHANGELOG for version rationale
|
|
133
|
+
grep -A 10 "## \[4.2.0\]" CHANGELOG.md
|
|
134
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Atomic Version Bump - Updates all version markers in one transaction
|
|
3
|
+
# Ensures package.json, CHANGELOG.md stay in sync
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
CHANGE_TYPE="${1:-}"
|
|
8
|
+
CHANGE_DESCRIPTION="${2:-}"
|
|
9
|
+
|
|
10
|
+
if [[ -z "$CHANGE_TYPE" ]]; then
|
|
11
|
+
echo "Usage: $0 <patch|minor|major> [description]"
|
|
12
|
+
echo ""
|
|
13
|
+
echo "Examples:"
|
|
14
|
+
echo " $0 patch 'Fix login bug'"
|
|
15
|
+
echo " $0 minor 'Add user dashboard'"
|
|
16
|
+
echo " $0 major 'Redesign API'"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Get script directory
|
|
21
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
22
|
+
|
|
23
|
+
# 1. Get current version
|
|
24
|
+
CURRENT_VERSION=$(grep -o '"version": *"[^"]*"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
|
|
25
|
+
echo "📦 Current version: $CURRENT_VERSION"
|
|
26
|
+
|
|
27
|
+
# 2. Calculate next version using decision tree
|
|
28
|
+
NEXT_VERSION=$("$SCRIPT_DIR/version-decision-tree.sh" "$CURRENT_VERSION" "$CHANGE_TYPE")
|
|
29
|
+
echo "🎯 Next version: $NEXT_VERSION"
|
|
30
|
+
|
|
31
|
+
# 3. Validate version sync before proceeding
|
|
32
|
+
echo ""
|
|
33
|
+
echo "🔍 Pre-flight validation..."
|
|
34
|
+
if ! "$SCRIPT_DIR/validate-version-sync.sh"; then
|
|
35
|
+
echo ""
|
|
36
|
+
echo "❌ Version sync validation failed. Fix inconsistencies before bumping."
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# 4. Update package.json
|
|
41
|
+
echo ""
|
|
42
|
+
echo "📝 Updating package.json..."
|
|
43
|
+
sed -i.bak "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEXT_VERSION\"/" package.json
|
|
44
|
+
rm package.json.bak
|
|
45
|
+
|
|
46
|
+
# 5. Prepare CHANGELOG.md entry
|
|
47
|
+
CURRENT_DATE=$(date +%Y-%m-%d)
|
|
48
|
+
CHANGELOG_ENTRY="## [$NEXT_VERSION] - $CURRENT_DATE
|
|
49
|
+
|
|
50
|
+
### 🎯 ${CHANGE_DESCRIPTION:-Version $NEXT_VERSION}
|
|
51
|
+
|
|
52
|
+
#### Changed
|
|
53
|
+
- TODO: Add change details
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
"
|
|
58
|
+
|
|
59
|
+
# Insert after the first "---" line in CHANGELOG.md
|
|
60
|
+
if [[ -f "CHANGELOG.md" ]]; then
|
|
61
|
+
echo "📝 Updating CHANGELOG.md..."
|
|
62
|
+
# Create temp file with new entry
|
|
63
|
+
awk -v entry="$CHANGELOG_ENTRY" '
|
|
64
|
+
/^---$/ && !inserted {
|
|
65
|
+
print
|
|
66
|
+
print entry
|
|
67
|
+
inserted=1
|
|
68
|
+
next
|
|
69
|
+
}
|
|
70
|
+
{print}
|
|
71
|
+
' CHANGELOG.md > CHANGELOG.md.tmp
|
|
72
|
+
mv CHANGELOG.md.tmp CHANGELOG.md
|
|
73
|
+
else
|
|
74
|
+
echo "⚠️ CHANGELOG.md not found, skipping"
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
# 6. Validate post-update
|
|
78
|
+
echo ""
|
|
79
|
+
echo "🔍 Post-update validation..."
|
|
80
|
+
UPDATED_VERSION=$(grep -o '"version": *"[^"]*"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
|
|
81
|
+
|
|
82
|
+
if [[ "$UPDATED_VERSION" != "$NEXT_VERSION" ]]; then
|
|
83
|
+
echo "❌ Version update failed: expected $NEXT_VERSION, got $UPDATED_VERSION"
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
echo ""
|
|
88
|
+
echo "✅ Version bumped successfully: $CURRENT_VERSION → $NEXT_VERSION"
|
|
89
|
+
echo ""
|
|
90
|
+
echo "📋 Next steps:"
|
|
91
|
+
echo " 1. Edit CHANGELOG.md to add detailed changes"
|
|
92
|
+
echo " 2. Review changes: git diff"
|
|
93
|
+
echo " 3. Commit: git add package.json CHANGELOG.md && git commit -m 'chore(release): bump version to $NEXT_VERSION'"
|
|
94
|
+
echo " 4. Tag: git tag -a v$NEXT_VERSION -m 'Release v$NEXT_VERSION'"
|
|
95
|
+
echo " 5. Push: git push origin main && git push origin v$NEXT_VERSION"
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Version Sync Validator - Ensures all version markers are consistent
|
|
3
|
+
# Checks: package.json, git tags, CHANGELOG.md
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Colors
|
|
8
|
+
RED='\033[0;31m'
|
|
9
|
+
GREEN='\033[0;32m'
|
|
10
|
+
YELLOW='\033[1;33m'
|
|
11
|
+
NC='\033[0m' # No Color
|
|
12
|
+
|
|
13
|
+
ERRORS=0
|
|
14
|
+
|
|
15
|
+
echo "🔍 Validating version synchronization..."
|
|
16
|
+
echo ""
|
|
17
|
+
|
|
18
|
+
# 1. Extract version from package.json
|
|
19
|
+
if [[ ! -f "package.json" ]]; then
|
|
20
|
+
echo -e "${RED}❌ package.json not found${NC}"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
PKG_VERSION=$(grep -o '"version": *"[^"]*"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
|
|
25
|
+
echo "📦 package.json version: $PKG_VERSION"
|
|
26
|
+
|
|
27
|
+
# 2. Check latest git tag
|
|
28
|
+
LATEST_TAG=$(git tag --sort=-v:refname | head -1 || echo "")
|
|
29
|
+
if [[ -z "$LATEST_TAG" ]]; then
|
|
30
|
+
echo -e "${YELLOW}⚠️ No git tags found${NC}"
|
|
31
|
+
else
|
|
32
|
+
TAG_VERSION="${LATEST_TAG#v}" # Remove 'v' prefix
|
|
33
|
+
echo "🏷️ Latest git tag: $LATEST_TAG ($TAG_VERSION)"
|
|
34
|
+
|
|
35
|
+
if [[ "$PKG_VERSION" != "$TAG_VERSION" ]]; then
|
|
36
|
+
echo -e "${RED}❌ Version mismatch: package.json ($PKG_VERSION) != git tag ($TAG_VERSION)${NC}"
|
|
37
|
+
((ERRORS++))
|
|
38
|
+
else
|
|
39
|
+
echo -e "${GREEN}✅ package.json and git tag match${NC}"
|
|
40
|
+
fi
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# 3. Check CHANGELOG.md
|
|
44
|
+
if [[ ! -f "CHANGELOG.md" ]]; then
|
|
45
|
+
echo -e "${YELLOW}⚠️ CHANGELOG.md not found${NC}"
|
|
46
|
+
else
|
|
47
|
+
# Extract first version from CHANGELOG (after the header)
|
|
48
|
+
# macOS grep doesn't support -P, use sed instead
|
|
49
|
+
CHANGELOG_VERSION=$(sed -n 's/^## \[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' CHANGELOG.md | head -1)
|
|
50
|
+
|
|
51
|
+
if [[ -z "$CHANGELOG_VERSION" ]]; then
|
|
52
|
+
echo -e "${YELLOW}⚠️ No version found in CHANGELOG.md${NC}"
|
|
53
|
+
else
|
|
54
|
+
echo "📝 CHANGELOG.md latest: $CHANGELOG_VERSION"
|
|
55
|
+
|
|
56
|
+
if [[ "$PKG_VERSION" != "$CHANGELOG_VERSION" ]]; then
|
|
57
|
+
echo -e "${RED}❌ Version mismatch: package.json ($PKG_VERSION) != CHANGELOG.md ($CHANGELOG_VERSION)${NC}"
|
|
58
|
+
((ERRORS++))
|
|
59
|
+
else
|
|
60
|
+
echo -e "${GREEN}✅ package.json and CHANGELOG.md match${NC}"
|
|
61
|
+
fi
|
|
62
|
+
fi
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# 4. Check for version format consistency in git tags
|
|
66
|
+
echo ""
|
|
67
|
+
echo "🔍 Checking git tag format consistency..."
|
|
68
|
+
INCONSISTENT_TAGS=$(git tag | grep -v '^v[0-9]\+\.[0-9]\+\.[0-9]\+$' || true)
|
|
69
|
+
if [[ -n "$INCONSISTENT_TAGS" ]]; then
|
|
70
|
+
echo -e "${YELLOW}⚠️ Found tags with inconsistent format:${NC}"
|
|
71
|
+
echo "$INCONSISTENT_TAGS" | sed 's/^/ /'
|
|
72
|
+
echo -e "${YELLOW} Expected format: vX.Y.Z (e.g., v4.2.0)${NC}"
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
echo ""
|
|
76
|
+
if [[ $ERRORS -eq 0 ]]; then
|
|
77
|
+
echo -e "${GREEN}✅ All version markers are synchronized${NC}"
|
|
78
|
+
exit 0
|
|
79
|
+
else
|
|
80
|
+
echo -e "${RED}❌ Found $ERRORS version synchronization error(s)${NC}"
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Version Decision Tree - Semantic Versioning Enforcer
|
|
3
|
+
# Prevents arbitrary version jumps by enforcing SemVer rules
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
CURRENT_VERSION="${1:-}"
|
|
8
|
+
CHANGE_TYPE="${2:-}"
|
|
9
|
+
|
|
10
|
+
if [[ -z "$CURRENT_VERSION" || -z "$CHANGE_TYPE" ]]; then
|
|
11
|
+
echo "Usage: $0 <current-version> <patch|minor|major>"
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Parse current version
|
|
16
|
+
if [[ ! "$CURRENT_VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
|
|
17
|
+
echo "❌ Invalid version format: $CURRENT_VERSION"
|
|
18
|
+
echo " Expected: X.Y.Z (e.g., 4.2.0)"
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
MAJOR="${BASH_REMATCH[1]}"
|
|
23
|
+
MINOR="${BASH_REMATCH[2]}"
|
|
24
|
+
PATCH="${BASH_REMATCH[3]}"
|
|
25
|
+
|
|
26
|
+
# Calculate next version based on change type
|
|
27
|
+
case "$CHANGE_TYPE" in
|
|
28
|
+
patch)
|
|
29
|
+
NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
|
|
30
|
+
;;
|
|
31
|
+
minor)
|
|
32
|
+
NEXT_VERSION="$MAJOR.$((MINOR + 1)).0"
|
|
33
|
+
;;
|
|
34
|
+
major)
|
|
35
|
+
NEXT_VERSION="$((MAJOR + 1)).0.0"
|
|
36
|
+
;;
|
|
37
|
+
*)
|
|
38
|
+
echo "❌ Invalid change type: $CHANGE_TYPE"
|
|
39
|
+
echo " Expected: patch, minor, or major"
|
|
40
|
+
exit 1
|
|
41
|
+
;;
|
|
42
|
+
esac
|
|
43
|
+
|
|
44
|
+
echo "$NEXT_VERSION"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
root
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [4.3.0] - 2026-03-13
|
|
11
|
+
|
|
12
|
+
### ✨ TDD Enforcement + OpenSpec Interop
|
|
13
|
+
|
|
14
|
+
v4.3.0 adds automatic TDD order validation and bidirectional OpenSpec conversion to solve requirement drift problems.
|
|
15
|
+
|
|
16
|
+
#### Added
|
|
17
|
+
|
|
18
|
+
- **TDD Order Validation**
|
|
19
|
+
- Added `validateTDDOrder()` in `lib/harness/planner.js` to enforce Constitution Article VI
|
|
20
|
+
- Validates that [IMPL] tasks depend on corresponding [TEST] tasks
|
|
21
|
+
- Validates that [TEST] tasks don't depend on [IMPL] tasks
|
|
22
|
+
- Intelligent feature name matching with fuzzy algorithm (removes suffixes like "测试", "实现", "功能")
|
|
23
|
+
- Extended `TaskSchema` in `lib/harness/schemas.js` with `type` field (TEST/IMPL/OTHER)
|
|
24
|
+
- Comprehensive test coverage in `lib/harness/__tests__/planner.tdd.test.js` (10 tests, all passing)
|
|
25
|
+
|
|
26
|
+
- **OpenSpec Interoperability**
|
|
27
|
+
- Added `.claude/scripts/import-openspec.js` for OpenSpec → CC-DevFlow conversion
|
|
28
|
+
- Parses OpenSpec format (Purpose + Requirements + BDD scenarios)
|
|
29
|
+
- Auto-generates TDD tasks (TEST + IMPL pairs with correct dependencies)
|
|
30
|
+
- Adds Design section with [NEEDS CLARIFICATION] markers
|
|
31
|
+
- Generates Verification checklist
|
|
32
|
+
- Added `.claude/scripts/export-openspec.js` for CC-DevFlow → OpenSpec conversion
|
|
33
|
+
- Strips YAML frontmatter and metadata
|
|
34
|
+
- Removes Design, Tasks, Verification sections
|
|
35
|
+
- Removes [NEEDS CLARIFICATION] markers
|
|
36
|
+
- Outputs pure Requirements in OpenSpec format
|
|
37
|
+
- Added `.claude/commands/flow/import-openspec.md` command documentation
|
|
38
|
+
- Added `.claude/commands/flow/export-openspec.md` command documentation
|
|
39
|
+
- Comprehensive test coverage in `.claude/scripts/__tests__/openspec.test.js` (5 tests, all passing)
|
|
40
|
+
- Round-trip conversion preserves requirements integrity
|
|
41
|
+
|
|
42
|
+
#### Benefits
|
|
43
|
+
|
|
44
|
+
- ✅ Automatic enforcement of TDD order (Constitution Article VI)
|
|
45
|
+
- ✅ Prevents implementation before tests at parse time
|
|
46
|
+
- ✅ Bidirectional OpenSpec compatibility
|
|
47
|
+
- ✅ Automatic TDD task generation during import
|
|
48
|
+
- ✅ Clean requirement export without implementation details
|
|
49
|
+
|
|
10
50
|
## [4.2.0] - 2026-02-19
|
|
11
51
|
|
|
12
52
|
### 🧠 Long-Running Harness Protocol Alignment
|
package/README.md
CHANGED
|
@@ -27,8 +27,9 @@ Harness-first five-stage workflow from requirement setup to release: `/flow:init
|
|
|
27
27
|
- 🔗 **GitHub Integration** - Automated PR creation, branch management, and conventional commits
|
|
28
28
|
- 📊 **Progress Tracking** - Real-time status monitoring and intelligent restart points
|
|
29
29
|
- 🔍 **Consistency Verification** - Enterprise-grade consistency checking with intelligent conflict detection
|
|
30
|
-
- 🧪 **TDD Enforced** - Strict Test-Driven Development with
|
|
30
|
+
- 🧪 **TDD Enforced** - Strict Test-Driven Development with automatic TDD order validation in harness planner
|
|
31
31
|
- 📜 **Constitution** - 10 Articles governing quality, security, and architecture
|
|
32
|
+
- 🔄 **OpenSpec Interop** - Bidirectional conversion between OpenSpec and CC-DevFlow formats with automatic TDD task generation
|
|
32
33
|
- 🔄 **Autonomous Development** - Ralph × Manus Integration for memory-enhanced continuous iteration
|
|
33
34
|
- 🔌 **Multi-Platform Support** - Compile workflows for Codex, Cursor, Qwen, Antigravity via `npm run adapt`
|
|
34
35
|
- 🔄 **Multi-Module Compiler** - Full module compilation: skills, commands, agents, rules, hooks
|
package/README.zh-CN.md
CHANGED
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
- 🔗 **GitHub 集成** - 自动化 PR 创建、分支管理和规范化提交
|
|
28
28
|
- 📊 **进度跟踪** - 实时状态监控和智能重启点
|
|
29
29
|
- 🔍 **一致性验证** - 企业级一致性检查,智能冲突检测
|
|
30
|
-
- 🧪 **TDD 强制执行** - 严格的测试驱动开发,
|
|
30
|
+
- 🧪 **TDD 强制执行** - 严格的测试驱动开发,harness planner 自动 TDD 顺序验证
|
|
31
31
|
- 📜 **Constitution** - 10条宪法条款管控质量、安全和架构
|
|
32
|
+
- 🔄 **OpenSpec 互操作** - OpenSpec 与 CC-DevFlow 格式双向转换,自动生成 TDD 任务
|
|
32
33
|
- 🔄 **自主开发** - Ralph × Manus 集成实现有记忆的持续迭代
|
|
33
34
|
- 🔌 **多平台支持** - 通过 `npm run adapt` 编译工作流到 Codex、Cursor、Qwen、Antigravity
|
|
34
35
|
- 🔄 **多模块编译器** - 完整模块编译:skills、commands、agents、rules、hooks
|