Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/test-sdlc-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Test SDLC Workflow

on:
pull_request:
paths:
- 'agent-context/sdlc-workflow.sh'
- 'agent-context/sdlc-pointer.sh'
- 'agent-context/README.md'
- 'scripts/start-agent-session.sh'
- 'scripts/capture-session-memory.sh'
- 'scripts/init-project.sh'
- 'scripts/upgrade-project.sh'
- 'scripts/verify-project-install.sh'
- 'scripts/sdlc.sh'
- 'scripts/validate-command-adapters.sh'
- 'templates/cursor/sdlc-spdd-whereami.md'
- 'templates/copilot/prompts/sdlc-spdd-whereami.prompt.md'
- 'templates/claude/commands/sdlc-spdd-whereami.md'
- 'templates/cursor/rules/sdlc-spdd.mdc'
- 'templates/copilot/copilot-instructions.md'
- 'templates/claude/CLAUDE.md'
- 'tests/test-sdlc-workflow.sh'
- 'tests/test-sdlc-pointer.sh'
- '.github/workflows/test-sdlc-workflow.yml'
push:
branches: [main]
paths:
- 'agent-context/sdlc-workflow.sh'
- 'agent-context/sdlc-pointer.sh'
- 'agent-context/README.md'
- 'scripts/start-agent-session.sh'
- 'scripts/capture-session-memory.sh'
- 'scripts/init-project.sh'
- 'scripts/upgrade-project.sh'
- 'scripts/verify-project-install.sh'
- 'scripts/sdlc.sh'
- 'scripts/validate-command-adapters.sh'
- 'templates/cursor/sdlc-spdd-whereami.md'
- 'templates/copilot/prompts/sdlc-spdd-whereami.prompt.md'
- 'templates/claude/commands/sdlc-spdd-whereami.md'
- 'templates/cursor/rules/sdlc-spdd.mdc'
- 'templates/copilot/copilot-instructions.md'
- 'templates/claude/CLAUDE.md'
- 'tests/test-sdlc-workflow.sh'
- 'tests/test-sdlc-pointer.sh'
- '.github/workflows/test-sdlc-workflow.yml'

jobs:
test-sdlc-workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check shell syntax
run: |
bash -n agent-context/sdlc-pointer.sh
bash -n agent-context/sdlc-workflow.sh
bash -n scripts/sdlc.sh
bash -n tests/test-sdlc-workflow.sh
bash -n scripts/start-agent-session.sh
bash -n scripts/capture-session-memory.sh
bash -n scripts/validate-command-adapters.sh

- name: Run SDLC pointer regression tests
run: ./tests/test-sdlc-pointer.sh

- name: Run SDLC workflow regression tests
run: ./tests/test-sdlc-workflow.sh
97 changes: 97 additions & 0 deletions agent-context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Each work item also has a canonical canvas under `spdd/canvas/`. Keep both copie

## SDLC Pointer (current chore/task)

**Quick start:** `./scripts/sdlc.sh` (or `./scripts/sdlc.sh next`) shows what to do now.
In chat: `/sdlc-spdd-whereami`.

Agents can drift onto the wrong Work ID when several chores are open. The pointer
manager keeps a single active chore in `.sdlc/pointer` (local state; not committed)
and provides guarded wrappers so commands refuse to run against a stale pointer.
Expand All @@ -77,6 +80,100 @@ sdlc_init

`start-agent-session.sh` sets the pointer automatically when `--work-id` is provided.

## SDLC Workflow (phase + gate tracking)

**Short commands** (installed at `scripts/sdlc-spdd/sdlc.sh`; orchestrator repo: `scripts/sdlc.sh`):

```bash
./scripts/sdlc.sh # what to do now (default)
./scripts/sdlc.sh status # full dashboard (auto-syncs)
./scripts/sdlc.sh start # open session brief at current phase
./scripts/sdlc.sh resume FEAT-001-order-status-api
./scripts/sdlc.sh advance
./scripts/sdlc.sh shelf --reason "blocked"
./scripts/sdlc.sh capture --summary "finished T02" # pointer-guarded
```

In **code** phase, the next canvas operation (`T01`, `T02`, …) is inferred automatically from the REASONS Canvas.

The workflow manager builds on the pointer to answer **where am I?**, **what is next?**,
and **how do I shelf or resume work?** State lives under `.sdlc/workflows/` (local,
gitignored). Committed artifacts (`progress-log.md`, canvas, reviews) remain the audit trail;
run `sync` to reconcile workflow state from those files.

```bash
# Where am I on the current task?
./agent-context/sdlc-workflow.sh status

# Pick up a shelved task (auto-shelves the current pointer if different)
./agent-context/sdlc-workflow.sh resume FEAT-001-order-status-api

# Resume at a specific phase (e.g. after intentionally skipping ahead)
./agent-context/sdlc-workflow.sh resume FEAT-001-order-status-api --phase code

# Move to the next phase after finishing a step
./agent-context/sdlc-workflow.sh advance

# Jump ahead to a later phase
./agent-context/sdlc-workflow.sh advance --to review

# Skip a phase with a recorded reason
./agent-context/sdlc-workflow.sh skip api-test --reason "no HTTP surface"

# Park current work and clear the pointer
./agent-context/sdlc-workflow.sh shelf --reason "blocked on dependency"

# Re-read canvas, progress log, and session brief into workflow state
./agent-context/sdlc-workflow.sh sync

# List shelved work ids
./agent-context/sdlc-workflow.sh list-shelved
```

`start-agent-session.sh` and `capture-session-memory.sh` update workflow timestamps
automatically. After shelving, run `resume <WORK-ID>` then `start-agent-session.sh`
with the suggested phase to sync back into the chat workflow.

## Team Work ID sharing

Local pointer (`.sdlc/`) is private to your machine. **Team coordination** uses the
committed file `agent-context/work-registry.tsv` — commit it after claim/release so
teammates see who is on which Work ID, phase, and operation.

```bash
./scripts/sdlc.sh list-work # discover Work IDs in the repo
./scripts/sdlc.sh team # team registry + your pointer
./scripts/sdlc.sh claim FEAT-001-alpha # resume + register as active owner
./scripts/sdlc.sh release --reason "handoff to QA"
./scripts/sdlc.sh resume OTHER-ID --force # take over if teammate left stale claim
```

Set `SDLC_USER="Jane"` to label registry rows. Set `SDLC_NO_TEAM_REGISTRY=1` to opt out.

**Stale claims:** active rows older than `SDLC_TEAM_STALE_DAYS` (default 7) show `[STALE>Nd]` in
`team` / `list-work`. Stale claims warn but do not block; non-stale claims block until `--force`.

**Done status:** canvases with `## Final Status` → `Status: Complete` are marked `done` when you run
`team`, `list-work`, or `sync-team`.

**Branch / PR / Jira linking** (stored in the `note` column):

```bash
./scripts/sdlc.sh claim FEAT-001 --branch cursor/feat-001 --pr "#21" --jira "PROJ-123"
# auto-detects current git branch on claim (disable: SDLC_TEAM_AUTO_BRANCH=0)
# auto-reads Jira Key from requirements/milestones/<WORK-ID>.md ## Jira (disable: SDLC_TEAM_AUTO_JIRA=0)
```

Jira **draft syntax** for issue creation lives in `requirements/milestones/<WORK-ID>.md` under
`## Jira`. Set `- Key: ABC-123` after create; `list-work` shows `jira:ABC-123` or `jira draft`.

**Notifications:** copy `agent-context/hooks/notify-team-registry.example.sh` and set:

```bash
export SDLC_TEAM_REGISTRY_HOOK=./agent-context/hooks/notify-team-registry.sh
export SDLC_TEAM_SLACK_WEBHOOK=https://hooks.slack.com/services/...
```

## Session Persistence

Use scripts to keep agent sessions durable across chat boundaries:
Expand Down
Loading
Loading