RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Windsurf rules/danielvm-git/bigpowers

Windsurf rules

.windsurf/rules/session-state.md

Track implementation decisions and progress in specs/state.yaml to prevent context rot. Use at the start of a session to load context, and whenever a significant decision is made or a milestone is reached.

Windsurf rules

Quality

82/100

Scores the file, not the repository.

Length

789 words

15 headings · 2 code blocks

Repository

114

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
danielvm-git/bigpowers/.windsurf/rules/session-state.mdRawGitHub
1---
2name: session-state
3model: haiku
4description: "Track implementation decisions and progress in specs/state.yaml to prevent context rot. Use at the start of a session to load context, and whenever a significant decision is made or a milestone is reached."
5---
6 
7# story: e45s23
8 
9# Session State
10> **HARD GATE** — **HARD GATE** — Session state must be synchronized with git state. If state.yaml conflicts with the working tree, halt and ask for clarification. Do NOT assume state is correct.
11 
12 
13Track the current state of implementation, including decisions made, pending tasks, and open questions, to ensure continuity across session boundaries and prevent "context rot."
14 
15Session-state implements the **isolate** strategy from the context-engineering framework (docs/references/context-engineering.md): each agent gets exactly the context it needs — no more — by recording decisions so the next agent can cold-start without replaying history. The four strategies (write, select, compress, isolate) work together: session-state handles isolation, terse-mode handles compression, survey-context handles selection, and CONVENTIONS.md ensures token-efficient writing.
16 
17## Goal
18 
19Maintain a single source of truth for the *current* session in `specs/state.yaml`. This complements long-term docs in `specs/tech-architecture/` and delivery detail in `specs/epics/` + `specs/release-plan.yaml`.
20 
21Legacy markdown (`specs/archive/STATE.md`, `RELEASE-PLAN.md`) is **not** SoT when YAML exists — use `specs/state.yaml` only.
22 
23When a story modifies existing behavior, patch only between matching marker pairs in `CLAUDE.md` / `AGENTS.md` `learned-preferences` fence — see e45s21.
24 
25## Handoff block (cold start)
26 
27When ending a session or before a context-heavy spawn, update `handoff` in `state.yaml`:
28 
29```yaml
30handoff:
31 last_step_completed: "e02s01 verify-work passed"
32 open_decisions:
33 - "Use folder mode for e07 (>5 stories)"
34 required_reading:
35 - CONVENTIONS.md
36 - specs/epics/e02-verification/epic.yaml
37 next_skill: develop-tdd
38```
39 
40## Strategic compaction
41 
42| Trigger | Action |
43|---------|--------|
44| Phase transition (Plan → Build → Verify) | Compact handoff; archive verbose decisions to ADR |
45| Context > 70% estimated | Run terse-mode for status only; move detail to specs/ |
46| Before `dispatch-agents` wave | `state.yaml` only channel between spawns |
47 
48## Workflow
49 
50### 1. Initialize (Session Start)
51 
52If `specs/state.yaml` does not exist, or if starting a new major phase:
53 
54- [ ] Read `specs/release-plan.yaml` and `specs/product/SCOPE_LATEST.yaml`.
55- [ ] Get git metadata: `git branch --show-current` and `git rev-parse --short HEAD`.
56- [ ] Create `specs/state.yaml` with active flow, git, handoff, and epic cycle if in build.
57 
58### 2. Load (Context Refresh)
59 
60When starting a new session or after a significant context flush:
61 
62- [ ] Read `specs/state.yaml` to understand where the previous agent left off.
63- [ ] Read `specs/execution-status.yaml` for story progress (do not infer from release-plan).
64- [ ] Verify git matches `state.yaml` `git.branch` / `git.hash`.
65 
66### 3. Update (Decision Point/Milestone)
67 
68Whenever a significant decision is made or a milestone is reached:
69 
70- [ ] Patch via `bash scripts/bp-yaml-set.sh specs/state.yaml git.hash <hash>` (or edit directly).
71- [ ] Patch `handoff` and `learned_preferences` / `workspace_facts` in `CLAUDE.md` fenced block when durable user preferences or repo facts crystallize (e45s23).
72- [ ] Update `handoff.open_decisions` with rationale.
73- [ ] Update `epic_cycle` when advancing `ship-epic` steps.
74- [ ] Record open questions under `handoff.open_decisions` or an ADR.
75 
76→ verify: `bash scripts/validate-specs-yaml.sh`
77 
78## Universal checkpoint pattern
79 
80Every multi-step flow (>3 steps) in bigpowers uses a cycle counter in `state.yaml`:
81 
82| Flow | Cycle key | Step field | Phases/Steps |
83|------|-----------|------------|-------------|
84| build-epic | `epic_cycle` | `current_step` | 8 (survey → release) |
85| fix-bug | `bug_cycle` | `current_step` | 5 (investigate → release) |
86| orchestrate-project | `project_cycle` | `current_phase` | 6 (discover → release) |
87 
88**Checkpoint:** After each step/phase completes, increment the counter in `state.yaml` and update `handoff.next_skill`.
89 
90**Resume:** On session start, read the current step/phase from the cycle key — continue from there, not from step 1.
91 
92**Completed steps:** Track completed steps in `completed_steps` (comma-separated string) for audit trail.
93 
94## Strategic compaction
95 
96Print the current session state: `cat specs/state.yaml`, then display `active_flow` and `handoff.next_skill` for quick reference.
97 
98### reset-state (absorbed)
99 
100Clear ephemeral session state. Set `active_epic_id`, `active_story_id`, and `epic_cycle.current_step` to `null` in `specs/state.yaml`. Use when ending a phase or starting a new project context.
101 
102### compact-state (absorbed)
103 
104Archive verbose decisions before a context transition. Move all entries from `handoff.open_decisions` to their appropriate location:
105 
106- **System-wide decisions** → `specs/adr/NNNN-slug.md` (global Architectural Decision Records)
107- **Epic-scoped decisions** → `specs/epics/<active_epic_id>-<slug>/adr/NNNN-slug.md` (epic-local ADRs, archived with epic)
108 
109After archiving, reset `handoff.open_decisions` to an empty list.
110 
111## File Format: specs/state.yaml
112 
113```yaml
114active_flow: build_epic # planning | build_epic | fix_bug
115active_epic_id: e02
116active_story_id: e02s01 # required when epic mode: folder
117active_bug_id: null # BUG-2026-06-01T143022 when fix_bug
118release:
119 target_version: null # NOT tracked manually — semantic-release decides at merge
120 last_tag: v2.28.0 # mirror of `gh release view`, reference only
121 last_publish: null
122epic_cycle:
123 current_step: develop-tdd
124 next_skill: develop-tdd
125 completed_steps: [kickoff-branch]
126bug_cycle:
127 current_step: null
128 completed_steps: []
129git:
130 branch: feat/e02-verify
131 hash: abc1234
132handoff:
133 last_step_completed: null
134 open_decisions: []
135 next_skill: survey-context
136```
137 
138## Anti-Patterns
139 
140- **Duplicate Plan**: Don't copy `release-plan.yaml` or epic shards into `state.yaml`.
141- **Stale State**: Forgetting to update `state.yaml` after a major refactor or decision.
142- **Status in release-plan**: Story/epic status lives only in `execution-status.yaml`.
143 
144 
145<!-- story: e03s03 -->
146<!-- story: e04s01 -->
147 

Commands it names

  • git:
  • git branch --show-current
  • git rev-parse --short HEAD
  • git.branch
  • git.hash
  • gh release view

Sections

  • story: e45s23
  • Session State
  • Goal
  • Handoff block (cold start)
  • Strategic compaction
  • Workflow
  • 1. Initialize (Session Start)
  • 2. Load (Context Refresh)
  • 3. Update (Decision Point/Milestone)
  • Universal checkpoint pattern
  • Strategic compaction
  • reset-state (absorbed)
  • compact-state (absorbed)
  • File Format: specs/state.yaml
  • Anti-Patterns

What it covers

lint-formatcode-styleagent-behaviour

Stack — with the evidence

shell

(0.80)

node

(0.70)

react

(0.70)

astro

(0.70)

express

(0.70)

vitest

(0.70)

typescript

(0.60)

javascript

(0.60)

python

(0.60)

github-actions

(0.60)

Format

Windsurf rules

Cursor's activation model with a different vocabulary — trigger modes instead of rule types — plus hard character caps, which is the one place a format here will silently drop instructions rather than fail loudly.

What the corpus says about it

Repository

Owner
danielvm-git
Language
—
License
—
Archived
no

All configs in this repo

Also in danielvm-git/bigpowers

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
danielvm-git/bigpowers.cursor/rules/align-grid.mdc · 114Cursor rulesnodeshell+8lint-formatdo-notagent-behaviour65/1003 days ago
danielvm-git/bigpowers.cursor/rules/assess-impact.mdc · 114Cursor rulesshellnode+8testtesting-strategydeployment66/1003 days ago
danielvm-git/bigpowers.cursor/rules/audit-code.mdc · 114Cursor rulesshellnode+8setuptestlint-formatstyle+466/1003 days ago
danielvm-git/bigpowers.cursor/rules/audit-plan.mdc · 114Cursor rulesnodeshell+8buildteststylegit74/1003 days ago
danielvm-git/bigpowers.cursor/rules/build-epic.mdc · 114Cursor rulesshellnode+8buildgit58/1003 days ago
danielvm-git/bigpowers.cursor/rules/change-request.mdc · 114Cursor rulesshellnode+8no sections48/1003 days ago
danielvm-git/bigpowers.cursor/rules/commit-message.mdc · 114Cursor rulesshellnode+8lint-formatstyletypesgit+382/1003 days ago
danielvm-git/bigpowers.cursor/rules/compose-workflow.mdc · 114Cursor rulesshellnode+8styledo-notagent-behaviour65/1003 days ago
danielvm-git/bigpowers.cursor/rules/context7-mcp.mdc · 114Cursor rulesshellnode+8style54/1003 days ago
danielvm-git/bigpowers.cursor/rules/craft-skill.mdc · 114Cursor rulesshellnode+8stylearchgitdo-not69/1003 days ago
danielvm-git/bigpowers.cursor/rules/deepen-architecture.mdc · 114Cursor rulesshellnode+8testtesting-strategydo-not57/1003 days ago
danielvm-git/bigpowers.cursor/rules/define-language.mdc · 114Cursor rulesshellnode+8lint-formatdo-not65/1003 days ago
danielvm-git/bigpowers.cursor/rules/define-success.mdc · 114Cursor rulesshellnode+8no sections4/1003 days ago
danielvm-git/bigpowers.cursor/rules/delegate-task.mdc · 114Cursor rulesshellnode+8git62/1003 days ago
danielvm-git/bigpowers.cursor/rules/deploy.mdc · 114Cursor rulesnodeshell+8setupbuildtestdeployment77/1003 days ago
danielvm-git/bigpowers.cursor/rules/design-interface.mdc · 114Cursor rulesshellnode+8styleagent-behaviour58/1003 days ago
danielvm-git/bigpowers.cursor/rules/develop-tdd.mdc · 114Cursor rulesshellnode+8teststylearchtesting-strategy+585/1003 days ago
danielvm-git/bigpowers.cursor/rules/diagnose-root.mdc · 114Cursor rulesshellnode+8no sections39/1003 days ago
danielvm-git/bigpowers.cursor/rules/diagnose-stall.mdc · 114Cursor rulesshellnode+8no sections44/1003 days ago
danielvm-git/bigpowers.cursor/rules/dispatch-agents.mdc · 114Cursor rulesshellnode+8git54/1003 days ago
Diff against .cursor/rules/align-grid.mdc Diff against .cursor/rules/assess-impact.mdc Diff against .cursor/rules/audit-code.mdc Diff against .cursor/rules/audit-plan.mdc Diff against .cursor/rules/build-epic.mdc Diff against .cursor/rules/change-request.mdc Diff against .cursor/rules/commit-message.mdc Diff against .cursor/rules/compose-workflow.mdc Diff against .cursor/rules/context7-mcp.mdc Diff against .cursor/rules/craft-skill.mdc Diff against .cursor/rules/deepen-architecture.mdc Diff against .cursor/rules/define-language.mdc Diff against .cursor/rules/define-success.mdc Diff against .cursor/rules/delegate-task.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/design-interface.mdc Diff against .cursor/rules/develop-tdd.mdc Diff against .cursor/rules/diagnose-root.mdc Diff against .cursor/rules/diagnose-stall.mdc Diff against .cursor/rules/dispatch-agents.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
danielvm-git/bigpowers.windsurf/rules/organize-workspace.md · 114Windsurf rulesshellnode+8buildstylegitdeployment+289/1003 days ago
danielvm-git/bigpowers.windsurf/rules/guard-git.md · 114Windsurf rulesshellnode+8stylearchgitsecurity+289/1003 days ago
danielvm-git/bigpowers.windsurf/rules/quick-fix.md · 114Windsurf rulesshellnode+8teststylegitdeployment+185/1003 days ago
danielvm-git/bigpowers.windsurf/rules/develop-tdd.md · 114Windsurf rulesshellnode+8teststylearchtesting-strategy+585/1003 days ago
danielvm-git/bigpowers.windsurf/rules/commit-message.md · 114Windsurf rulesshellnode+8lint-formatstyletypesgit+382/1003 days ago
danielvm-git/bigpowers.windsurf/rules/extract-design.md · 114Windsurf rulesnodeshell+8lint-formatstyledependenciesui82/1003 days ago
danielvm-git/bigpowers.windsurf/rules/setup-environment.md · 114Windsurf rulesnodeshell+8setupstylesecuritydo-not+181/1003 days ago
danielvm-git/bigpowers.windsurf/rules/wire-ci.md · 114Windsurf rulesnodeshell+8buildtestlint-formatstyle+181/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack