xiaohongshu
xiaohongshu
sync-acs
Manually synchronize acceptance criteria (AC) checkbox status in spec.md based on task completion
Full skill instructions
Purpose: Manually trigger AC checkbox synchronization to ensure spec.md acceptance criteria accurately reflect task completion status.
Use When:
Detect Active Increment
Parse Task Completion
Parse AC Definitions
Intelligent Sync Logic
Atomic File Update
# Auto-detect and sync active increment
/sw:sync-acs
# Sync specific increment
/sw:sync-acs 0039
# Show what would change (dry run)
/sw:sync-acs --dry-run
# Force sync (ignore conflicts)
/sw:sync-acs --force
# Validate only (check for mismatches)
/sw:sync-acs --validate
The command uses ACStatusManager for sophisticated synchronization:
import { ACStatusManager } from '../../../../../src/core/increment/ac-status-manager';
const manager = new ACStatusManager(process.cwd());
const result = await manager.syncACStatus(incrementId);
// result.synced: true if sync was performed
// result.updated: string[] - AC-IDs updated to [x]
// result.conflicts: string[] - Conflicts detected
// result.warnings: string[] - Orphaned ACs, missing files
// result.changes: string[] - Human-readable diff
# Auto-detect active increment
ACTIVE_INCREMENT=$(ls -t .specweave/increments/ 2>/dev/null | grep -v "_backlog\|_archive" | head -1)
if [[ -z "$ACTIVE_INCREMENT" ]]; then
echo "❌ No active increment found"
exit 1
fi
echo "🔄 Syncing AC status for $ACTIVE_INCREMENT..."
# Use the update-ac-status.js hook script (already integrated)
node plugins/specweave/lib/hooks/update-ac-status.js "$ACTIVE_INCREMENT"
Or invoke directly:
const result = await manager.syncACStatus(incrementId);
# Updated ACs
if [[ -n "${result.updated}" ]]; then
echo "✅ Updated AC checkboxes:"
for acId in "${result.updated[@]}"; do
echo " $acId → [x]"
done
fi
# Conflicts
if [[ -n "${result.conflicts}" ]]; then
echo "⚠️ Conflicts detected:"
for conflict in "${result.conflicts[@]}"; do
echo " $conflict"
done
fi
# Warnings
if [[ -n "${result.warnings}" ]]; then
echo "⚠️ Warnings:"
for warning in "${result.warnings[@]}"; do
echo " $warning"
done
fi
Before:
# spec.md
- [ ] AC-US1-01: User can login
- [ ] AC-US1-02: Session persists
# tasks.md
#### T-001: Implement login API
**AC**: AC-US1-01
**Status**: [x] (100% - Completed)
#### T-002: Add session storage
**AC**: AC-US1-01
**Status**: [x] (100% - Completed)
After:
# spec.md
- [x] AC-US1-01: User can login ✓ UPDATED
- [ ] AC-US1-02: Session persists
Output:
🔄 Syncing AC status for increment 0039...
✅ Updated AC checkboxes:
AC-US1-01 → [x]
📝 Changes:
AC-US1-01: [ ] → [x] (2/2 tasks complete - 100%)
Before:
# spec.md
- [ ] AC-US1-02: Session persists
# tasks.md
#### T-003: Add Redis session store
**AC**: AC-US1-02
**Status**: [x] (100% - Completed)
#### T-004: Test session expiry
**AC**: AC-US1-02
**Status**: [ ] (0% - Not started)
After:
# spec.md
- [ ] AC-US1-02: Session persists (NO CHANGE - 50% complete)
Output:
🔄 Syncing AC status for increment 0039...
ℹ️ No AC updates needed
📊 Completion Status:
AC-US1-02: 1/2 tasks complete (50%) - threshold not met
Before:
# spec.md
- [x] AC-US1-03: Data validated (manually checked)
# tasks.md
#### T-005: Add validation rules
**AC**: AC-US1-03
**Status**: [x] (100% - Completed)
#### T-006: Add error handling
**AC**: AC-US1-03
**Status**: [ ] (0% - Not started)
After:
# spec.md
- [x] AC-US1-03: Data validated (PRESERVED - conflict detected)
Output:
🔄 Syncing AC status for increment 0039...
⚠️ Conflicts detected:
AC-US1-03: Marked [x] but only 1/2 tasks complete (50%)
→ Manual override preserved (no change made)
💡 Tip: Review tasks for AC-US1-03 or uncheck manually if premature
Before:
# spec.md
- [ ] AC-US1-04: Performance optimized
- [ ] AC-US1-05: Security hardened
# tasks.md
#### T-007: Implement caching
**AC**: AC-US1-04
**Status**: [x] (100% - Completed)
(No tasks reference AC-US1-05)
Output:
🔄 Syncing AC status for increment 0039...
✅ Updated AC checkboxes:
AC-US1-04 → [x]
⚠️ Warnings:
AC-US1-05: No implementing tasks found (orphaned AC)
→ Add tasks or remove AC from spec.md
The hook automatically calls ACStatusManager.syncACStatus() after every task completion:
# plugins/specweave/hooks/post-task-completion.sh (lines 232-269)
if [ -n "$CURRENT_INCREMENT" ]; then
node plugins/specweave/lib/hooks/update-ac-status.js "$CURRENT_INCREMENT"
fi
Disable automatic sync:
export SKIP_AC_SYNC=true
# Now hooks won't sync ACs (useful for batch work)
# Validate ACs before closing increment
/sw:sync-acs --validate
# Warns if ACs out of sync
# Auto-sync ACs before closing
/sw:sync-acs
# Then proceed with increment closure
# Show AC completion alongside task progress
/sw:sync-acs --status
# Display: 8/10 ACs complete (80%)
This command ensures acceptance criteria accurately reflect implementation progress!
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience