Skip to content
Open
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
52 changes: 52 additions & 0 deletions .github/workflows/specs-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy Specs Site

on:
push:
branches: [develop]
paths:
- 'docs/specs/**'
- 'specs-site/**'

workflow_dispatch:

permissions:
contents: read

Check notice

Code scanning / SonarCloud

Read permissions should be defined at the job level Low

Move this read permission from workflow level to job level. See more on SonarQube Cloud

Check warning on line 13 in .github/workflows/specs-site.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this read permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=TheRestartProject_restarters.net&issues=AZ2XDt1N993XNTvtBFdq&open=AZ2XDt1N993XNTvtBFdq&pullRequest=835
pages: write

Check notice

Code scanning / SonarCloud

Write permissions should be defined at the job level Low

Move this write permission from workflow level to job level. See more on SonarQube Cloud

Check warning on line 14 in .github/workflows/specs-site.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=TheRestartProject_restarters.net&issues=AZ2XDt1N993XNTvtBFdr&open=AZ2XDt1N993XNTvtBFdr&pullRequest=835
id-token: write

Check notice

Code scanning / SonarCloud

Write permissions should be defined at the job level Low

Move this write permission from workflow level to job level. See more on SonarQube Cloud

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
working-directory: specs-site
run: npm ci

- name: Build site
working-directory: specs-site
run: npm run build

- uses: actions/upload-pages-artifact@v3
with:
path: specs-site/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
12 changes: 12 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,17 @@ npm test
- Event-driven architecture with model observers
- Only translate fr and fr-BE

## Living Specifications

When modifying PHP controller or service methods:
- Maintain `#[UserStory]` and `#[Feature]` attributes (in `app/Attributes/`)
- Add `#[UserStory]` to new public methods that represent user-facing functionality
- Add `#[NoStory]` to methods that intentionally have no user story
- Update the story text if you change what a method does
- When adding or modifying tests, include `@story:ClassName::method` references
- Run `php artisan specs:extract` after annotation changes and commit the updated manifest
- Update the narrative in `docs/specs/narratives/` if feature coverage has changed
- Preserve human-written prose in narratives -- update structure and counts, not wording

## Development Warnings
- Don't try to test changes when you're running on Windows.
14 changes: 14 additions & 0 deletions app/Attributes/Feature.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_CLASS)]
class Feature
{
public function __construct(
public string $name,
public string $description = '',
) {}
}
13 changes: 13 additions & 0 deletions app/Attributes/NoStory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_METHOD)]
class NoStory
{
public function __construct(
public string $reason = '',
) {}
}
16 changes: 16 additions & 0 deletions app/Attributes/UserStory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
class UserStory
{
public function __construct(
public string $story,
public string $persona,
public string $feature = '',
public string $theme = '',
) {}
}
Loading