Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Commit 5176fff

Browse files
committed
docs: add function list table plan and consolidate guides
Finalize feature design with merging hook pattern, update features.json steps, create implementation plan 002, and add raw deployer PoC note to design doc. Consolidate duplicate commit message rules into a single guide with authorship modes. Add page/component/hook rules to ARCHITECTURE.md. Clarify one-at-a-time TDD in TESTING.md. Update init-session to hand off to Feature Development Sequence. Log Cypress sandbox blocker in agent-struggles.json. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
1 parent 6b40579 commit 5176fff

16 files changed

Lines changed: 384 additions & 176 deletions

.claude/commands/commit-user.md

Lines changed: 12 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -3,93 +3,19 @@ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git log:*), Bash(git di
33
description: Draft a git commit message (interactive — does NOT commit)
44
---
55

6-
# Git Commit Message Guidelines
6+
# Commit (Interactive)
77

8-
Draft a git commit message following these rules. DO NOT commit — show the message and terminal command only.
8+
Draft a commit message following `docs/references/commit-message-guide.md`. Do NOT commit — show the message and the terminal command only.
99

10-
## The Seven Rules
10+
## Steps
1111

12-
1. Separate subject from body with a blank line
13-
2. Limit the subject line to 50 characters
14-
3. Use conventional commit spec for subject line
15-
4. Do not end the subject line with a period
16-
5. Use the imperative mood in the subject line
17-
6. Wrap the body at 72 characters
18-
7. Use the body to explain what and why vs. how
19-
20-
## Format
21-
22-
```txt
23-
<type>: <subject - max 50 chars total, imperative mood, conventional commit spec>
24-
25-
<Body - wrapped at 72 chars, explains what and why>
26-
<Optional bullet points for clarity>
27-
<Optional "Issue $ARGUMENTS" if provided>
28-
```
29-
30-
## Conventional Commits
31-
32-
- Use conventional commits spec with types: feat, fix, refactor, docs, test, chore, style, perf, ci, build
33-
- Format: `<type>: <description>`
34-
- Examples: "feat: add user authentication", "fix: resolve memory leak in cache"
35-
- Use "feat" only on user-facing changes
36-
37-
## Subject Line
38-
39-
- Write as if completing: "If applied, this commit will..."
40-
- Include type prefix (conventional commits)
41-
- Total length max 50 chars including type
42-
- Examples: "refactor: simplify cache handling", "fix: prevent race condition"
43-
- NOT: "refactored cache", "fixed the race"
44-
45-
## Body
46-
47-
- Explain the motivation for the change
48-
- Explain the "what" and "why" vs. "how" which means:
49-
- the way things worked before the change (and what was wrong with that),
50-
- the way they work now,
51-
- and why I decided to solve it the way I did,
52-
- and if you're not sure about the "why" then ask me.
53-
- Focus on context, not implementation details
54-
- Find a balance for message length, i.e. analyze the diff and decide if a shorter message is enough or more explanation is needed
55-
- Don't overuse bullet points (-, \*, +), add them only in bigger commits if they are helpful
56-
- Keep it short if there aren't many changes
57-
58-
### Example
59-
60-
Here is a good example from a [commit to the Bitcoin core](https://github.com/bitcoin/bitcoin/commit/eb0b56b19017ab5c16c745e6da39c53126924ed6).
61-
62-
```txt
63-
refactor: simplify serialize.h's exception handling
64-
65-
Remove the 'state' and 'exceptmask' from serialize.h's stream
66-
implementations, as well as related methods.
67-
68-
As exceptmask always included 'failbit', and setstate was always
69-
called with bits = failbit, all it did was immediately raise an
70-
exception. Get rid of those variables, and replace the setstate
71-
with direct exception throwing (which also removes some dead
72-
code).
73-
74-
As a result, good() is never reached after a failure (there are
75-
only 2 calls, one of which is in tests), and can just be replaced
76-
by !eof().
77-
78-
fail(), clear(n) and exceptions() are just never called. Delete
79-
them.
80-
```
81-
82-
## Context
83-
84-
- Current git status: !`git status`
85-
- Current git diff (staged and unstaged changes): !`git diff HEAD`
86-
- Current branch: !`git branch --show-current`
87-
- Recent commits (use for style reference only commits from me, Stanislav Jakuschevskij): !`git log --oneline -10`
88-
89-
## Task
90-
91-
1. Analyze the staged changes from git diff
92-
2. New added features and fixes are more important than other types like refactoring, etc.
93-
3. Draft a commit message following all seven rules
94-
4. Use conventional commits spec
12+
1. Run in parallel:
13+
- `git status`
14+
- `git diff HEAD`
15+
- `git branch --show-current`
16+
- `git log --oneline -10` (style reference — only match commits from Stanislav Jakuschevskij)
17+
2. Analyze the diff and draft a message following all seven rules
18+
3. New features and fixes take priority over refactoring for the commit type
19+
4. Use tandem authorship (Co-Authored-By trailer)
9520
5. If $ARGUMENTS is provided, add "Issue $ARGUMENTS" at the bottom
21+
6. Show the message and the `git commit` command — do NOT execute it

.claude/commands/init-session.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ Execute the startup sequence from `docs/WORKFLOW.md`. AGENTS.md is always in con
2525

2626
6. **Run tests** — run `yarn test` and verify app is healthy.
2727

28-
7. **Wait** — tell the user you're oriented, report the picked feature, and ask what they'd like to work on. Do NOT start any work autonomously.
28+
7. **Wait** — tell the user you're oriented, report the picked feature and which step of the Feature Development Sequence you'd start at. When the user says to proceed, follow the Feature Development Sequence in `docs/WORKFLOW.md` step by step. Do NOT start any work autonomously.

.claude/commands/session-commit.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,42 @@ Automate end-of-session cleanup: stage, log progress, commit.
2020
- Never stage files that likely contain secrets (.env, credentials, etc.)
2121
- Skip if everything is already staged
2222

23-
3. **Update progress log** — read `docs/claude-progress.txt`, then prepend a new entry at the top (after the header line) following the format documented in `AGENTS.md` under `claude-progress.txt`.
23+
3. **Update progress log** — read `docs/claude-progress.txt`, then prepend a new entry at the top (after the header line) following the format in `docs/references/claude-progress-readme.md`.
2424
- Analyze the staged diff to determine what was done
2525
- Use today's actual date
2626
- Be concise but complete
2727
- Stage the updated file: `git add docs/claude-progress.txt`
2828

29-
4. **Draft and commit** — follow all commit message rules from `.claude/commands/commit-user.md`. Use a HEREDOC and append a Co-Authored-By trailer:
29+
4. **Migrate blockers** — if the progress entry you just wrote has a `Blockers:` line that is NOT `None`:
30+
- Read `docs/agent-struggles.json`
31+
- For each blocker, append an entry:
32+
33+
```json
34+
{
35+
"date": "<today>",
36+
"description": "<blocker text from progress entry>",
37+
"cause": "<your best short assessment>",
38+
"suggestion": "<what would fix or prevent this>",
39+
"resolved": false
40+
}
41+
```
42+
43+
- Stage: `git add docs/agent-struggles.json`
44+
45+
5. **Draft and commit** — follow all rules from `docs/references/commit-message-guide.md`. Determine authorship mode (tandem vs autonomous) from the guide. Use a HEREDOC:
46+
3047
```bash
3148
git commit -m "$(cat <<'EOF'
3249
<type>: <subject>
3350

3451
<body>
3552

36-
Co-Authored-By: Claude <noreply@anthropic.com>
53+
<authorship trailer>
3754
EOF
3855
)"
3956
```
4057

41-
5. **Verify** — run `git status` and `git log --oneline -1` to confirm success.
58+
6. **Verify** — run `git status` and `git log --oneline -1` to confirm success.
4259

4360
## Rules
4461

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ AGENTS.override.md
2222
.claude/settings*.json
2323
.claude/pr/*
2424
.mcp*
25+
.tmp
2526

2627
# Editors
2728
*.code-workspace

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ See `docs/design/` for full design specs.
2222
| `docs/claude-progress.txt` | Session handoff log — see [`references/claude-progress-readme.md`](docs/references/claude-progress-readme.md) |
2323
| `docs/agent-struggles.json` | Struggle log — see [`references/agent-struggles-readme.md`](docs/references/agent-struggles-readme.md) |
2424
| `docs/references/ocp-plugin-guide.md` | OCP dynamic plugin mechanics, i18n, extension points |
25-
| `docs/references/commit-message-agent-readme.md` | Git commit conventions |
25+
| `docs/references/commit-message-guide.md` | Git commit conventions and authorship rules |

docs/ARCHITECTURE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Arrows mean "imports / depends on."
3939
- Services never import Components or Views
4040
- No circular dependencies
4141

42+
## Page / Component / Hook Rules
43+
44+
**Components are simple** — they receive data via props, render it, and call callbacks to return data to the parent (or use context). No logic at the top of a component.
45+
46+
**Pages are smart** — they use central hooks (e.g. `useClusterService`, `useSourceControl`) to fetch, prepare, and transform all data needed for downstream components.
47+
48+
**Extract logic into hooks** — if a page or component has any logic (state management, data transformation, side effects), extract it into a co-named hook: `FunctionTable.tsx``useFunctionTable.ts`, `FunctionsListPage.tsx``useFunctionsListPage.ts`. If there is no logic, no hook is needed.
49+
4250
## Architectural Guidance
4351

4452
- PatternFly components preferred over custom HTML

docs/TESTING.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
## Approach
44

5-
Red/green/refactor TDD. Write tests first, implement to pass, then refactor to improve code if applicable.
5+
Red/green/refactor TDD — **one test at a time**:
6+
7+
1. Write one test case (red)
8+
2. Write the minimum implementation to make it pass (green)
9+
3. Refactor if needed
10+
4. Move to the next test case
11+
12+
Do NOT write all test cases first and then implement everything at once.
613

714
## Test Layers
815

docs/WORKFLOW.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Every session, before doing any work:
1616

1717
After [Startup Sequence](#startup-sequence), work through the picked feature:
1818

19-
1. **Plan** — read `docs/ARCHITECTURE.md` + `docs/STYLEGUIDE.md` + `docs/TESTING.md`, then create implementation plan → `docs/plans/active/<incremented-number>-feature-<short-name>.md`
19+
1. **Plan** — read `docs/ARCHITECTURE.md` + `docs/STYLEGUIDE.md` + `docs/TESTING.md`, then use `/brainstorming` to design the chosen feature from `docs/features.json`, then use `/writing-plans` to create implementation plan → `docs/plans/active/<NNN>-<type>-<short-name>.md`
2020
2. **Branch** — create feature branch per [Branching](#branching) convention
2121
3. **Implement** — using `/executing-plans` skill
2222
4. **Review** — code review using `/requesting-code-review` skill, fix found issues
@@ -28,22 +28,22 @@ After [Startup Sequence](#startup-sequence), work through the picked feature:
2828

2929
## Branching
3030

31-
Create a feature branch per plan: `<NNN>-<type>-<short-name>` where `<NNN>` matches the plan number and `<type>` the conventional commit type as per our [Git Commit Guide](references/commit-message-agent-readme.md#conventional-commits). Example: `001-feat-function-list-empty-state`.
31+
Create a feature branch per plan: `<NNN>-<type>-<short-name>` where `<NNN>` matches the plan number and `<type>` the conventional commit type as per our [Git Commit Guide](references/commit-message-guide.md#conventional-commits). Example: `001-feat-function-list-empty-state`. If we're on a feature branch already do nothing.
3232

3333
## Pull Requests
3434

3535
Open PRs via `gh pr create` using the template at `.github/pull_request_template.md`.
3636

3737
**Title format:** `<Type>: <Sentence ending with a period.>` — capitalize the type and the first word, end with a period. Example: `Feat: Add function list page with empty state.`
3838

39-
Types are the same as [conventional commits](references/commit-message-agent-readme.md#conventional-commits) but capitalized.
39+
Types are the same as [conventional commits](references/commit-message-guide.md#conventional-commits) but capitalized.
4040

4141
## Session Rules
4242

4343
- One feature at a time
4444
- Clean state at end (code suitable for merging to main)
4545
- Update [`docs/claude-progress.txt`](references/claude-progress-readme.md) before session ends
46-
- Commit work to git before ending — follow [`docs/references/commit-message-agent-readme.md`](references/commit-message-agent-readme.md) strictly
46+
- Commit work to git before ending — follow [`docs/references/commit-message-guide.md`](references/commit-message-guide.md) strictly
4747

4848
## Continuous Improvement
4949

docs/agent-struggles.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
[]
1+
[
2+
{
3+
"date": "2026-03-31",
4+
"description": "Playwright browser plugin cannot execute inside nono sandbox — browser binary not found or npm cache not accessible",
5+
"cause": "nono sandbox restricts access to Playwright browser binaries",
6+
"suggestion": "Either pre-install Playwright browsers in the sandbox profile or add browser binary path to nono allow-list",
7+
"resolved": true
8+
},
9+
{
10+
"date": "2026-04-01",
11+
"description": "Concurrent Claude sessions break nono sandbox — EACCES on .claude.json after external session atomically writes it",
12+
"cause": "Landlock grants are inode-based; atomic writes (write temp + rename) replace the inode, invalidating the sandbox grant",
13+
"suggestion": "Avoid running Claude outside sandbox while sandbox is active, or symlink .claude.json into $HOME/.claude/ directory which has full access",
14+
"resolved": false
15+
},
16+
{
17+
"date": "2026-04-01",
18+
"description": "Cypress cannot run inside nono sandbox — EACCES on ~/.config/Cypress and /run/user/ dconf",
19+
"cause": "Cypress needs write access to ~/.config/Cypress and /run/user/<uid>/dconf, neither of which are in the nono allow-list",
20+
"suggestion": "Add ~/.config/Cypress (readwrite) and /run/user (readwrite) to the nono sandbox profile, or run Cypress outside the sandbox",
21+
"resolved": false
22+
}
23+
]

docs/claude-progress.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
# Claude Progress Log
22
# Newest entries first. Agents: append your entry at the top after the header.
33

4+
---
5+
## 2026-04-01 | Session: Nono sandbox Playwright fix + docs consolidation
6+
Worked on: Resolved Playwright browser blocker in nono sandbox, consolidated commit message docs, added planning guide and architecture rules
7+
Completed:
8+
- Fixed Playwright MCP in nono sandbox (added /proc, /etc/fonts, /opt/google/chrome read; $HOME/.npm allow; npx allowed_command)
9+
- Resolved agent-struggles.json Playwright blocker entry
10+
- Added session-commit step to migrate blockers from progress log to agent-struggles.json
11+
- Consolidated commit message docs: single source of truth in commit-message-guide.md, slimmed commit-user.md and session-commit.md, deleted commit-message-agent-readme.md
12+
- Created planning-guide.md (plans outline test cases, not full code)
13+
- Added page/component/hook rules to ARCHITECTURE.md
14+
- Clarified TDD approach in TESTING.md (one test at a time)
15+
- Simplified 002-function-list-table.md plan (removed all code, kept test case outlines)
16+
Left off: Execute function list table plan. Nono Landlock inode issue with .claude.json (concurrent sessions cause EACCES)
17+
Blockers: Concurrent Claude sessions break nono sandbox — Landlock inode grants invalidated when external session atomically writes .claude.json
18+
19+
---
20+
## 2026-03-31 | Session: Function list table design + nono sandbox setup
21+
Worked on: Designed function list table feature, set up nono sandbox for autonomous development
22+
Completed:
23+
- Brainstormed and finalized feature design (table with name, runtime, status, url, replicas, actions columns)
24+
- Designed useFunctionsList merging hook (repos + deployments → FunctionListItem[])
25+
- Updated features.json with refined feature steps
26+
- Updated design doc with merging hook pattern and raw deployer PoC note
27+
- Created implementation plan (docs/plans/active/002-function-list-table.md)
28+
- Captured real K8s deployment response (.tmp/k8s-deployment-response.json)
29+
- Captured real GitHub search response (.tmp/gh-search-response.json)
30+
- Created fine-grained GitHub PAT scoped to func-console (read + PR write)
31+
- Set up nono sandbox profile (claude-code-func-console) with credential injection
32+
- Verified: gh api, yarn test, plugin loading all work in sandbox
33+
- Verified: destructive commands blocked (rm, oc, sudo, ssh keys)
34+
Left off: Playwright browser access not working in sandbox (needs investigation). Ready to execute plan.
35+
Blockers: Playwright plugin can't execute browser inside nono sandbox — needs either npm cache fix or browser binary permission
36+
437
---
538
## 2026-03-30 | Session: Replace nginx with Go backend
639
Worked on: Replaced nginx reverse proxy with custom Go backend server

0 commit comments

Comments
 (0)