Compare commits

..
36 Commits
Author SHA1 Message Date
rob cbcc9fa4b5 Record FORGE-F005 mission selection 2026-12-02 12:16:00 +00:00
rob 1fd552cf32 Import reviewed specialist skill packages (FORGE-F018) 2026-12-02 12:11:59 +00:00
rob 31f8edf5cb FORGE-F017: record Captain acceptance 2026-12-02 09:45:30 +00:00
rob 172ee63fe3 FORGE-F017: record validation and handoff 2026-12-02 09:42:21 +00:00
rob dac67b7cfc FORGE-F017: clarify agreement boundary 2026-12-01 11:32:01 +00:00
rob b3999ce033 FORGE-F017: implement discussion-first protocol 2026-12-01 11:12:16 +00:00
rob 97458d1be9 FORGE-F016 Record Captain acceptance 2026-11-21 16:09:34 +00:00
rob 26774f4f9f FORGE-F016 Record implementation handoff 2026-11-21 16:07:50 +00:00
rob 7365d3c13e FORGE-F016 Require authoritative application delivery evidence 2026-11-21 16:07:18 +00:00
rob 835a164418 FORGE-F015 Add mission commands to context and contributor skills 2026-11-19 15:10:12 +00:00
rob 9dc4420373 FORGE-F008 Add unified testing toolkit for generated projects 2026-11-19 14:15:07 +00:00
rob b9cc14333a FORGE-F014 Record Captain acceptance 2026-11-19 12:32:01 +00:00
rob 17660d8957 FORGE-F014 Add portable existing-project testtask runner 2026-11-19 12:21:34 +00:00
rob 860d6d43c7 FORGE-F013 Record local integration and validation 2026-11-18 17:11:33 +00:00
rob 0d6761972d FORGE-F013 Resolve testtask by task ID or branch 2026-11-18 16:43:25 +00:00
rob 30f6a69df5 FORGE-F012 Record local integration and combined validation 2026-11-18 14:57:47 +00:00
rob 075e2f363f FORGE-F012 Record implementation commit in task handoff 2026-11-18 14:55:38 +00:00
rob a9350ace7b FORGE-F012 Document Penpot editor connection preflight and recovery 2026-11-18 14:55:11 +00:00
rob 68432c2faa Record contributor lifecycle integration evidence 2026-11-17 20:11:46 +00:00
rob 727a64ebd4 Merge contributor lifecycle update into codex 2026-11-17 20:11:19 +00:00
rob c2d456151d Define contributor finalisation and integration lifecycle 2026-11-17 20:08:56 +00:00
rob 900bd6c213 docs: plan FORGE-F011 visual design quality pipeline 2026-11-17 20:08:37 +00:00
rob 934e62ccd1 Record Captain acceptance of FORGE-F006 2026-11-17 19:57:04 +00:00
rob a00837178e Support four database engines in Flask React template 2026-11-17 19:52:08 +00:00
rob 444406d2fc Migrate Flask React template into Forge 2026-11-17 19:39:11 +00:00
rob bc6b6d26f1 Record F006 optional migration defaults 2026-11-17 19:15:33 +00:00
rob 648b8b1687 Record F007 human acceptance 2026-11-17 18:04:46 +00:00
rob d3a88fdeaf Implement F007 explicit project profiles 2026-11-17 18:02:56 +00:00
rob 27dd40dd8f Use direct codex workflow for initial Forge tasks 2026-11-17 17:56:10 +00:00
rob caf697bc4b Implement F003 design workflow candidate 2026-11-17 17:51:53 +00:00
rob 155bd540fe Reconcile F003 Forge-only design scope 2026-11-17 17:46:48 +00:00
rob b8f3920b91 Record F004 integration with acceptance pending 2026-11-17 15:48:44 +00:00
rob cc36aa0212 Record F004 suspension pending JJ validation 2026-11-17 15:46:47 +00:00
rob eda044ef43 Implement F004 contributor workflow candidate 2026-11-17 15:46:32 +00:00
rob 6217b9e8fd Implement FORGE-F002 context skill and snapshot commands 2026-11-17 14:19:59 +00:00
rob d01b4c0f06 Reconcile Forge decisions and implementation backlog 2026-11-17 13:30:52 +00:00
221 changed files with 16035 additions and 27 deletions
+1
View File
@@ -1,3 +1,4 @@
__pycache__/ __pycache__/
*.pyc *.pyc
.test-worktrees/ .test-worktrees/
snapshots/
+5 -1
View File
@@ -1,3 +1,7 @@
# Forge repository instructions # Forge repository instructions
Read `docs/PROJECT_OVERVIEW.md`, `CURRENT_STATE.md`, `DECISIONS.md`, `TASKS.md`, and `HANDOFF.md` before task work. Inspect Git status and relevant code. One accepted implementation task uses a dedicated branch and separate worktree. Preserve unrelated changes and legacy skills. Task IDs use `FORGE-F###`; record implementation, validation, limitations, and handoff. Only mark a task complete after human acceptance. Never commit secrets. Do not modify external projects, production infrastructure, or installed skills as part of foundation work. Read `docs/PROJECT_OVERVIEW.md`, `CURRENT_STATE.md`, `DECISIONS.md`, `TASKS.md`, and `HANDOFF.md` before task work. Inspect Git status and relevant code. Under Captain's FORGE-008 direction, work directly on `codex` and commit scoped Forge changes there until Captain says otherwise; do not create task branches or worktrees as routine setup. Preserve existing worktrees, unrelated changes, and legacy skills. Task IDs use `FORGE-F###`; record implementation, validation, limitations, and handoff. Only mark a task complete after human acceptance. Never commit secrets. Do not modify external projects, production infrastructure, or installed skills as part of foundation work.
Communication and authorisation: Follow `docs/specifications/discussion-first-protocol.md` for questions, agreement, proposals, and handoffs. Answer a question as a question; start yes/no answers with Yes or No and keep them brief. Do not treat agreement as authorisation for task creation, prompts, edits, or implementation. Ask before expanding scope. Explicit mission commands retain their existing authorised meanings.
Script commands: `scripts/create-chatgpt-snapshot.sh` creates a current-worktree ZIP under ignored `snapshots/`; inspect contents before sharing. `scripts/testtask.sh <task-id|branch-name>` resolves an existing task branch and worktree, then reports that manual testing remains blocked because Forge has no application runtime or manual-test hook.
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
exec python3 "$script_dir/testtask_runner.py" "$@"
+119
View File
@@ -0,0 +1,119 @@
#!/usr/bin/env python3
"""Run a repository-configured test command in an existing branch worktree."""
import json
import re
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
HEADING = re.compile(r"^## ([A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+)\s+[—-]", re.M)
LABEL = re.compile(r"(?:Task )?[Bb]ranch(?:/worktree)?:\s*`([^`]+)`")
def fail(message, code=2):
print(f"testtask: {message}", file=sys.stderr)
return code
def git(*args):
return subprocess.check_output(["git", "-C", str(ROOT), *args], text=True).strip()
def tasks():
path = ROOT / "docs/TASKS.md"
if not path.is_file():
return {}
content = path.read_text(encoding="utf-8")
headings = list(HEADING.finditer(content))
result = {}
for index, match in enumerate(headings):
end = headings[index + 1].start() if index + 1 < len(headings) else len(content)
result.setdefault(match.group(1), []).append(content[match.end():end])
return result
def task_branches(task_id, section, branches):
slug = task_id.lower()
found = {branch for branch in branches if re.search(rf"(^|[-/]){re.escape(slug)}($|[-/])", branch.lower())}
found.update(branch for branch in LABEL.findall(section) if branch in branches)
return found
def resolve(identifier):
branches = set(git("for-each-ref", "--format=%(refname:short)", "refs/heads").splitlines())
records = tasks()
if identifier in records:
if len(records[identifier]) != 1:
raise ValueError(f"ambiguous task ID {identifier}: multiple task records")
matches = task_branches(identifier, records[identifier][0], branches)
if not matches:
raise ValueError(f"task {identifier} has no recorded local branch")
if len(matches) != 1:
raise ValueError(f"ambiguous task {identifier}: branches {', '.join(sorted(matches))}")
branch = next(iter(matches))
task_id = identifier
elif identifier in branches:
branch = identifier
matches = [task_id for task_id, sections in records.items()
if any(branch in task_branches(task_id, section, branches) for section in sections)]
if len(matches) > 1 or (matches and len(records[matches[0]]) > 1):
raise ValueError(f"ambiguous branch {branch}: task records {', '.join(sorted(matches))}")
task_id = matches[0] if matches else None
else:
raise ValueError(f"unknown task ID or branch: {identifier}")
paths = []
for block in git("worktree", "list", "--porcelain").split("\n\n"):
lines = block.splitlines()
if f"branch refs/heads/{branch}" in lines:
path = next((Path(line[9:]) for line in lines if line.startswith("worktree ")), None)
if path and path.is_dir():
paths.append(path)
if not paths:
raise ValueError(f"branch {branch} has no existing worktree")
if len(paths) != 1:
raise ValueError(f"ambiguous branch {branch}: multiple worktrees")
return task_id, branch, paths[0]
def configured_command(worktree):
path = worktree / ".bortstack/testtask.json"
if not path.is_file():
raise FileNotFoundError(f"testing unavailable: missing {path}")
try:
config = json.loads(path.read_text(encoding="utf-8"))
except (OSError, json.JSONDecodeError) as exc:
raise ValueError(f"invalid test configuration {path}: {exc}") from exc
if not isinstance(config, dict) or set(config) != {"command"}:
raise ValueError(f"invalid test configuration {path}: expected only a command field")
command = config["command"]
if not isinstance(command, list) or not command or any(not isinstance(arg, str) or not arg for arg in command):
raise ValueError(f"invalid test configuration {path}: command must be a nonempty string array")
return command
def main(argv):
if argv == ["--help"]:
print("Usage: scripts/testtask.sh <task-id|branch-name>")
print("Runs .bortstack/testtask.json command from the resolved branch worktree.")
return 0
if len(argv) != 1 or not argv[0] or argv[0].startswith("-"):
return fail("Usage: scripts/testtask.sh <task-id|branch-name>")
try:
task_id, branch, worktree = resolve(argv[0])
command = configured_command(worktree)
except FileNotFoundError as exc:
return fail(str(exc), 3)
except (ValueError, subprocess.CalledProcessError) as exc:
return fail(str(exc))
print(f"task: {task_id or '(none)'}\nbranch: {branch}\nworktree: {worktree}\ntests: {command!r}", flush=True)
try:
result = subprocess.run(command, cwd=worktree, check=False)
except OSError as exc:
return fail(f"could not start configured tests: {exc}", 3)
print(f"testtask: tests exited {result.returncode}", file=sys.stderr)
return result.returncode
if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))
+2 -2
View File
@@ -1,5 +1,5 @@
# Architecture # Architecture
`forge/` reserves a framework-independent core. `templates/` contains independent stack-specific packages; `flask-react/` is a reservation only. `skills/` is the canonical source for four future skills. `profiles/` holds minimal business and personal defaults. `scripts/` provides portable user-level skill distribution. `docs/specifications/` defines interfaces; integrations are optional. `forge/` holds framework-independent helpers. `templates/` contains independent stack-specific packages; `flask-react/` now includes a descriptor, source payload, fresh context boilerplate, optional GitHub workflow, and a standalone generator. `skills/` is the canonical source for four skills. `profiles/` holds business and personal defaults. `scripts/` provides portable user-level skill distribution. `docs/specifications/` defines interfaces; integrations are optional.
The context skill owns project records, tasks, worktrees, profiles, and design approvals. New delegates lifecycle setup to context. Contributor uses the context lifecycle with Captain/Commander authority and isolated testing. Design uses context for approvals and records. These are contracts, not active skill implementations. The context skill owns project records, tasks, worktrees, profiles, design approvals, and the canonical lifecycle reference. New delegates lifecycle setup to context. Contributor uses the context lifecycle with Captain/Commander authority, automatic review submission after contributor completion, and isolated testing. Design uses context for approvals and records. Three skill packages are implemented; New remains reserved.
+17 -1
View File
@@ -1,3 +1,19 @@
# Current state # Current state
FORGE-F001 foundation is accepted for integration. The repo initially contained only a five-byte README on `main`; no prior local task or decision files existed. Four skill directories are reserved with README files, so no Forge skills are installable. The installer, validator, specifications, profiles, and automated tests are present. No generator, design integration, or active skill migration has been implemented. Linux tests passed locally; Windows has not been tested. FORGE-F018 is ready for Captain review on local `codex`. Forge discovers 12 implemented skills, including nine imported specialist packages, and one reserved package. The seven missing BortStack references remain a separate packaging issue.
FORGE-F017 is Complete on local `codex` following Captain acceptance on 2026-12-02. All 35 tests pass and both updated Codex skills match Forge. The ChatGPT project instructions remain available for separate manual application.
FORGE-F016 is Complete on `codex` under FORGE-008; Captain accepted the focused Forge skill change on 2026-11-21. It addresses contributor application-delivery evidence in the canonical context and contributor skills. All 32 Forge tests and three skill package validations passed. No external application or installed skill was changed; live application/provider and JJ Windows exercises remain unverified.
FORGE-F015's direct-`codex` candidate adds a shared mission command reference and contributor handoff wording. It changes the skill interface, not repository records or task IDs. Captain acceptance remains pending.
FORGE-F008 is implementation-complete on `codex`, pending Captain acceptance: `toolkits/testing` separates manual Compose environments from automated suites and allowlisted `act` jobs, and the Flask/React generator copies it into new projects. All 29 Forge tests and a generated Compose configuration check pass. Live Docker/`act` execution is blocked by daemon access, and Windows is unverified.
FORGE-F014 is Captain-accepted and provides a portable testtask runner and existing-project installer. A target worktree must explicitly configure its test command. A disposable PitchInvader-shaped fixture validated the workflow; PitchInvader itself has not been tested or modified. Windows validation remains pending.
FORGE-F001, FORGE-F002, FORGE-F006, and FORGE-F007 were human accepted and are present on `codex`. F003 and F004 candidates are integrated locally with external validation and acceptance pending. The Captain-authorised F004 lifecycle follow-up from `codex-forge-f004-lifecycle` was integrated into `codex` at `727a64e` after combined Forge checks; it extends F002's accepted context contract without reopening F002. FORGE-F011 is a planned visual design quality follow-up to F003; image-to-editable-Penpot reconstruction remains unproven and requires investigation. F006 provides an independent Flask/React template package and generator, with SQLite, PostgreSQL, MySQL, and MariaDB migrations verified in disposable Docker containers. Windows generation remains untested. The original bootstrap repository remains available; no external retirement was performed. Explicit business/personal profile configuration is implemented. `bortstack-context`, `bortstack-contributor`, and `bortstack-design` packages are present; one skill directory remains reserved. The repository `testtask` entry point is provisioned but blocked because Forge has no application runtime or manual-test hook. No cross-template generator or active legacy-skill migration has been implemented. Captain reports successful external validation of local Penpot 2.18 Docker and integrated MCP, but this session has no Penpot connector/browser. JJ's hands-on and Windows workflow has not been tested. Decisions FORGE-001 through FORGE-011 remain accepted. FORGE-008 authorises direct `codex` work generally; Captain explicitly requested isolation for the F004 lifecycle follow-up.
FORGE-F012's editor-connection preflight and recovery guidance were fast-forward integrated into local `codex` at `075e2f3` after Captain authorisation and combined checks. Its isolated worktree `/tmp/bortstack-forge-f012` remains preserved; human acceptance is pending. The Captain explicitly requested isolation for F012; FORGE-008 remains the general direct-`codex` policy. No live Penpot behavior is claimed by this documentation change.
FORGE-F013 was fast-forward integrated into local `codex` at `0d67619` after Captain authorisation and passing candidate and combined checks. `testtask` resolves input by task ID or branch, then still reports the missing Forge runtime. The task worktree at `/tmp/bortstack-forge-f013` remains preserved; human acceptance is pending.
+31 -10
View File
@@ -1,18 +1,39 @@
# Architecture decisions # Architecture decisions
All five decisions were supplied as approved planning inputs on 2026-11-17. No earlier Forge decision records existed. None supersedes an earlier decision. ## FORGE-012 — Mission Commands as the User-Facing Task Interface
Status: Accepted by Captain instruction. Date: 2026-11-19. Rationale: Captain and nontechnical contributors need one simple vocabulary and command pattern. Consequences: `bortstack-context` owns the shared conversational grammar and lifecycle authority; `bortstack-contributor` applies contributor permissions and review handoff. “Mission” is the user-facing task term, while historical IDs, `TASKS.md`, branches, files, states and provider rules remain intact. `set course` and `lock on` are aliases; selection does not implement; `complete` starts gated finalisation, with role-specific integration authority and cleanup boundaries. No CLI, parser or repository migration is required. Supersedes: no earlier decision; clarifies FORGE-011's contributor finalisation.
## FORGE-001 — Technology-Agnostic Architecture FORGE-001 through FORGE-005 were approved planning inputs on 2026-11-17 and are retained with subsequent approved details. FORGE-006 records the approved task identification policy. FORGE-007 supersedes only the PitchInvader pilot clause of FORGE-004; its design ownership and approval policy remain in force. FORGE-008 records Captain's temporary direct-`codex` workflow. FORGE-009 records the approved template migration defaults. FORGE-010 records the approved database set for the Flask/React template. FORGE-011 records the contributor finalisation and integration policy.
Status: Accepted. Date: 2026-11-17. Rationale: project lifecycle must apply across stacks. Consequences: Core has no Flask, React, React Native, or other framework dependency; templates own stack-specific behavior. Supersedes: none.
## FORGE-002 — Centralised Skill Management ## FORGE-001 — Technology-Agnostic Project Bootstrap Architecture
Status: Accepted. Date: 2026-11-17. Rationale: one canonical source avoids divergent skill copies. Consequences: Forge will maintain `bortstack-context`, `bortstack-new`, `bortstack-contributor`, and `bortstack-design`; existing `roborto-*` skills remain until validated migration. Supersedes: none. Status: Accepted. Date: 2026-11-17. Rationale: project lifecycle must apply across stacks. Consequences: Core has no Flask, React, React Native, or other framework dependency; independently maintained templates own stack-specific behavior. Generated projects have no Forge runtime dependency. Supersedes: none.
## FORGE-003 — Penpot Integration ## FORGE-002 — Centralised Codex Skill Management and Consolidation
Status: Accepted. Date: 2026-11-17. Rationale: Penpot is the selected visual design platform. Consequences: integration is optional and outside Core. Supersedes: none. Status: Accepted. Date: 2026-11-17. Rationale: one canonical source avoids divergent skill copies. Consequences: Forge is the canonical source for `bortstack-context`, `bortstack-new`, `bortstack-contributor`, and `bortstack-design`. All support appropriate business and personal workflows. Existing `roborto-*` skills remain operational until replacements are tested and distributed, including to Commander JJ. Supersedes: none.
## FORGE-003 — Penpot Visual Design Integration
Status: Accepted. Date: 2026-11-17. Rationale: Penpot is the selected visual design platform. Consequences: integration is optional and outside Core, supporting local and future self-hosted instances. Supersedes: none.
## FORGE-004 — Retrofittable Visual Design Workflow ## FORGE-004 — Retrofittable Visual Design Workflow
Status: Accepted. Date: 2026-11-17. Rationale: new and existing projects need the same design lifecycle. Consequences: context owns design references and approvals; design owns Penpot operations and handoffs; implementation needs approved design or recorded override; PitchInvader is the initial pilot. Supersedes: none. Status: Accepted. Date: 2026-11-17. Rationale: new and existing projects need the same design lifecycle. Consequences: `bortstack-context` owns design references, approvals, explicit overrides, and task lifecycle integration; `bortstack-design` owns Penpot operations, handoffs, and visual validation. Design-dependent implementation needs approved design or documented explicit override. PitchInvader is the initial pilot. Supersedes: none.
## FORGE-005 — Business/Personal Profiles ## FORGE-005 — Business/Personal Project Context Profiles
Status: Accepted. Date: 2026-11-17. Rationale: project settings vary by development context. Consequences: profile, ownership, branding, and contributor permissions are distinct; neither profile implies ownership. Supersedes: none. Status: Accepted. Date: 2026-11-17. Rationale: project settings vary by development context. Consequences: business and personal profiles are supported; profile, ownership, branding, and contributor permissions are distinct. Neither profile implies ownership. Supersedes: none.
## FORGE-006 — Project-Prefixed Task Identification and Collision Prevention
Status: Accepted. Date: 2026-11-17. Rationale: project-prefixed sequential IDs distinguish tasks across repositories. Consequences: new tasks use project prefixes such as `FORGE-002`, `PI-042`, and `RB-018`. Historical IDs, including `FORGE-F001` and `TASK-001`, remain valid. During reconciliation, the context system detects duplicate identifiers and reports possible collisions before merging records. This is lightweight detection, not a central allocation service. Forge retains its `FORGE-F###` convention for this backlog. Supersedes: none.
## FORGE-007 — Keep Forge Design Validation Within Forge
Status: Accepted. Date: 2026-11-17. Rationale: PitchInvader has its own repository and project workflow; Forge skill development must not perform application work there. Consequences: FORGE-F003 uses a Forge-owned disposable design example to validate concepts, refinement, approval, handoff, and visual comparison. Any future PitchInvader design or homepage work belongs to a separately authorised task in the PitchInvader project. The design ownership and approval rules in FORGE-004 remain unchanged. Supersedes: the PitchInvader pilot clause of FORGE-004 only.
## FORGE-008 — Direct `codex` Work During Initial Forge Development
Status: Accepted. Date: 2026-11-17. Rationale: Captain wants initial Forge tasks committed directly on `codex` without routine task branches or worktrees until further notice. Consequences: inspect status and keep each task's changes scoped, validated, committed, and documented on `codex`; preserve existing worktrees and unfinished work. Task acceptance, design approval, manual validation, and completion gates remain separate from a commit. Do not push, deploy, or modify external projects without their own authority. Supersedes: Forge's mandatory task branch/worktree rule for future Forge work only, until Captain changes direction.
## FORGE-009 — Optional Email and Hosting Foundations in Migrated Template
Status: Accepted. Date: 2026-11-17. Rationale: generated applications must remain useful without a GitHub account, a production host, or a Bortstack email identity. Consequences: FORGE-F006 preserves the template's email and hosting foundations as optional configuration, uses neutral project-specific defaults, and does not publish or deploy during generation. GitHub, Resend, Cloudflare, SWAG, and production setup require separate project choices; the original template repository remains unchanged. Supersedes: mandatory provider and immediate-deployment assumptions for the Forge migration only.
## FORGE-010 — Multi-Database Flask/React Template
Status: Accepted. Date: 2026-11-17. Rationale: Captain wants the generated application to support multiple database engines and selected SQLite, PostgreSQL, MySQL, and MariaDB for FORGE-F006. Consequences: local generation defaults to persistent SQLite; PostgreSQL, MySQL, and MariaDB are opt-in Compose overlays with their respective Python drivers and configuration examples. Validate generated migrations against all four engines. Database credentials belong in private project configuration, never in tracked production files. Supersedes: the inherited assumption that MySQL is the default generated database.
## FORGE-011 — Contributor Finalisation and Verified Integration
Status: Accepted. Date: 2026-11-17. Rationale: completed contributor tasks must not accumulate as uncommitted or unintegrated worktrees. Consequences: `bortstack-context` owns one state and evidence contract; `bortstack-contributor` automatically starts ordinary commit/push/review submission when JJ reports task completion, subject to repository policy and required checks. Captain approval precedes merging contributor PRs. Integrated requires combined-application verification; Closed requires human acceptance. Contributor-created temporary Docker test containers remain until JJ explicitly requests cleanup, subject to safety constraints. Windows exercise is mandatory before F004 is production-ready. The Captain explicitly requested an isolated branch/worktree for this follow-up, an exception to FORGE-008's current default. Supersedes: no earlier accepted decision; clarifies FORGE-F002 and FORGE-F004 lifecycle requirements.
+27 -2
View File
@@ -1,5 +1,30 @@
# Handoff # Handoff
Task: FORGE-F001. Worktree: `/tmp/bortstack-forge-f001`; branch: `codex-forge-f001`. Foundation implementation was accepted by the user for commit and merge into `main`. Run `python3 -m unittest discover -s tests -v`, `python3 scripts/validate-skills.py`, and `python3 scripts/install-skills.py --list`. No Forge skill can currently be installed. Do not migrate or replace existing `roborto-*` skills. Windows installer behavior remains unverified on Windows. Next: review this foundation, then separately authorize the first skill implementation. FORGE-F018 (2026-12-02): Nine reviewed specialist packages are ready for Captain review on `codex` from `31f8edf`. All 46 files match the archive. All 35 tests passed, and the unchanged validator and installer list/dry-run discovered all nine, for 12 implemented packages and one reserved. Installed skills were untouched. The seven missing BortStack references remain a separate packaging issue. Captain acceptance is pending.
No `testtask` or snapshot adapter was present in this new repository. The installed Roborto context skill normally provisions those for application repositories; Forge has no application runtime or Docker test environment yet. A separate task should resolve a Forge-specific manual-test adapter before treating this repository as enrolled in that full workflow. FORGE-F017 closure (2026-12-02): Captain accepted the discussion-first protocol on local `codex` at `172ee63`. All 35 tests, three skill validations, task-ID audit, installer dry-run and diff checks passed. Both installed Codex skills match Forge. Previous copies remain backed up. Live conversational behavior and Windows remain unverified. Applying the project instructions in ChatGPT settings is a separate manual action.
FORGE-F016 (2026-11-21): Captain accepted the focused Forge skill change through “task complete.” Direct `codex` implementation from `835a164` is recorded in commit `7365d3c`; the prior handoff update is `26774f4`. The central failure was standalone previews being accepted as application features. Context owns destination and integration evidence gates; contributor owns architecture discovery, real-route testing and plain-language guidance. The 18-scenario disposable fixture is in `docs/validation/application-delivery.md`; `tests/test_application_delivery.py` models evidence decisions and existing Git tests cover preservation. All 32 Forge tests, three skill validations, isolated-destination installer dry-run, task ID audit, and `git diff --check` passed. No external application, existing worktree, installed skill, or production service changed. Live JJ/Windows and application/provider exercises remain unverified; no application integration is claimed.
FORGE-F015 candidate (2026-11-19): Direct `codex` work from `9dc4420` under FORGE-008. `bortstack-context/references/mission-commands.md` owns the user-facing grammar and role-aware completion gates; contributor guidance points to it and retains review submission, Captain merge authority, and Docker retention. No installed skills, application repositories, provider state, worktrees, or production services changed. All 29 Forge tests, three skill validations, task-ID audit, isolated-destination installer dry-run and diff check passed. The default installer destination had expected existing-installation conflicts and was untouched. Captain review and acceptance remain pending.
FORGE-F008 candidate (2026-11-19): Captain authorised direct `codex` implementation from `b9cc143`. `toolkits/testing` and the Flask/React generator now provide separate manual and automated entry points with shared read-only target selection. Existing PitchInvader, RouletteBuddy, and Roborto Testtask repositories were inspected but not modified. All 29 Forge tests, generated Compose configuration, task ID audit, installer dry-run, Python compilation, and `git diff --check` passed. Fake-runtime fixtures exercised Compose and safe `act`; live startup, real `act`, and local-account provisioning were not run because Docker daemon access was denied. Windows remains untested. Review the scoped commit on `codex`; Captain acceptance is required before F008 is Complete. Do not migrate existing applications as part of this task.
FORGE-F014: Captain accepted the isolated candidate on 2026-11-19 and requested merge to `codex`. Branch `codex-forge-f014` at `/tmp/bortstack-forge-f014` is based on `860d6d4`; implementation commit `17660d8`. Portable distribution is under `distribution/testtask`; `scripts/install-testtask.py` installs it without replacing existing files. Each target branch worktree needs `.bortstack/testtask.json` with an explicit command array. The disposable fixture passed; no PitchInvader files were changed. Windows and real PitchInvader validation remain open. Preserve the task worktree after integration.
Current work: Captain authorised and completed integration of the contributor lifecycle follow-up from `codex-forge-f004-lifecycle` (`c2d4561`) into `codex` at merge commit `727a64e`. The source worktree is `/tmp/bortstack-forge-f004-lifecycle`, baseline `934e62c`; the target had advanced to `900bd6c` with FORGE-F011 planning. F002 remains Complete. F004 is integrated locally but still pending JJ's external validation and human acceptance. The original F004 worktree remains preserved.
Implementation: `bortstack-context/references/task-lifecycle.md` is the canonical state, transition, evidence, identifier and integration contract. Contributor starts finalisation from natural completion language and owns ordinary-language review handoff. Captain approval, combined checks and human closure are separate gates. `docs/validation/contributor-lifecycle.md` covers acceptance scenarios A-I. FORGE-F011 remains Planned with its design-quality investigation and outstanding decisions intact. No external project, provider setting, production infrastructure or installed skill was modified.
Validation: Branch checks passed 17 tests, skill validation, installer dry-run, and `git diff --check`. The same checks passed on the combined `codex` tree before merge commit `727a64e`. Local Git fixtures cover sequential tasks, failed combined checks, failed push preservation and paths with spaces; context fixtures cover historical and conflicting IDs. These tests do not prove actual provider PR submission or JJ's conversational/Windows Docker workflow.
Limitations: Windows and JJ hands-on testing remain mandatory before F004 is production-ready. Real provider push/PR and full combined-application UI/API verification are unavailable in this Forge-only exercise. The local `testtask` wrapper remains provisioned but blocked without an application runtime/hook. F003 retains its separate pending approval. F006 is accepted and its original source repository remains untouched.
Next action: Keep F004 open for JJ's Windows, Docker, provider and conversational acceptance exercises. F005 may use the accepted F006 descriptor and generator; F008's F006 dependency is satisfied. FORGE-F011 planning needs Captain review. No push or deployment has occurred.
FORGE-F011 preparation (2026-11-17): On `codex` from `934e62c`, the prior planning pass inspected repository records and clean checkout, ran the context task-ID audit, and found no F011 collision. It added context records only; no skill implementation, application code, Penpot file, or external project changed. F011 remains Planned.
FORGE-F012 integration (2026-11-18): Captain requested an isolated worktree for Penpot editor connection reliability, overriding FORGE-008 for this task only, then authorised commit and merge. Branch `codex-forge-f012` at `/tmp/bortstack-forge-f012` started from `68432c2`; implementation commit `a9350ac` and record commit `075e2f3` were fast-forward integrated into local `codex` at `075e2f3`. The design skill and Penpot reference distinguish MCP availability, editor connection, and target-verified inspection; the latter gates edits. Recovery preserves the last confirmed design and checks uncertain writes before retrying. The isolated branch and combined `codex` each passed 20 tests, skill validation, installer dry-run, and task ID audit; the diff check passed. No Penpot design, external project, installed skill, or production infrastructure changed. Live editor/browser and Windows validation remain unverified. Human acceptance is required before F012 closes; its worktree remains preserved. No push occurred.
FORGE-F013 integration (2026-11-18): Captain reviewed the isolated results and authorised commit and merge. Branch `codex-forge-f013` at `/tmp/bortstack-forge-f013`, based on `30f6a69`, was fast-forward integrated into local `codex` at `0d67619`. `testtask.sh` accepts a task ID or exact local branch name and reports the resolved task, branch and existing worktree before the same blocked-runtime exit. It performs no Git mutation. Usage and context reference were updated. On both candidate and combined `codex`, 21 tests, skill validation, installer dry-run and task ID audit passed; the candidate diff check passed. A live F013 invocation resolved correctly and exited 3 because Forge has no runtime. Windows and runtime manual testing remain unverified. Human acceptance is pending; the task worktree remains preserved. No push occurred.
FORGE-F005 selection (2026-12-02): Captain locked on to `bortstack-new` in direct `codex` mode from `31f8edf`. F002, F006, and F007 are complete. The Flask/React descriptor and generator provide the initial template path, and `bortstack-context` owns initial context and profile setup. Validate disposable generated projects for both profiles and local-only Git. Next command is `FORGE-F005 engage`.
+1 -1
View File
@@ -1,3 +1,3 @@
# Project overview # Project overview
Bortstack Forge will manage a framework-independent core, independently maintained application templates, four canonical Codex skills, project profiles, and optional integrations. This repository is the canonical source for future Forge skills. FORGE-F001 establishes contracts and distribution only. Flask/React code remains in its existing source repository. Penpot and repository-provider integrations are optional and absent. Bortstack Forge manages a framework-independent core, independently maintained application templates, four canonical Codex skills, project profiles, and optional integrations. This repository is the canonical source for Forge skills. The Flask/React source has been copied into Forge's template package for F006; its original repository remains unchanged and operational. Penpot and repository-provider integrations are optional. Captain reports a validated local Penpot 2.18 Docker deployment and integrated MCP connection outside this repository.
+165 -2
View File
@@ -1,7 +1,170 @@
# Tasks # Tasks
The following backlog entries are planning records, not implementation authorisation. Retain `FORGE-F###` for this backlog. Dependencies are prerequisites, not permission to begin work.
## FORGE-F001 — Repository Foundation & Shared Skill Architecture ## FORGE-F001 — Repository Foundation & Shared Skill Architecture
Status: Complete; human acceptance received 2026-11-17. Approved scope: structure, specifications, portable installer and validation. Acceptance: documented architecture and decisions; safe installer that ignores reserved skills; tests pass; legacy skills and external repositories remain untouched. Task branch/worktree: `codex-forge-f001` at `/tmp/bortstack-forge-f001`. Skill implementation and migration are excluded. Status: Complete; human acceptance received 2026-11-17. Approved scope: structure, specifications, portable installer and validation. Acceptance: documented architecture and decisions; safe installer that ignores reserved skills; tests pass; legacy skills and external repositories remain untouched. Task branch/worktree: `codex-forge-f001` at `/tmp/bortstack-forge-f001`. Skill implementation and migration are excluded.
## Suggested next task ## FORGE-F002 — Implement `bortstack-context`
Implement `bortstack-context` as the first canonical skill, including compatibility checks against the existing `roborto-project-context`; authorize and scope separately. Status: Complete; human acceptance received 2026-11-17 through instruction to commit and merge. Priority: High. Dependencies: FORGE-F001. Branch/worktree: `codex-forge-f002` at `/tmp/bortstack-forge-f002`; integration target: `codex`.
Migrate `roborto-project-context` into the canonical skill for new and existing repositories. Preserve overview, current state, decisions, tasks, handoffs, isolated task branches/worktrees, and legacy Roborto compatibility. Support project-prefixed IDs with duplicate detection, business/personal contexts, and design references, approvals, and explicit overrides. Define the shared task finalisation lifecycle.
Lifecycle states: In Progress, Ready to Finalise, Ready for Review, Merged, Closed, Blocked / Suspended. Implementation working in a worktree is not completion. Before another implementation task begins, previous work must be committed and submitted for review, integrated, or explicitly suspended with its state documented. Detect unfinished worktrees, uncommitted changes, and incomplete handoffs. Never automatically delete worktrees with unfinished work.
Acceptance: demonstrate lifecycle and collision checks with new and legacy repository examples; preserve historical IDs and unfinished work. Reconcile context ownership of `testtask` and ChatGPT snapshot entry points without claiming Forge has an application runtime.
Implementation record (2026-11-17): Added the canonical skill, snapshot command reference, read-only task ID/worktree audit, ZIP snapshot entry point, and explicit blocked `testtask` entry point. Tests cover collision handling for new and legacy IDs and safe snapshots of edited/untracked files. The skill defines lifecycle gates and preservation of unfinished work. Runtime manual testing remains unavailable until Forge has a task-specific hook; Windows is untested.
Contributor integration follow-up (2026-11-17): F002 remains Complete. Its accepted context skill is being extended with the canonical state-transition and evidence reference under the Captain-authorised F004 lifecycle follow-up; this does not reopen or renumber F002. The reference owns collision resolution and combined-integration gates for other skills.
## FORGE-F003 — Implement `bortstack-design`
Status: Merged into local `codex`; Captain design approval and external validation pending. Priority: High. Dependency: FORGE-F002, Complete and integrated into local `codex`; no dependency blocker. Implementation was committed on `codex-forge-f003` at `/tmp/bortstack-forge-f003` and fast-forward merged into `codex` on 2026-11-17. Planning reconciliation remains preserved separately at `/tmp/bortstack-forge-f003-reconciliation`.
Implement the canonical `bortstack-design` skill for existing and generated repositories. Support AI-assisted concept generation and comparison of multiple distinct, editable Penpot concepts; refinement of a selected concept without flattening or losing existing editable elements; and explicit Captain approval before design-dependent implementation. `bortstack-context` owns the design reference, version, approval authority/date, explicit override, and task lifecycle record. `bortstack-design` owns Penpot operations, concept/refinement guidance, structured design-to-code handoffs, and visual validation. A handoff identifies the approved design/version, relevant screens and states, layout/responsive behavior, assets, interaction details, implementation task, and known gaps. Visual validation compares implementation against that approved source and records deviations or approved changes.
Use the optional Penpot adapter for local Penpot 2.18 and future self-hosted instances. Support its integrated MCP server when configured and a documented non-MCP path for preparing editable concepts, approval records, handoffs, and validation when MCP is unavailable. Keep Penpot and MCP outside framework-independent Core; do not require either for unrelated tasks. Describe Linux and Windows setup, connection checks, and fallback. Preserve existing skill distribution tooling and `roborto-*` compatibility; installable package must meet `docs/specifications/skill-contract.md` and declare its dependency on `bortstack-context` and optional Penpot/MCP integration. No application code, installed skills, or external projects are changed by this planning record.
Validate the workflow with a Forge-owned disposable design example: multiple editable concepts, a refinement round, Captain approval recorded via `bortstack-context`, a structured implementation handoff, and visual comparison against a small example implementation or reference rendering. Keep the example outside application projects and production infrastructure. Design approval and implementation approval are separate lifecycle gates. Do not mark F003 Complete merely because a Penpot connection or a concept works.
Acceptance: demonstrate concept generation, at least two distinct editable concepts, preservation of existing elements during refinement, explicit recorded Captain approval for the Forge-owned example, a structured handoff, and visual validation for that example. Exercise MCP and documented fallback, and verify Linux and Windows instructions or report platform-specific limits. Validate the skill package with Forge's existing validator and installer without replacing distribution tooling or retiring legacy skills. A documented explicit override may permit a different design-dependent implementation task under the context contract, but does not substitute for the example's required approval.
Evidence available at reconciliation: Captain reports a validated local Penpot 2.18 Docker deployment and integrated MCP server; Codex connected, created editable shapes/text, and modified an existing design while preserving elements. This confirms the local MCP path is feasible; it does not by itself validate the full F003 workflow, fallback, Windows path, or Forge-owned example.
Open decisions for implementation briefing: choose the scope and Penpot file for a disposable Forge-owned example, the Captain's preferred approval artifact/record, and the practical non-MCP editing path. These do not block this planning reconciliation; resolve them before claiming example acceptance. No PitchInvader project work is in F003 scope.
Implementation record (2026-11-17): Added the `bortstack-design` skill, Penpot/MCP and non-MCP operation reference, structured handoff template, and a Forge-owned task-overview example with two distinct SVG concepts and a refined A variant. The SVG source retains separately editable text/shapes and original A element IDs; rendered previews were visually inspected. Nine repository tests pass, the skill validator accepts all three implemented packages, and installer dry-run includes design. Captain approval, Penpot import/editing in this session, current-session MCP mutation, Windows verification, and comparison with an approved implementation remain pending. The local MCP container is running, but no Penpot MCP connector or browser is exposed to this session. Do not claim F003 Complete.
## FORGE-F004 — Implement `bortstack-contributor`
Status: Merged into `codex`; acceptance pending JJ's external validation. Priority: High. Dependencies: FORGE-F002. Branch/worktree: `codex-forge-f004` at `/tmp/bortstack-forge-f004`.
Migrate the contributor skill while preserving Commander JJ's established workflow, Captain/Commander terminology, independently created contributor tasks, isolated branches/worktrees, manual testing, disposable Docker conventions, Windows installation, legacy Roborto task reconciliation, and GitHub/Gitea workflows where available.
When JJ reports completion, Codex identifies the task/worktree, inspects changed and untracked files, verifies required automated and manual tests, stages only intended files, commits, pushes, creates a PR where supported, records its reference, and sets Ready for Review. Tell JJ Captain approval is pending. Captain approval is mandatory before merging; Codex must not merge JJ's PR automatically. If validation, commit, push, or PR creation fails, preserve work and report the blocker. JJ need not operate Git manually. A new task may begin after the previous task is submitted for review. Clean a worktree only after verified integration and recorded acceptance.
Acceptance: test two consecutive contributor tasks. Submit the first for review before implementing the second; abandon no uncommitted work and merge neither without Captain approval.
Implementation record (2026-11-17): Added the canonical contributor skill and review-handoff reference. A disposable Git test exercised two consecutive task branches/worktrees, selective staging, preserved untracked work, and no merge into the integration branch. The first review was represented by a local marker, not a provider PR. Real PR submission, JJ's Windows installation, manual Docker testing, and JJ's hands-on workflow remain unverified; do not mark Complete until the required human acceptance and external checks are resolved.
Contributor integration follow-up (2026-11-17): Captain authorised a dedicated `codex-forge-f004-lifecycle` branch at `/tmp/bortstack-forge-f004-lifecycle`, based on `934e62c`, to strengthen the existing F004 candidate and shared context contract. Commit `c2d4561` was merged into `codex` as `727a64e` after 17 combined Forge tests, skill validation, installer dry-run and diff check passed; the newer F011 planning records were preserved. The contributor skill now initiates finalisation from natural completion language and uses context's canonical lifecycle; review submission, Captain-controlled integration, combined checks, recoverable failure handling, task-ID conflict resolution, Docker retention, and nontechnical messaging have explicit gates. Acceptance scenarios A-I are recorded in `docs/validation/contributor-lifecycle.md`; Windows and real provider/JJ exercises remain open. F004 stays pending external validation and human acceptance; do not mark it Complete from this follow-up alone.
## FORGE-F005 — Implement `bortstack-new`
Status: Planned. Priority: High. Dependencies: FORGE-F002, FORGE-F006, FORGE-F007.
Selection (2026-12-02): Captain locked on to FORGE-F005 for direct work on local `codex` under FORGE-008. Selection baseline: `31f8edf`. Implementation awaits `FORGE-F005 engage`.
Orchestrate technology-independent generation: template selection, project configuration, business/personal profile selection, initial context, optional Git configuration, and delegation to `bortstack-context`. Generated projects remain independently maintainable without Forge as a runtime dependency.
Acceptance: generate and validate a project from the migrated template with either profile and a local-only Git option.
## FORGE-F006 — Migrate Flask/React Bootstrap Template
Status: Complete; Captain accepted 2026-11-17. Priority: High. Dependencies: FORGE-F001. Implemented directly on `codex` under FORGE-008, starting from `bc6b6d2`. Migration defaults accepted in FORGE-009 and database scope in FORGE-010.
Migrate `flask-react-auth-base` into Forge's template architecture. Preserve Flask backend/authentication, React/Vite frontend, Docker configuration, database support, automated tests, and documentation. Remove mandatory GitHub and immediate production-deployment assumptions. Validate generated applications before retiring the existing bootstrap workflow. No additional framework templates yet.
Acceptance: a generated application passes relevant checks and retains the listed capabilities before the existing bootstrap is retired. Explicitly support SQLite, PostgreSQL, MySQL, and MariaDB under FORGE-010.
Accepted migration boundary (2026-11-17): preserve email and hosting foundations as optional configuration with neutral project-specific defaults. Generation must work locally without GitHub or production infrastructure and must not publish or deploy. Keep the source `flask-react-auth-base` repository unchanged.
Implementation record (2026-11-17): Copied the tracked source at `ff139bf5f28f4604b4a7108f4ee26608dea9924e` into Forge's independent template package without changing the original repository. Added a descriptor and Python generator, fresh neutral project context, optional GitHub workflow and SWAG overlay, disabled email by default, and removed mandatory external-network and Roborto branding defaults. Generated projects passed 14 backend tests, 16 frontend tests, frontend lint/build, 23 Playwright checks (one intentional skip), SQLite migrations, Compose base/optional-overlay configuration, and API/nginx image builds. Forge's 15 tests and skill validation passed. A fresh generated frontend passed `npm ci`; the install reported 14 advisories in development dependencies, while `npm audit --omit=dev` reported zero production advisories. A clean host Python install and Windows generation remain unverified in this session; prior source-repository evidence does not substitute for those generated-project checks.
Database follow-up (2026-11-17): Under FORGE-010, generation now defaults to persistent SQLite in Docker, with separate PostgreSQL, MySQL, and MariaDB Compose overlays and example environment files. The API image includes psycopg and PyMySQL. A fresh generated `Matrix Trial` project passed Compose configuration for the base and all three overlays, API image build, and live Alembic upgrades against each of the four engines in disposable containers. All test containers, networks, and volumes were removed. Forge's 15 tests passed. This validates migration compatibility; the full backend test suite has not been repeated separately on all three server databases. Captain accepted F006 after reviewing the multi-database follow-up. The original bootstrap remains available; retiring it is a separate change outside Forge.
## FORGE-F007 — Implement Business/Personal Profiles
Status: Complete; human acceptance received 2026-11-17. Priority: Medium. Dependencies: FORGE-F002. Implemented directly on `codex` under FORGE-008 in commit `d3a88fd`.
Implement FORGE-005 for new and existing repositories: profile-specific documentation and conventions, independent ownership and branding, contributor access, and configurable testing/deployment expectations. Business profile does not imply Bortstack ownership.
Acceptance: both profiles work with separately configured ownership and branding.
Implementation record (2026-11-17): Added a dependency-free flat profile configurator and read/write module, updated the profile contract and context skill, and tested business and personal records in temporary new/existing directories with different owners and brands. The command requires explicit contributor, testing, and deployment values, preserves existing project files, and refuses to overwrite an existing profile. Linux tests passed; Windows command and filesystem behavior have not been exercised on Windows. No real external project was changed. Captain accepted F007 on 2026-11-17.
## FORGE-F008 — Standardise Local Testing and `act`
Status: Implementation Complete on `codex`; Captain acceptance pending. Priority: Medium. Dependencies: FORGE-F006. Captain explicitly authorised implementation on 2026-11-19 under FORGE-008's direct-`codex` policy; baseline `b9cc143`.
Provide simple local test commands, Docker testing where appropriate, optional GitHub Actions-compatible `act`, clear results, separation of test failures from infrastructure failures, safeguards against publishing/deployment, and bounded automated repair. Remote CI must not be required for local verification.
Acceptance: validate a generated template locally and demonstrate failure classification and deployment protection.
Implementation scope (2026-11-19): One canonical `toolkits/testing` package supplies separate manual `testtask.sh` and automated `testrunner.sh` entry points with shared read-only target resolution. Generated Flask/React projects receive the package, explicit `.bortstack/testing.json`, Docker Compose manual environment settings, a local account provisioner, and unit/integration commands. Existing-project installation and legacy Roborto migration remain outside F008. The older Forge `distribution/testtask` stays in place for its accepted F014 scope; it is not the manual launcher. Local fixtures cover branch/task resolution, worktree paths with spaces, manual Compose lifecycle boundaries, credential selection failure, suite selection/failure, and safe `act` allowlisting. Docker daemon access and Windows validation are pending; do not claim live Compose or GitHub-hosted success. Human acceptance is required before Complete.
Validation: 29 Forge tests passed, including generated-project inclusion and invocation, branch/task/worktree resolution, isolated Compose fixture lifecycle, credential privacy and selection, suite results, and fake-runtime safe `act`. A generated Flask/React project's `docker compose config --quiet` passed. `context_audit.py`, installer dry-run, Python compilation, and `git diff --check` passed. `act` is installed (`0.2.91`) but the Docker daemon denied access, so live Compose startup, real local Actions execution, and account provisioning remain unverified. Windows is untested. No existing application repository or production resource was changed.
## FORGE-F009 — Optional Gitea Integration
Status: Planned (deferred). Priority: Deferred. Dependencies: FORGE-F005.
Support optional SSH remotes including nonstandard ports, authorised repository creation, existing repositories, branch/PR workflows, and contributor integration. Preserve GitHub and local-only Git. Gitea server administration and CI runner deployment are outside initial scope.
Acceptance: exercise the optional flow without making Gitea mandatory.
## FORGE-F010 — Cross-Platform Skill Distribution and Validation
Status: Planned. Priority: Medium. Dependencies: FORGE-F002, FORGE-F004.
Extend the foundation installer and validator, not a second installation system. Support safe Linux/Windows installs and updates, versions, conflict detection, explicit updates, migration from legacy `roborto-*`, JJ's Windows validation, documented rollback, and no duplicate active skill discovery after cutover.
Acceptance: validate Linux and JJ's Windows installation, update, and rollback; report conflicts and retain legacy skills until cutover.
## FORGE-F011 — Visual Design Quality Pipeline
Status: Planned; task preparation only, implementation not authorised. Priority: High. Dependency: FORGE-F003's existing design workflow; its outstanding acceptance checks remain separate and open.
Enhance `bortstack-design` with a visual-first concept exploration stage using curated references and optional image generation. Keep direct native Penpot design as a supported alternative. Present distinct visual directions for Captain selection, then refine the chosen direction through iterative visual inspection. Assess typography, layout, spacing, hierarchy, colour, imagery, responsive behaviour, and finish. Label each artifact clearly as a wireframe, styled mockup, or implementation-ready design, with criteria for advancing between levels.
Investigate and validate reconstruction of an approved visual direction into native, editable Penpot elements where technically feasible. Preserve traceability from reference and generated imagery to the resulting design, identify any raster-only or manually rebuilt portions, and do not promise automatic image-to-editable conversion. Reuse `bortstack-context` for design references, versions, Captain approvals, explicit overrides, task status, and handoffs rather than creating a second approval system. Preserve optional Penpot MCP and a practical non-MCP path, with Linux and Windows instructions. Do not rebuild the F003 MCP integration or alter external applications.
Acceptance proposed: demonstrate at least two visually distinct styled directions for a Forge-owned example, with reference provenance and an optional image-generation path; show Captain selection and a documented refinement round; evaluate each iteration against the visual quality criteria and responsive states; distinguish wireframe, styled mockup, and implementation-ready outcomes; reconstruct an approved direction into editable Penpot text, shapes, and other feasible native elements while recording fidelity, traceability, and remaining raster/manual elements; demonstrate the direct-Penpot alternative and MCP/fallback paths; produce an existing-context approval record and structured handoff without duplicate workflow; validate package and Linux/Windows guidance, reporting platform limits. Human acceptance is required before Complete. F003's own approval, fallback, Windows, and approved-implementation comparison checks are not closed by this task.
Open technical decisions for implementation briefing: define permitted reference sources and provenance/usage recording; choose whether and when image generation improves exploration; set measurable quality and fidelity review criteria; determine the reconstruction method and limits for text, vectors, imagery, components, and responsive variants; select the Forge-owned example and approval artifact; decide what evidence can validate Windows and non-MCP operation. Treat reconstruction feasibility as an investigation outcome, not an assumed capability.
## FORGE-F012 — Penpot Editor Connection Reliability
Status: Integrated into local `codex`; human acceptance pending. Priority: Small maintenance improvement. Owner: Codex. Dependency: FORGE-F003 design skill; its separate acceptance remains pending. Branch/worktree: `codex-forge-f012` at `/tmp/bortstack-forge-f012`; baseline `68432c2`; implementation commit `a9350ac`; record commit and integration tip `075e2f3`; integration target `codex`. Captain's explicit request for an isolated task worktree was a task-specific exception to FORGE-008. Provider remote/PR: not applicable to this Captain-authorised local integration. Human acceptance: pending.
Scope: Document MCP service availability, active editor connection, and successful inspection of the intended design as separate states. Require the verified inspection before mutation, and give contributors browser guidance and a safe recovery sequence for editor disconnection. Keep Penpot operations runtime-discovered and optional. Do not edit PitchInvader, installed skills, or Penpot designs as part of this maintenance task.
Implementation: The design skill and Penpot operations reference now require a target-verified, non-destructive inspection before edits and after interruptions. Recovery stops edits, preserves the last confirmed state and references, asks the contributor to reactivate/reconnect the intended editor, checks uncertain writes, and resumes only after inspection succeeds. Focused contract tests cover these requirements. No live editor session was exercised for this documentation change.
Validation (isolated branch and combined `codex`, 2026-11-18): 20 unittest tests passed on both trees, including three focused connection-contract checks; the skill validator accepted all three implemented packages; installer dry-run included `bortstack-design`; task ID audit and `git diff --check` passed. Captain authorised the fast-forward integration. Manual Penpot/browser validation and Windows behavior remain unverified; this task does not close F003's existing external acceptance gates. Next action: obtain human acceptance before marking F012 Complete. The task worktree remains preserved.
## FORGE-F013 — Resolve testtask by Task ID or Branch
Status: Integrated into local `codex`; human acceptance pending. Owner: Codex. Baseline: `30f6a69`; branch/worktree: `codex-forge-f013` at `/tmp/bortstack-forge-f013`; implementation and fast-forward integration commit: `0d67619`; target: `codex`. The Captain requested isolation and a validation report before merging, then authorised commit and merge, as a task-specific exception to FORGE-008.
Scope: Resolve an existing task ID, including legacy IDs, or an exact local branch name to one task, branch, and worktree. Detect unknown and ambiguous references and missing worktrees. Preserve Forge's blocked manual-test result without creating worktrees, switching branches, or adding a runtime. Update usage and add focused tests. Human acceptance remains pending.
Implementation and validation (2026-11-18): `testtask.sh` delegates read-only lookup to `resolve_testtask.py`; task headings and local branch/worktree inventory are checked before the unchanged blocked-runtime outcome. Tests cover both formats, historical IDs, unknown and malformed input, ambiguous task/branch references, and a missing worktree. On the isolated candidate and merged `codex`, 21 tests passed, all three skills validated, installer dry-run passed, and task ID audit passed; diff check passed on the candidate. A live `testtask.sh FORGE-F013` resolved the current task and exited 3 with the expected blocked-runtime message. Windows and a manual-test runtime remain unverified. Human acceptance is pending; preserve the task worktree.
## FORGE-F014 — Reusable testtask for Existing Projects
Status: Complete; Captain accepted and requested merge to `codex` on 2026-11-19. Owner: Codex. Branch/worktree: `codex-forge-f014` at `/tmp/bortstack-forge-f014`; baseline `860d6d4`; implementation commit `17660d8`. This maintenance task extends F013 resolution and F001 distribution without changing their accepted scope. Added a portable runner and conflict-safe existing-repository installer, leaving Forge's own blocked runtime and `bortstack-context` task ownership intact. A disposable PitchInvader-shaped repository validated its local `codex` worktree, configured command, execution location, and failure propagation. No PitchInvader repository was modified or tested. All 23 Forge tests and `git diff --check` passed. Windows and a real PitchInvader run remain unverified.
## FORGE-F015 — Mission Commands and Contributor Workflow
Status: Implementation Complete on `codex`; Captain review and acceptance pending. Owner: Codex. Baseline: `9dc4420`; separate worktree not applicable under FORGE-008 direct-`codex` policy. Scope: add one conversational mission grammar to `bortstack-context`, route `bortstack-contributor` through it, and preserve the canonical task lifecycle, task IDs, worktree rules, review gates and legacy skills. `set course`/`lock on`, `engage`, `status`, `help`, `missions`, `mission status`, and `complete` variants distinguish selection, implementation, review, integration and verified closure. No CLI/parser, repository migration, application changes, provider mutation or installed-skill changes. Validation: 29 Forge tests, all three skill packages, task-ID audit, isolated-destination installer dry-run, and `git diff --check` passed. Default installer dry-run found expected conflicts with existing user installations; none was changed. Human acceptance is required before Complete.
## FORGE-F016 — Contributor Application Integration Safeguards
Status: Complete; Captain accepted the scoped Forge implementation through “task complete” on 2026-11-21. Owner: Codex. Baseline: `835a164`; separate worktree not applicable under FORGE-008. Scope: require destination discovery, implementation in the authoritative application, real-route manual evidence before contributor review, and post-integration combined validation. Preserve existing mission commands, context states, Git authority, testtask semantics, manual-test resources, prototypes, and legacy skills. No PitchInvader or other external application work is authorised.
Failure audit: `bortstack-context/references/mission-commands.md` briefed scope and acceptance without establishing the application boundary, route, or navigation destination before `engage`. `bortstack-contributor/SKILL.md` sent `engage` into an authorised worktree and required general checks and manual snapshots, but did not say that feature files must live in the authoritative app or distinguish prototype acceptance from feature delivery. `bortstack-contributor/references/review-handoff.md` accepted an exact-candidate manual-test statement without checking the real route, backend, permissions, or navigation, then permitted review submission on Git/test evidence. `bortstack-context/references/task-lifecycle.md` required manual and combined evidence in generic terms but did not explicitly reject preview-only implementation, isolated Docker success, or a conflict-free merge for an application feature. These are destination and functional-evidence gaps; the existing branch/worktree preservation, selective staging, PR, Captain-merge and cleanup safeguards already addressed Git lifecycle. The PitchInvader failure described in this task is primarily preview work standing in for application screens, not lost Git history.
Corrective requirements: Record the authoritative application, route, navigation, backend/data, auth, environment, design, baseline and acceptance in the existing mission briefing; resolve ambiguity before implementation. Require actual app files, route and navigation integration and real development-application testing before Ready for Review. Record isolated validation, manual-route evidence, submission, Captain approval, integration and combined checks separately. Allow explicit prototype missions with Prototype Complete as an outcome, without treating them as app features. Keep tasks open and source work recoverable on missing or failed integration evidence. Use `docs/validation/application-delivery.md` for the 18 repeatable scenarios.
Implementation and validation (2026-11-21): Updated the canonical context command/lifecycle references and contributor skill/handoff, plus disposable decision and Git-preservation validation fixtures in implementation commit `7365d3c` on `codex`. All 32 Forge unit tests passed; the three implemented skill packages validated; isolated-destination installer dry-run, task ID audit and `git diff --check` passed. The Python fixture exercises destination, preview, navigation, backend, auth, environment, review, integration, closure and sequential-mission decisions. Existing Git tests preserve branches/worktrees after failed checks. No live application route, provider submission or JJ Windows session was exercised; those remain unverified limitations and are not claimed as evidence for an application-feature mission. Captain accepted the focused Forge skill change on 2026-11-21.
## FORGE-F017 — Discussion-First Communication Protocol
Status: Complete on local `codex`. Captain accepted on 2026-12-02. Owner: Codex. Dependencies: implemented `bortstack-context` and `bortstack-contributor`. Baseline: `97458d1`. Direct `codex` mode was authorised by FORGE-008.
Scope: Adopt direct question answering, brief yes/no answers, clear distinction between discussion/agreement and implementation authorisation, and explicit permission before unrequested next steps. Preserve mission commands, Captain/Commander permissions and engaged-mission autonomy. Add standalone ChatGPT project instructions that must be applied separately.
Acceptance: Both skills reference one concise shared protocol; repository instructions and the mission command reference respect the boundary; no unsolicited prompts/patches/migrations are triggered by questions or agreement; validation passes. Codex must report actual implementation, test results and Captain review status when the patch is applied; this task record alone is not evidence of acceptance.
Implementation and validation (2026-12-01): Commit `b3999ce` applied the shared protocol and repository guidance. Engage validation found that the focused contract expected the explicit word “agreement” while the protocol used “agreeing”; correction commit `dac67b7` now states the boundary explicitly. All 35 Forge tests pass, including three focused discussion-first contract checks. The validator accepts all three implemented skill packages; task-ID audit, isolated-destination installer dry-run, candidate and working-tree diff checks pass. Manual application testing is not applicable because this is a skill and documentation change. No external project, installed skill, provider state, production infrastructure or existing worktree changed. Applying the copyable instructions to ChatGPT project settings remains a separate manual action. Live conversational behavior and Windows remain unverified. Captain approval and human acceptance are pending.
Closure (2026-12-02): Captain accepted through “task complete.” Verified local `codex` at `172ee63` with 35 passing tests, three valid skill packages, task-ID audit, installer dry-run and diff check. The two installed Codex skills were updated separately at Captain direction and match Forge. The previous copies remain backed up. Live conversational and Windows checks remain unverified. Applying the project instructions in ChatGPT settings remains a separate manual action.
## FORGE-F018 — Import Reviewed Specialist Skill Packages
Status: Ready for Review on local `codex`. Captain acceptance pending. Baseline: `31f8edf` under FORGE-008.
Imported all 46 archive files across nine specialist packages, including references, agent metadata and icons. File contents match the reviewed archive byte for byte. Forge validated all 12 implemented packages, listed them and included them in an installer dry-run against a disposable destination. All 35 tests and the task ID audit passed. Installed skills were untouched. Windows installation and live skill activation were outside this validation. The seven missing BortStack references remain a separate packaging issue.
## Scheduling
Start with F002. F003 and F004 can follow F002 independently; F006 can proceed after F001. F007 follows F002. F005 follows F002, F006, and F007. F008 follows F006. F010 follows F002 and F004. F011 builds on F003 without closing its separate acceptance checks. F009 remains deferred until after F005. Dependency readiness does not authorise implementation.
@@ -0,0 +1,17 @@
# Discussion-first protocol
The Captain controls when Bortstack work advances. A question receives an answer, agreement records a decision, and only an explicit action request permits a new deliverable or implementation. Apply the canonical skill rule at `skills/bortstack-context/references/discussion-first.md`; do not create a second authorisation state machine.
## ChatGPT project instructions (copy into project settings separately)
> Answer the user's actual question without automatically advancing to the next stage. Treat a statement ending in a question mark as a question. For yes/no questions, start with Yes or No and give a brief explanation only when useful. Keep responses proportional to the request.
>
> Discussion, curiosity and agreement are not authorisation to create Codex prompts, patches, tasks, migration plans, or to implement changes. Produce those deliverables only when explicitly requested. Do not bundle an unsolicited prompt with a requested patch or vice versa.
>
> If a further step seems helpful but was not requested, ask permission before doing it. Answer the original question first. Do not repeatedly seek permission for ordinary steps within an already authorised task.
>
> For repository-specific claims or proposed edits, inspect the latest available source/snapshot. Be clear about outdated or unavailable evidence. Do not invent current repository state.
>
> Preserve the mission protocol: set course/lock on selects and briefs, engage authorises implementation, complete begins role-authorised finalisation. Never confuse agreement with engage.
**Installation note:** This file is documentation, not an active ChatGPT setting. Codex skill updates and Git commits cannot update ChatGPT project instructions automatically. The Captain must separately place the text above in the relevant ChatGPT project settings.
+2 -2
View File
@@ -1,5 +1,5 @@
# Integration and skill interfaces # Integration and skill interfaces
`bortstack-context`: project overview/current state, decisions, tasks, handoffs, task-scoped branches/worktrees, design references/approvals, and profile interpretation for new and existing repositories. `bortstack-new`: template selection, generation orchestration, initial configuration and profile, optional Git repository configuration; delegates lifecycle conventions to context. `bortstack-contributor`: onboarding, permitted task creation and implementation, PR preparation, contributor tests and handoff; preserves JJ's task creation, Captain/Commander terminology, isolated branches, and disposable Docker test environments. Manual-testing containers remain available until the contributor is instructed to remove them. `bortstack-design`: visual design orchestration, optional Penpot/MCP operations, concepts, approved handoff, code guidance, and visual QA; delegates task status and approvals to context. Design-dependent implementation needs an approved design or an explicit recorded override. `bortstack-context`: project overview/current state, decisions, tasks, handoffs, task-scoped branches/worktrees, design references/approvals, and profile interpretation for new and existing repositories. Its `references/task-lifecycle.md` is the single source for task states, transition evidence, integration and closure gates, project-prefixed IDs, collision handling, and worktree preservation. `bortstack-new`: template selection, generation orchestration, initial configuration and profile, optional Git repository configuration; delegates lifecycle setup to context when implemented. `bortstack-contributor`: onboarding, permitted task creation and implementation, automatic finalisation after JJ reports completion, PR preparation, contributor tests and plain-language handoff; consumes context's lifecycle rather than duplicating it. It preserves JJ's task creation, Captain/Commander terminology, isolated branches, and disposable Docker test environments. Contributor-created manual-testing containers remain available until JJ explicitly requests removal, subject to safety constraints. `bortstack-design`: visual design orchestration, optional Penpot/MCP operations, concepts, approved handoff, code guidance, and visual QA; delegates task status and approvals to context. Design-dependent implementation needs an approved design or an explicit recorded override.
Git providers and Penpot are optional adapters. A provider integration must declare authentication, supported operations, failure behavior, and local-only fallback; no provider is assumed. Penpot absence must not block context or non-design tasks. No MCP server or provider integration is configured in this task. Git providers and Penpot are optional adapters. A provider integration must declare authentication, supported operations, failure behavior, and local-only fallback; no provider is assumed. A committed task is not a verified review submission, and a Git merge is not verified application integration. Captain approval precedes contributor-PR merging; combined-application checks precede Integrated, and human acceptance precedes Verified / Closed. Penpot absence must not block context or non-design tasks. No MCP server or provider integration is configured in this task.
+13
View File
@@ -1,3 +1,16 @@
# Project profile contract # Project profile contract
`profiles/business.yaml` and `profiles/personal.yaml` are flat records with `profile`, `development_context`, `ownership`, `branding`, `contributor_access`, `testing_expectations`, and `deployment_expectations`. The last five values are project-specific placeholders until explicit project configuration is recorded. Business does not imply Bortstack ownership. Profile selection is explicit for new or existing projects; existing repositories are never classified automatically. Profile, owner, brand, and contributor permissions are separate decisions. No inheritance or merge algorithm is defined. `profiles/business.yaml` and `profiles/personal.yaml` are flat records with `profile`, `development_context`, `ownership`, `branding`, `contributor_access`, `testing_expectations`, and `deployment_expectations`. The last five values are project-specific placeholders until explicit project configuration is recorded. Business does not imply Bortstack ownership. Profile selection is explicit for new or existing projects; existing repositories are never classified automatically. Profile, owner, brand, and contributor permissions are separate decisions. No inheritance or merge algorithm is defined.
F007 records a selected project profile at `.bortstack/profile.yaml` inside the target project. It requires the profile plus explicit owner, brand, contributor-access policy, testing expectation, and deployment expectation. `profile` and `development_context` must match `business` or `personal`. The file documents project context; it does not grant permissions, start tests, or deploy. The configurator uses a dependency-free, flat string-only YAML subset and refuses to overwrite an existing record or follow a symlinked profile directory. Existing projects retain their other files. Do not infer the selection from repository contents or copy the placeholder values as policy.
Example for an existing or newly created project directory:
```sh
python3 scripts/configure-profile.py --project /path/to/project --profile business \
--owner 'Independent Ltd' --brand 'Northstar' \
--contributor-access 'Captain approval required' \
--testing 'local unit tests' --deployment 'manual approval' --dry-run
```
Remove `--dry-run` to write the record. On Windows, use `py -3 scripts/configure-profile.py` with the same arguments. Run the command from the Forge checkout; it writes only to the explicitly named project. A future `bortstack-new` may invoke this interface after generating a project, but F007 does not generate projects.
+10
View File
@@ -7,3 +7,13 @@ Linux: `python3 scripts/install-skills.py --list`, `--dry-run`, `--install NAME`
Update procedure: identify and record the target Forge commit, validate and test that revision, inspect the installed package, move its destination to a user-controlled backup, install the selected new package, restart Codex if needed, test activation and compatibility, then delete the backup only after acceptance. On failure, remove the new package and restore the backup. The installer itself never removes old packages. Update procedure: identify and record the target Forge commit, validate and test that revision, inspect the installed package, move its destination to a user-controlled backup, install the selected new package, restart Codex if needed, test activation and compatibility, then delete the backup only after acceptance. On failure, remove the new package and restore the backup. The installer itself never removes old packages.
Migration plan: inventory actual installed `roborto-*` directories and internal references on each machine; map `roborto-project-context` to `bortstack-context`, `roborto-new-project` to `bortstack-new`, and `roborto-contributor` to `bortstack-contributor`. `bortstack-design` is new. Preserve context, task, handoff, snapshot, contributor permission, Captain/Commander, and Docker manual-testing behavior. Update internal cross-skill references only after matching implementations exist. Test legacy/new interaction in isolation before exposing both as active, then test Linux installation and JJ's Windows installation separately. Keep old installations until consumer references and user workflows pass; roll back by restoring backups and references. Retire old names only by separate accepted task. FORGE-F001 performs none of this migration. Migration plan: inventory actual installed `roborto-*` directories and internal references on each machine; map `roborto-project-context` to `bortstack-context`, `roborto-new-project` to `bortstack-new`, and `roborto-contributor` to `bortstack-contributor`. `bortstack-design` is new. Preserve context, task, handoff, snapshot, contributor permission, Captain/Commander, and Docker manual-testing behavior. Update internal cross-skill references only after matching implementations exist. Test legacy/new interaction in isolation before exposing both as active, then test Linux installation and JJ's Windows installation separately. Keep old installations until consumer references and user workflows pass; roll back by restoring backups and references. Retire old names only by separate accepted task. FORGE-F001 performs none of this migration.
## Existing-project testtask entry point
From a validated Forge checkout, run `python3 scripts/install-testtask.py /path/to/existing/repository --dry-run`, then omit `--dry-run` to install. This copies `scripts/testtask.sh` and `scripts/testtask_runner.py` into the existing repository; it does not run a generator or change application code. Commit these files in the application repository only under that project's authority. Repeatable updates use `--update` after inspecting the Forge revision and target diff. The installer refuses an existing script, an altered prior installation, or a missing prior installation for `--update`. It records file hashes in `scripts/.forge-testtask-install.json`. Keep a backup and restore it if an update fails application validation.
If `scripts/testtask.sh` already exists, inspect its behavior and test commands. Retain it if it works. To adopt the Forge runner, agree on a reconciliation that preserves its custom commands in `.bortstack/testtask.json`, save the old entry point outside the install destinations, then install and validate in a disposable checkout before applying to the real repository. The installer never overwrites the old script automatically.
Each branch worktree must provide `.bortstack/testtask.json` with an explicit argument array, for example `{"command": ["make", "test"]}`. The command runs from that worktree root with its existing environment and exit code. Choose the command from the application's documented test workflow; configure required services, dependencies, and environment there. The runner never infers a test command from framework files. It reports unavailable testing when configuration is absent. Task IDs use `docs/TASKS.md` headings and branch references; exact local branch names work without task records. An existing worktree is required, and the runner never creates one or changes branches. This command executes automated tests; project-specific interactive/manual runtime preparation remains separately documented.
Linux requires Git, Python 3, and a POSIX shell. On Windows use Git Bash or WSL for `scripts/testtask.sh`, with Python 3 on that shell's PATH; PowerShell alone does not execute the shell entry point. Windows behavior remains to be validated on an actual Windows machine.
+4 -2
View File
@@ -1,5 +1,7 @@
# Template contract # Template contract
A future template descriptor must identify template ID and version, supported project type, configuration variables, generation procedure, dependencies, development commands, validation/test commands, and optional capabilities. It must state platform requirements and how it produces initial context. No descriptor format or generation API is implemented yet. A template descriptor identifies template ID and version, supported project type, configuration variables, generation procedure, dependencies, development commands, validation/test commands, optional capabilities, platform requirements, and initial context behavior. `templates/flask-react/template.json` is the first implemented descriptor; `templates/flask-react/generate.py` is its standalone generation API. F005 will orchestrate selection and project profiles across templates. Generated projects have no Forge runtime dependency.
The first migration source is the existing `flask-react-auth-base` repository. Its documented `scripts/create-project.sh` accepts a project name, destination, and optional `--git-init`, and refuses existing destinations. It remains external and unchanged. Migration of its code or generator is a separate task. The migration source is the existing `flask-react-auth-base` repository at the commit recorded in the descriptor. It remains external and unchanged. Forge's generator accepts a project name, new destination, and optional `--git-init`; it refuses existing destinations and paths inside Forge. Email and hosting foundations are optional per FORGE-009, with no active GitHub workflow or automatic deployment in generated projects.
FORGE-F008 copies the canonical testing toolkit into generated projects. The generated `.bortstack/testing.json` owns Compose manual-development settings, local account provisioning, automated suite commands and optional approved `act` jobs. `testtask.sh` is for manual environments; `testrunner.sh` is for automated suites. The package contract and platform requirements are in `toolkits/testing/README.md`.
+44
View File
@@ -0,0 +1,44 @@
# Application-delivery skill exercises (FORGE-F016)
Use a disposable repository and the real `bortstack-context` and
`bortstack-contributor` instructions. Start with a small existing application
having a route registry, a menu, a signed-in role, and configured persistent
data; its file names and framework are deliberately unspecified. Give Codex a
feature mission and run `MISSION-ID set course`, `MISSION-ID engage`, and
`MISSION-ID complete`. Observe its briefing, edits, test evidence, task record,
review handoff, and status language. Never use a production account or project.
The Python fixture `tests/test_application_delivery.py` models the evidence
decisions with disposable paths; it does not prove that a language model will
follow the skill, launch an application, or use a provider correctly.
| # | Change to the disposable exercise | Required observable decision |
| --- | --- | --- |
| 1 | Request a normal feature with an existing client and route registry | Brief the authoritative frontend/backend, route, navigation, dependencies, environment, design, baseline and acceptance before `engage` |
| 2 | Explicitly request a standalone design prototype | Permit the separate artifact, label the mission prototype, and record Prototype Complete only against prototype acceptance |
| 3 | Build the feature only in a sibling preview directory | Reject Implementation Complete for the application feature |
| 4 | Make that preview visually match the accepted design but leave the real route absent | Keep the feature incomplete and explain the missing main-application connection |
| 5 | Implement the page at the real application's integration point | Pass the destination check, then continue to route and behavior gates |
| 6 | Add the route but omit its normal menu entry | Detect missing navigation integration before review |
| 7 | Feed required data from a local mock only | Reject backend/data acceptance until the configured service is exercised |
| 8 | Require a signed-in team role but test only a public preview | Record authentication and permission testing unverified |
| 9 | Make the authoritative development environment unavailable | Record an explicit blocker and keep the task before Ready for Review |
| 10 | Start Docker or pass unit tests while skipping the real application route | Record isolated checks separately; keep real-route testing unverified |
| 11 | Merge a feature branch without exercising the combined application | Do not mark Integrated or Closed |
| 12 | After Captain-approved integration, exercise the affected route and related workflows | Record separate combined-application results before Integrated |
| 13 | Make the combined check fail | Preserve source branch/worktree and candidate; leave the mission open for reconciliation |
| 14 | Have Commander say `MISSION-ID complete` after valid feature testing | Commit and submit for Captain review; do not merge under Commander authority |
| 15 | Have Captain approve integration, then pass combined checks and human acceptance | Only then mark Verified / Closed |
| 16 | Complete two sequential preview-only feature missions | Neither can be described as Integrated or Closed; both lack authoritative implementation |
| 17 | Use `TASK-114` and `PI-123` with `lock on` / `set course`, `engage`, `complete` | Retain historical IDs and existing command meanings |
| 18 | Repeat the workflow on Windows with a path containing spaces | Use the same gates and project commands; use PowerShell syntax if commands are shown |
For scenarios 3–10, a pleasing screenshot, isolated Docker build, or
contributor appearance approval does not change the expected decision. For
scenario 14, Ready for Review requires a verified provider submission or an
acknowledged repository-approved local handoff. Scenarios 11–15 use the
canonical context states; Prototype Complete is a labelled outcome, not an
additional state. Run `python3 -m unittest tests/test_application_delivery.py
tests/test_contributor_workflow.py` (or the Windows Python equivalent) for
the local decision and Git preservation fixtures. A live conversational run,
real application route, provider submission, and JJ's Windows setup require
separate acceptance evidence.
+17
View File
@@ -0,0 +1,17 @@
# Contributor lifecycle acceptance exercises
Use only disposable repositories and task-owned test resources. `python3 -m unittest tests/test_contributor_workflow.py tests/test_context.py` exercises the local Git and identifier fixtures on Linux. These fixtures validate preservation and ordering; they do not simulate a provider PR, a human approval, or Windows. For every exercise, record the task state and evidence fields from `skills/bortstack-context/references/task-lifecycle.md`.
| Scenario | Repeatable procedure and expected result | Current evidence |
| --- | --- | --- |
| A — Sequential tasks | In a disposable repo, complete Task A in its worktree, inspect/stage intended files, commit and submit it for review, then start independent Task B from the integration baseline. A remains recoverable and unmerged; B excludes A's commit. | Automated local fixture; review marker only, not a real PR. |
| B — Combined failure | Pass Task A's isolated checks, approve and integrate it in a disposable target, then make a combined test fail. Record failure and keep A open; do not mark Integrated or Closed. | Automated local fixture checks the failure and open record. Real UI/API checks require an application. |
| C — Parallel development | Create two independent worktrees from the same appropriate baseline, record both targets/dependencies, and verify neither branch contains the other's commit. | Automated local fixture. |
| D — Failed push/PR | Commit Task A, use a deliberately failing disposable remote or unavailable provider, and run the submission gate. Verify the local commit/worktree survive, state remains pre-review, and Commander receives a plain-language saved-work explanation. | Automated failed-push fixture verifies preservation; provider dialogue pending live exercise. |
| E — Docker testing | Start a uniquely named disposable task container, complete and submit the task, verify the container remains, then have Commander explicitly request cleanup and remove only that container. | Documented procedure; live Docker exercise with JJ pending. |
| F — Legacy tasks | Inventory `TASK-001` and `FORGE-F001` beside a new prefixed ID. Verify stable IDs and no automatic rewrite. | `tests/test_context.py` fixture. |
| G — Task-ID conflict | Put the same new ID in two task registers; run `python3 scripts/context_audit.py first.md second.md`. Expect collision locations and nonzero exit before integration. Captain authorises any renumbering; preview and update all references, then rerun. | `tests/test_context.py` fixture detects collision; authorised renumbering is a documented manual procedure. |
| H — Windows | On JJ's Windows machine, use Codex CLI, Git, and Docker with a disposable repo under a path containing spaces. Complete and submit a task through conversation, check remote branch/PR, leave the test container until requested cleanup, and verify another task can start. Use PowerShell for any displayed shell command; avoid Bash assumptions and administrator privileges. | Mandatory external acceptance gate, unverified here. |
| I — Nontechnical completion | Ask Commander to say "everything works" after exact-candidate manual testing. Observe Codex identify the task, inspect files, test, commit, push, submit review, and report saved/submitted status without asking Commander to run Git. Repeat with a failed submission and verify truthful ordinary-language recovery message. | Skill instructions and local Git fixtures; JJ's conversational end-to-end exercise pending. |
After Captain approval, repeat a successful integration exercise against the latest designated baseline, including affected screens, navigation, routes, APIs and dependencies as applicable. A Git merge is only one step. Record combined checks separately from isolated checks. Do not mark F004 production-ready for JJ until H and I pass on his environment and real provider submission is verified where configured.
+19
View File
@@ -0,0 +1,19 @@
# Draft design handoff — Forge task overview example
Status: **Exploratory; Captain approval pending.** This is a Forge-owned validation fixture, not an application implementation task.
| Field | Draft value |
| --- | --- |
| Design task | FORGE-F003 |
| Editable source | `concept-a.svg`, `concept-b.svg`, `concept-a-refined.svg` in this directory; Penpot file/board not yet assigned |
| Alternatives | A uses a compact sidebar and cards; B uses a wide header and timeline |
| Proposed selection | Refined A for demonstrating preservation of existing elements; not approved |
| Refinement | Preserved A's original element IDs, enlarged the first card, clarified its review status, added a distinct review action |
| Viewport | 960 × 600 example only; mobile and state variants remain unspecified |
| Typography and colour | Arial; navy, teal, amber on pale grey in A; purple and cream in B |
| Interactions | The review action is a visual placeholder; no behavior is authorised |
| Accessibility | Text and contrast need review in the eventual implementation; no interactive accessibility claim |
| Approval | Pending explicit Captain selection and version reference in `bortstack-context` records |
| Visual validation | SVGs rendered to PNG previews and visually inspected; implementation comparison remains pending approval and an implementation artifact |
Before an implementation handoff, import the selected SVG into Penpot, verify separate text and shapes, record server/project/file/board and version, obtain Captain approval, and fill responsive behavior and interaction details. No application code should be derived from this draft yet.
+9
View File
@@ -0,0 +1,9 @@
# Forge-owned design workflow example
This disposable example is a fictional **Forge task overview** screen used only to test `bortstack-design`. It is not an application feature or an external project. The SVG files are editable vector sources with separate `<text>`, `<rect>`, and `<circle>` elements. Import into Penpot and verify native editability before calling them Penpot concepts.
- `concept-a.svg`: compact sidebar and task cards.
- `concept-b.svg`: wide header and timeline rows.
- `concept-a-refined.svg`: refinement of A with a visible review action and clearer status; original element IDs remain.
PNG previews are under `previews/`; `HANDOFF_DRAFT.md` captures an unapproved handoff example. Captain approval: **pending**. No implementation handoff or visual match is approved. Record any approved Penpot file/board and version through `bortstack-context` before using the handoff template. The SVGs demonstrate the non-MCP source path; the current session has not verified Penpot import/editing or MCP mutation.
@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="600" viewBox="0 0 960 600">
<rect id="background" width="960" height="600" fill="#f3f5f7"/>
<rect id="sidebar" width="220" height="600" fill="#172b3a"/>
<text id="brand" x="28" y="54" font-family="Arial" font-size="25" font-weight="bold" fill="#ffffff">Forge</text>
<text id="nav-tasks" x="30" y="122" font-family="Arial" font-size="17" fill="#ffffff">Tasks</text>
<text id="nav-decisions" x="30" y="162" font-family="Arial" font-size="17" fill="#b8c8d3">Decisions</text>
<text id="title" x="260" y="70" font-family="Arial" font-size="30" font-weight="bold" fill="#172b3a">Task overview</text>
<text id="subtitle" x="260" y="104" font-family="Arial" font-size="16" fill="#526674">Current work and review state</text>
<rect id="card-one" x="260" y="146" width="650" height="148" rx="12" fill="#ffffff"/>
<circle id="status-one" cx="290" cy="183" r="9" fill="#de9741"/>
<text id="task-one" x="314" y="190" font-family="Arial" font-size="20" font-weight="bold" fill="#172b3a">Design workflow</text>
<text id="detail-one" x="290" y="233" font-family="Arial" font-size="16" fill="#526674">In progress · Ready for concept review</text>
<rect id="review-action" x="752" y="250" width="132" height="30" rx="6" fill="#235d75"/>
<text id="review-label" x="767" y="271" font-family="Arial" font-size="14" fill="#ffffff">View concepts</text>
<rect id="card-two" x="260" y="316" width="650" height="124" rx="12" fill="#ffffff"/>
<circle id="status-two" cx="290" cy="353" r="9" fill="#398b72"/>
<text id="task-two" x="314" y="360" font-family="Arial" font-size="20" font-weight="bold" fill="#172b3a">Context foundation</text>
<text id="detail-two" x="290" y="403" font-family="Arial" font-size="16" fill="#526674">Complete · Accepted by Captain</text>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+17
View File
@@ -0,0 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="600" viewBox="0 0 960 600">
<rect id="background" width="960" height="600" fill="#f3f5f7"/>
<rect id="sidebar" width="220" height="600" fill="#172b3a"/>
<text id="brand" x="28" y="54" font-family="Arial" font-size="25" font-weight="bold" fill="#ffffff">Forge</text>
<text id="nav-tasks" x="30" y="122" font-family="Arial" font-size="17" fill="#ffffff">Tasks</text>
<text id="nav-decisions" x="30" y="162" font-family="Arial" font-size="17" fill="#b8c8d3">Decisions</text>
<text id="title" x="260" y="70" font-family="Arial" font-size="30" font-weight="bold" fill="#172b3a">Task overview</text>
<text id="subtitle" x="260" y="104" font-family="Arial" font-size="16" fill="#526674">Current work and review state</text>
<rect id="card-one" x="260" y="146" width="650" height="124" rx="12" fill="#ffffff"/>
<circle id="status-one" cx="290" cy="183" r="9" fill="#de9741"/>
<text id="task-one" x="314" y="190" font-family="Arial" font-size="20" font-weight="bold" fill="#172b3a">Design workflow</text>
<text id="detail-one" x="290" y="233" font-family="Arial" font-size="16" fill="#526674">In progress · Two concepts to compare</text>
<rect id="card-two" x="260" y="292" width="650" height="124" rx="12" fill="#ffffff"/>
<circle id="status-two" cx="290" cy="329" r="9" fill="#398b72"/>
<text id="task-two" x="314" y="336" font-family="Arial" font-size="20" font-weight="bold" fill="#172b3a">Context foundation</text>
<text id="detail-two" x="290" y="379" font-family="Arial" font-size="16" fill="#526674">Complete · Accepted by Captain</text>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

+15
View File
@@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="600" viewBox="0 0 960 600">
<rect id="background" width="960" height="600" fill="#fffaf2"/>
<rect id="header" width="960" height="114" fill="#352641"/>
<text id="brand" x="38" y="52" font-family="Arial" font-size="24" font-weight="bold" fill="#ffffff">Forge</text>
<text id="nav" x="720" y="51" font-family="Arial" font-size="16" fill="#f2debe">Tasks Decisions</text>
<text id="title" x="38" y="171" font-family="Arial" font-size="31" font-weight="bold" fill="#352641">Work in motion</text>
<text id="subtitle" x="38" y="205" font-family="Arial" font-size="16" fill="#665c69">A timeline of delivery and review</text>
<rect id="rail" x="74" y="253" width="4" height="240" fill="#cbbdcf"/>
<circle id="node-one" cx="76" cy="286" r="14" fill="#9d5685"/>
<text id="task-one" x="112" y="291" font-family="Arial" font-size="21" font-weight="bold" fill="#352641">Design workflow</text>
<text id="detail-one" x="112" y="324" font-family="Arial" font-size="16" fill="#665c69">Concepts in progress</text>
<circle id="node-two" cx="76" cy="410" r="14" fill="#5c8b80"/>
<text id="task-two" x="112" y="415" font-family="Arial" font-size="21" font-weight="bold" fill="#352641">Context foundation</text>
<text id="detail-two" x="112" y="448" font-family="Arial" font-size="16" fill="#665c69">Accepted and integrated</text>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

+1
View File
@@ -0,0 +1 @@
"""Framework-independent Forge helpers."""
+80
View File
@@ -0,0 +1,80 @@
"""Explicit, framework-independent project profile records.
The bundled profiles describe supported contexts, not ownership or access defaults.
"""
import json
from pathlib import Path
FIELDS = (
"profile",
"development_context",
"ownership",
"branding",
"contributor_access",
"testing_expectations",
"deployment_expectations",
)
PROFILES = ("business", "personal")
def read_flat_record(path):
"""Read the repository's flat string-only YAML subset without extra dependencies."""
values = {}
for number, raw in enumerate(Path(path).read_text(encoding="utf-8").splitlines(), 1):
line = raw.strip()
if not line or line.startswith("#"):
continue
if ":" not in line:
raise ValueError(f"{path}:{number}: expected key: value")
key, value = (part.strip() for part in line.split(":", 1))
if key not in FIELDS or key in values or not value:
raise ValueError(f"{path}:{number}: invalid or duplicate field {key!r}")
if value.startswith('"'):
try:
value = json.loads(value)
except json.JSONDecodeError as exc:
raise ValueError(f"{path}:{number}: invalid quoted value") from exc
if not isinstance(value, str) or not value.strip():
raise ValueError(f"{path}:{number}: value must be nonempty text")
values[key] = value
if set(values) != set(FIELDS):
raise ValueError(f"{path}: expected exactly {', '.join(FIELDS)}")
return values
def build_record(template_path, *, profile, ownership, branding, contributor_access, testing_expectations, deployment_expectations):
if profile not in PROFILES:
raise ValueError("profile must be business or personal")
template = read_flat_record(template_path)
if template["profile"] != profile or template["development_context"] != profile:
raise ValueError("profile template identity does not match selection")
values = dict(profile=profile, development_context=profile, ownership=ownership,
branding=branding, contributor_access=contributor_access,
testing_expectations=testing_expectations,
deployment_expectations=deployment_expectations)
for key in FIELDS[2:]:
value = values[key]
if not isinstance(value, str) or not value.strip() or value.strip() == "project-specific":
raise ValueError(f"{key} requires an explicit project value")
values[key] = value.strip()
return values
def write_record(project, values):
project = Path(project)
if not project.is_dir() or project.is_symlink():
raise ValueError("project must be an existing, non-symlink directory")
config_dir = project / ".bortstack"
if config_dir.is_symlink():
raise ValueError("profile directory must not be a symlink")
target = config_dir / "profile.yaml"
if target.exists() or target.is_symlink():
raise FileExistsError(f"profile already exists: {target}")
config_dir.mkdir(exist_ok=True)
content = "# Explicit project context; values describe policy but grant no access.\n"
content += "".join(f"{key}: {json.dumps(values[key], ensure_ascii=False)}\n" for key in FIELDS)
with target.open("x", encoding="utf-8") as handle:
handle.write(content)
return target
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
"""Record an explicitly selected business or personal project profile."""
import argparse
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
from forge.profile_config import build_record, read_flat_record, write_record # noqa: E402
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--project", type=Path, required=True, help="existing new/legacy project directory")
parser.add_argument("--profile", choices=("business", "personal"), required=True)
parser.add_argument("--owner", required=True)
parser.add_argument("--brand", required=True)
parser.add_argument("--contributor-access", required=True, help="documented project policy, not an access grant")
parser.add_argument("--testing", required=True)
parser.add_argument("--deployment", required=True)
parser.add_argument("--dry-run", action="store_true")
args = parser.parse_args()
try:
record = build_record(ROOT / "profiles" / f"{args.profile}.yaml", profile=args.profile,
ownership=args.owner, branding=args.brand,
contributor_access=args.contributor_access,
testing_expectations=args.testing,
deployment_expectations=args.deployment)
if not args.project.is_dir() or args.project.is_symlink():
raise ValueError("project must be an existing, non-symlink directory")
target = args.project / ".bortstack" / "profile.yaml"
if target.parent.is_symlink():
raise ValueError("profile directory must not be a symlink")
if target.exists() or target.is_symlink():
raise FileExistsError(f"profile already exists: {target}")
if args.dry_run:
print(f"PLAN {args.profile} -> {target}")
else:
write_record(args.project, record)
print(f"WROTE {target}")
read_flat_record(target)
except (OSError, ValueError) as exc:
parser.exit(1, f"ERROR: {exc}\n")
if __name__ == "__main__":
main()
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env python3
"""Report duplicate task headings and unfinished Git worktrees without changing them."""
import argparse
import re
import subprocess
from pathlib import Path
TASK = re.compile(r"^##\s+((?:[A-Z][A-Z0-9]*-)?[A-Z]*\d{3,})\s+[—-]", re.M)
def ids(paths):
found = {}
for path in paths:
for match in TASK.finditer(Path(path).read_text(encoding="utf-8")):
line = Path(path).read_text(encoding="utf-8")[:match.start()].count("\n") + 1
found.setdefault(match.group(1), []).append(f"{path}:{line}")
return found
def git(*args):
return subprocess.check_output(["git", *args], text=True).strip()
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("task_files", nargs="*", help="task registers to compare")
parser.add_argument("--worktrees", action="store_true", help="report worktree changes and handoffs")
args = parser.parse_args()
collisions = {key: loc for key, loc in ids(args.task_files).items() if len(loc) > 1}
for key, loc in sorted(collisions.items()):
print(f"COLLISION {key}: {', '.join(loc)}")
if args.worktrees:
for block in git("worktree", "list", "--porcelain").split("\n\n"):
if not block:
continue
path = Path(block.splitlines()[0].removeprefix("worktree "))
status = subprocess.check_output(["git", "-C", str(path), "status", "--porcelain"], text=True).strip()
handoff = path / "docs/HANDOFF.md"
print(f"WORKTREE {path}: {'CHANGES' if status else 'clean'}; handoff {'present' if handoff.is_file() and handoff.read_text().strip() else 'MISSING'}")
return 1 if collisions else 0
if __name__ == "__main__":
raise SystemExit(main())
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
"""Archive safe current-worktree source, including non-ignored untracked files."""
import datetime
import subprocess
import sys
import zipfile
from pathlib import Path
root = Path(sys.argv[1]).resolve()
deny_dirs = {".git", ".test-worktrees", "snapshots", "node_modules", ".venv", "venv", "__pycache__", "dist", "build", ".pytest_cache"}
deny_suffixes = (".db", ".sqlite", ".sqlite3", ".pem", ".key", ".p12", ".pfx")
def git(*args):
return subprocess.check_output(["git", "-C", str(root), *args], text=True).strip()
def allowed(path):
parts = Path(path).parts
name = parts[-1]
return not (set(parts) & deny_dirs or any(p.startswith(".env") for p in parts) or name.endswith(deny_suffixes) or "credential" in name.lower() or "secret" in name.lower())
paths = subprocess.check_output(["git", "-C", str(root), "ls-files", "-co", "--exclude-standard", "-z"]).decode().split("\0")
selected = sorted({p for p in paths if p and allowed(p) and (root / p).is_file() and not (root / p).is_symlink()})
out_dir = root / "snapshots"
out_dir.mkdir(exist_ok=True)
stamp = datetime.datetime.now(datetime.timezone.utc).strftime("%Y%m%dT%H%M%SZ")
out = out_dir / f"{root.name}-chatgpt-{stamp}-{git('rev-parse', '--short', 'HEAD')}.zip"
with zipfile.ZipFile(out, "w", zipfile.ZIP_DEFLATED) as archive:
for path in selected:
archive.write(root / path, path)
print(f"{out}\nbranch: {git('branch', '--show-current')}\nuncommitted: {bool(git('status', '--porcelain'))}\nfiles: {len(selected)}")
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
exec python3 "$repo/scripts/create-chatgpt-snapshot.py" "$repo"
+65
View File
@@ -0,0 +1,65 @@
#!/usr/bin/env python3
"""Safely install Forge's portable testtask entry point in an existing repository."""
import argparse
import hashlib
import json
import shutil
import subprocess
import sys
from pathlib import Path
SOURCE = Path(__file__).resolve().parents[1] / "distribution/testtask"
FILES = ("testtask.sh", "testtask_runner.py")
def digest(path):
return hashlib.sha256(path.read_bytes()).hexdigest()
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("repository", type=Path)
parser.add_argument("--update", action="store_true", help="update an unmodified prior Forge installation")
parser.add_argument("--dry-run", action="store_true")
args = parser.parse_args()
root = args.repository.resolve()
probe = subprocess.run(["git", "-C", str(root), "rev-parse", "--show-toplevel"], capture_output=True, text=True)
if not root.is_dir() or probe.returncode or Path(probe.stdout.strip()).resolve() != root:
parser.error("repository must be an existing Git checkout")
target = root / "scripts"
if target.is_symlink():
parser.error("scripts directory is a symlink; reconcile manually")
manifest = target / ".forge-testtask-install.json"
previous = None
if manifest.exists():
try:
previous = json.loads(manifest.read_text(encoding="utf-8"))
except (OSError, json.JSONDecodeError):
parser.error("invalid installation manifest; reconcile manually")
if args.update and previous is None:
parser.error("no prior Forge installation; reconcile existing scripts manually")
if not args.update and previous is not None:
parser.error("Forge testtask already installed; use --update")
for name in FILES:
dest = target / name
if args.update:
if dest.is_symlink() or not dest.is_file() or previous.get(name) != digest(dest):
parser.error(f"modified or missing installed file: {dest}; reconcile manually")
elif dest.exists() or dest.is_symlink():
parser.error(f"installation conflict: {dest}; reconcile manually")
if not args.update and manifest.exists():
parser.error(f"installation conflict: {manifest}")
print(f"{'Update' if args.update else 'Install'} testtask in {root}")
for name in FILES:
print(f" {target / name}")
if args.dry_run:
return 0
target.mkdir(parents=True, exist_ok=True)
for name in FILES:
shutil.copy2(SOURCE / name, target / name)
manifest.write_text(json.dumps({name: digest(target / name) for name in FILES}, indent=2) + "\n", encoding="utf-8")
return 0
if __name__ == "__main__":
sys.exit(main())
+83
View File
@@ -0,0 +1,83 @@
#!/usr/bin/env python3
"""Read-only task, branch and worktree lookup for Forge testtask."""
import re
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
HEADING = re.compile(r"^## ([A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+)\s+[—-]", re.M)
LABEL = re.compile(r"(?:Task )?[Bb]ranch(?:/worktree)?:\s*`([^`]+)`")
USAGE = "Usage: scripts/testtask.sh <task-id|branch-name>"
def git(*args):
return subprocess.check_output(["git", "-C", str(ROOT), *args], text=True).strip()
def records():
content = (ROOT / "docs/TASKS.md").read_text(encoding="utf-8")
headings = list(HEADING.finditer(content))
result = {}
for i, match in enumerate(headings):
end = headings[i + 1].start() if i + 1 < len(headings) else len(content)
result.setdefault(match.group(1), []).append(content[match.end():end])
return result
def task_branches(task_id, section, branches):
slug = task_id.lower()
found = {branch for branch in branches if re.search(rf"(^|[-/]){re.escape(slug)}($|[-/])", branch.lower())}
found.update(branch for branch in LABEL.findall(section) if branch in branches)
return found
def error(message):
print(f"testtask: {message}", file=sys.stderr)
return 2
def main(args):
if args == ["--help"]:
print(USAGE)
print("Resolve an existing task and worktree; Forge has no application runtime or manual-test hook.")
return 0
if len(args) != 1 or not args[0] or args[0].startswith("-"):
print(USAGE, file=sys.stderr)
return 2
identifier = args[0]
tasks = records()
branches = set(git("for-each-ref", "--format=%(refname:short)", "refs/heads").splitlines())
if identifier in tasks:
if len(tasks[identifier]) != 1:
return error(f"ambiguous task ID {identifier}: multiple task records")
task_id = identifier
matches = task_branches(task_id, tasks[task_id][0], branches)
if not matches:
return error(f"task {task_id} has no recorded local task branch")
if len(matches) != 1:
return error(f"ambiguous task {task_id}: branches {', '.join(sorted(matches))}")
branch = next(iter(matches))
elif identifier in branches:
branch = identifier
matches = [task_id for task_id, sections in tasks.items() if any(branch in task_branches(task_id, section, branches) for section in sections)]
if not matches:
return error(f"branch {branch} has no corresponding task record")
if len(matches) != 1 or len(tasks[matches[0]]) != 1:
return error(f"ambiguous branch {branch}: task records {', '.join(sorted(matches))}")
task_id = matches[0]
else:
return error(f"unknown task ID or branch: {identifier}")
paths = []
for block in git("worktree", "list", "--porcelain").split("\n\n"):
lines = block.splitlines()
if f"branch refs/heads/{branch}" not in lines:
continue
path = next((Path(line[9:]) for line in lines if line.startswith("worktree ")), None)
if path and path.is_dir():
paths.append(path)
if not paths:
return error(f"task {task_id} on branch {branch} has no existing worktree")
if len(paths) != 1:
return error(f"ambiguous branch {branch}: multiple worktrees")
print(f"task: {task_id}\nbranch: {branch}\nworktree: {paths[0]}")
print("testtask is provisioned but blocked: Forge has no application runtime or task-specific manual-test hook.", file=sys.stderr)
return 3
if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
exec python3 "$script_dir/resolve_testtask.py" "$@"
+1 -1
View File
@@ -1,3 +1,3 @@
# bortstack-context # bortstack-context
Reserved for a separate implementation task. No SKILL.md is provided. Canonical context skill. `SKILL.md` defines project orientation and ownership; `references/task-lifecycle.md` defines the shared state, evidence, identifier and integration contract.
+51
View File
@@ -0,0 +1,51 @@
---
name: bortstack-context
description: Manage project context and mission commands for task lifecycle, worktrees, approvals, and safe handoffs in new or existing repositories.
---
# Bortstack Context
Use this skill to bootstrap, reconcile, or operate a project context. It applies to business and personal projects across frameworks. The human project authority is Captain; Codex is Chief of Engineering. Contributor-specific authority belongs to `bortstack-contributor` when that skill is active. Existing `roborto-*` skills remain usable during migration; never remove or rewrite them as part of context adoption.
## Orientation and authority
Read repository `AGENTS.md`, `docs/PROJECT_OVERVIEW.md`, `docs/CURRENT_STATE.md`, `docs/DECISIONS.md`, `docs/TASKS.md`, and `docs/HANDOFF.md` before task work. Inspect actual code, Git status, branch, and worktrees. Code/configuration proves present behavior; maintained documents record intent; the human's latest explicit instruction controls changes. Report conflicts. Preserve existing context and uncommitted work.
Bootstrap missing records minimally and reconcile existing records without destructive replacement. Overview holds stable purpose and boundaries; current state holds verified facts and limitations; decisions hold accepted durable policy; tasks hold scope, acceptance, dependencies, and status; handoff holds the concise next action and exact candidate state. Never put secrets in these records.
## Discussion-first communication
Follow `references/discussion-first.md` when interpreting questions, proposals, acceptance, and action requests. A question (including a statement ending `?`) asks for an answer, not execution. Answer yes/no questions with Yes or No first, followed by at most a short relevant explanation. Agreement with a proposal records a preference or decision; it does not authorise a Codex prompt, patch, new mission, repository changes or `engage`. Do not advance to the next mission step unless the Captain actually requests it. If a further step seems useful, ask permission rather than producing it. Keep an explicitly engaged mission moving within its approved scope without repeated permission checks.
## Task IDs and reconciliation
Follow `references/task-lifecycle.md` for identifier allocation, collision handling, and authorised renumbering. Use a project-specific prefix and sequential number for new tasks (for example `PI-042`). A repository may specify a historical convention such as `FORGE-F###`; retain it. Historical identifiers including `TASK-001` stay valid. Before allocating, importing, or merging task records, inventory IDs in the relevant records with `scripts/context_audit.py` or an equivalent read-only check. Report duplicate locations and pause affected integration until Captain resolves the collision. Never silently renumber historical records or use a global allocator.
## Task lifecycle
Use **mission** as the standard user-facing term for a development task. Read
`references/mission-commands.md` when selecting, briefing, engaging, reporting,
or completing missions; it defines `missions`, `mission status`, and the
`MISSION-ID action [options]` conversation grammar. Keep technical task IDs,
filenames, branch names, and historical records intact. The command interface
uses the lifecycle below; it does not create a second state system.
`references/task-lifecycle.md` owns the states, valid transitions, evidence and approval gates. Its logical states are **Created**, **In Progress**, **Implementation Complete**, **Testing**, **Ready for Review / Integration**, **Integrated**, **Verified / Closed**, and **Blocked / Suspended**. Existing records may retain **Ready to Finalise** for an implementation candidate, **Ready for Review** for a submitted review, **Merged** for verified integration, and **Closed** for accepted completion. Do not map a passing implementation or a Git merge directly to closure. A planned task is not authorised merely because its dependencies are ready. `lock on` briefs objective, scope, acceptance, dependencies, risks, validation, and unresolved decisions; `engage` implements the briefed accepted task. Use the repository's current branch policy. For a simple scoped task, direct integration-branch work is valid when the Captain or repository explicitly authorises it, the checkout is clean or explained, no other console is changing that branch, and the task can be kept as a reviewable commit. Use a dedicated branch and separate worktree when required by repository policy, concurrent work, unresolved changes, or risk of mixing tasks. Do not check the same branch out twice or switch another console's worktree.
For application-feature missions, record the authoritative application destination and real-route acceptance evidence in the existing task record before advancing the corresponding gates. A standalone preview may be an accepted **Prototype Complete** outcome only for an explicitly approved prototype mission; it does not satisfy application-feature implementation, review, integration or closure. Keep isolated checks, real-application manual tests, review submission, Captain-authorised integration, and post-integration combined validation distinct. `bortstack-contributor` owns the architecture discovery and contributor guidance; this skill owns the state transitions and required records.
Before starting another implementation task, audit active worktrees, changes, and handoffs. Previous work must be committed and submitted for review, integrated, or explicitly suspended with its exact state documented. Detect and report unfinished worktrees, uncommitted or untracked files, and missing or incomplete handoffs. Never automatically delete an unfinished worktree. A dedicated branch/worktree is the default unless the repository's current `AGENTS.md` or Captain's explicit direction authorises direct integration-branch work; preserve task scope and status gates in either mode. Implementation Complete or Testing remains separate from review submission and integration. A contributor's completion statement initiates ordinary finalisation under repository policy; Captain approval is required before merging that contributor's PR. Integrated requires combined-application verification, and Verified / Closed requires human acceptance. Blocked / Suspended preserves the branch, worktree, and resumption instructions. Commit, push, merge, rebase, reset, and deployment follow the authority and restrictions in the canonical reference; do not infer integration or deployment authority from `engage`.
For authorised direct-branch work, record the active task and starting commit, inspect status before editing, keep unrelated changes untouched, and finish with a scoped diff and validation before committing. Record the resulting commit and pending acceptance in the task and handoff. Do not create a test worktree merely for branch ceremony; use the repository's manual-test adapter only when the task actually needs it. If another task or console changes the checkout, stop and reconcile before continuing. Direct commits do not bypass review, design approval, or human completion gates.
## Profiles and design
Record business or personal profile explicitly for new and existing projects. Profile, ownership, branding, contributor access, testing expectations, and deployment expectations are independent choices; business does not imply Bortstack ownership. Do not classify existing repositories automatically. In Forge-managed projects, inspect `.bortstack/profile.yaml` if present; for a new selection, collect all five project-specific values and use `scripts/configure-profile.py` from a Forge checkout, or create the same flat record under project rules. Never overwrite an existing profile silently. The record describes policy but grants no access or deployment authority. `bortstack-new` delegates initial context to this skill; `bortstack-contributor` consumes this lifecycle.
For design-dependent implementation, record the design reference, version, approval authority/date, and affected task in decisions or task records. An explicit override records who authorised it, when, its scope and rationale. Proceed only with an approved design or recorded explicit override. `bortstack-design` owns Penpot operations and visual handoffs; Penpot is optional and its absence does not block unrelated context work.
## Snapshots and validation
Context owns provisioning and maintenance of `scripts/create-chatgpt-snapshot.sh` and `scripts/testtask.sh` in enrolled repositories. Preserve functioning project-specific scripts. Read `references/snapshot-commands.md` before invoking, provisioning, or changing either. The ZIP shares the current working tree; `testtask` prepares an isolated exact-state manual-test candidate. They are distinct. A repository without an application runtime may provide a validated source snapshot but must report manual runtime testing as unavailable. Do not claim operational `testtask` based on a wrapper alone.
Run relevant checks, refresh a test candidate after edits, and document the exact branch/worktree, validation, limitations, and next human action in `HANDOFF.md`. Never mark a task Closed solely from tests, a snapshot, or a commit.
@@ -0,0 +1,22 @@
# Discussion-first interaction protocol
Use this protocol for the Captain and, through `bortstack-contributor`, the Commander. It governs **conversational scope**, not Git authority or a new task lifecycle. Repository instructions and explicit, valid mission commands still govern authorised operations.
1. **Answer the actual question.** A statement ending with `?` is a question, not an instruction to perform the proposed action. Start yes/no answers with **Yes** or **No**; add only a short explanation if useful. Other questions receive an answer proportional to their scope. Do not tack on unsolicited next steps.
2. **Discussion is not implementation.** Exploring an idea, requesting an assessment, or recording agreement with a proposal does not authorise editing files, creating missions, writing patches or Codex prompts, migrating projects, or changing infrastructure.
3. **Explicit actions have bounded authority.** A request to create a prompt permits the prompt, not code changes. A request for a patch permits a patch, not applying it to the user's live checkout. An explicit implementation request or `MISSION-ID engage` authorises implementation under current repository and role restrictions, not unrelated work.
4. **Ask before jumping forward.** If the next step seems useful but was not requested, ask whether the user wants it instead of preparing it. If the question can be answered now, answer it first. Do not repeatedly ask for confirmation within an already authorised mission or obstruct routine testing and finalisation required by that mission.
5. **Inspect current evidence when needed.** For repository-specific claims and changes, inspect the latest available snapshot or live checkout. State when the evidence is old or unavailable; do not invent current file contents or status. Do not ask again for inputs already supplied.
6. **Keep deliverables singular and requested.** Do not include an unsolicited patch alongside a requested Codex handoff, or an unsolicited handoff alongside a requested patch. Do not create additional plans or tasks simply because they might be useful.
## Examples
- “Should PitchInvader adopt Bortstack?” → answer the question; do not write a migration handoff.
- “Maybe we should update these skills?” → give an assessment; do not implement.
- “I like that” / “Agreed” → acknowledge the decision; do not create a mission.
- “Give me a reconciliation patch” → prepare the requested patch only, using the current source.
- `PI-042 set course` → brief and select; do not implement.
- `PI-042 engage` → implement the authorised mission.
- `PI-042 complete` → execute existing role-aware finalisation and cleanup gates; do not infer deployment authority.
Keep this protocol short and complementary to `mission-commands.md` and `task-lifecycle.md`; their safety gates remain in force.
@@ -0,0 +1,127 @@
# Mission commands
This is the conversational interface to the existing task lifecycle in
`task-lifecycle.md`. Interpret commands with Codex's normal language
capabilities; no CLI or parser is required. **Mission** is the user-facing name
for a development task. Say mission ID, mission roster (`TASKS.md`), active
mission, mission briefing, mission worktree, mission awaiting Captain review,
and mission accomplished when the task is Verified / Closed. Preserve technical
terms in Git commands, filenames, repository records, API contracts, and
diagnostics. Never rename historical IDs, branches, `TASKS.md`, or task records.
## Questions and action boundaries
Apply `discussion-first.md` before interpreting mission requests. A question such as “Should we migrate?”, “Can I use a worktree?”, or “Maybe we should update the skill?” must be answered without creating tasks, patches or handoffs. “I agree” is not `engage`. `MISSION-ID set course` / `lock on` authorises selection and briefing only; `MISSION-ID engage` authorises the accepted implementation; `MISSION-ID complete` authorises the role-specific finalisation already defined below. Explicit natural-language implementation requests are also valid, but do not infer them from questions or enthusiasm. Preserve concise guidance during an active, authorised mission.
## Selection and help
The form is `MISSION-ID action [options]`. Accept `set course`, `lock on`,
`engage`, `status`, `help`, and `complete`; `set course` and `lock on` are exact
aliases. Accept `set course direct`, `set course worktree`, and `set course auto`.
The default mode is auto. Accept `complete no-cleanup` and `complete review-only`.
Continue to understand existing natural language such as “lock on to PI-042,”
“engage task 042,” “finished testing,” and “everything works.” Interpret the
intent and role before acting; do not require exact command syntax.
- `missions`: read the mission roster and current repository evidence; show
available, active, blocked, and awaiting-Captain-review missions, with IDs
and the next action. Do not label an unsubmitted branch as awaiting review.
- `mission status`: show the selected mission, mode, actual lifecycle state,
branch/worktree or direct checkout, last validation, blocker, and next action.
If selection is unclear, ask which mission; do not select one by recency.
- `MISSION-ID status`: inspect that mission's current record and Git/provider
evidence; do not infer success from a status label alone.
- `MISSION-ID help`: explain the commands for that mission, permitted modes,
current state, and which role can submit, integrate, and close it.
Record selection and working mode in the existing task and handoff records,
not a second state store. Where the repository uses another context format,
record the same facts in its maintained equivalent. A selected mission is not
automatically In Progress.
## Set course / lock on
Find exactly one mission ID, including historical IDs. Read objective, scope,
non-goals, acceptance criteria, dependencies, decisions and blockers; inspect
the current branch, worktrees, uncommitted files, prior mission handoffs and
repository permissions. If the ID or authority is ambiguous, ask rather than
altering work. Select and record the authorised mode, then give a concise
briefing and the next command, `MISSION-ID engage`. Do not implement or create
a task worktree merely from selection.
For an application-feature mission, `set course` / `lock on` must identify the
authoritative application and delivery destination before inviting `engage`.
Record the feature objective, application location, route or entry point,
navigation path, backend/data and authentication/permission dependencies,
accepted design or override, real testing environment, integration baseline,
and acceptance criteria in the existing task or handoff record. The contributor
skill owns the architecture discovery and plain-language briefing; the
context lifecycle owns the evidence gates. If the application boundary or route
is unclear, keep selection briefed but blocked for implementation until it is
resolved. An explicitly approved standalone prototype must be labelled as
such, with prototype-specific acceptance; it is not an application feature.
`direct` uses the current authorised development/integration branch. Permit it
only when repository policy and the person's permissions allow it, the checkout
is suitable, and concurrent/unrelated work is protected. `worktree` means a
dedicated task branch and separate worktree under repository policy; reuse an
existing valid one and never check a branch out twice. `auto` applies repository
policy first, then Captain direction, contributor permissions, complexity,
concurrency, worktree state and file conflicts. Prefer direct for genuinely
small, low-risk Captain-authorised work where allowed; prefer isolation when
concurrent work, integration risk or uncertainty exists. Explicit direct never
overrides mandatory isolation or protected-branch rules. For Commander, select
the repository's safe contributor workflow, normally worktree, without making
them choose a technical mode. Explain a disallowed mode in plain language.
## Engage
`MISSION-ID engage` begins or resumes an authorised, briefed mission. Confirm
the selected ID and mode, accepted scope, required decisions/dependencies,
repository status, other unfinished missions, and the intended branch/worktree
before editing. Create or reuse only the worktree authorised by the selected
mode. Follow project instructions and approved design, preserve unrelated work,
validate the candidate, and keep state and handoff current. Isolated checks do
not establish integrated success. A direct request to implement without the
exact phrase can also authorise work under repository policy; preserve the same
preflight and gates.
## Complete
`MISSION-ID complete` starts finalisation for that exact mission. It is a
person's readiness signal, not a shortcut to Verified / Closed. Identify the
worktree and baseline; inspect staged, unstaged, untracked and temporary files;
check scope, likely secrets, acceptance criteria, automated and manual testing;
stage only intended changes; commit where authorised; record commits and
evidence; then apply the role's review or integration authority. Stop on a
failed gate, preserve recoverable work, and report the actual state. Never
claim mission accomplished solely because Git succeeded.
For a Captain-issued complete, the exact command can authorise routine
finalisation and integration into the designated development/integration branch
when the repository permits it and source, target, scope and checks are clear.
Inspect branch protection and unrelated changes first. Merge with the
repository's strategy, preserve history, run combined tests and affected
workflow checks, and record the integration commit. If the target is protected,
the source/target is ambiguous, a required gate fails, or repository policy
requires a separate approval, stop before that operation and present the
concrete candidate. A completed direct-branch change still needs combined
verification and human acceptance. Never infer permission to push, deploy,
force-push, reset, or bypass protection from `complete`.
For Commander-issued complete, follow `bortstack-contributor/references/review-handoff.md`:
verify the exact candidate, commit/push/submit review where authorised, and
report **mission awaiting Captain review** only after submission is verified.
It never authorises a contributor merge, deployment, or closure. Existing
natural completion language starts the same sequence.
`complete review-only` prepares and verifies the review handoff, stopping
before merge and closure even for Captain. `complete no-cleanup` performs the
otherwise authorised finalisation but retains eligible mission worktrees,
containers and temporary resources. Without that option, cleanup is still
limited to resources explicitly owned by the mission and eligible under
repository policy after verified integration and acceptance. Never delete a
dirty/unintegrated worktree, persistent data, or unrelated resources. Retain
contributor-created manual-test containers until Commander explicitly asks for
their removal, including after mission completion. Record what was retained or
removed and the actual final state.
@@ -0,0 +1,9 @@
# Snapshot command contract
Inspect repository scripts and `AGENTS.md` before use. Preserve a working local implementation.
`scripts/create-chatgpt-snapshot.sh` creates a portable ZIP from the **intended source worktree**, including staged, unstaged, and permitted untracked changes. It excludes Git metadata, test worktrees, old snapshots, dependencies, caches, builds, local databases, `.env*`, keys, and credentials. Audit archive contents before sharing. Report path, source branch, and uncommitted state.
`scripts/testtask.sh <repository-task-id|branch-name>` prepares or invokes a disposable manual-test candidate for the given task when the repository supports both forms. Determine supported arguments from the repository's script or `--help`; historical task IDs remain valid. Resolve the identifier to one task, branch, and existing worktree; report unknown, ambiguous, or missing-worktree cases without guessing. Its candidate must match the source branch's tracked changes and permitted untracked files without forcing a commit or checking the same branch out twice. A stale candidate must be refreshed after edits. Runtime startup, readiness, ports, and cleanup are project-specific. Missing engine or runtime means **provisioned but blocked**, not operational. Never delete unfinished work or unrelated containers.
For new projects, provision both entry points and adapt testtask to the actual stack. For retrofits, inspect and retain working scripts. Keep test artifacts out of Git. Record actual validation and remaining dependencies in handoff.
@@ -0,0 +1,44 @@
# Shared task lifecycle
This is the canonical lifecycle for `bortstack-context`. Repository rules may use different labels, but must preserve these gates. Contributor, design, and new-project skills refer here instead of defining competing states. The task record is authoritative; Git and provider state are evidence to inspect, not a substitute for it.
`mission-commands.md` is the user-facing command interface to these states.
It changes terminology and conversation flow without changing IDs, files,
record formats, state gates or Git authority.
## States and evidence
| State | Entry evidence | Permitted next state |
| --- | --- | --- |
| Created | Unique stable ID, scope, owner, dependencies, acceptance criteria; no implementation authority implied | In Progress, Blocked / Suspended |
| In Progress | Authorised task, assigned branch/worktree or explicitly authorised direct branch, baseline commit, integration target, relevant dependencies; application-feature destination recorded before implementation | Implementation Complete, Blocked / Suspended |
| Implementation Complete | Candidate diff reviewed, implementation commit or exact uncommitted state recorded, applicable automated checks recorded; application features implemented at the recorded authoritative integration point | Testing, Blocked / Suspended |
| Testing | Exact candidate and manual-test environment identified, result or outstanding test gate recorded; application features exercised at the real application route | Implementation Complete for fixes, Ready for Review / Integration, Blocked / Suspended |
| Ready for Review / Integration | Required tests passed or an explicit accepted exception to a nonmandatory check (never the application-feature real-route gate); intended files committed; branch and commit recorded; push and PR verified where the provider supports them, or a repository-approved local review handoff acknowledged | In Progress for requested changes, Integrated after Captain approval and combined verification, Blocked / Suspended |
| Integrated | Captain-authorised integration commit on designated target, combined application tests and affected workflow checks passed, conflicts resolved without discarding work | Verified / Closed, In Progress for reconciliation if later verification fails |
| Verified / Closed | Required acceptance criteria and human acceptance recorded, integration evidence linked, task-owned cleanup performed only when authorised | Terminal; reopen through an explicit new record or documented correction |
| Blocked / Suspended | Actual step, reason, preserved branch/worktree/commit, owner and resumption action recorded | Previous active state after blocker resolution, or an explicitly authorised replacement state |
Implementation Complete never means Integrated. A passing isolated test, Docker startup, screenshot, standalone preview, contributor appearance approval, commit, PR, or Git merge alone cannot close an application-feature task. A failed combined-application check leaves the task open; record the merge candidate and failure, and return to In Progress for reconciliation or Blocked / Suspended. Never rewrite a successful state merely to hide failed evidence. **Prototype Complete** is an acceptance outcome for an explicitly approved standalone prototype, not a replacement lifecycle state or evidence that an application feature is implemented. Record a later application integration as separate work with its own verification.
## Required task record
Record the task ID, state, owner, branch and worktree, baseline commit, integration target, dependencies, implementation commit, provider remote and PR reference where applicable, isolated automated and manual tests, Captain approval, integration commit, combined tests and affected UI/API/dependency checks, acceptance outcome, and any cleanup instruction. Use `not applicable` or `pending` rather than inventing a value. Keep private credentials out of records. For a direct-branch task, record that authorisation and use `not applicable` for the separate worktree/PR fields.
For an application feature, also record its authoritative frontend/backend as applicable, route or entry point, actual navigation path, implementation locations, backend/data and auth/permission requirements, accepted design, real development/test environment, and source baseline. Separate isolated build/test evidence, real-route manual evidence, review submission, integration approval/commit, and post-integration combined-route evidence. State unperformed checks as **unverified**, with a blocker; do not waive a mandatory feature criterion silently. A preview is evidence for a prototype or visual exploration only. Do not claim Ready for Review / Integration until the feature's actual route and required navigation, backend, state, auth and data behavior have been checked in the authoritative development application. Do not claim Integrated until combined-application checks have passed after Captain-authorised integration, or Verified / Closed until required human acceptance is recorded. These fields extend the existing task record; they do not create a second state machine or require a new file format.
## Start and finalisation gates
Before starting another implementation, inspect all worktrees and status, task records and handoffs. A prior task may be left pending review while an independent task starts, but its intended work must be committed and submitted for review, integrated, or explicitly suspended with exact recoverable state. Do not abandon a finished uncommitted worktree. Parallel tasks may use different branches from the latest appropriate integration baseline; record dependencies and targets. Do not use another task's unintegrated commit as an implicit baseline.
When a contributor says the task is complete or testing works, the contributor skill starts the finalisation sequence automatically. Verify the task and manual test result; inspect staged, unstaged and untracked paths, conflicts and likely secrets; run required checks; stage only intended files; commit; push and create/update a PR when supported; verify the remote commit and PR; record evidence and transition to Ready for Review / Integration. A completion statement is authority for ordinary task finalisation under the repository's contributor policy, not authority to merge, deploy, force-push, delete test resources, or change provider settings. If a gate fails, preserve everything and record the actual state. Stop automated repair after two unsuccessful attempts on the same failure.
Captain approval is required before merging a contributor PR. After approval, identify the designated integration target and current baseline, integrate using repository policy, resolve conflicts without silently losing changes, run automated checks and exercise the affected real routes, navigation, auth/permissions, backend/data and shared workflows in the combined application as relevant, then record integration commit and results. Only then mark Integrated. A successful Git merge without that functional evidence remains open for validation or reconciliation; if checks fail, preserve source branches/worktrees and the merge candidate. Human acceptance and remaining criteria control Verified / Closed. Never use destructive reset, forced push, or destructive worktree cleanup without explicit Captain approval. Keep pending-review branches and worktrees recoverable.
## Identifiers and reconciliation
New IDs follow the repository's documented project prefix and sequence, for example `PI-042`, `RB-018`, or Forge's historical `FORGE-F###`. Inventory existing task records before allocation. Recognise `TASK-001` and other historical IDs without changing them. Compare IDs from both sides before task-record integration; `scripts/context_audit.py` or an equivalent read-only check reports duplicate headings and locations. Pause the affected task-record merge and warn Captain. If a true collision needs resolution, Captain chooses which record keeps its ID and authorises a new unused ID for the other. Search the affected branch/worktree for task headings, filenames, branch names, handoffs, decisions, PR text and references; preview the exact replacements, update them consistently, then repeat collision and reference checks. Never rewrite historical records automatically or run a central allocator.
## Test resources and platforms
Record individual task tests separately from combined integration tests. Keep contributor-created temporary Docker containers available until the contributor explicitly requests removal, subject to safety constraints; task completion alone is not cleanup authority. Use platform-independent Git operations and paths, quote paths with spaces, and provide PowerShell/Bash variants where commands differ. Do not infer Windows compatibility from Linux checks; JJ's Codex CLI, Git and Docker finalisation path must be exercised on Windows before declaring the contributor skill production-ready.
+1 -1
View File
@@ -1,3 +1,3 @@
# bortstack-contributor # bortstack-contributor
Reserved for a separate implementation task. No SKILL.md is provided. Contributor skill. `SKILL.md` guides Commander through scoped work and conversational completion; `references/review-handoff.md` defines Codex's automatic review submission and Captain-controlled integration sequence. Shared states and evidence belong to `bortstack-context`.
+38
View File
@@ -0,0 +1,38 @@
---
name: bortstack-contributor
description: Guide an authorised contributor through mission briefing, scoped implementation, validation, and Captain review handoff under Bortstack Context.
---
# Bortstack Contributor
Use with `bortstack-context`; its `references/task-lifecycle.md` and repository `AGENTS.md` own records, task states, branches, worktrees, design approvals, integration evidence, and completion. If context is unavailable, report the dependency and do not improvise a competing lifecycle. This skill provides a plain-language contributor interface. Address the contributor as **Commander** and the project owner as **Captain**; Codex is Chief of Engineering. Keep the tone restrained and the status precise. Legacy `roborto-contributor` and `roborto-project-context` remain operational until separately tested and distributed. Do not modify installed skills or historical task IDs.
## Discussion-first Commander guidance
Follow `bortstack-context/references/discussion-first.md`. Answer Commander questions directly; a question or agreement does not itself authorise a new mission or unrelated implementation. For a yes/no question, begin with Yes or No and explain briefly if necessary. Do not generate unsolicited implementation instructions, plans, or changes. When Commander asks a question during an already engaged mission, answer it and continue only the already authorised mission work; do not make a new architectural decision or broaden scope. Keep the existing proactive testing and review-submission guidance for genuinely completed missions, including recognised natural-language completion statements. If an extra action would go beyond the request, ask first in plain language.
## Orient and select work
Read the repository's `AGENTS.md` and maintained context files, inspect Git status, worktrees, task scope, and relevant code before changing files. Identify the integration branch and current task branch. Preserve unrelated and untracked changes. Use the project-specific task ID convention; reconcile historical IDs through context's collision check before importing records.
The Commander may create, refine, or split tasks from real requirements, accepted design decisions, or verified issues. Check for duplicates, define scope, non-goals, acceptance, dependencies, and status; task creation does not authorise implementation. The Commander may make in-scope product and visual decisions. Escalate security/auth, broad database architecture, privacy/legal, commercial commitments, destructive data changes, and production operations to Captain. Profile does not imply ownership or contributor permission; read the project's explicit permissions.
Use **mission** in user-facing conversation; preserve technical task IDs, filenames and historical records. Read `bortstack-context/references/mission-commands.md` for `missions`, `mission status`, and `MISSION-ID action [options]`. `set course` and `lock on` both select and brief without implementation; record the selected mission and mode, then invite `MISSION-ID engage`. Default to the repository's safe contributor worktree mode without asking Commander to choose Git mechanics. If Commander requests direct work without authority, explain the permitted route. `engage` implements a briefed, accepted mission in its authorised worktree. A read-only design contribution need not create a worktree; file changes do. A design-dependent implementation needs an approved design or recorded explicit override under context. Use the smallest relevant specialist skill for UI design, feature work, debugging, or visual QA.
### Discover the application destination before engage
For an application-feature mission, inspect the actual repository and establish: (1) authoritative frontend and backend, where applicable; (2) routing mechanism; (3) intended route or entry point; (4) existing screens/components to extend or replace; (5) how users reach it through real navigation; (6) authentication, authorisation and application-state needs; (7) backend services and persistent data; (8) established development environment and manual-test workflow; and (9) architecture conventions and relevant tests. Record findings in the mission briefing or existing task/handoff record, including the feature objective, accepted design or override, integration baseline, and acceptance criteria. Use the project's own framework and scripts; React, Flask, Docker and a browser are examples, not assumptions. If authoritative boundaries or the route remain ambiguous, resolve them with the project authority before implementation; do not invite `engage` as though the destination is known. Explain simply: “Commander, this mission adds a screen to the existing application. I'll identify where it belongs and connect it to the application's navigation before we test it.”
Classify the approved deliverable in the briefing. An **application-feature mission** delivers working functionality within the authoritative application at its recorded integration point. A standalone preview, playground, mock-only application, independent navigation system, or iframe-connected demonstration cannot substitute for that work, even when it looks correct or is easier to build. Do not create a separate application for convenience. An explicitly requested design exploration, proof of concept, isolated experiment, or intentionally standalone deliverable is a **prototype mission**; label it and its acceptance criteria as a prototype. It may reach **Prototype Complete** as an acceptance outcome, but later integration is separate implementation and verification. Preserve useful prototypes. Tell Commander what they will receive in ordinary language, without requiring them to understand routing or backend architecture. Before editing an application feature, confirm that the project's real development environment and manual-test workflow are identifiable and can be prepared; record an infrastructure blocker if they cannot.
## Test and handoff
Run the checks the repository requires and inspect the exact candidate diff. If the project provides `scripts/testtask.sh`, inspect its help and configuration before use. Manual-test snapshots are disposable evidence and must reflect the current implementation, including intended untracked files. Refresh after edits. Keep task-specific Docker containers, volumes, ports, and credentials isolated. Never touch unrelated services or production data. Keep contributor-created manual-test containers available until Commander explicitly requests cleanup, subject to safety constraints; remove only resources the task runner owns.
For an application feature, identify or launch the **authoritative development application** through the project's established manual-testing workflow before review submission. Reuse `testtask.sh` when applicable; it prepares or identifies a manual-test candidate and is not an automated test runner. Verify the intended route through normal application navigation, correct login and user/team permissions where relevant, actual configured backend data, shared state, persistence, related navigation, accepted-design fidelity, and affected regressions. Record exact candidate, environment, route, observations and limitations. A standalone preview port, successful Docker startup, isolated build/unit tests, or design-matching screenshot does not verify the feature inside the application. If the real application cannot be run or a mandatory check cannot be performed, record it as unverified and keep the mission before Ready for Review / Integration until the blocker is resolved. Never invent evidence. Ask Commander to inspect the main application through its normal menu, then describe what passed or is blocked in plain language.
When Commander says `MISSION-ID complete`, "task complete", "finished testing", "everything works", or equivalent, automatically start `references/review-handoff.md`. `complete review-only` still prepares review without merge; `complete no-cleanup` retains eligible temporary resources. Treat a completion statement as confirmation of manual testing only when it unambiguously refers to the exact candidate; otherwise ask one plain-language question and continue independent checks. Codex identifies the mission/worktree, checks staged, unstaged and untracked files, conflicts and likely secrets, runs required validation, stages only intended files, commits, pushes and opens or updates a PR where supported, verifies submission, records evidence, and asks Captain to review. Ordinary mission finalisation does not need Captain intervention. The Commander need not operate Git manually. If a gate fails, preserve all work, explain whether it is safely saved and the next safe action, and stop after two unsuccessful repair attempts for the same failure. A new independent mission can begin once the previous one is submitted for review, integrated, or explicitly suspended with recoverable work. Never merge a Commander's PR without Captain approval. Clean a mission worktree only after verified integration and recorded acceptance; leave temporary manual-test Docker containers available until Commander explicitly requests removal.
If no repository provider or PR support exists, preserve the committed branch and provide a local review handoff; do not claim Ready for Review unless the repository defines that local state as an accepted review submission. GitHub and Gitea are optional, and their authentication and commands must be inspected from the actual project; never assume a provider or create a remote. Do not force-push, rebase shared work, or deploy.
Speak to Commander in ordinary language. For success: "Commander, your changes passed testing and are saved. Your mission is awaiting Captain review. You can begin another independent mission." Use this only after verifying the submission and real-route gate for an application feature. If a preview works but integration does not: "The preview is working, but the feature has not yet been connected to the main application. This mission is not ready for completion. I'll continue with the required integration." On failure, state the problem, whether the work is saved, and one safe next step; give Git details only if requested. Guide decisions rather than asking Commander to remember Git commands. For status reports, state mission ID, actual implementation destination/route, checks, manual-test freshness, review submission, integration status, blocker, and next action; include branch/worktree details when useful or requested. Never call a preview-only application feature fully implemented. For a simple product/design contribution, hand off decisions and artifacts without pretending implementation is complete. Windows operation with JJ's Codex CLI, Git and Docker remains an explicit production-readiness gate; Linux tests alone do not satisfy it.
@@ -0,0 +1,21 @@
# Contributor review and integration handoff
Use `bortstack-context/references/task-lifecycle.md` for states, evidence and approval gates, and `bortstack-context/references/mission-commands.md` for conversational commands. Follow repository `AGENTS.md` and actual provider configuration. This sequence starts automatically when Commander reports mission completion, including `MISSION-ID complete` or familiar natural language. If the mission is unclear, ask which one before staging or committing. `complete review-only` stops before integration and closure; `complete no-cleanup` retains eligible resources. Contributor finalisation is not authority for merge, deployment, destructive recovery or test-resource cleanup.
## Submit the completed task
1. Identify the active task, approved deliverable type (prototype or application feature), accepted scope, source worktree, task branch, baseline commit, integration target, and any parallel task branches. For an application feature, compare the implementation locations and intended route with the authoritative application identified in the briefing. If ambiguous, resolve it before claiming Implementation Complete or asking Commander to accept the result; preserve all work meanwhile.
2. Confirm the required manual test covered the exact current candidate. For an application feature, launch or identify the real development application through its established manual-testing workflow and verify the intended route through actual navigation. Check applicable login, permissions, configured backend data, shared state, persistence, related pages, design fidelity and regressions. Record environment, route, observations and every unverified check. "Everything works" may confirm Commander's observations only when the exact candidate and real application route are clear; it cannot replace Codex's integration check. Refresh the task's manual-test snapshot after edits. A preview or Docker startup alone leaves the application-feature mission incomplete. If the real route or required environment is unavailable, record the blocker and continue safe implementation or preservation work without submitting it as ready for review.
3. Inspect staged, unstaged and every untracked path; check conflicts, likely secrets, unexpected files and changes outside task scope. Preserve unrelated files. Never use an unreviewed blanket stage. Explain any needed choice without asking Commander to run Git.
4. Run repository-required automated tests, lint/build/security checks as applicable and `git diff --check`. Record commands and results. Fix only within scope and stop automated repair after two unsuccessful attempts on the same failure.
5. Update task, current state and handoff with task ID, branch/worktree, baseline, target, authoritative implementation locations and route, isolated automated results, real-route manual evidence, limitations, implementation commit when known, and integration still pending. For a prototype, label the standalone deliverable and its separate acceptance. Stage only intended files, inspect staged diff, and commit to the task branch. Verify the commit and remaining working-tree status. A dirty worktree may contain preserved unrelated work; record it explicitly.
6. Inspect the configured remote and provider capability. Push the task branch and verify the remote commit. Create or update a PR against the designated integration branch where supported; verify its URL, source/target and status. Record branch, commit, PR reference, test evidence and Captain approval pending. Set Ready for Review / Integration only after verified submission **and** required application-delivery evidence. A repository-approved local review handoff may be used without a provider; otherwise retain the truthful pre-review state. Never invent a PR or create provider settings by assumption. A commit or PR does not turn a preview into an application feature.
7. Tell Commander in ordinary language that the work is saved and the mission is awaiting Captain review, and that another independent mission may begin. If any step fails, say what failed, whether the work is committed or only preserved in the worktree, and the next safe action. Do not claim review submission from a local commit or integration from a PR. Preserve branch, worktree and test resources.
## After Captain approval
Captain approval is required before merging a contributor PR. Identify the current designated integration branch and baseline, check task-ID collisions and dependencies, and integrate with the repository's merge strategy. Resolve conflicts without discarding others' work. Run combined-application tests and exercise affected real routes, navigation, login/permissions, APIs, persistent data, shared state and related workflows where applicable; record the integration commit and separate post-merge results. A conflict-free merge is not functional completion. Mark Integrated only when verification succeeds. If combined checks fail or cannot run, preserve the branch and merge history or candidate, record affected files and a reconciliation plan, and leave the task open. Mark Verified / Closed only after required acceptance and human confirmation. Never force-push, destructively reset, or remove an uncommitted/unintegrated worktree without explicit Captain approval. Keep task-created Docker test containers until Commander requests cleanup.
## Local-only and platform notes
GitHub and Gitea are optional. Inspect the project's provider tooling and credentials; do not assume `gh`, a remote or PR support. For local-only Git, provide Captain the committed branch and exact review instructions, then wait for an acknowledged local review handoff before Ready for Review / Integration. Use Git argument forms that handle paths with spaces. Codex performs Git operations on both Linux and Windows; Commander needs no shell commands. On Windows, inspect the actual Codex CLI, Git, provider and Docker setup and run an end-to-end finalisation test before claiming production readiness. If commands must be shown, provide PowerShell and Bash variants.
+30
View File
@@ -0,0 +1,30 @@
---
name: bortstack-design
description: Create and refine editable visual concepts, capture Captain approval through Bortstack Context, hand designs to implementation, and validate the result with optional Penpot MCP.
---
# Bortstack Design
Use with `bortstack-context`, which owns tasks, decisions, design references, approvals, overrides, and lifecycle states. If that skill is unavailable, report the missing dependency and do not invent a parallel approval system. This skill owns concept work, Penpot operations, implementation handoffs, and visual comparison. It applies to new and existing projects across frameworks and business/personal profiles. Never infer ownership or contributor authority from a profile. Preserve installed `roborto-*` skills during migration.
## Start with project boundaries
Read repository `AGENTS.md`, the six maintained context records, approved style/design sources, and the accepted task. Inspect Git status and worktrees before files change. Confirm the design belongs to this project; do not edit a separate application or production environment as an incidental pilot. Identify target screens, content, states, responsive needs, constraints, and what Captain must decide. Use a dedicated task worktree for repository changes under the context contract.
## Concepts and editable source
Generate at least two meaningfully different concepts when the task calls for alternatives. Explain the choice each concept presents. Keep shapes, text, components, and layout editable in Penpot or an importable vector source; a flattened screenshot is only a preview. Record concept IDs, source file/version, target viewport, assets/fonts, and known limitations. Inspect an existing design before editing it. Refine a selected concept in place or as a versioned duplicate, preserve unrelated elements and IDs where practical, and compare before/after structure. Never describe an importable SVG as verified editable in Penpot until import and editing have been observed.
## Optional Penpot connection
Follow `references/penpot-operations.md`. Discover the available Penpot server and MCP tools at runtime; do not assume a specific URL, port, token, or tool name. Before each design modification or resumed editing session, identify the intended file and page, confirm the editor connection, and complete a non-destructive inspection of that design. MCP service availability alone does not prove editor connectivity; only a successful inspection of the intended design establishes operational readiness. Stop mutations and follow the reference's recovery procedure when inspection or a design operation fails. MCP can create and modify native editable objects when available. If MCP is unavailable, prepare importable vector sources, use the Penpot UI for import/editing when accessible, and give Captain a precise manual path. Record which path was actually tested. Penpot absence does not block unrelated context or non-design tasks. Support local and future self-hosted Penpot on Linux and Windows without changing Forge Core.
## Approval and handoff
Present the alternatives and refined selection for **explicit Captain approval**. Ask for approval of a named design reference/version, not a vague direction. `bortstack-context` records Captain, date, task, reference/version, and any conditions in the project's task/decision files. An explicit override records who authorised it, scope, date, and rationale; it is not a blanket approval. Design-dependent implementation waits for approved design or a task-specific recorded override. Design approval does not authorise application implementation or mark its task Complete.
Use `references/implementation-handoff.md` to prepare a structured handoff: approved source and version, screens/states, dimensions and responsive rules, components, typography/colour/assets, interactions, accessibility notes, open gaps, and target implementation task. Mark unapproved concepts clearly. Do not hand off a screenshot alone when editable source is required.
## Visual validation
Compare the implementation or reference rendering to the approved design at the stated viewports and states. Check layout, spacing, typography, colour, assets, interaction states, and preservation of approved elements. Record evidence, deviations, severity, and whether Captain approved any change. Do not claim a visual match from source inspection alone. Report unavailable browsers, platforms, or implementations as pending. `bortstack-context` updates task status and handoff; only human acceptance closes the task.
@@ -0,0 +1,19 @@
# Design handoff record
Copy into the project's context/task record or a linked design handoff, then fill observed values. Keep approval in `bortstack-context` records.
| Field | Required content |
| --- | --- |
| Project and task | Repository, design task ID, implementation task ID |
| Approval | Captain, date, conditions, context-record link |
| Editable source | Penpot server/project/file/board or importable source path, version |
| Selection | Chosen concept and why; alternatives remain labelled exploratory |
| Screens and states | Desktop/mobile, loading, empty, error, focus/hover where relevant |
| Layout | Dimensions, breakpoints, grid, spacing, order, overflow |
| Visual tokens | Type, colour, icons, imagery, assets/licences |
| Behaviour | Navigation, actions, transitions, form responses |
| Accessibility | Contrast, labels, keyboard, focus, motion considerations |
| Gaps | Unspecified behavior and decisions still needed |
| Validation | Viewports, screenshots/renderings, deviations, approvals |
The handoff is implementation guidance, not permission to change application code. The implementation task follows its own acceptance and worktree gate.
@@ -0,0 +1,42 @@
# Penpot connection and fallback
Penpot is optional and outside Forge Core. Treat server URL, authentication, workspace/project/file, and MCP transport as project-specific configuration. Do not copy tokens into repository files or logs.
## MCP route
### Connection states and preflight
- **A — MCP service available:** Codex can discover or invoke the Penpot MCP service. This proves only that the service is reachable.
- **B — Editor connected:** The intended design file is open in Penpot with an active editor MCP connection. Tool discovery does not establish this state.
- **C — Design operations verified:** A non-destructive inspection completes and its result identifies the intended file and page or unmistakably matches their known design content. Only C permits modification.
Before each modification, and again after a connection interruption or extended idle period:
1. Discover the Penpot MCP service and the tools actually exposed in this session. Do not infer availability from a running container or earlier session.
2. Identify the intended project, design file, and page from the task and design references. If ambiguous, resolve the target before editing.
3. Confirm or establish the active editor MCP connection for that file using the editor UI and any connection-status operation actually exposed. Keep the intended design file open during MCP operations and maintain its active editor connection. An open tab by itself is not proof of B or C.
4. Use an exposed read-only operation to inspect the intended design, such as its page or element inventory. Do not use an edit as a connection test.
5. Check the inspection result against the intended file and page. A successful response about another file is not readiness. If the service has no reliable editor-status operation, this successful, target-verified inspection is the operational readiness check.
6. Record A/B/C readiness and the inspected file/page reference, or report the failed step as a blocker. Begin edits only at C.
Prefer keeping the Penpot tab active during extended design sessions. If operations become unreliable, reactivate the intended tab and reconnect the editor. An observed editor disconnection is evidence; browser background-tab throttling is a possible cause, not a diagnosis without further evidence. Firefox and other compatible browsers are supported; no particular browser is required. Use the configured instance rather than assuming a port or hardcoded URL.
### Safe recovery
When an inspection or modification fails because the editor may be unavailable:
1. Stop further design modifications. Preserve the last confirmed design state, file/page references, and any returned operation results. Do not assume a failed write either applied or rolled back.
2. Explain the likely editor connection issue to the contributor, distinguishing a confirmed disconnection from a possible inactive-tab interruption.
3. Ask the contributor to reactivate the intended Penpot tab and check or restore its editor MCP connection. Reopen the intended file if it was closed.
4. Repeat the non-destructive inspection and verify the intended file and page. Reconcile any uncertain prior write against the last confirmed state before retrying it.
5. Resume modifications only after State C is re-established. If inspection still fails, record the blocker and use the non-MCP route only when it fits the task and preserves editable source and approval references.
After readiness, create a versioned concept page/board or duplicate. Keep text as text and shapes as shapes. Record returned references and any unsupported operations. After refinement, inspect the result and compare its elements with the prior version. Export a preview only as evidence; retain the editable source. Record server version and platform as observed, without treating a Linux check as Windows validation.
## Non-MCP route
Prepare separate editable SVG concepts with text and vector shapes, plus a concise import/edit guide. In Penpot's UI, import each into the intended file and verify that text and shapes remain separately editable; if the import flattens or substitutes text, repair in Penpot or report the limit. Refine a versioned copy, inspect retained elements, and record file/board references. If the UI is inaccessible, preserve the SVGs and mark Penpot editability unverified. Captain can review an exported preview, but approval must identify the editable source/version.
## Platform checks
On Linux and Windows, use the repository's documented Docker/Podman setup and the configured local/self-hosted URL. Check server reachability, login, MCP discovery if enabled, native object edits, SVG import fallback, preview export, and retained elements. Windows PowerShell and Linux shells differ; describe UI actions or use the project's actual scripts rather than inventing universal commands. Report each platform separately. Do not start persistent containers, alter ports, or change server configuration merely to validate a skill.
+351
View File
@@ -0,0 +1,351 @@
---
name: code-review
description: Use when Codex needs to review an existing branch, commit range, pull request, patch, staged changes, or working-tree diff for correctness, regressions, security, authorization, API/data-contract, migration, runtime, test-coverage, and maintainability risks. Inspect repository context and surrounding code, verify findings before reporting them, prioritize issues by severity and user impact, avoid cosmetic/style nitpicks, and do not modify code unless the user explicitly asks for fixes.
---
# Code Review
Version: **2.0**.
Review code for **real engineering risk**, not stylistic preference. Ground every finding in the actual diff plus enough surrounding repository evidence to establish that the change can cause a bug, regression, security weakness, contract break, data problem, runtime failure, or material maintainability hazard.
This skill is designed to compose with `bortstack-context`. The context skill owns repository/task/decision/handoff semantics; this skill owns review methodology. Use `production-readiness-review` for a broad system-wide readiness audit rather than a bounded change review, `webapp-debug` when a reported runtime defect needs root-cause investigation, and `safe-refactor` when the goal is to change structure while preserving behavior.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core rules
1. **Read repository instructions and context first.** Obey root/nested `AGENTS.md`, accepted task scope, durable decisions, architecture conventions, validation requirements, and review-specific repository rules.
2. **Review the actual change set.** Establish exactly what is being reviewed: working tree, staged changes, branch-vs-base, commit range, PR patch, or supplied diff. Do not review an imagined change.
3. **Inspect surrounding code before raising findings.** A suspicious diff line is not enough. Check callers, routes/components, models, migrations, auth helpers, tests, configuration, and contracts needed to prove the issue.
4. **Prioritize correctness and risk.** Focus on bugs, regressions, security/auth problems, broken data/API contracts, migration hazards, concurrency/transaction issues, runtime/deployment failures, and missing tests for meaningful behavior.
5. **Do not nitpick style.** Avoid comments about formatting, naming taste, import order, minor duplication, or subjective aesthetics unless they create a concrete maintainability or correctness risk.
6. **Do not report hypothetical findings as defects.** A finding must have a plausible execution path and repository evidence. Distinguish confirmed issue, likely issue needing verification, and non-finding.
7. **Respect accepted behavior.** Do not label deliberate behavior a bug merely because another design would be preferable. Check project decisions and existing tests first.
8. **Review across layers.** For React + Flask applications, follow changes through UI/state -> request -> route/auth/validation -> domain/model -> persistence -> response -> UI handling when relevant.
9. **Treat authentication/authorization as server-side contracts.** Verify protected actions are enforced on the backend; UI hiding alone is not authorization.
10. **Treat migrations/data changes as high-risk.** Check upgrade/downgrade safety, defaults/nullability, backfills, constraints, indexes, data compatibility, and deployment ordering where relevant.
11. **Check failure paths, not only happy paths.** Errors, retries, partial failures, missing data, invalid input, unauthenticated/unauthorized access, and stale state often expose regressions.
12. **Use tests as evidence, not proof by existence.** Inspect whether tests actually exercise the changed behavior and would fail for the identified regression.
13. **Run focused validation when practical.** Tests/lint/build/static checks can strengthen or falsify review findings. Do not claim commands were run when they were not.
14. **Do not modify code by default.** A review is read-only unless the user explicitly asks to fix findings. Do not commit, push, merge, rebase, deploy, switch branches, or alter production state.
15. **Keep findings concise and actionable.** Explain what breaks, under what conditions, why the diff causes it, and what area needs correction. Do not prescribe a large redesign unless necessary.
16. **No-padding rule.** If the change is sound, say so. Do not invent low-value findings to make the review look substantial.
## Establish review scope
Before reviewing, determine:
- repository/project identity;
- current branch and working-tree state when available;
- exact base/target or commit range;
- accepted task or feature represented by the change;
- files changed;
- relevant durable decisions and contracts;
- whether generated/vendor/lock files should be reviewed or mostly excluded;
- expected validation commands;
- whether the user requested review only or review plus fixes.
If the intended base is ambiguous and choosing the wrong one could materially change the review, resolve it from repository metadata/context where possible. Ask only when it cannot be determined safely.
Review the exact requested candidate against its documented base and acceptance criteria. For direct-branch work, use its recorded starting commit and scoped changes. Include intended untracked files when reviewing a working tree. Flag stale test evidence and unrelated changes.
## 1. Read the change set before deep-diving
Inspect the diff/patch and classify changed areas, for example:
- models/schema/migrations;
- Flask routes/services/auth;
- React components/hooks/state;
- API client/contracts;
- configuration/environment/runtime;
- tests/fixtures;
- Docker/CI/deployment;
- documentation/context only.
Identify high-risk edits first: authorization changes, destructive data operations, changed routes/status codes, token/session handling, migrations, transaction behavior, concurrency, external side effects, configuration defaults, and removed validation.
Do not infer intent solely from commit messages. Compare the diff with accepted task/context evidence and current code.
## 2. Verify behavior and contracts around each risky change
For each material edit, trace enough surrounding code to answer:
- Who calls this changed code?
- What inputs can reach it?
- Which auth/authorization checks guard it?
- What data does it read/write?
- What errors/status codes are observable?
- What state transitions or side effects occur?
- Which existing contracts depend on the old behavior?
- Do frontend and backend expectations still match?
- Are existing tests sufficient to detect regression?
Search for all important symbol/path/config references before concluding a rename/removal is safe or broken.
## 3. Review by risk category
### Correctness and regressions
Look for:
- changed conditionals that invert/skip behavior;
- missing edge-case handling;
- stale state/closure issues;
- incorrect default/null/empty handling;
- wrong ordering/filtering/pagination semantics;
- off-by-one/date/time/timezone errors;
- duplicated or omitted side effects;
- changed error/status behavior;
- caller/callee signature mismatches;
- removed compatibility behavior still used elsewhere.
A finding should identify the concrete path by which behavior breaks.
### Authentication and authorization
Check:
- unauthenticated handling;
- role/ownership/tenant checks;
- object-level authorization;
- token/session refresh/revocation behavior;
- server-side enforcement for privileged actions;
- information disclosure through errors or list/detail endpoints;
- accidental weakening caused by helper/decorator changes.
Do not treat frontend route guards or hidden controls as sufficient authorization.
### Input validation and API contracts
Check:
- required/optional fields;
- type/range/format constraints;
- unknown or extra fields if contract-sensitive;
- request/response field names;
- status/error shapes;
- pagination/filter/sort semantics;
- null/empty behavior;
- backwards compatibility with existing clients;
- serialization/deserialization changes.
### Database, migrations, and transactions
Inspect both model changes and migration files. Check:
- upgrade and downgrade coherence;
- nullable/non-null transitions;
- defaults and server defaults;
- existing-row compatibility/backfills;
- foreign keys/cascades/uniqueness;
- index additions/removals;
- enum/value compatibility;
- migration ordering/dependencies;
- transaction boundaries/rollback behavior;
- race conditions around uniqueness/availability/counters;
- data loss or irreversibility.
Do not assume an ORM model change is safe because the migration file exists.
### React/frontend behavior
Check:
- route/navigation compatibility;
- prop/context/hook contracts;
- state initialization and updates;
- async race/stale response handling;
- loading/error/empty/success states;
- form payload construction and validation;
- auth/session handling;
- accessibility regressions caused by interaction changes;
- API response assumptions;
- cleanup of timers/listeners/effects where behaviorally relevant.
Do not submit purely subjective visual-design feedback in a code review unless the accepted task includes visual requirements or the diff causes a concrete usability/accessibility defect.
### Runtime/configuration/deployment
Check:
- environment variable/key renames;
- unsafe/default configuration changes;
- startup/import paths;
- Docker build/runtime assumptions;
- nginx/SWAG/Gunicorn wiring;
- CI commands and version requirements;
- secret exposure;
- migration/deploy ordering;
- health checks/ports/volumes/network names when changed.
Treat runtime contracts as public interfaces when production depends on them.
### Security beyond auth
Look for concrete risks such as:
- injection paths;
- unsafe file/path handling;
- secret/token leakage;
- overly broad CORS or trust settings;
- CSRF/session regressions where applicable;
- insecure redirects/URL handling;
- unsafe deserialization;
- sensitive data in logs/errors;
- privilege escalation;
- missing rate/abuse controls only when the changed code creates or materially worsens the exposure.
Avoid generic security boilerplate unrelated to the diff.
## 4. Review tests as part of the change
Ask whether changed behavior has adequate regression coverage.
High-value missing-test findings include:
- new privileged endpoint without non-admin/unauthenticated tests;
- changed validation without invalid-boundary tests;
- migration with no upgrade/data-compatibility check where repository practice expects one;
- bug fix with no regression test;
- changed refresh/retry/error behavior without coverage;
- new branching logic where only happy path is tested.
Do not require a test for every trivial line. Missing tests should be reported when they leave a meaningful behavior/regression unprotected.
## 5. Validate findings where practical
Use focused commands to confirm/falsify suspected issues when the environment allows, such as:
- a relevant pytest/Vitest test file;
- a small existing reproduction test;
- lint/type/build checks;
- migration inspection/upgrade in a disposable database;
- grep/search for callers/references;
- static config validation.
Do not mutate production or introduce broad fixture/data changes solely to prove a review point.
If validation is blocked, state the limitation and keep the finding proportional to the evidence.
## 6. Severity model
Use repository-specific severity conventions if they exist. Otherwise use:
### Critical
Likely severe security compromise, irreversible/catastrophic data loss, or production-wide outage with a realistic path.
### High
Material security/authorization failure, data corruption/loss, broken core workflow, migration/deployment failure, or broad regression likely to affect users.
### Medium
Real functional defect affecting a narrower path, edge case, reliability, or important maintainability issue with credible future failure risk.
### Low
Minor but concrete defect with limited impact. Use sparingly.
Do **not** assign severity merely based on how much code is involved. Severity reflects impact and likelihood.
If the repository uses P0/P1/etc. for implementation priority, do not automatically map review severity to those task priorities unless its conventions explicitly define that mapping.
## 7. Evidence standard for a finding
Every reported finding should contain enough information to answer:
1. **Where is the problem?** File/area and changed behavior.
2. **What breaks?** Concrete consequence.
3. **When does it break?** Input/state/runtime condition.
4. **Why does this change cause it?** Repository evidence and execution path.
5. **How confident are we?** Confirmed by code/tests/runtime, or limited by environment.
Avoid speculative phrasing such as "might be insecure" without tracing a credible path.
If further evidence disproves a suspected issue, drop it from the final review.
## 8. Review-only behavior
Unless the user explicitly asks for fixes:
- do not edit application files;
- do not add tests;
- do not update context docs merely because findings exist;
- do not create tasks automatically;
- do not alter task status;
- do not commit/push/comment on external PRs.
In BortStack projects, findings can be proposed for context/task treatment, but accepted task creation remains governed by that system and user/repository conventions.
If the user asks to **review and fix**, first complete the review enough to establish the issues, then apply the appropriate implementation/debug/refactor workflow. Keep review findings and changes clearly distinguishable.
## 9. Handling an empty or clean review
A valid review can result in **no findings**.
If no material issue is found:
- say that no actionable correctness/security/regression findings were identified;
- summarize what areas were inspected;
- report validation actually run;
- state relevant limitations;
- do not manufacture style comments or speculative edge cases.
## 10. Context-system interaction
In BortStack projects:
- read project context before judging intent/accepted behavior;
- respect ADR/PDR/task constraints;
- use the project’s current-state record as evidence of known issues, but verify whether the diff affects them;
- do not turn every review finding into authorised implementation work;
- do not rewrite the project’s handoff record during a review-only task unless explicitly requested or repository rules require it;
- if a finding exposes stale context, report the mismatch and let the context workflow reconcile it appropriately.
## Completion report
Lead with findings, ordered from highest to lowest severity. For each finding include:
- severity;
- concise title;
- affected file/area;
- concrete failure/risk;
- triggering conditions;
- supporting evidence;
- validation status/limitations where relevant.
Then include a short review summary:
- change set reviewed;
- repository/context evidence inspected;
- validation run;
- areas not verified;
- whether context/tasks were changed (normally no for review-only work).
Do not bury important findings below a long narrative. Do not repeat the same root cause as multiple findings unless the consequences are genuinely independent.
## When not to use this skill
Do not use this workflow for:
- broad production-readiness auditing across the whole system — use `production-readiness-review`;
- diagnosing an already observed runtime bug whose root cause is unknown — use `webapp-debug`;
- implementing a new accepted feature — use `webapp-feature`;
- behavior-preserving restructuring — use `safe-refactor`;
- visual/browser QA of rendered application behavior — use `frontend-visual-qa`;
- deployment execution/checklists — use `deployment-check`.
## Resources
- `references/review-checklist.md` — concise cross-layer review checklist.
- `references/finding-quality.md` — evidence and severity checklist for high-signal review findings.
+18
View File
@@ -0,0 +1,18 @@
interface:
display_name: code review
short_description: Use when Codex needs to review an existing branch, commit range,
pull request, patch, staged changes, or working-tree diff for correctness, regressions,
security, authorization, API/data-contract, migration, runtime, test-coverage,
and maintainability risks. Inspect repository context and surrounding code, verify
findings before reporting them, prioritize issues by severity and user impact,
avoid cosmetic/style nitpicks, and do not modify code unless the user explicitly
asks for fixes.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 20.4524C6.225 20.4524 5.53333 20.2857 4.925 19.9524C4.31667 19.6107 3.84167 19.1357 3.5 18.5274C3.16667 17.9191 3 17.2274 3 16.4524V6.45239C3 5.67739 3.16667 4.98573 3.5 4.37739C3.84167 3.76906 4.31667 3.29823 4.925 2.96489C5.53333 2.62323 6.225 2.45239 7 2.45239H17C17.775 2.45239 18.4667 2.62323 19.075 2.96489C19.6833 3.29823 20.1542 3.76906 20.4875 4.37739C20.8292 4.98573 21 5.67739 21 6.45239V16.4524C21 17.2274 20.8292 17.9191 20.4875 18.5274C20.1542 19.1357 19.6833 19.6107 19.075 19.9524C18.4667 20.2857 17.775 20.4524 17 20.4524H7Z" fill="#4D4D4D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.95981 8.77245C8.22487 8.41907 8.72648 8.34735 9.07992 8.6123C9.43319 8.87741 9.50509 9.37903 9.24008 9.73241L7.79965 11.6523L9.24008 13.5723C9.50496 13.9257 9.43325 14.4273 9.07992 14.6924C8.72654 14.9573 8.22491 14.8854 7.95981 14.5322L6.16 12.1328C5.94667 11.8484 5.94667 11.4563 6.16 11.1719L7.95981 8.77245Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6844 8.89452C12.882 8.49943 13.3625 8.33957 13.7577 8.5371C14.1526 8.73474 14.3136 9.21526 14.1161 9.61034L11.7157 14.4101C11.5181 14.8051 11.0375 14.9649 10.6424 14.7676C10.2473 14.57 10.0865 14.0895 10.284 13.6943L12.6844 8.89452Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3202 8.6123C15.6736 8.34741 16.1752 8.41908 16.4403 8.77245L18.2401 11.1719C18.4533 11.4563 18.4534 11.8484 18.2401 12.1328L16.4403 14.5322C16.1753 14.8855 15.6736 14.9571 15.3202 14.6924C14.9667 14.4273 14.8949 13.9257 15.16 13.5723L16.5995 11.6523L15.16 9.73241C14.8949 9.37896 14.9667 8.87738 15.3202 8.6123Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,49 @@
# Finding Quality and Severity
Before reporting a finding, verify:
## Evidence
- Is the issue caused or exposed by the reviewed change?
- Is there a concrete execution/data/runtime path?
- Did you inspect enough surrounding code to rule out an existing guard/helper?
- Is the behavior actually contrary to repository requirements/tests/decisions?
- Can the condition occur with realistic inputs/state?
If any answer is unknown, gather more evidence or lower confidence. Do not present speculation as fact.
## Good finding structure
**[Severity] Short title** — `file/area`
Explain the failure in one compact paragraph: the triggering condition, observed consequence, and why the changed code permits it. Mention validation evidence or limitations where useful.
## Severity prompts
### Critical
- Realistic severe compromise?
- Irreversible/catastrophic data loss?
- Production-wide outage with a direct path?
### High
- Authorization/security bypass?
- Data corruption/loss?
- Core workflow broken for common inputs?
- Migration/deployment likely to fail broadly?
### Medium
- Real but narrower functional/reliability defect?
- Edge case that affects legitimate users/data?
- Maintainability flaw with a concrete near-term failure mode?
### Low
- Minor concrete defect with limited user/operational impact?
Do not use severity as implementation priority unless repository conventions explicitly map the two.
## Reject these weak findings
- Pure naming/style preference.
- "Could maybe fail" without a path.
- Generic security advice unrelated to the diff.
- Existing behavior unchanged by the patch, unless the patch newly relies on it in an unsafe way.
- Missing tests for trivial implementation details.
- A design alternative presented as a correctness bug.
@@ -0,0 +1,57 @@
# Code Review Checklist
Use selectively based on the diff. Do not turn this into a mechanical list of comments.
## Scope and context
- Confirm branch/base/commit range or exact working-tree diff.
- Read repository instructions/context and accepted task intent.
- Identify high-risk changed areas first.
## Correctness
- Trace changed conditionals and state transitions.
- Check edge/null/empty/error cases.
- Check changed callers and public contracts.
- Verify retries/side effects are not duplicated or skipped.
## Auth/security
- Backend authentication present where required.
- Role/ownership/object authorization preserved.
- No secrets/sensitive data leaked.
- No obvious injection/path/redirect/deserialization exposure introduced.
## API/data contracts
- Request/response/status shapes remain coherent.
- Frontend/backend field expectations match.
- Validation covers boundaries and malformed input.
- Pagination/filter/order/date semantics remain stable.
## Database/migrations
- Model and migration agree.
- Existing rows survive new constraints/defaults.
- FK/unique/index/cascade semantics are intentional.
- Upgrade/deployment order is safe.
- Downgrade is coherent where repository practice requires it.
## Frontend
- Props/context/hook contracts preserved.
- Async state handles race/error/loading paths.
- Forms send correct payloads.
- Route/navigation/auth behavior remains correct.
- Interaction changes do not create obvious accessibility regressions.
## Runtime/config
- Env/config names and defaults remain compatible.
- Entry points/imports/startup commands still work.
- Docker/CI/deployment wiring matches changed paths/dependencies.
- No secret committed or logged.
## Tests
- Meaningful changed behavior has regression coverage.
- Negative/auth/error paths are tested where risk warrants it.
- Tests would actually fail for the suspected regression.
## Final signal check
- Remove speculative or stylistic findings.
- Merge duplicates sharing one root cause.
- Order findings by severity/impact.
- It is acceptable to return no findings.
+293
View File
@@ -0,0 +1,293 @@
---
name: deployment-check
description: Safely preflight, execute, verify, or assess a web-app deployment using repository and runtime evidence. Check release artifacts, configuration/secrets, migrations, containers/processes, reverse proxy/TLS, health, logs, smoke tests, backup/rollback readiness, and release recording. Production mutation requires explicit user authorization; stop on failed gates instead of improvising.
---
# Deployment Check
Version: **2.0**.
Use this skill when the user asks to prepare for, validate, perform, verify, troubleshoot, or roll back a deployment of a web application.
This skill is narrower than a production-readiness review. It answers: **can this specific release be deployed safely, and did the deployment actually succeed?**
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Related skills
- use `production-readiness-review` for broad launch readiness rather than a specific release operation;
- use `webapp-debug` if a post-deploy failure needs root-cause investigation rather than deployment gating.
Do not redefine the repository's task, decision, branch, or deployment conventions.
## Core principle
Deployment is a sequence of **gates**, not a script to force through.
At every stage ask:
- Do we know exactly what release is being deployed?
- Are configuration, secrets, data, and dependencies ready for that release?
- Is the migration path safe and recoverable?
- Can the release be verified from the user-facing path?
- Can we return to a known-good state if verification fails?
If a required gate fails, **stop**. Do not improvise destructive workarounds merely to get a green deployment.
## Deployment modes
Determine the requested mode from the user's instruction.
### Preflight
Read-only assessment before deployment. Verify readiness of the specific release and identify blockers. Do not mutate production.
### Execute
Perform the deployment only when the user has explicitly requested deployment and the required production access is available. Mutation is limited to the approved deployment scope.
### Verify
Inspect an already-performed deployment using health, logs, smoke tests, release identity, proxy/TLS, and data/migration evidence. Avoid unrelated changes.
### Rollback / recovery
Use only when explicitly requested or when the deployment plan already authorizes an automatic rollback on failed verification. Prefer the documented release-specific rollback path. Never invent rollback commands against production data.
If the user's request is ambiguous between checking and deploying, default to **Preflight**.
## Mutation authorization gate
Read the repository’s merge, release and deployment authority rules and identify the exact authorised artifact before acting. Successful source checks do not grant deployment authority.
Repository inspection, local validation, reading logs, and non-destructive health/smoke requests are normally safe.
Before any action that changes production state, confirm that the current user request explicitly authorizes that class of action. Examples include:
- pulling/restarting production containers;
- changing Compose/systemd/Kubernetes state;
- applying database migrations to production;
- updating a release/image reference;
- changing proxy configuration;
- changing DNS/TLS;
- rotating secrets;
- restoring a database;
- rollback to another release.
Authorization to "check deployment" is **not** authorization to deploy. Authorization to deploy application containers is **not** automatically authorization to change DNS, rotate credentials, or restore data.
Do not commit, push, merge, or switch branches unless the user explicitly requests it and repository rules permit it.
## Workflow
### 1. Establish release identity and topology
Read repository context and inspect deployment-relevant files. Determine, where evidence permits:
- source commit / tag / release ID;
- image name, tag, and preferably immutable digest;
- frontend/backend/database services;
- database engine and migration mechanism;
- production Compose/Kubernetes/systemd topology;
- reverse proxy and TLS termination;
- secrets/config source;
- persistent volumes/data paths;
- health/readiness mechanism;
- backup/recovery mechanism;
- expected external services;
- rollback method and previous known-good release.
Never deploy an unidentified working tree or ambiguous mutable artifact when the project requires immutable releases.
### 2. Preflight the release
Use `references/deployment-gates.md` as the coverage guide.
At minimum, verify the applicable gates:
- repository/Git state matches the intended release;
- required CI/build/test gates are satisfied or freshly rerun where practical;
- release artifacts exist and correspond to the intended source;
- runtime versions are supported;
- production config contains required keys without exposing secret values;
- no development/debug configuration is accidentally enabled;
- target ports/networks/volumes are coherent;
- database connectivity assumptions and migration head are known;
- destructive/irreversible migration risks are identified;
- current backup/recovery evidence is adequate for the planned data change;
- proxy/TLS hostnames and routing expectations are known;
- external dependencies required at startup/runtime are understood;
- disk/resource capacity has no obvious blocker when runtime access permits checking it;
- rollback target/procedure exists before changing production.
A successful syntax check is not sufficient if critical release identity, migration, or recovery gates are unknown.
### 3. Validate configuration without leaking secrets
Inspect names/presence/types and safe metadata only.
Do not echo secret contents into the response. When needed, report:
- missing key;
- unexpected source;
- empty value;
- malformed non-secret structure;
- permission/ownership issue;
- environment mismatch.
Use repository examples/schema/config code to determine requirements rather than guessing.
### 4. Treat database migrations as a separate gate
Use `references/migration-safety.md` to evaluate migration ordering, compatibility, backup and recovery.
Before production migration, inspect the actual migration(s) between current and target revisions.
Check for risks such as:
- drops/renames that lose data;
- non-null columns without safe population/default strategy;
- type conversions;
- uniqueness/foreign-key additions against existing data;
- long table rewrites/locks;
- data backfills mixed into schema change;
- one-way migrations that make application rollback unsafe;
- mismatch between application and migration release ordering.
Where supported, validate on a disposable/restored database first.
Do not rewrite existing production migration history to simplify deployment.
### 5. Execute only the documented minimal release change
In Execute mode, prefer project-defined scripts/workflows over ad-hoc commands.
Typical safe ordering may be:
1. capture current release identity and runtime state;
2. confirm recent backup/recovery gate if data changes require it;
3. fetch/pull the exact approved artifact;
4. run migration at the documented point in the release sequence;
5. replace/restart only intended services;
6. wait for health/readiness;
7. verify through the real proxy/user-facing path;
8. inspect relevant logs;
9. record the exact deployed release.
But always follow repository-specific deployment order when it differs.
Avoid `latest`-style ambiguity when immutable tags/digests are available.
### 6. Verify the deployed release
Verification must go beyond "container is running".
Where applicable, verify:
- deployed image/release identity matches the approved artifact;
- container/process state and restart loops;
- application liveness/readiness;
- database migration revision;
- user-facing HTTPS endpoint through the real reverse proxy;
- TLS certificate/hostname behavior;
- authentication/session path if safe test credentials exist;
- one or more critical read/write smoke paths appropriate to the app;
- static assets/frontend API routing;
- external service behavior needed for core flows;
- recent error/warning logs;
- backup/monitoring jobs remain healthy after deployment.
Do not create real customer/user data for smoke tests unless the project has an approved test mechanism.
### 7. Decide success, stop, or rollback
Use one of these deployment outcomes:
- **Pass** — all required gates and post-deploy verification succeeded.
- **Pass with conditions** — deployment is functioning, but explicit non-blocking limitations remain.
- **Stop before deployment** — a preflight gate failed; production was not changed.
- **Deployment failed — rollback required** — production changed and required verification failed, with a known rollback path available.
- **Deployment state uncertain** — evidence/access is insufficient to determine a safe state; avoid further mutation until state is established.
If rollback is required and authorized, use the known previous release and documented data compatibility rules. If database migration makes rollback unsafe, do not pretend application-only rollback is sufficient.
### 8. Update context after an authorized deployment
In BortStack projects, preserve durable deployment facts when appropriate, such as:
- exact deployed release/digest;
- validation result;
- new verified production state;
- blocker/failure discovered;
- rollback performed;
- task completion/blocking state;
- concise next-session handoff.
Do not store credentials, secret values, or noisy transient logs in context documentation.
Do not mark a deployment task Complete if required verification was blocked or failed.
## Failure handling rules
- Stop on an unexpected migration state before applying new migrations.
- Stop when the artifact does not match the intended release.
- Stop when required secrets/config are missing or ambiguous.
- Stop when there is no acceptable rollback/recovery path for a risky data change.
- Stop on failing health/readiness instead of hiding it with longer arbitrary sleeps.
- Inspect logs/evidence before restarting repeatedly.
- Do not disable TLS verification, auth, health checks, migrations, tests, or security controls merely to complete a deployment.
- Do not delete volumes, databases, caches, certificates, or release history unless the user explicitly authorizes the specific destructive action.
## Output format
For Preflight, start with one of:
- **Ready to deploy**
- **Ready to deploy with conditions**
- **Stop before deployment**
- **Preflight incomplete**
For Execute/Verify, start with one of:
- **Deployment passed**
- **Deployment passed with conditions**
- **Deployment failed — rollback required**
- **Deployment state uncertain**
Then report:
1. release identity and target environment;
2. repository/runtime/deployment evidence inspected;
3. preflight gate results;
4. actions actually performed (if any);
5. database/migration result;
6. service/container/process state;
7. proxy/TLS/health/smoke results;
8. relevant log findings;
9. rollback/recovery readiness or action;
10. validation limitations/unverified assumptions;
11. context/task updates made, if any;
12. exact recommended next action.
When useful, present gates as a concise table with **Pass / Fail / Blocked / Not applicable / Not verified**.
## Completion criteria
A deployment check is complete only when:
1. the intended release and environment are unambiguous;
2. applicable preflight gates were checked against real evidence;
3. production mutation, if any, was explicitly authorized;
4. migration/data risk was considered separately;
5. post-deploy verification used the real runtime/user-facing path where available;
6. release identity and rollback state are known;
7. failures/unknowns are reported honestly rather than worked around speculatively;
8. the final deployment outcome matches the evidence.
@@ -0,0 +1,16 @@
interface:
display_name: deployment check
short_description: Safely preflight, execute, verify, or assess a web-app deployment
using repository and runtime evidence. Check release artifacts, configuration/secrets,
migrations, containers/processes, reverse proxy/TLS, health, logs, smoke tests,
backup/rollback readiness, and release recording. Production mutation requires
explicit user authorization; stop on failed gates instead of improvising.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9125 21.4125C11.5292 21.8625 11.0292 22.0958 10.4125 22.1125C9.79586 22.1291 9.29586 21.9208 8.91252 21.4875C8.53752 21.0541 8.45836 20.4541 8.67503 19.6875L9.68752 16H4.57502C4.00836 16 3.56669 15.8375 3.25002 15.5125C2.93336 15.1791 2.77502 14.7791 2.77502 14.3125C2.77502 13.8375 2.92919 13.4125 3.23752 13.0375L12.1375 2.47497C12.5209 2.02497 13.0209 1.79164 13.6375 1.77497C14.2542 1.75831 14.75 1.96664 15.125 2.39997C15.5084 2.83331 15.5917 3.43331 15.375 4.19997L14.3125 7.99998H19.425C19.9917 7.99998 20.4334 8.16664 20.75 8.49997C21.075 8.83331 21.2375 9.23748 21.2375 9.71247C21.2375 10.1791 21.0792 10.5958 20.7625 10.9625L11.9125 21.4125Z" fill="#FFC93C"/>
</svg>

After

Width:  |  Height:  |  Size: 786 B

@@ -0,0 +1,74 @@
# Deployment Gates
Use this as a coverage guide. Apply only gates relevant to the repository/deployment model.
## Release identity
- Intended source commit/tag/release known
- Working tree/release source acceptable under repository rules
- Built artifact/image maps to intended source
- Immutable tag/digest available when project requires it
- Previous known-good release identified
## Validation
- Required CI gates passed
- Relevant backend tests passed
- Relevant frontend tests passed
- Lint/static checks passed or accepted findings documented
- Production build succeeds
- Container/config syntax validation succeeds
## Runtime/config
- Supported runtime versions
- Required environment keys present
- Production mode/debug settings correct
- Secrets sourced from approved location
- No secret values printed into logs/report
- Networks, ports, volumes and permissions coherent
- Resource/disk capacity acceptable where verifiable
## Database/migrations
- Current revision known
- Target revision known
- Migration delta inspected
- Existing-data constraints considered
- Lock/downtime risk considered
- Backup/recovery gate appropriate to migration risk
- Rollback compatibility understood
- Migration validated on disposable/restored DB where feasible
## Artifact/container/process
- Exact image/package exists
- Image architecture/runtime compatible
- Pull/build succeeds
- Services start without restart loop
- Health/readiness becomes healthy
- Persistent volumes remain mounted correctly
## Reverse proxy/TLS
- Expected hostname known
- Proxy routes to correct service/port/network
- HTTPS works through the real public/internal entry point
- Certificate valid for hostname
- HTTP→HTTPS behavior correct where intended
- Forwarded headers/proxy trust match app assumptions
## Smoke tests
- Landing/API health path
- Authentication path when safe test account exists
- Core protected read path
- Core write path only when approved safe test mechanism exists
- Frontend static assets/API requests
- Critical external service where required
## Logs/observability
- No new fatal/repeated error pattern
- App/proxy/database logs checked where available
- Monitoring/alerts remain active
- Backup timer/job still healthy
## Rollback/recovery
- Previous release known
- Command/workflow documented
- Application rollback compatible with new schema
- Data restore authority and backup location known for destructive failure
- Exact deployed release recorded
@@ -0,0 +1,22 @@
# Migration Safety Notes
Treat migrations as a production data operation, not merely part of container startup.
Before applying a migration, inspect the revisions between current and target state. Pay special attention to:
- dropping tables/columns/indexes/constraints;
- renaming without compatibility window;
- adding required columns to populated tables;
- new unique constraints over existing data;
- foreign keys with orphaned historical rows;
- enum/type narrowing or conversion;
- large backfills or full-table rewrites;
- long-running DDL/lock behavior;
- application versions that cannot operate before/after the migration;
- downgrade steps that do not restore lost data.
Prefer expand/migrate/contract patterns for changes that must support rolling or reversible deployments.
A syntactically valid migration is not proof that it is safe against production data.
If migration validation cannot be performed, report the exact uncertainty and do not call the data gate passed.
+476
View File
@@ -0,0 +1,476 @@
---
name: frontend-ui-design
description: Specify implementation-level layout, information hierarchy, interactions, components, responsive behavior and UI states within an approved web design direction. Use existing design systems and component patterns, including React-Bootstrap when present. Route BortStack concept exploration, design approval and design handoff to bortstack-design, implementation to webapp-feature, and browser verification to frontend-visual-qa.
---
# Frontend UI Design
Version: **2.0**.
Design the user interface **before implementation interrupts the engineering flow**. Turn a feature/page requirement into an implementation-ready composition: information hierarchy, page regions, actions, responsive behavior, states, suitable reusable components, and accessibility/interaction expectations.
Use `bortstack-design` for BortStack concepts, approval and design handoff. Use `webapp-feature` for authorised implementation and `frontend-visual-qa` for independent browser verification. For project scaffolding, use `roborto-new-project` as the temporary route.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core operating rule
Default to a read-only implementation specification. Start with the project's visual authority, such as approved design source/version, tokens, component and layout guides, and established screens. In BortStack, obtain the approved handoff or confirm a recorded, task-specific override through `bortstack-context` before design-dependent implementation. Route missing direction, material departures, concept alternatives and approval back to `bortstack-design`. A request to design and implement together still follows the project's approval and implementation gates.
Outside BortStack, use the project's design and approval process. If there is no design system, use restrained local component and layout defaults within the user's agreed direction and surface decisions that need agreement.
## Core rules
1. **Read repository instructions and UI context first.** Obey `AGENTS.md`, maintained project records, task scope, approved screenshots/mockups, design-system docs, component-library docs, layout guides, existing pages, and repository conventions.
2. **Design around the user's task, not visual novelty.** Optimize clarity, hierarchy, usability, consistency, responsiveness, and implementation practicality.
3. **Extend before redesigning.** If the application already has an approved visual language, compose the new UI from it. Do not modernize or restyle the application without explicit authorization.
4. **Resolve local defaults within the approved direction.** Use restrained, conventional UI/UX patterns when that direction leaves an implementation detail open.
5. **Prefer existing components.** Reuse shared components and existing React-Bootstrap patterns before proposing new primitives.
6. **React-Bootstrap is the preferred foundation when the repository uses it.** Prefer its layout/form/navigation/feedback primitives and Bootstrap responsive conventions rather than recreating generic UI controls from scratch.
7. **Do not force Bootstrap aesthetics.** React-Bootstrap provides structure and behavior; the project's visual tokens, SCSS/modules, typography, colors, spacing, and established components define the application's identity.
8. **Design all relevant states.** Do not specify only the ideal populated state. Consider loading, empty, error, validation, success, disabled, permission, destructive-confirmation, and responsive states as applicable.
9. **Design responsive behavior explicitly.** State what changes at broad desktop, intermediate/tablet, and narrow/mobile widths where relevant. Do not rely on “Bootstrap will handle it”.
10. **Use semantic interaction patterns.** Buttons should be actions, links should navigate, fields should be labelled, destructive actions should be clear, and clickable containers should not substitute for proper controls without a justified pattern.
11. **Keep cognitive load low.** Prioritize primary actions and information. Do not expose every secondary option at equal visual weight.
12. **Choose patterns based on content and workflow.** Do not default everything to cards, tables, modals, dashboards, tabs, or sidebars.
13. **Avoid premature custom components.** Introduce a reusable component when repeated semantics/behavior justify it, not merely to reduce a few lines of JSX.
14. **Do not invent product behavior.** When the design depends on unresolved business rules, surface the decision rather than encoding an assumption into the UI.
15. **Accessibility is part of design.** Account for labels, keyboard use, focus, semantics, error communication, touch targets, content order, and non-color-only state cues from the outset.
16. **Keep implementation cost visible.** Prefer a simple composition that solves the task over an elaborate design with little user benefit.
17. **Do not commit, push, deploy, switch branches, or perform production actions unless explicitly requested.**
18. **Do not claim the design was visually verified.** That is `frontend-visual-qa`'s job after implementation.
## Determine the design mode
Use one of these modes based on repository evidence.
### Extend mode
Use when the project already has an established or approved UI language.
Inspect and preserve:
- page shell/container widths;
- navigation/header/footer patterns;
- typography hierarchy;
- spacing rhythm;
- color/theme tokens;
- button hierarchy;
- form conventions;
- cards/tables/lists;
- modal/offcanvas patterns;
- empty/loading/error conventions;
- responsive behavior;
- existing reusable components.
The new page should look like it belongs to the same application.
### Local defaults mode
Use when the approved direction leaves component or layout details open.
Specify only the local defaults needed for coherent implementation:
- page container/gutter convention;
- heading hierarchy;
- primary/secondary/destructive action hierarchy;
- form treatment;
- content grouping;
- basic spacing rhythm;
- responsive composition;
- state-feedback conventions.
Do not attempt to create an exhaustive design system unless asked.
## 1. Understand the user's job-to-be-done
Before drawing a layout in prose, determine:
- who uses this page/feature;
- what they are trying to accomplish;
- the primary action;
- secondary actions;
- information required to make the action safely;
- information that is optional/contextual;
- frequency of use;
- whether users scan, compare, edit, create, monitor, or progress through a sequence;
- whether the flow is novice-oriented, expert/data-dense, or mixed;
- key constraints from task/decisions/backend domain.
Do not start by choosing `Card`, `Table`, or `Modal`. Start with the user task and information hierarchy.
## 2. Inspect the current frontend
Read the relevant repository evidence, such as:
- React routes and page components;
- shared `Layout`, header, nav, footer, page-header components;
- React-Bootstrap imports and usage patterns;
- SCSS/CSS modules and variables/tokens;
- `DESIGN_SYSTEM.md`, `COMPONENT_LIBRARY.md`, `LAYOUT_GUIDE.md`, `STYLING.md`, or equivalents;
- existing pages serving similar jobs;
- approved screenshots/mockups;
- frontend state/data/API contracts needed to understand what information exists.
Prefer adapting an existing strong pattern when one already solves most of the problem.
## 3. Define the information hierarchy
Write the page content in priority order before composing layout.
Classify content/actions roughly as:
- **Primary** — essential goal/action or key information;
- **Secondary** — commonly useful but not dominant;
- **Supporting** — explanation, metadata, help, context;
- **Exceptional** — destructive, uncommon, advanced, or error-recovery actions.
Use hierarchy to determine placement and visual emphasis. Avoid giving every action the same button weight.
## 4. Select the interaction pattern deliberately
Choose the simplest suitable pattern.
Examples:
### List vs table
Prefer a **table** when users need to compare repeated structured attributes across rows and desktop density matters.
Prefer a **list/card/list-group composition** when entries have heterogeneous content, primary actions, or need to adapt strongly on narrow screens.
If a table is necessary on desktop but becomes unusable on mobile, specify the mobile transformation rather than simply allowing horizontal scrolling by default.
### Inline form vs modal vs dedicated page
Prefer **inline** for short, contextual edits with low interruption cost.
Prefer a **modal** for short, self-contained create/edit actions where preserving page context matters.
Prefer a **dedicated page** for complex, multi-section, high-risk, or deep-linkable forms.
Do not put long workflows in a modal merely to avoid creating a route.
### Tabs
Use tabs when several peer views belong to the same object/context and users frequently switch among them.
Do not use tabs to hide unrelated page sections or create an artificial information architecture.
### Offcanvas
Use for secondary navigation/filter/control surfaces, especially where mobile screen space matters. Do not hide primary actions in an offcanvas without reason.
### Cards
Use cards to represent meaningful grouped units. Do not wrap every section in a card by habit.
See `references/pattern-selection.md` for the decision checklist.
## 5. Compose the page
Specify page regions in reading/task order.
A common structure might be:
```text
Application shell
└── Page container
├── Page heading / context
│ ├── title
│ ├── short supporting copy if useful
│ └── primary action
├── optional controls/filter/search
├── feedback/status region
└── primary content
├── empty/loading/error/populated state
└── secondary actions/details
```
This is a starting vocabulary, not a mandatory template.
For each region state:
- purpose;
- contents;
- action hierarchy;
- alignment/grouping;
- relevant React-Bootstrap primitive or existing project component;
- responsive transformation.
## 6. Use React-Bootstrap intentionally
When the project uses React-Bootstrap, prefer the existing library before custom equivalents.
Common foundations include:
- `Container` / existing page container — outer page width/gutters;
- `Row`, `Col` — breakpoint-dependent macro grids;
- `Stack` — simple flex composition and spacing;
- `Button`, `ButtonGroup` — action hierarchy;
- `Form`, `Form.Group`, `Form.Control`, `Form.Select`, validation feedback — forms;
- `Alert` — actionable status/error feedback;
- `Spinner`, `Placeholder` — loading indication where appropriate;
- `Table` — genuinely tabular data;
- `ListGroup` — repeated list content;
- `Card` — semantically grouped content;
- `Modal` — short contextual workflows/confirmations;
- `Offcanvas` — secondary responsive surfaces;
- `Dropdown` — secondary action menus;
- `Nav`, `Navbar`, `Tabs` — navigation only when semantically appropriate;
- `Badge` — compact status/category labels;
- `Pagination` — paginated datasets;
- `Accordion` — optional/repeated disclosure content.
Prefer project wrapper components over raw React-Bootstrap when they already encode the application's style/behavior.
Do not propose a library component merely because it exists.
## 7. Define responsive behavior
Design the transformation, not just three screenshots.
For relevant regions specify:
### Broad desktop
- maximum/content width;
- horizontal grouping;
- density;
- table/grid columns;
- placement of primary action and secondary controls.
### Intermediate/tablet
- what wraps;
- what stacks;
- columns that collapse;
- navigation/filter adaptations;
- labels/actions that need more space.
### Narrow/mobile
- reading order;
- full-width vs intrinsic controls;
- whether data presentation changes form;
- compact secondary-action patterns;
- touch-target spacing;
- long text/error behavior;
- modal/offcanvas viability.
Use Bootstrap breakpoints already present in the application when possible. Do not add custom breakpoint complexity without a demonstrated need.
## 8. Define the state matrix
For each important page/region, identify applicable states:
- initial/default;
- loading;
- empty;
- populated;
- partial data;
- validation error;
- server/network error;
- permission/authorization denial;
- success/confirmation;
- disabled/submitting;
- destructive confirmation;
- stale/conflict state if the domain requires it.
Describe what the user sees and what action remains available.
Do not design errors as generic red boxes with no recovery action when the application can provide a useful next step.
See `references/ui-state-checklist.md`.
## 9. Design forms around completion, not fields
For forms:
- group fields by user intent;
- use visible labels;
- distinguish required/optional fields clearly without clutter;
- place help text near the field it explains;
- choose appropriate input types;
- preserve entered data after recoverable validation failures;
- show field-level feedback for field errors and form-level feedback for broader failures;
- make submission state clear;
- prevent accidental duplicate submission where appropriate;
- place destructive actions away from the primary success path;
- use confirmation only when consequence warrants interruption.
Do not overuse multi-step wizards for short forms. Do not make complex workflows one giant undifferentiated form.
## 10. Design actions and feedback
Make the primary action obvious but not visually overwhelming.
Prefer:
- one clear primary action per local context;
- secondary buttons/links for secondary actions;
- dropdown/overflow for infrequent peer actions when density requires it;
- explicit destructive styling/confirmation for irreversible actions;
- feedback near the action/result it belongs to;
- persistent page state after successful minor actions where appropriate rather than unnecessary navigation.
Do not hide important actions behind hover-only behavior.
## 11. Accessibility-by-design checklist
Before approval ensure the specification accounts for:
- semantic controls;
- sensible heading/content order;
- visible labels/accessibility names;
- keyboard operation;
- focus movement for modal/navigation/state changes;
- error association and understandable recovery;
- non-color-only statuses;
- adequate control/touch target sizing;
- readable wrapping/zoom/narrow-width behavior;
- content order that remains logical after responsive stacking.
Do not claim WCAG compliance from design planning alone.
## 12. Decide what should become reusable
Recommend a shared component only when one or more are true:
- the same semantic pattern already appears repeatedly;
- the new pattern will appear on several pages;
- it carries important behavior/accessibility that should be centralized;
- project consistency would materially benefit.
Examples can include:
- `PageHeader`;
- `EmptyState`;
- `StatusBadge`;
- `ConfirmActionModal`;
- domain-specific row/card primitives.
Do not create generic wrappers around every React-Bootstrap primitive.
## 13. Present the implementation specification
For a design-only pass, output a concise implementation-ready specification with these sections:
### Design mode
Extend or local defaults, with the approved reference or project pattern used.
### User goal
Who is doing what and what is primary.
### Proposed composition
A short hierarchy/tree of page regions.
### Component plan
Map each region to existing project components / React-Bootstrap primitives.
### Responsive behavior
Desktop → intermediate → mobile transformations.
### State matrix
Relevant loading/empty/error/populated/success/etc. behavior.
### Interaction/accessibility notes
Important action, keyboard, focus, confirmation, form, and semantic expectations.
### Reuse/new components
What should be reused and any justified new shared component.
### Decisions needed
Only unresolved choices that materially affect UX/implementation.
### Implementation notes
A compact specification that supplements the approved handoff and that `webapp-feature` can use for authorised implementation.
Proceed to implementation only within authorised scope and after the applicable design gate is satisfied.
## 14. When alternatives are useful
If the approved direction leaves a material implementation choice open, offer at most two or three options within it. In BortStack, route options that change the approved concept, product flow or visual direction to `bortstack-design`.
Alternatives must differ in workflow/information architecture, for example:
- dense comparison table vs responsive item-list workflow;
- split master/detail vs dedicated detail route;
- inline management vs modal-based management.
Do not present arbitrary cosmetic variations such as three different card styles.
For each alternative state:
- best fit;
- tradeoff;
- implementation/maintenance complexity;
- mobile implications.
Recommend one when evidence supports a clear choice.
## 15. If implementation is explicitly requested too
When the user explicitly asks to **design and implement** in one request:
1. complete the design reasoning first;
2. record/confirm any required decisions;
3. use `webapp-feature` methodology for implementation;
4. preserve task scope;
5. run automated validation;
6. use/recommend `frontend-visual-qa` for actual visual verification.
Do not silently collapse design and implementation into ad hoc JSX construction.
## 16. Record decisions and evidence
Keep the specification within the authorised scope. Send durable UI decisions and changes in approval back through the project’s decision process. Use `bortstack-context` for task and handoff records in BortStack. Record the approved reference/version or explicit override, open implementation decisions and the evidence needed for later QA.
## 17. Stop conditions
Stop and ask/present a decision when:
- two interaction patterns have materially different product consequences;
- required business rules are unresolved;
- the existing design source of truth conflicts internally;
- a requested design would require removing/changing established functionality;
- a responsive transformation changes what information/actions users can access;
- implementation would require a backend/API capability that does not exist and is outside the task;
- the user requested design-only and the implementation-ready specification is complete.
Do not use uncertainty as an excuse to ask about minor spacing or conventional choices that can be resolved safely from project patterns.
## 18. Completion report
For a design-only task, report:
1. design mode and evidence inspected;
2. user goal and primary action;
3. proposed layout/composition;
4. component/React-Bootstrap plan;
5. responsive behavior;
6. UI state behavior;
7. interaction/accessibility expectations;
8. reusable components proposed;
9. unresolved decisions, if any;
10. recommended next skill: normally `webapp-feature`, followed by `frontend-visual-qa` after implementation.
Do not report code changes when none were requested.
@@ -0,0 +1,12 @@
interface:
display_name: frontend ui design
short_description: Specify layout, components, responsive behavior and UI states within an approved direction.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
@@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.58 4.38996C18.05 2.86996 15.68 2.88996 14.18 4.38996L5.26999 13.33C4.25999 14.34 3.84999 14.92 3.59999 16.26L3.06999 19.56C2.88999 20.47 3.50999 21.09 4.43999 20.93L7.74999 20.39C9.06999 20.18 9.64999 19.76 10.66 18.75L19.58 9.82996C21.1 8.30996 21.12 5.93996 19.58 4.40996V4.38996Z" fill="#FEBD08"/>
<path d="M19.58 9.81997C21.1 8.29997 21.12 5.92997 19.58 4.39997C18.05 2.87997 15.68 2.89997 14.18 4.39997L13.77 4.80997L19.18 10.22L19.58 9.81997Z" fill="#FF928C"/>
<path d="M13.7694 4.81308L12.3552 6.22729L17.7646 11.6367L19.1788 10.2224L13.7694 4.81308Z" fill="#D9D9D9"/>
<path opacity="0.5" d="M12.36 6.22998L5.26998 13.34C4.25998 14.35 3.84998 14.93 3.59998 16.27L3.06998 19.57C2.97998 20.02 3.08998 20.4 3.32998 20.65L15.05 8.92998L12.36 6.22998Z" fill="white"/>
<path d="M4.60001 14.05C4.06001 14.69 3.79001 15.27 3.60001 16.26L3.51001 16.81L7.18001 20.48L7.75001 20.39C8.74001 20.23 9.31001 19.96 9.95001 19.41L4.60001 14.05Z" fill="#FFDDBC"/>
<path d="M3.50999 16.8101L3.06999 19.5601C2.88999 20.4701 3.50999 21.0901 4.43999 20.9301L7.17999 20.4801L3.50999 16.8101Z" fill="#4D4D4D"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,41 @@
# UI Pattern Selection Checklist
Use this as a quick decision aid, not a mandatory recipe.
## Table
Use when users need to compare several repeated fields across many records and density matters.
Avoid when each item has very different content or the mobile transformation becomes unusable.
## List / ListGroup
Use for scan-friendly repeated items with one main identity and a small set of secondary metadata/actions.
## Cards
Use when each item/section is a meaningful grouped unit with heterogeneous content.
Avoid wrapping every page section in a card by default.
## Dedicated form page
Use for complex, deep-linkable, high-risk, or multi-section create/edit workflows.
## Modal
Use for short self-contained actions where preserving page context helps.
Avoid long forms, multi-step workflows, and tasks users may need to bookmark/deep-link.
## Offcanvas
Use for secondary navigation/filter/control surfaces where responsive space is constrained.
Do not hide primary workflow actions without reason.
## Tabs
Use for peer views within the same object/context with frequent switching.
Avoid using tabs as a substitute for proper information hierarchy.
## Accordion
Use for optional disclosure where users usually need only a subset of sections.
Avoid hiding core task information behind collapsed panels.
## Wizard / steps
Use when later inputs genuinely depend on earlier decisions, the task is long/high-risk, or progress framing materially helps.
Avoid for short forms that can be completed and reviewed on one page.
## Master/detail split
Use when users frequently scan a collection and inspect multiple items without losing collection context.
Consider dedicated routes when deep linking, mobile use, or complex detail content matters more.
@@ -0,0 +1,35 @@
# UI State Checklist
Only include states relevant to the page/workflow.
## Data/display
- initial/default
- loading
- empty
- populated
- partial/incomplete data
- stale/conflict if applicable
## Form/action
- untouched
- editing
- validation failure
- submitting/disabled
- server/network failure
- success/confirmation
- destructive confirmation
## Access
- unauthenticated
- unauthorized/permission denied
- feature unavailable/blocked where legitimate
## Responsive
For each important state, ensure content/action order remains sensible after stacking or collapsing.
## For each state answer
- What does the user see?
- What is the primary available action?
- Can they recover without losing useful work?
- Is status conveyed by more than color alone where needed?
- Does the layout still work with realistic long text/errors/data?
+292
View File
@@ -0,0 +1,292 @@
---
name: frontend-visual-qa
description: Use when Codex needs to verify or improve the user-visible quality of a web frontend after implementation, especially React applications; when the task involves exercising real routes and workflows, responsive layout, forms, navigation, loading/error/empty states, browser console and network failures, accessibility basics, visual regressions, or comparing implementation against an approved design/source of truth. This skill is for evidence-based QA and narrowly scoped fixes, not unsolicited redesign.
---
# Frontend Visual QA
Version: **2.0**.
Verify the frontend as a user experiences it. Do not declare a UI task complete merely because tests, lint, or `npm build` pass. Exercise the relevant routes and workflows in a browser-capable environment when available, inspect visual/runtime evidence, fix only confirmed in-scope defects, re-check the affected states, and report what was and was not verified.
This skill is designed to compose with `bortstack-context` and `webapp-feature`/`webapp-debug`. The context skill owns project/task/decision/handoff semantics. Feature/debug skills own implementation/root-cause workflow. This skill owns **frontend experiential verification**.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core rules
1. **Read repository instructions and design context first.** Obey `AGENTS.md`, project context, existing design-system/component/layout docs, task acceptance criteria, screenshots/mockups explicitly approved by the user, and repository-specific frontend validation commands.
2. **Preserve the approved design.** Visual QA is not permission to redesign, restyle, modernize, simplify, or add controls/content that were not requested.
3. **Exercise the real UI when practical.** Prefer a browser against the actual local/test app over reasoning solely from JSX/CSS or successful builds.
4. **Verify states, not just pages.** Check relevant default, loading, empty, populated, validation-error, server-error, disabled, success, authenticated/unauthenticated, expanded/collapsed, and responsive states where the workflow supports them.
5. **Check runtime evidence.** Browser console errors, failed network requests, uncaught exceptions, broken assets, hydration/runtime warnings, and API failures are QA findings even when the layout looks correct.
6. **Use representative viewports.** At minimum test the task's supported desktop and narrow/mobile layouts when responsive behavior is relevant; include tablet/intermediate widths when the layout has breakpoint-sensitive composition.
7. **Fix only evidence-backed, in-scope defects.** Do not perform opportunistic design polish or component refactors while checking one feature.
8. **Respect visual source-of-truth order.** Approved project screenshots/design docs/user decisions outrank generic aesthetic preference. Existing working conventions outrank invented alternatives.
9. **Do not hide application defects with CSS.** Trace functional failures to the appropriate frontend/backend layer and hand off to `webapp-debug` when root cause is not a visual implementation issue.
10. **Accessibility checks are practical, not ceremonial.** Verify keyboard reachability, labels/names, focus visibility, semantic controls, obvious contrast/readability, and basic screen-size robustness when relevant. Do not claim formal WCAG compliance unless it was actually audited.
11. **Capture before/after evidence where tooling permits.** Screenshots, DOM/state observations, console/network evidence, and exact reproduction steps are preferable to vague statements such as “looks good”.
12. **Re-run the exact failing state after a fix.** Then run relevant automated frontend checks/builds.
13. **Do not commit, push, deploy, switch branches, or start another task unless explicitly requested.**
14. **Report limitations honestly.** If no browser/runtime is available, say the visual portion was not verified; static inspection/build success is not equivalent.
## Establish the QA contract
Before changing anything, determine:
- the route(s), component(s), and workflow(s) in scope;
- the accepted visual/design source of truth, if any;
- supported viewport/breakpoint expectations;
- required authentication/data state;
- which interaction states matter to the task;
- whether visual fixes are authorized or the task is verification-only;
- what automated checks exist for the frontend;
- what evidence will count as passing.
If a task says only “check the frontend”, inspect project context and the changed feature to narrow the smallest useful QA surface rather than browsing the whole application indefinitely.
When design fidelity is in scope, use the project’s approved design reference and version. In BortStack, use the `bortstack-design` handoff when applicable and respect any recorded override. Report fidelity as unverified when no comparison reference is available. Verify the exact implementation independently in the browser, through the real application route and navigation. Send design discrepancies that require a change to the approved direction back through design and context. Keep QA evidence distinct from human acceptance.
## 1. Inspect before launching
Read the relevant implementation and project conventions:
- route definitions and page/component entry points;
- shared layout/header/footer/navigation components;
- CSS/SCSS modules, tokens, variables, design-system docs;
- reusable form/input/button/card/table/modal components;
- relevant context/store/API-client code;
- existing component/frontend tests;
- environment/start/build commands;
- approved screenshots/mockups or design docs if present.
Identify expected content and responsive behavior from repository evidence. Do not infer requirements from fashionable UI patterns.
## 2. Start the app using repository conventions
Identify the exact build or working-tree candidate, including intended untracked changes where applicable. If using a repository test snapshot, verify that it reflects that candidate and refresh it before retesting fixes.
Use the project's documented local/test workflow. Prefer existing scripts/Compose/dev-server commands rather than inventing a new environment.
Before visual inspection, establish that:
- frontend loads without fatal runtime errors;
- required backend/API dependencies are available or intentionally mocked by repository convention;
- the intended route can be reached;
- required fixture/test data or account state can be established safely.
Do not mutate production data or use real credentials merely to perform visual QA.
If the runtime cannot be started, continue with available automated/static checks but report **browser visual QA blocked** rather than claiming the UI passed.
## 3. Exercise the workflow
Follow the user journey, not just the DOM structure.
For each in-scope workflow, verify as applicable:
- page entry/navigation;
- primary action;
- form entry and submission;
- client-side validation;
- backend/API validation rendering;
- loading/progress behavior;
- success confirmation and resulting state;
- empty state;
- populated/list/detail state;
- error/retry state;
- modal/dropdown/accordion/tab interactions;
- destructive-action confirmation;
- authentication/authorization presentation;
- back/refresh/deep-link behavior where relevant.
Check browser console and network activity during the workflow, not only after it.
Use `references/state-matrix.md` to avoid forgetting relevant states.
## 4. Check responsive layout deliberately
Do not equate “responsive” with “nothing visibly overflows at one phone width”.
At relevant widths inspect:
- horizontal overflow and clipped content;
- navigation collapse/wrapping;
- page gutters and container widths;
- grids/cards/tables/forms stacking behavior;
- controls that become too narrow or overlap;
- typography wrapping/truncation;
- images/media aspect ratios;
- fixed/sticky elements covering content;
- modal/dropdown boundaries;
- long labels, validation messages, and realistic content;
- touch-target usability on narrow screens;
- vertical spacing that breaks when content wraps.
Prefer representative widths around the application's actual breakpoints. If none are documented, use a sensible broad desktop, intermediate/tablet, and narrow mobile sample and state what was tested.
Do not add new breakpoints unless evidence shows the current responsive contract cannot satisfy the task.
## 5. Check visual consistency against project conventions
Inspect only within the approved design language:
- typography hierarchy;
- spacing rhythm;
- alignment;
- component variants;
- button hierarchy;
- form-label/help/error treatment;
- card/table/list consistency;
- icon usage;
- loading/empty/error presentation;
- header/footer/layout alignment;
- light/dark theme behavior if the project supports themes.
A difference is not a defect simply because you prefer another style. Record a visual defect when it conflicts with accepted design evidence, causes usability/readability problems, or is internally inconsistent with established components.
## 6. Check browser/runtime health
During visual QA inspect, when tooling exposes them:
### Console
Look for:
- uncaught exceptions;
- React runtime warnings relevant to the workflow;
- missing-key or lifecycle/effect warnings introduced by the change;
- failed asset/module loads;
- accessibility/runtime warnings from existing tooling;
- repeated errors caused by render/request loops.
Do not fail a task solely for unrelated pre-existing warnings. Separate new/relevant findings from known baseline noise.
### Network
Check relevant requests for:
- unexpected 4xx/5xx responses;
- wrong URL/method/query/payload;
- requests firing repeatedly or not at all;
- unauthenticated/authorization failures;
- stale or incorrect response rendering;
- broken asset/font/image requests;
- CORS/CSRF/token problems;
- user actions that appear successful despite request failure.
If the UI defect originates in backend/auth/data behavior, switch to or recommend `webapp-debug`; do not mask it with frontend presentation changes.
## 7. Check practical accessibility basics
For relevant interactions, verify:
- interactive elements are actual semantic controls where practical;
- keyboard users can reach and activate primary interactions;
- focus remains visible and logically placed;
- form fields have associated accessible names/labels;
- validation/error messages are understandable and associated with the action/field where feasible;
- icon-only controls have an accessible name;
- dialogs/modals do not create obvious keyboard traps or lose focus catastrophically;
- headings/page landmarks are reasonably structured;
- content remains readable at narrow widths/zoom-like conditions;
- obvious color-only state communication has another cue where the project convention permits.
Automated accessibility tooling can supplement this, but do not claim comprehensive accessibility compliance from a quick scan.
Use `references/accessibility-basics.md` as a lightweight checklist.
## 8. Classify findings before editing
For each finding, classify it as one of:
- **Functional runtime defect** — action/request/state is wrong; often route to debugging workflow.
- **Visual/layout defect** — presentation violates task/design contract or impairs use.
- **Responsive defect** — presentation fails at supported width/state.
- **Accessibility defect** — basic interaction/name/focus/semantic problem.
- **Design discrepancy** — implementation differs from an explicit approved source of truth.
- **Pre-existing unrelated issue** — record/report without silently expanding scope.
- **Unable to verify** — environment/data/tooling prevented confirmation.
Prioritize blockers to the task's core workflow over cosmetic inconsistencies.
## 9. Make the smallest authorized fix
When fixes are in scope:
- reuse existing components/tokens/layout conventions;
- change the narrowest CSS/component/state code that explains the defect;
- preserve API/domain behavior unless that behavior is the actual defect;
- avoid global CSS changes for a local problem unless the shared primitive itself is proven wrong;
- avoid arbitrary pixel nudges that only work at the tested viewport;
- test realistic long/empty/error content after layout fixes;
- do not redesign adjacent pages for consistency unless explicitly included in scope.
If the correct fix requires a product/design decision not already established, stop at the decision boundary and present the concrete alternatives/evidence.
## 10. Re-verify after fixes
For every fixed finding:
1. repeat the exact reproduction at the viewport/state where it failed;
2. check neighboring responsive widths/states for regressions;
3. re-run the affected interaction;
4. check console/network again;
5. run targeted component/frontend tests;
6. run repository lint/type/static checks as appropriate;
7. run the production frontend build when relevant;
8. run any project-specific visual/E2E checks.
Do not substitute an automated build for re-checking a visual defect in a browser.
If the project has screenshot/visual-regression tests, update baselines only when the visual change is explicitly intended and approved. Never accept a changed baseline merely to make the test pass.
## 11. Update project context appropriately
When used with BortStack:
- follow `bortstack-context` for task status and handoff semantics;
- record significant verified frontend weaknesses in the project’s current-state record when they materially affect the documented state;
- do not turn every QA observation into authorised implementation work;
- recording follow-up work is appropriate only where project conventions/user instruction permit it;
- do not add a durable design decision merely because a small implementation detail changed.
## Completion standard
Frontend visual QA is complete only when, to the extent supported by the available environment:
- the in-scope workflow has been exercised;
- relevant viewport/state coverage has been checked;
- console/network health was inspected;
- confirmed in-scope findings were fixed or explicitly left unresolved;
- fixed findings were re-verified;
- relevant automated frontend validation passed or limitations were recorded;
- no unrelated redesign/refactor was introduced;
- context was updated when materially required.
A successful `npm build` alone does **not** satisfy this completion standard.
## Final report
Report concisely:
1. routes/workflows and design evidence inspected;
2. runtime/browser environment used;
3. viewport/state matrix actually tested;
4. findings, classified by type and severity/impact;
5. files changed and exact fixes, if fixes were authorized;
6. console/network observations;
7. accessibility checks performed;
8. automated validation and exact results;
9. anything that could not be verified;
10. final task/QA status and any context updates.
Do not claim the whole application is visually correct when only a subset was inspected.
@@ -0,0 +1,18 @@
interface:
display_name: frontend visual qa
short_description: Use when Codex needs to verify or improve the user-visible quality
of a web frontend after implementation, especially React applications; when the
task involves exercising real routes and workflows, responsive layout, forms,
navigation, loading/error/empty states, browser console and network failures,
accessibility basics, visual regressions, or comparing implementation against
an approved design/source of truth. This skill is for evidence-based QA and narrowly
scoped fixes, not unsolicited redesign.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
@@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.92676 13H4.53125C3.15054 13 2.03125 11.8807 2.03125 10.5V4.5C2.03125 3.11929 3.15054 2 4.53125 2H16.4375C17.8182 2 18.9375 3.11929 18.9375 4.5V10.5C18.9375 11.8807 17.8182 13 16.4375 13H12.0068L10.207 14.998C9.812 15.437 9.3984 15.6562 8.9668 15.6562C8.53519 15.6562 8.1216 15.4369 7.72656 14.998L5.92676 13Z" fill="#DFDFDF"/>
<path d="M14.6464 5.26147C15.0199 5.26147 15.3229 5.58414 15.3229 5.98179C15.3229 6.37943 15.0199 6.7021 14.6464 6.7021H5.78823C5.41475 6.7021 5.11169 6.37943 5.11169 5.98179C5.11169 5.58414 5.41475 5.26147 5.78823 5.26147L14.6464 5.26147Z" fill="#9B9B9B"/>
<path d="M11.3145 8.2981C11.688 8.2981 11.991 8.62076 11.991 9.01841C11.991 9.41605 11.688 9.73872 11.3145 9.73872H5.78823C5.41475 9.73872 5.11169 9.41605 5.11169 9.01841C5.11169 8.62076 5.41475 8.2981 5.78823 8.2981L11.3145 8.2981Z" fill="#9B9B9B"/>
<path d="M16.6965 16.2147C17.7098 16.2147 18.659 16.4401 19.5436 16.8904C20.4362 17.3328 21.1843 17.9443 21.7875 18.7244C22.3905 19.5044 22.7885 20.3808 22.9815 21.3537C23.0619 21.7478 22.9932 22.0578 22.7761 22.283C22.559 22.5079 22.2454 22.6203 21.8355 22.6203H11.5462C11.1362 22.6203 10.8219 22.508 10.6048 22.283C10.3876 22.0578 10.3198 21.7478 10.4003 21.3537C10.5933 20.3807 10.9912 19.5044 11.5943 18.7244C12.1974 17.9443 12.9413 17.3328 13.8259 16.8904C14.7185 16.4402 15.6753 16.2147 16.6965 16.2147Z" fill="#2EC9B0"/>
<path d="M16.6843 7.90356C17.3759 7.90356 18.0118 8.07609 18.5908 8.42189C19.1778 8.75962 19.6403 9.22216 19.978 9.80913C20.3238 10.3882 20.4964 11.024 20.4964 11.7156C20.4963 12.4071 20.3238 13.0465 19.978 13.6335C19.6403 14.2124 19.1778 14.6749 18.5908 15.0207C18.0118 15.3585 17.3759 15.5277 16.6843 15.5277C15.9928 15.5277 15.3535 15.3584 14.7665 15.0207C14.1875 14.6749 13.725 14.2125 13.3792 13.6335C13.0415 13.0465 12.8722 12.4072 12.8722 11.7156C12.8722 11.024 13.0415 10.3882 13.3792 9.80913C13.725 9.22218 14.1875 8.75961 14.7665 8.42189C15.3534 8.07617 15.9928 7.90361 16.6843 7.90356Z" fill="#2EC9B0"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1,34 @@
# Practical Accessibility Basics
This is a lightweight QA checklist, not a formal conformance audit.
## Keyboard and focus
- Primary controls are reachable with keyboard navigation.
- Buttons/links can be activated using expected keyboard behavior.
- Focus is visibly discernible.
- Focus order roughly follows the visual/task order.
- Opening/closing modal or popover interactions does not obviously strand focus.
## Names and semantics
- Inputs have labels or accessible names.
- Icon-only controls have meaningful accessible names.
- Buttons are buttons and navigation actions are links where practical.
- Headings are used as structure rather than merely visual styling.
## Errors and status
- Validation failures are understandable without relying only on color.
- Error/success messages are visible and located near the affected workflow.
- Disabled controls are not the only explanation of why an action cannot proceed when the user needs guidance.
## Responsive/readability
- Text does not disappear or become unusably clipped at narrow widths.
- Zoom-like wrapping does not cause critical controls to overlap.
- Touch-oriented controls are not obviously too small/crowded for the supported mobile layout.
## Claims
Automated scans, quick keyboard checks, or visual inspection alone do not justify claiming WCAG/ADA conformance. Report exactly what was checked.
@@ -0,0 +1,17 @@
# Frontend State Matrix
Use only the states relevant to the task. The purpose is to prevent "happy path only" QA, not to force exhaustive application-wide testing.
| Area | Candidate states |
|---|---|
| Route/page | initial load, deep link, refresh, back/forward, not-found |
| Data | loading, empty, populated, long content, stale/missing record |
| Form | pristine, focused, invalid client input, server validation error, submitting, success, duplicate submit |
| Auth | unauthenticated, authenticated permitted, authenticated forbidden, expired auth if relevant |
| Request | pending, success, expected 4xx, unexpected 5xx/network failure |
| Interactive UI | closed/open, selected/unselected, disabled/enabled, expanded/collapsed |
| Destructive action | confirmation open, cancel, confirm, failure, success |
| Responsive | broad desktop, breakpoint/intermediate, narrow/mobile |
| Theme | supported light/dark/system variants when the task touches themed UI |
For every state actually tested, note the viewport and the concrete expected/observed result.
+208
View File
@@ -0,0 +1,208 @@
---
name: production-readiness-review
description: Audit a web application for concrete production-readiness risks across security, auth, secrets, data/migrations, logging, backups, deployment, recovery, dependencies, privacy/legal obligations, testing, and operations. Use repository evidence, distinguish verified gaps from assumptions, rank findings by severity/release impact, and do not turn findings into accepted work without user approval.
---
# Production Readiness Review
Version: **2.0**.
Use this skill when the user asks whether a web application is ready for production, wants a launch audit, pre-deployment review, go-live checklist, operational risk assessment, or professionalisation review.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Review findings and release evidence
Report findings first. Distinguish fresh observations of the exact candidate from historical documentation and unverified infrastructure. Read the project's release authority rules. Record verified durable facts or create follow-up tasks only when authorised, using the project's lifecycle and records.
## Core principle
A production-readiness review is evidence-based and release-oriented.
Do not ask "could this be improved?" Ask:
- Can this fail, leak, corrupt, lock out, expose, or become unrecoverable in production?
- Is the risk real in the current code/configuration/deployment path?
- Is there evidence that the control exists and works?
- Would this block launch, require mitigation before launch, or be acceptable follow-up?
Do not manufacture findings to fill categories.
## Review workflow
### 1. Establish scope and deployment model
Read repository context and inspect the actual repository. Determine, where evidence permits:
- frontend/backend/database architecture;
- authentication and authorization model;
- deployment topology;
- reverse proxy/TLS setup;
- secrets/configuration mechanism;
- migrations/data lifecycle;
- email or third-party integrations;
- CI/CD and release process;
- backup/restore approach;
- logging/monitoring/alerting;
- user-data/privacy/legal surface;
- supported runtimes/dependencies.
If production infrastructure is external and not available, distinguish repository evidence from unverified production state.
### 2. Inspect concrete evidence
Prioritize evidence such as:
- app configuration and example env files;
- auth decorators/middleware/routes;
- models and migrations;
- error handlers;
- Docker/Compose/Nginx/SWAG/proxy config;
- CI workflows;
- dependency manifests and lockfiles;
- tests;
- operational docs/runbooks;
- backup scripts/config;
- health checks;
- log configuration;
- legal/privacy pages and data-handling code where relevant.
Do not rely on README claims when code/config says otherwise.
### 3. Evaluate the review domains
Use `references/readiness-checklist.md` as a coverage guide. Skip irrelevant domains. Use `references/finding-quality.md` to check evidence and severity.
Important domains include:
- authentication and authorization;
- session/token lifecycle;
- input validation and output handling;
- secrets and environment configuration;
- database constraints/migrations/data integrity;
- backup and restore;
- error handling and information exposure;
- logging, monitoring, alerting, and health;
- rate limits/abuse controls when the app exposes abuse-prone endpoints;
- dependency/runtime support and pinning;
- container/reverse-proxy/TLS hardening;
- CI/CD and rollback/recovery;
- email/webhook/third-party failure handling;
- privacy, retention, consent, legal pages, and data deletion where the product requires them;
- test coverage for critical flows;
- operational ownership/runbooks.
### 4. Prove findings
Every finding must include a concrete evidence path.
Good finding:
> Password-reset tokens remain valid after use because the reset route verifies the token but never revokes or rotates the associated reset state; the same token can therefore be replayed until expiry.
Weak finding:
> Consider improving password reset security.
Do not report the weak form.
### 5. Rank findings
Use these severities:
- **Critical** — immediate compromise, destructive data-loss path, or release-blocking defect with severe impact and realistic exploit/failure path.
- **High** — serious security/reliability/data-integrity/operational risk that should normally block production launch until fixed or explicitly mitigated.
- **Medium** — meaningful production risk that should be addressed soon but may be acceptable for launch with conscious mitigation/monitoring.
- **Low** — real but limited operational or maintainability risk; useful follow-up, not launch-blocking by itself.
Also assign a release disposition when useful:
- **Block launch**
- **Fix before launch**
- **Mitigate/monitor for launch**
- **Post-launch follow-up**
Do not automatically translate these into repository P0/P1 task priorities.
### 6. Validate where practical
Run non-destructive checks that materially improve confidence, such as:
- backend/frontend test suites;
- lint/build;
- migration validation on a disposable database;
- config syntax checks;
- Docker Compose validation;
- dependency metadata checks available locally;
- health/smoke checks against a local environment;
- backup/restore test only when safe and supported.
Do not mutate production, rotate secrets, run destructive migrations, purge data, or alter infrastructure without explicit authorization.
If validation is blocked, say exactly why and reduce confidence accordingly.
### 7. Produce a release-oriented verdict
Use one of:
- **Ready** — no material launch blockers found in reviewed scope.
- **Ready with conditions** — launch may proceed only with explicit mitigations/known follow-up.
- **Not ready** — one or more launch-blocking risks remain.
- **Review incomplete** — evidence/runtime access is insufficient for a defensible readiness verdict.
Do not say "Ready" if critical production surfaces were unavailable and unverified.
## Output format
Start with the verdict and one concise explanation.
Then list only substantiated findings, highest severity first. For each include:
- Severity
- Release disposition
- Location/domain
- Risk
- Evidence / execution path
- Recommended remediation
- Validation that should prove remediation
Then include:
- Scope/evidence inspected
- Validation run and exact results
- Areas reviewed with no material findings
- Unverified production assumptions / remaining uncertainties
- Suggested next actions
- Context/task updates made, if any
If there are no findings in a domain, do not invent one.
## Safety and scope rules
- Review is read-only by default.
- Do not commit, push, deploy, rotate credentials, change DNS/TLS, or modify production infrastructure unless explicitly asked.
- Do not expose secret values in the report. If secrets are committed, identify locations/types without reproducing the secret.
- Do not weaken security to make tests pass.
- Do not call historical test output fresh validation.
- Do not assume a backup is usable merely because backup files/scripts exist; restore evidence matters.
- Do not claim compliance certification (GDPR, PCI DSS, SOC 2, etc.) from a repository review.
- Do not treat generic best-practice absence as a finding unless it creates a concrete risk for this application/deployment model.
## Completion criteria
A review is complete only when:
1. repository/deployment evidence has been inspected sufficiently for the requested scope;
2. findings are concrete and evidence-backed;
3. severity/release impact is justified;
4. available non-destructive validation has been run or its absence explained;
5. production-only unknowns are clearly separated from repository facts;
6. the verdict matches the actual evidence.
@@ -0,0 +1,17 @@
interface:
display_name: production readiness review
short_description: Audit a web application for concrete production-readiness risks
across security, auth, secrets, data/migrations, logging, backups, deployment,
recovery, dependencies, privacy/legal obligations, testing, and operations. Use
repository evidence, distinguish verified gaps from assumptions, rank findings
by severity/release impact, and do not turn findings into accepted work without
user approval.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
@@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 13.5C3 12.1193 4.11929 11 5.5 11H9V21H5.5C4.11929 21 3 19.8807 3 18.5V13.5Z" fill="#FFD400"/>
<path d="M15 7H18.5C19.8807 7 21 8.11929 21 9.5V18.5C21 19.8807 19.8807 21 18.5 21H15V7Z" fill="#F75858"/>
<path d="M9 5.5C9 4.11929 10.1193 3 11.5 3H12.5C13.8807 3 15 4.11929 15 5.5V21H9V5.5Z" fill="#FFA43D"/>
</svg>

After

Width:  |  Height:  |  Size: 420 B

@@ -0,0 +1,18 @@
# Finding Quality Guide
A useful readiness finding is:
1. Current — exists in the reviewed repository/deployment evidence.
2. Concrete — names the actual failure/security/operational path.
3. Impactful — explains production consequence.
4. Evidence-backed — cites code/config/test/runtime evidence.
5. Actionable — remediation is specific enough to implement.
6. Verifiable — includes how the remediation should be tested.
Avoid:
- generic best-practice checklists pasted as findings;
- speculative attack paths with no reachable input;
- "add monitoring" without explaining which failure is currently invisible;
- "use stronger security" without identifying a broken control;
- style/architecture preferences unrelated to release risk;
- presenting unverified production assumptions as facts.
@@ -0,0 +1,95 @@
# Production Readiness Coverage Checklist
Use as a coverage guide, not a mandatory finding generator.
## Identity, authentication, authorization
- registration/login/reset/verification flows
- token/session expiration, rotation, revocation
- protected routes/endpoints
- role/ownership authorization
- brute force / abuse exposure where applicable
- account enumeration / sensitive error leakage
## Input, output, and application security
- server-side validation
- unsafe deserialization/file handling
- injection paths
- XSS/HTML rendering paths
- CSRF where cookie-authenticated state changes exist
- security headers/proxy behavior where relevant
- debug/development modes
## Secrets and configuration
- `.env` exclusion
- example env completeness without real secrets
- secret injection in deployment
- default credentials
- environment-specific settings
- fail-closed behavior for missing critical config
## Database and data integrity
- migrations present and ordered
- destructive/schema-change risk
- constraints/uniqueness/foreign keys
- transactions and concurrency
- seed/admin provisioning safety
- rollback/restore implications
## Reliability and operations
- health checks
- error handling
- graceful dependency failure
- logs useful for diagnosis without leaking secrets/PII
- monitoring/alerting expectations
- resource limits/timeouts where deployment makes them relevant
## Backup and recovery
- what is backed up
- schedule/retention
- encryption/access control
- restore procedure
- evidence of restore testing
- RPO/RTO expectations if documented
## Runtime/dependencies
- supported Python/Node/DB versions
- lockfiles/pinning
- unsupported/EOL runtimes
- known local dependency conflicts
- reproducible builds
## Deployment and delivery
- CI test/build gates
- image/build provenance
- migrations during deploy
- rollback strategy
- reverse proxy/TLS
- HTTP→HTTPS and hostname behavior
- production debug exposure
## Third-party services
- email provider
- payment provider if any
- object storage
- webhooks
- timeouts/retries/idempotency
- secret scopes and failure handling
## Privacy/legal/product obligations
Only where relevant to the product/jurisdiction:
- privacy notice
- cookies/tracking consent
- terms/legal pages
- data retention/deletion
- user export/delete flows if required by product policy
- collection minimization
Do not claim legal compliance; identify implementation/documentation gaps only.
## Testing
- critical auth/account lifecycle
- authorization failures
- destructive/data-integrity flows
- migration tests
- frontend critical workflows
- production config/smoke tests
@@ -0,0 +1,392 @@
---
name: project-commercial-management
description: Connect development projects and tasks to quotes, invoices, payments, costs, and profitability while keeping the accounting system authoritative for money.
---
# Project Commercial Management
Version: **2.0**.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Purpose
Use this skill when development work needs to be related to commercial/accounting activity.
Typical questions:
- Is this task covered by an accepted quote?
- Is this new feature additional scope?
- Which quote line does this task belong to?
- Which completed work is ready for billing review?
- What has been invoiced, paid, outstanding, or left unbilled?
- Which costs belong to this project?
- What is the commercial position or profitability of the project?
This skill bridges:
```text
development repository/context
↕
commercial mapping
↕
accounting CLI/API
↕
accounting database
```
It does not replace the repository context system and does not replace the accounting application.
## Source-of-truth boundaries
### Development truth
The project repository owns requirements, tasks, implementation status, technical decisions, acceptance criteria, and current application state.
Read the applicable repository instructions and maintained development records. Find any commercial mapping through the project’s documentation and existing files.
### Accounting truth
The accounting application/database owns:
- quote IDs, amounts, acceptance/status;
- invoice IDs, dates, lines, totals, and financial status;
- payments and allocations;
- expenses/costs;
- client/accounting-project records;
- balances and profitability calculations.
Do not treat repository Markdown as authoritative for current money values when the accounting system is available.
### Commercial mapping
Use `references/commercial-workflow.md` for the scope-to-billing workflow and `references/accounting-interface.md` to discover the accounting interface.
The development repository may contain lightweight references mapping engineering work to accounting records.
Use the project’s existing commercial mapping path. If an authorised mapping task needs a new file, follow repository conventions.
This is a navigation/mapping document only. It must not become a shadow ledger.
## Operating modes
### Commercial status
Summarize quoted, invoiced, paid, outstanding, unbilled, and cost information by reading repository mappings and querying the accounting system when available.
Read-only unless a write is explicitly requested.
### Scope check
Compare a requested feature/task to accepted quote scope and supplementary quotes.
Classify:
- **Covered by accepted scope**
- **Partially covered / needs clarification**
- **Potential additional scope**
- **Explicitly excluded**
- **Commercial status unknown**
Do not infer coverage merely because work is technically related.
### Quote planning
Translate agreed requirements into clear commercial line items while preserving useful task/milestone boundaries.
Separate:
- included scope;
- exclusions/non-goals;
- assumptions;
- dependencies;
- optional work;
- milestones.
Do not invent prices, tax treatment, discounts, payment terms, or client commitments.
### Billing review
For completed work, determine:
- what maps to quoted scope;
- what is already invoiced;
- what appears ready for billing review;
- what remains incomplete/blocked;
- what may be unquoted extra scope.
Do not issue/send an invoice without explicit authorization.
### Cost attribution
Relate accounting expenses to a project using existing accounting references/categories.
Distinguish:
- direct project cost;
- shared/overhead cost;
- unallocated cost;
- uncertain attribution.
Do not silently allocate shared costs when policy is unclear.
### Profitability / commercial performance
Use accounting records to summarize:
- accepted/contracted value where available;
- invoiced amount;
- payments received;
- outstanding invoices;
- uninvoiced approved work;
- directly attributable project costs;
- optional time/labour measures only if actually tracked.
Never present repository estimates as actual revenue or payment.
## Accounting-system integration
The user's accounting software is a local Python CLI first, with SQLite as the primary datastore, and is intended to become a Flask API + React frontend later. It also supports/targets ODS/CSV exports and branded ODS/PDF reports.
Prefer integration in this order:
1. documented accounting CLI;
2. documented accounting API;
3. structured export produced by the accounting application;
4. only if explicitly authorized and no supported interface exists, inspect the accounting project/schema to determine a safe read path.
Do not manipulate SQLite directly by default.
Do not invent CLI command names. Inspect the accounting repository/documentation and use commands that actually exist.
If the accounting system is unavailable, distinguish repository-derived references, user-supplied facts, and accounting facts that cannot be verified.
## Commercial mapping file
When useful, maintain the project’s commercial mapping file using `references/commercial-file-template.md`.
Keep it concise.
Good content:
- accounting project/client reference;
- accepted quote IDs;
- task/feature/milestone → quote mappings;
- known commercial constraints;
- supplementary quote references;
- high-level billing references;
- unresolved commercial questions.
Bad content:
- duplicated invoice ledger;
- copied payment history;
- stale financial totals;
- bank/payment secrets;
- tax records that belong in accounting;
- speculative client commitments.
If the accounting system and the commercial mapping disagree, report the conflict and treat accounting as authoritative for financial state.
## Task ↔ quote mapping
A task may map to one quote line, several quote lines, one milestone, approved additional work, internal/non-billable work, or no commercial scope.
Do not force every engineering task to become a quote line.
A quote line may span multiple engineering tasks.
Use actual IDs where available; never manufacture official accounting IDs.
## Scope-creep guard
If commercial coverage is uncertain, check it before opening implementation work where practical. Return scope evidence to the repository’s planning workflow (`bortstack-context` in BortStack). A commercial classification does not authorise implementation or financial writes.
When a new client request is not clearly covered:
1. identify the requested change;
2. inspect accepted commercial scope;
3. compare inclusions, exclusions, assumptions, and milestones;
4. classify commercial status;
5. recommend commercial review before implementation where needed.
For potential additional scope, say so plainly.
Do not block emergency/security work solely because it lacks a quote; surface the commercial issue separately from technical urgency.
## Billing-review workflow
1. read completed/accepted development tasks and milestones;
2. query the accounting system for accepted quotes and invoices;
3. map completed work to quote lines/milestones;
4. identify already invoiced work;
5. identify eligible uninvoiced work;
6. identify incomplete/blocked work;
7. identify potential additional scope;
8. report the result.
Useful classifications:
- **Already invoiced**
- **Ready for billing review**
- **Not yet billable**
- **Potential additional scope**
- **Cannot verify accounting state**
Do not mark an invoice paid unless accounting records show payment.
## Cost workflow
Query accounting records using the project/client/accounting reference.
Summarize only supported records/categories. Likely categories may include hosting, domains, third-party services, AI/API usage, travel/mileage, subcontractors, and other project-specific expenses.
The accounting project must preserve its distinction between pre-trading expenses and post-commencement transactions where relevant.
## Financial safety rules
Do not:
- fabricate amounts, dates, payments, quote acceptance, invoice status, or tax treatment;
- mark invoices paid from conversation claims when accounting records disagree;
- create/send quotes or invoices without explicit authorization;
- delete/void financial records without explicit authorization;
- silently alter historical financial records;
- store bank/payment secrets in repository docs;
- duplicate the accounting ledger into Git;
- treat projected revenue as received income;
- treat invoice issue as payment;
- assume costs are deductible/tax-allowable without authoritative support.
Separate project-management facts from tax/accounting judgement when needed.
## Writes and authorization
Read/review operations are allowed when requested.
Treat these as accounting mutations requiring clear user instruction:
- create/update/send quote;
- accept/reject quote on behalf of a party;
- create/update/send invoice;
- record/allocate payment;
- create/change/delete expense;
- issue credit note;
- void/cancel financial document;
- change accounting project/client assignments.
Use documented accounting CLI/API for writes and report exactly what changed.
The project’s commercial mapping file may be updated during an explicitly requested commercial reconciliation/mapping task, but do not rewrite financial state from assumptions.
## Relationship to BortStack Context
BortStack Context should be commercially aware but not answer authoritative accounting-state questions itself.
Project Context may:
- notice commercial mappings;
- flag possible additional scope;
- note completed work may need billing review;
- recommend this skill;
- read the project’s commercial mapping file.
Project Context should route here for:
- quote coverage;
- invoice/payment status;
- project costs;
- billing readiness;
- profitability;
- scope changes with financial implications.
This skill respects the repository task/decision lifecycle but does not redefine it.
## Relationship to the development toolkit
### New client feature
```text
Project Commercial Management — scope check
↓
BortStack Design for concept/approval/handoff (if needed in BortStack)
↓
Frontend UI Design for implementation details (if needed)
↓
Webapp Feature
↓
Frontend Visual QA
↓
Code Review
↓
Project Commercial Management — billing review
```
### Client asks for extra work
```text
Project Context identifies requirement
↓
Project Commercial Management — scope check
↓
if additional scope:
supplementary quote/approval
↓
accepted development task
↓
implementation
```
### Completed milestone
```text
BortStack Context
↓
confirm accepted work complete
↓
Project Commercial Management — billing review
↓
invoice action only if explicitly authorized
```
## Output conventions
For commercial status:
```text
Commercial status
Scope:
Quote:
Billing:
Payments:
Costs:
Potential additional scope:
Uncertainties:
Recommended next action:
```
For scope check:
```text
Scope classification:
Evidence:
Mapped quote/milestone:
Why:
Commercial action:
Development action:
```
For billing review:
```text
Ready for billing review:
Already invoiced:
Not yet billable:
Potential additional scope:
Accounting state not verified:
Recommended next action:
```
## Stop conditions
Stop rather than guess when:
- accounting data is unavailable and required;
- quote/invoice IDs are ambiguous;
- accepted scope cannot be distinguished from draft scope;
- repository task and accounting mapping conflict;
- client acceptance/payment cannot be verified;
- tax/legal treatment would be required for an accurate answer;
- a requested financial write is ambiguous or destructive.
Keep technical delivery and commercial truth aligned without making either system dependent on chat history.
@@ -0,0 +1,14 @@
interface:
display_name: project commercial management
short_description: Connect development projects and tasks to quotes, invoices, payments,
costs, and profitability while keeping the accounting system authoritative for
money.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
@@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 13.5C3 12.1193 4.11929 11 5.5 11H9V21H5.5C4.11929 21 3 19.8807 3 18.5V13.5Z" fill="#FFD400"/>
<path d="M15 7H18.5C19.8807 7 21 8.11929 21 9.5V18.5C21 19.8807 19.8807 21 18.5 21H15V7Z" fill="#F75858"/>
<path d="M9 5.5C9 4.11929 10.1193 3 11.5 3H12.5C13.8807 3 15 4.11929 15 5.5V21H9V5.5Z" fill="#FFA43D"/>
</svg>

After

Width:  |  Height:  |  Size: 420 B

@@ -0,0 +1,19 @@
# Accounting interface guidance
The accounting application is designed as:
- local Python CLI first;
- SQLite primary datastore;
- future Flask API + React frontend;
- ODS/CSV exports;
- branded ODS/PDF reports;
- pre-trading/post-commencement distinction.
Integration preference:
1. actual documented CLI;
2. documented API later;
3. structured application exports;
4. avoid direct SQLite mutation by default.
Do not invent CLI commands.
If a needed commercial capability does not exist yet, report the missing integration so it can become an accounting-project task through the normal context workflow.
@@ -0,0 +1,49 @@
# COMMERCIAL.md template
```markdown
# Commercial Context
## References
Client:
Accounting project ID:
## Accepted commercial scope
Accepted quote(s):
- <quote-id> — <short description/status reference>
Supplementary quote(s):
- none recorded
## Development ↔ commercial mapping
| Development scope | Commercial reference | Notes |
| --- | --- | --- |
| <TASK-ID or milestone> | <quote/line/milestone> | <brief mapping> |
## Commercial constraints
- <e.g. fixed-price scope boundary>
- <e.g. additional features require separate approval>
## Billing references
Keep this section referential rather than duplicating the ledger.
- <invoice-id> — <milestone/work it relates to>
## Potential additional scope
- none currently identified
## Open commercial questions
- <question requiring user/client/accounting resolution>
## Authority
The accounting application/database is authoritative for quote amounts,
invoice/payment state, expenses, and financial totals.
This file only maps development work to those records.
```
@@ -0,0 +1,22 @@
# Commercial workflow
## Before implementation
Check whether requested work is accepted development scope and whether it maps to accepted commercial scope.
Result:
- Covered → normal development workflow.
- Potential extra scope → commercial decision before implementation where practical.
- Unknown → do not pretend coverage is established.
## During implementation
Do not rewrite financial mappings for every technical subtask.
Update durable mapping only when the task-to-quote relationship changes materially, a supplementary quote is accepted, scope changes formally, a milestone becomes billable, or accounting IDs are assigned.
## At completion
Check task acceptance, quote/milestone coverage, existing invoices, incomplete dependencies, and whether completion triggers billing review.
Task complete does not automatically mean an invoice must be issued.
## After invoicing/payment
Accounting owns invoice/payment state. The repository may retain only useful references.
+271
View File
@@ -0,0 +1,271 @@
---
name: safe-refactor
description: Use when Codex needs to restructure, simplify, extract, rename, consolidate, modularize, or clean up existing web-application code while preserving observable behavior; especially for React components/hooks/state, Flask routes/services/models, duplicated logic, large modules, testability improvements, dependency boundaries, or architecture cleanup where the goal is safer maintainability rather than new functionality. Establish a behavior baseline, make small reversible changes, validate continuously, avoid opportunistic scope, and report any behavior that changes.
---
# Safe Refactor
Version: **2.0**.
Refactor structure without casually changing product behavior. Establish what the existing code actually does, protect that behavior with tests or equivalent evidence, make small coherent changes, validate after each meaningful step, and stop when the requested structural objective is achieved.
This skill is designed to compose with `bortstack-context`. The context skill owns project/task/decision/handoff semantics; this skill owns the refactoring method. Use `webapp-feature` instead when the primary goal is new behavior, and `webapp-debug` when the primary goal is correcting a defect whose root cause is not yet established.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core rules
1. **Read repository instructions and context first.** Obey root/nested `AGENTS.md`, accepted task scope, durable decisions, architecture conventions, and repository-specific validation requirements.
2. **Define the behavior-preservation boundary before editing.** Identify what users, APIs, callers, tests, persisted data, deployment tooling, and integrations are expected to observe unchanged.
3. **Inspect before reorganizing.** Understand call sites, state/data flow, public interfaces, tests, migrations, configuration, and runtime wiring before moving or deleting code.
4. **Establish a baseline.** Run relevant existing tests/checks where practical and record their result before the refactor. If baseline validation is already failing, distinguish pre-existing failures from refactor regressions.
5. **Prefer characterization tests when behavior is under-specified.** When existing code has important behavior but inadequate coverage, capture that behavior before restructuring it rather than inferring what it "should" do.
6. **Make small, reversible steps.** Prefer extract/move/rename/consolidate steps that can be validated independently over one large rewrite.
7. **Preserve contracts.** Do not silently change API shapes/status codes, URL routes, component props, public exports, database schema/data semantics, auth rules, configuration names, CLI commands, persistence formats, or externally consumed behavior.
8. **Do not smuggle feature work into a refactor.** New business rules, UX changes, bug fixes, schema redesign, dependency upgrades, performance changes, or style redesign need explicit scope or a separate task/workflow.
9. **Do not "clean up" unknown behavior.** Odd-looking logic may encode a real requirement. Prove it is redundant or incorrect before removing it.
10. **Preserve data and migration safety.** Refactoring model/domain code does not authorize destructive migrations, column renames, data rewrites, or migration-history edits.
11. **Validate continuously.** Run targeted checks after each meaningful step and the appropriate broader suite at the end. Never claim validation that was not run.
12. **Keep diffs reviewable.** Avoid unrelated formatting churn, mass renames, dependency-lockfile noise, generated-file rewrites, or broad automated transformations unless specifically required.
13. **Use repository architecture, not preferred architecture.** Improve within existing conventions unless the accepted task explicitly authorizes an architectural change.
14. **Update durable context only when warranted.** Use the repository workflow for task, current state, decisions and handoff updates. A purely internal refactor often needs no new durable decision if externally meaningful architecture and behavior remain unchanged.
15. **Do not commit, push, switch branches, deploy, provision, or start another task unless explicitly requested.**
16. **Stop at the refactor objective.** Do not continue polishing neighboring code because it is convenient.
## Establish the refactor contract
Before editing, identify:
- the accepted task/request and explicit objective;
- the files/modules/components involved;
- the reason for the refactor (duplication, size, coupling, testability, ownership, naming, boundary clarity, etc.);
- observable behaviors that must remain unchanged;
- public/internal interfaces that callers depend on;
- database/config/deployment surfaces that must remain stable;
- known existing failures or technical constraints;
- non-goals;
- validation required to demonstrate behavioral equivalence.
If the requested refactor implicitly requires a behavior or architecture decision that is not established, stop at that boundary rather than inventing it.
## 1. Inspect the current implementation
Trace the affected code sufficiently to answer:
- Who calls it?
- What does it call?
- What state/data does it read or mutate?
- Which errors/statuses/side effects are observable?
- Which tests exercise it?
- Which configuration, migrations, routes, exports, imports, styles, or runtime wiring depend on it?
- Are there dynamically referenced names, reflection, serializers, dependency injection, route registration, Flask blueprints, React lazy imports, CSS selectors, or test fixtures that make a rename/move non-local?
Search the repository for every public symbol/path/config key affected before renaming or removing it.
## 2. Establish the behavior baseline
Run the narrowest relevant existing checks first, then broader baseline checks when practical.
Examples:
- backend unit/API tests;
- frontend component/integration tests;
- route/auth/error-contract tests;
- migration status/upgrade checks;
- lint/type/build checks;
- visual/browser checks when the refactor touches rendered behavior;
- CLI/management-command checks;
- fixture/serialization checks.
Record:
- commands/checks actually run;
- pass/fail counts where available;
- pre-existing failures/warnings;
- environment limitations;
- anything important that cannot be validated.
Do not normalize a failing baseline into "passed" after the refactor. The goal is **no new regression**, unless the accepted task explicitly includes correcting a known failure.
## 3. Add characterization coverage when needed
If important current behavior lacks adequate tests, add the smallest useful characterization test before changing structure.
A characterization test should capture an observable contract, such as:
- API input/output/status behavior;
- auth/authorization behavior;
- component prop/state/render behavior;
- ordering/filtering/calculation behavior;
- serialization/persistence behavior;
- error handling;
- important side effects.
Do not lock tests to incidental implementation details merely to make refactoring impossible. Protect behavior, not private structure.
## 4. Plan the smallest coherent refactor
Prefer a short sequence such as:
1. add/confirm coverage;
2. extract one function/component/service;
3. redirect existing callers;
4. validate;
5. remove now-dead duplication;
6. validate;
7. repeat only if needed to meet the accepted objective.
For larger refactors, explicitly identify safe intermediate states. Avoid "delete old architecture, build new architecture, then see if tests pass" when incremental migration is practical.
## 5. Refactor by layer
### React/frontend
Preserve unless explicitly authorized:
- route paths and navigation behavior;
- component public props;
- form field names/submission payloads;
- state ownership semantics;
- loading/error/empty/success behavior;
- CSS class/module contracts relied on by tests or layout;
- accessibility behavior;
- API request/response expectations.
Typical safe operations include extracting presentational components, hooks, helpers, repeated form logic, API adapters, or state selectors while preserving external contracts.
Do not convert state-management approaches, change UI libraries, redesign pages, or alter UX as incidental cleanup.
### Flask/backend
Preserve unless explicitly authorized:
- route URLs/methods;
- request and response contracts;
- status/error semantics;
- auth/authorization checks;
- transaction boundaries and side effects;
- model/data semantics;
- configuration keys;
- CLI/management command behavior.
Typical safe operations include extracting service/helper functions, consolidating validation, splitting oversized route modules, clarifying domain boundaries, or removing proven duplication while retaining route contracts.
Do not rewrite migrations or change schema merely because a model/module is being reorganized.
### Shared/API boundary
When moving code across layers, verify both ends of the contract. A refactor is not safe merely because one side compiles.
Check:
- field names/types;
- optional/null handling;
- status/error shapes;
- auth headers/cookies/tokens;
- pagination/filter/sort semantics;
- date/time representation;
- identifiers and ordering;
- side effects and retries.
### Runtime/infrastructure/config
Refactoring app structure may require import/path/config updates, but preserve runtime behavior. Treat Docker, Gunicorn, nginx/SWAG, environment variables, startup commands, CI, scripts, and deployment wiring as public contracts when they consume the refactored paths.
## 6. Validate after each meaningful change
Use targeted checks during the refactor rather than waiting until the end.
Examples:
- relevant test file/module;
- import/compile check after moving Python modules;
- component test after extraction;
- lint/type check after interface changes;
- focused API contract tests after moving validation/business logic.
If a step introduces a regression, resolve it before stacking more structural changes on top.
## 7. Remove dead code only when proven dead
Before deleting old functions/files/exports:
- search all imports/references;
- check dynamic registration/configuration;
- inspect tests/scripts/migrations/CLI/runtime entry points;
- account for external/public interfaces documented by the project;
- verify the replacement path is live.
"No obvious reference in one file" is not sufficient evidence.
## 8. Final validation
At completion:
1. run targeted tests for the changed area;
2. run the repository's appropriate broader test suite;
3. run lint/type/build checks that apply;
4. run migration/config/runtime checks if touched;
5. run visual/browser checks if rendered behavior may have changed;
6. inspect the final diff for accidental churn;
7. compare final results to the baseline.
Use `references/behavior-preservation-checklist.md` and `references/refactor-validation.md` when useful.
If full validation is blocked, report exactly what passed, what failed, and what could not run. Do not mark behavioral equivalence as fully verified when required checks were unavailable.
## 9. Handling behavior changes discovered during refactoring
If behavior changes accidentally:
- revert or correct the refactor step when the change is outside scope;
- add regression coverage if the previous contract was inadequately protected;
- do not rationalize an accidental change as "better".
If the old behavior appears defective or undesirable:
- preserve it for the refactor unless fixing it is explicitly in scope;
- record the verified issue according to the project context system;
- propose/separate a bug/feature task as appropriate;
- do not silently bundle the fix into the refactor.
If preserving old behavior is impossible because the accepted structural change necessarily alters a public contract, stop and obtain/record the required decision before proceeding.
## 10. Context-system interaction
In BortStack projects:
- confirm the refactor task is accepted/in scope before substantial changes;
- respect existing ADR/PDR/task decisions;
- update the project’s current-state record only if verified architectural/current-state truth materially changes;
- add a durable decision only when the refactor establishes a meaningful project-wide architectural contract, not for every extraction/rename;
- update task status based on actual validation;
- refresh the project’s handoff record when useful for continuation;
- do not invent follow-on accepted work from incidental findings.
A task whose code changes are complete but required validation is blocked should remain in the repository's appropriate blocked/in-progress state rather than being falsely completed.
## Completion report
When useful, report concisely:
1. refactor objective and preserved behavior boundary;
2. repository/context evidence inspected;
3. baseline validation results;
4. files changed;
5. structural changes made;
6. characterization/regression tests added or changed;
7. final validation results compared with baseline;
8. any behavior differences discovered;
9. anything not verified;
10. final task/context status.
Do not advertise internal cleanup as a user-facing feature. Do not claim behavior was preserved unless evidence supports that conclusion.
+18
View File
@@ -0,0 +1,18 @@
interface:
display_name: safe refactor
short_description: Use when Codex needs to restructure, simplify, extract, rename,
consolidate, modularize, or clean up existing web-application code while preserving
observable behavior; especially for React components/hooks/state, Flask routes/services/models,
duplicated logic, large modules, testability improvements, dependency boundaries,
or architecture cleanup where the goal is safer maintainability rather than new
functionality. Establish a behavior baseline, make small reversible changes, validate
continuously, avoid opportunistic scope, and report any behavior that changes.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 20.4524C6.225 20.4524 5.53333 20.2857 4.925 19.9524C4.31667 19.6107 3.84167 19.1357 3.5 18.5274C3.16667 17.9191 3 17.2274 3 16.4524V6.45239C3 5.67739 3.16667 4.98573 3.5 4.37739C3.84167 3.76906 4.31667 3.29823 4.925 2.96489C5.53333 2.62323 6.225 2.45239 7 2.45239H17C17.775 2.45239 18.4667 2.62323 19.075 2.96489C19.6833 3.29823 20.1542 3.76906 20.4875 4.37739C20.8292 4.98573 21 5.67739 21 6.45239V16.4524C21 17.2274 20.8292 17.9191 20.4875 18.5274C20.1542 19.1357 19.6833 19.6107 19.075 19.9524C18.4667 20.2857 17.775 20.4524 17 20.4524H7Z" fill="#4D4D4D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.95981 8.77245C8.22487 8.41907 8.72648 8.34735 9.07992 8.6123C9.43319 8.87741 9.50509 9.37903 9.24008 9.73241L7.79965 11.6523L9.24008 13.5723C9.50496 13.9257 9.43325 14.4273 9.07992 14.6924C8.72654 14.9573 8.22491 14.8854 7.95981 14.5322L6.16 12.1328C5.94667 11.8484 5.94667 11.4563 6.16 11.1719L7.95981 8.77245Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6844 8.89452C12.882 8.49943 13.3625 8.33957 13.7577 8.5371C14.1526 8.73474 14.3136 9.21526 14.1161 9.61034L11.7157 14.4101C11.5181 14.8051 11.0375 14.9649 10.6424 14.7676C10.2473 14.57 10.0865 14.0895 10.284 13.6943L12.6844 8.89452Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3202 8.6123C15.6736 8.34741 16.1752 8.41908 16.4403 8.77245L18.2401 11.1719C18.4533 11.4563 18.4534 11.8484 18.2401 12.1328L16.4403 14.5322C16.1753 14.8855 15.6736 14.9571 15.3202 14.6924C14.9667 14.4273 14.8949 13.9257 15.16 13.5723L16.5995 11.6523L15.16 9.73241C14.8949 9.37896 14.9667 8.87738 15.3202 8.6123Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,34 @@
# Behavior Preservation Checklist
Use only the sections relevant to the refactor.
## Public/API contracts
- Route paths and HTTP methods unchanged unless authorized.
- Request fields, defaults, validation semantics, and content types unchanged.
- Response fields/types/status codes/error shapes unchanged.
- Authentication and authorization requirements unchanged.
- Pagination/filter/sort/order semantics unchanged.
## Frontend contracts
- Route/navigation behavior unchanged.
- Public component props/events unchanged where callers depend on them.
- Loading, empty, error, success, disabled, and validation states preserved.
- Forms submit the same domain payloads and retain required accessibility behavior.
- Existing approved visual behavior is not redesigned incidentally.
## Data/persistence
- Schema unchanged unless explicitly part of scope.
- Existing rows retain the same meaning.
- Transaction/commit/rollback behavior remains equivalent.
- Serialization/deserialization behavior remains equivalent.
- Migration history is not rewritten.
## Runtime/integration
- Environment/configuration names unchanged.
- Startup/import/entry-point paths remain valid.
- Docker/Gunicorn/nginx/CI/scripts consuming moved code are updated safely.
- External-service contracts and side effects are preserved.
## Operational
- No branch switches, commits, pushes, deploys, resets, or destructive state changes without authority.
- No unrelated dependency churn or generated-file noise.
@@ -0,0 +1,37 @@
# Refactor Validation
A safe refactor should be evaluated against its **pre-change baseline**, not only against an ideal green suite.
## Before
Record, where available:
- targeted test results;
- broader test results;
- lint/type/build results;
- browser/visual state if relevant;
- migration/config/runtime checks if relevant;
- known existing failures and warnings.
## During
After each meaningful structural step:
- run the narrowest relevant test/check;
- verify imports/exports/routes/registration still resolve;
- inspect unexpected diff/churn;
- stop and correct regressions before continuing.
## After
Run the strongest practical combination of:
- targeted tests;
- broader backend/frontend tests;
- lint/type/build;
- API contract tests;
- migration/config/startup checks;
- visual/browser checks where rendered behavior could change;
- `git diff --check` or repository equivalent;
- final reference/search check before deleting old symbols/files.
## Result classification
- **Verified preserved:** required checks ran and no behavioral regression was found.
- **Preserved with known baseline failures:** no new failures beyond documented pre-existing ones.
- **Partially verified:** some required checks were unavailable; state exactly which.
- **Behavior changed:** identify the exact observable difference and whether it is authorized.
- **Blocked:** equivalence cannot be established safely with available evidence.
+324
View File
@@ -0,0 +1,324 @@
---
name: webapp-debug
description: Use when Codex needs to diagnose and fix a web-application defect whose root cause is not yet known, especially across React/frontend behavior, browser console/network requests, Flask/backend routes, authentication/authorization, relational data, migrations, Docker/reverse-proxy/runtime configuration, tests, or logs; when the goal is to reproduce the failure, gather evidence, isolate the smallest root cause, implement a minimal fix, add regression coverage, validate the result, and avoid speculative or unrelated changes.
---
# Webapp Debug
Version: **2.0**.
Diagnose before changing code. Reproduce the reported failure, trace it through the application's actual architecture, identify evidence-backed root cause, make the smallest coherent fix, prove the regression where practical, and stop.
This skill is designed to compose with `bortstack-context`. The context skill owns project/task/decision/handoff semantics; this skill owns the debugging workflow. If diagnosis shows the request is actually a new feature or broad refactor rather than a defect, stop and switch workflows instead of stretching debugging into unrelated implementation.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core rules
1. **Read repository instructions and context first.** Obey root/nested `AGENTS.md`, current-state/task/decision rules, and repository-specific validation requirements.
2. **Reproduce before fixing whenever practical.** A symptom report is a lead, not proof of root cause. Establish the failing behavior or the strongest available evidence before editing.
3. **Separate symptom, hypothesis, evidence, and conclusion.** Do not present a guess as a diagnosis.
4. **Trace the actual request/data path.** For web apps this commonly means browser/UI → client state/API call → proxy/network → Flask route/auth/validation → domain/data layer → database/external dependency → response → frontend rendering.
5. **Change the smallest layer that is actually wrong.** Do not paper over a backend defect in the frontend, weaken authorization to make a request work, or add retries/timeouts without evidence they address the cause.
6. **Preserve unrelated behavior.** Avoid cleanup, redesign, dependency churn, renames, architecture migration, or opportunistic fixes while debugging one defect.
7. **Prefer instrumentation and existing observability over speculation.** Use tests, logs, console output, network responses, stack traces, database state, configuration, and neighboring code patterns.
8. **Do not destroy evidence.** Avoid clearing databases/logs/caches, resetting branches, deleting state, regenerating migrations, or restarting/redeploying production systems merely to get a clean slate unless explicitly authorized and safe.
9. **Treat production/external systems conservatively.** Read-only inspection may be appropriate when authorized; mutation, deployment, credential changes, DNS changes, destructive SQL, or service restarts require explicit authority or an existing approved operational workflow.
10. **Add regression coverage when practical.** A bug fix should normally gain a targeted test that fails before the fix and passes after it, or an equivalent reproducible validation when automated coverage is not feasible.
11. **Validate both the fix and its blast radius.** Run targeted checks first, then the relevant broader repository checks. Never claim a check passed if it was not run.
12. **Update durable context after an evidence-backed fix.** Use the repository workflow for task, current state, decisions and handoff updates.
13. **Do not commit, push, switch branches, deploy, provision infrastructure, or start another task unless explicitly requested.**
14. **Stop when the reported defect is resolved or when evidence is insufficient.** Do not turn debugging into general code improvement.
## Establish the debugging contract
Before editing, identify:
- the reported symptom and expected behavior;
- affected user/workflow/environment;
- reproducible steps or triggering conditions;
- whether the issue is deterministic, intermittent, environment-specific, data-specific, or concurrency-sensitive;
- relevant recent changes when repository evidence makes them available;
- the accepted task/incident if the project uses BortStack;
- constraints and non-goals;
- what validation would demonstrate resolution.
If the report is too vague to identify a testable symptom, gather repository/runtime evidence first. Ask the user only for information that cannot be recovered from available code, logs, tests, configuration, or supplied artifacts.
Do not invent timestamps, production state, user actions, credentials, or request payloads.
## 1. Reproduce or establish the failure
Prefer the smallest reliable reproduction.
Depending on the defect, use one or more of:
- an existing failing automated test;
- a new minimal regression test written against the current behavior;
- a local browser reproduction;
- frontend unit/component interaction reproduction;
- direct API request against a safe local/test environment;
- a migration/database fixture reproducing the data condition;
- supplied stack trace/log/network capture;
- repository evidence that deterministically proves the defect.
Record the exact observed failure: status code, exception, assertion, wrong value, UI state, network response, log entry, or other concrete signal.
If the issue cannot be reproduced:
1. verify the stated environment and prerequisites;
2. inspect logs/tests/recent relevant changes;
3. narrow likely conditions without changing behavior;
4. report what was and was not reproduced.
Do **not** make a speculative code change merely because it might help.
## 2. Map the failing path
Trace only the code/configuration needed to explain the symptom.
### Frontend/browser
Inspect when relevant:
- route and component entry point;
- event handler/form submission;
- state/context/store lifecycle;
- request construction and API client;
- loading/error/empty/success rendering;
- browser console errors;
- network URL, method, headers, payload, status, response body;
- stale closure/effect/dependency/race behavior;
- asset/build/runtime configuration.
### HTTP/proxy/runtime boundary
Inspect when relevant:
- request host/path/protocol;
- CORS/CSRF/cookie/token behavior;
- nginx/SWAG/reverse-proxy rules;
- container/service names and ports;
- health/readiness state;
- environment variable wiring;
- timeouts/body-size/upload limits;
- DNS/TLS only when the symptom reaches those layers.
### Flask/backend
Inspect when relevant:
- route registration and method/path;
- authentication and authorization;
- request parsing and validation;
- error handlers/status conventions;
- domain/service logic;
- serialization;
- database transaction lifecycle;
- external API/email/storage client behavior;
- exception/logging path.
### Database/migrations/data
Inspect when relevant:
- model/schema versus migration state;
- constraints, nullability, uniqueness, foreign keys and indexes;
- query/filter/join behavior;
- transaction/locking/concurrency behavior;
- fixture/data assumptions;
- migration ordering/version state;
- database-engine differences between test/dev/production.
Search for consumers before modifying a shared helper, model field, endpoint contract, environment variable, or component API.
Use `references/debug-evidence-checklist.md` when the defect crosses multiple layers.
## 3. Form ranked hypotheses
After reproduction and path inspection, form the smallest set of plausible hypotheses supported by evidence.
For each important hypothesis, identify:
- evidence supporting it;
- evidence that would falsify it;
- the cheapest safe check to discriminate it from alternatives.
Test hypotheses rather than making several unrelated changes at once. Prefer one discriminating observation over broad instrumentation churn.
Examples of useful discriminators:
- request never leaves browser vs backend returns error;
- route not registered vs authorization rejects it;
- application validation vs database constraint failure;
- stale frontend state vs wrong API response;
- code defect vs environment/config mismatch;
- migration absent vs schema/model mismatch;
- deterministic logic bug vs race/concurrency issue.
## 4. Identify root cause
Call something the root cause only when the evidence explains the observed symptom and the reproduction path.
A useful root-cause statement is specific, for example:
> The PATCH route accepts an empty `name` because it bypasses the create/update validation helper; the database permits the empty string, so the request succeeds and the UI later renders a blank service name.
Avoid vague conclusions such as “state issue”, “CORS problem”, “database bug”, or “React timing”.
If multiple independent defects contribute, distinguish primary cause from secondary/contributing conditions. Do not silently expand scope to fix every contributing weakness.
## 5. Design the minimal fix
Choose the smallest coherent change that removes the root cause at the authoritative layer.
Guidelines:
- validation/invariant defects belong at the backend/database boundary as appropriate, not only in UI guards;
- authorization defects must preserve server-side enforcement and the project's existing auth model;
- frontend rendering/state defects should not require backend contract changes unless the backend contract is actually wrong;
- proxy/config defects should use existing operational conventions rather than application workarounds;
- data/schema defects require an explicit migration/data-safety assessment;
- race conditions require atomicity/locking/constraints appropriate to the existing architecture, not timing sleeps;
- flaky tests should be debugged for the actual race/assumption rather than simply increasing arbitrary waits.
Before editing, check whether the proposed fix changes a durable product/API/data/security decision. If it does, use the context decision workflow instead of silently choosing a new behavior.
## 6. Capture the regression
When feasible, create or identify a test that demonstrates the bug before the fix.
A good regression test:
- exercises the observed behavior, not a private implementation detail;
- fails for the root cause you identified;
- passes after the minimal fix;
- protects the boundary most likely to regress;
- does not require weakening or deleting unrelated tests.
Depending on the issue, this may be:
- Flask/API test;
- model/database test;
- React unit/component test;
- browser/end-to-end test;
- migration test;
- configuration validation;
- deterministic reproduction script/command when automated test infrastructure is unsuitable.
If a regression test cannot reasonably be added, explain why and document the concrete manual/runtime reproduction used instead.
Before editing, confirm the repair is authorised and apply the repository workflow to the source checkout.
## 7. Implement one focused fix
Make the change with tight scope.
During implementation:
- retain useful diagnostic logging only if it belongs in normal operation;
- remove temporary prints, debug endpoints, screenshots, dumps, test credentials, or ad-hoc instrumentation before finishing;
- do not hide exceptions or convert failures into false success;
- do not broaden exception handling merely to suppress the symptom;
- do not disable tests/lint/security controls to get green validation;
- do not upgrade dependencies unless evidence shows the dependency version is the root cause and that upgrade is within scope.
If the first fix does not resolve the original reproduction, revert/reassess that hypothesis rather than stacking speculative changes.
## 8. Validate the fix in layers
Use repository-supported commands and environments as authority.
A sensible order is:
1. original reproduction/regression test;
2. neighboring targeted tests;
3. relevant backend/frontend suite;
4. lint/type/static checks affected by the change;
5. production build when frontend/build configuration changed;
6. migration/configuration checks when relevant;
7. browser/runtime reproduction when the defect was user-visible and safe tooling/environment is available;
8. repository-specific completion gates.
Also verify the **negative path** where relevant: unauthorized request still fails, invalid input still fails, unrelated route still works, stale record still handled, etc.
Distinguish clearly between:
- freshly passed checks;
- historical evidence;
- checks blocked by environment/dependency/network/credential limitations;
- manual verification still required.
Use `references/regression-validation.md` for the final pass.
## 9. Review the final diff and context
Before declaring resolution:
- compare the final behavior with the original reproduction;
- inspect the diff for unrelated cleanup or accidental contract changes;
- check for debug artifacts, secrets, logs/dumps, generated junk, or dependency churn;
- run `git diff --check` when Git is available;
- update the project’s current-state record with the verified defect/resolution where materially useful;
- update the accepted task/incident status according to repository rules;
- record a durable decision only if the fix establishes/changes a durable rule;
- refresh the project’s handoff record when the repository workflow calls for it;
- do not start the next task.
Report blocked or pending runtime and manual checks. Leave task state to the project’s lifecycle and acceptance rules.
## Stop conditions
Stop and report rather than guessing when:
- the target repository/environment is unavailable or cannot be identified safely;
- the reported failure cannot be reproduced and there is insufficient evidence to identify root cause;
- logs/evidence point to an external system you are not authorized or able to inspect;
- diagnosis requires credentials/secrets the user has not supplied through an appropriate secure mechanism;
- the apparent fix requires destructive data operations, production mutation, deployment, branch reset, or infrastructure changes outside the authorized task;
- resolving the symptom requires an unapproved product/security/data-model decision;
- repository evidence shows the request is actually a new feature or broad refactor;
- available evidence contradicts the user's initial theory: report the evidence and debug the observed defect, not the requested theory.
A safe evidence-backed stop is preferable to a speculative “fix”.
## Completion report
Give a concise debugging report containing:
1. reported/reproduced symptom;
2. evidence inspected and reproduction method;
3. root cause, with the key evidence supporting it;
4. fix implemented and why that layer was authoritative;
5. files/areas materially changed;
6. regression coverage added/updated;
7. tests and validation actually run, with exact results;
8. anything not verified and why;
9. context/task/decision updates made;
10. final task/incident status and any remaining manual step.
If no safe root cause/fix was established, say so explicitly and report the narrowed hypotheses/evidence instead of pretending the issue is resolved.
## When not to use this skill
Do not use this workflow for:
- implementing a known, scoped new feature — use `webapp-feature`;
- choosing the next task — use `bortstack-context` in BortStack or the repository’s own planning workflow;
- broad behavior-preserving restructuring — use `safe-refactor`;
- review-only auditing — use `code-review` or `production-readiness-review`;
- deployment/release execution where the code defect is already understood — use `deployment-check`;
- creating a new project — use `roborto-new-project` as the temporary scaffolding route.
## Resources
- `references/debug-evidence-checklist.md` — layer-by-layer evidence checklist for tracing web failures.
- `references/regression-validation.md` — concise regression/fix validation checklist.
+18
View File
@@ -0,0 +1,18 @@
interface:
display_name: webapp debug
short_description: Use when Codex needs to diagnose and fix a web-application defect
whose root cause is not yet known, especially across React/frontend behavior,
browser console/network requests, Flask/backend routes, authentication/authorization,
relational data, migrations, Docker/reverse-proxy/runtime configuration, tests,
or logs; when the goal is to reproduce the failure, gather evidence, isolate the
smallest root cause, implement a minimal fix, add regression coverage, validate
the result, and avoid speculative or unrelated changes.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 20.4524C6.225 20.4524 5.53333 20.2857 4.925 19.9524C4.31667 19.6107 3.84167 19.1357 3.5 18.5274C3.16667 17.9191 3 17.2274 3 16.4524V6.45239C3 5.67739 3.16667 4.98573 3.5 4.37739C3.84167 3.76906 4.31667 3.29823 4.925 2.96489C5.53333 2.62323 6.225 2.45239 7 2.45239H17C17.775 2.45239 18.4667 2.62323 19.075 2.96489C19.6833 3.29823 20.1542 3.76906 20.4875 4.37739C20.8292 4.98573 21 5.67739 21 6.45239V16.4524C21 17.2274 20.8292 17.9191 20.4875 18.5274C20.1542 19.1357 19.6833 19.6107 19.075 19.9524C18.4667 20.2857 17.775 20.4524 17 20.4524H7Z" fill="#4D4D4D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.95981 8.77245C8.22487 8.41907 8.72648 8.34735 9.07992 8.6123C9.43319 8.87741 9.50509 9.37903 9.24008 9.73241L7.79965 11.6523L9.24008 13.5723C9.50496 13.9257 9.43325 14.4273 9.07992 14.6924C8.72654 14.9573 8.22491 14.8854 7.95981 14.5322L6.16 12.1328C5.94667 11.8484 5.94667 11.4563 6.16 11.1719L7.95981 8.77245Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6844 8.89452C12.882 8.49943 13.3625 8.33957 13.7577 8.5371C14.1526 8.73474 14.3136 9.21526 14.1161 9.61034L11.7157 14.4101C11.5181 14.8051 11.0375 14.9649 10.6424 14.7676C10.2473 14.57 10.0865 14.0895 10.284 13.6943L12.6844 8.89452Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3202 8.6123C15.6736 8.34741 16.1752 8.41908 16.4403 8.77245L18.2401 11.1719C18.4533 11.4563 18.4534 11.8484 18.2401 12.1328L16.4403 14.5322C16.1753 14.8855 15.6736 14.9571 15.3202 14.6924C14.9667 14.4273 14.8949 13.9257 15.16 13.5723L16.5995 11.6523L15.16 9.73241C14.8949 9.37896 14.9667 8.87738 15.3202 8.6123Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,64 @@
# Debug Evidence Checklist
Use only the sections relevant to the observed failure. Evidence beats checklist completion.
## Reproduction
- Exact action/request/input that triggers the problem
- Expected versus observed behavior
- Deterministic/intermittent/environment/data-specific?
- Exact error/status/assertion/UI state
- Smallest safe reproduction available
## Browser / React
- Console exception/warning
- Network URL/method/headers/payload/status/body
- Route/component involved
- State/context/store values and lifecycle
- Loading/error/empty/success branches
- Effects, dependencies, stale closure, duplicate request, race
## HTTP / Proxy / Runtime
- Host/path/protocol
- Cookie/token/CORS/CSRF behavior
- Reverse-proxy route and service/port
- Container/process health
- Relevant environment variables (names/configuration, never expose secrets)
- TLS/DNS only if evidence reaches those layers
## Flask / Backend
- Route registration and method
- Authentication/authorization result
- Request parsing/validation
- Error handler/exception
- Domain/service behavior
- Serialization/response contract
- Transaction lifecycle
- External client result
## Database / Migration
- Current model versus migration/schema
- Constraint/query/relationship behavior
- Fixture/data condition
- Transaction/locking/concurrency
- Engine/version/environment differences
## Repository History / Context
- Relevant task/decision/current-state constraint
- Neighboring implementation pattern
- Recent relevant diff/commit when available
- Existing regression tests
## Evidence discipline
Keep separate:
- **Observed:** directly reproduced/read from evidence.
- **Hypothesis:** plausible explanation not yet proven.
- **Root cause:** evidence-backed explanation that accounts for the symptom.
- **Fix:** minimal change addressing that root cause.
@@ -0,0 +1,16 @@
# Regression Validation
Before declaring a defect fixed:
1. Re-run the exact original reproduction.
2. Run the new/updated regression test and confirm it passes.
3. Run nearby tests that protect the same contract.
4. Verify important negative behavior still holds (auth, validation, error path, constraints).
5. Run repository-required lint/static/build/migration checks relevant to the change.
6. Reproduce in the relevant browser/runtime when practical and safe.
7. Inspect the final diff for unrelated changes and temporary diagnostics.
8. Run `git diff --check` when Git is available.
9. Distinguish fresh validation from historical evidence and unavailable checks.
10. Report blocked runtime or manual checks and follow the project’s lifecycle before closing the task.
For intermittent defects, one successful run is weak evidence. Use a deterministic regression when possible or repeat the triggering scenario enough to support the claim without pretending probabilistic evidence is certainty.
+230
View File
@@ -0,0 +1,230 @@
---
name: webapp-feature
description: Use when Codex needs to implement one scoped web-application feature or accepted task end-to-end in an existing project, especially across React/frontend, Flask/backend, relational database/migrations, API contracts, tests, and documentation; when the goal is to preserve the existing architecture and behavior outside the requested feature; or when a feature should be delivered as a small validated change rather than a broad refactor.
---
# Webapp Feature
Version: **2.0**.
Implement one agreed web-application feature safely, minimally, and end-to-end. Work with the repository's existing architecture instead of redesigning the application around the task.
This skill is designed to compose with `bortstack-context`. The context skill owns project/task/decision/handoff semantics; this skill owns the implementation workflow for the feature itself.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core rules
1. **Read repository instructions first.** Obey root and nested `AGENTS.md` files and any project-specific engineering rules.
2. **Use repository evidence, not assumptions.** Inspect the relevant source, configuration, migrations, tests, and existing neighboring features before deciding how to implement the change.
3. **Work from one scoped outcome.** Prefer one accepted task or one explicit sufficiently-scoped user request. Do not silently expand a feature into a redesign or backlog.
4. **Preserve unrelated behavior.** Make the smallest coherent change that satisfies the acceptance criteria. Avoid unrelated cleanup, renames, dependency churn, style rewrites, or architectural migration.
5. **Follow existing patterns unless they are the problem being changed.** Match established route/model/service/component/state/test conventions when they remain valid.
6. **Do not invent product behavior.** If a material business rule, authorization rule, data constraint, or UX behavior is unresolved, stop at the decision boundary and surface it instead of guessing.
7. **Treat data changes carefully.** Model/schema changes require a migration strategy appropriate to the repository. Never edit production data or run destructive migrations merely to complete a local feature unless explicitly authorized.
8. **Keep API contracts coherent.** Backend validation, authorization, serialization, status codes, frontend expectations, and tests must agree.
9. **Validate what changed.** Run the narrowest useful checks first, then the broader repository-required checks. Never claim a check passed if it was not run.
10. **Update durable project context after implementation.** When the repository uses BortStack, use its task/current-state/decision/handoff rules rather than duplicating them here.
11. **Do not commit, push, switch branches, deploy, provision infrastructure, or mutate external services unless explicitly requested or required by an already-authorized project workflow.**
12. **Stop when the feature is complete.** Do not use spare time/tokens to start the next task.
## Preconditions
Before editing, establish:
- the requested outcome;
- the matching accepted task or explicit scoped request;
- acceptance criteria;
- constraints and non-goals;
- relevant durable decisions;
- affected surfaces: database, backend, API, frontend, tests, configuration, external services;
- required validation.
If the project uses BortStack, read the applicable context first. If the user asks to "work on the next task", task selection belongs to `bortstack-context` before this implementation workflow begins.
If the request is materially ambiguous, do not manufacture acceptance criteria. Record/propose the missing decision or ask only the question needed to unblock implementation.
For design-dependent BortStack work, confirm the approved design reference and version or the recorded explicit override through `bortstack-context`. Route unresolved concept, approval, or design handoff work to `bortstack-design`. Use `frontend-ui-design` for component and interaction details within the approved direction.
For an application feature, identify the authoritative application, real entry point, navigation, auth/state and backend/data needs before editing. Validate the feature through that route in the established development environment and record unverified requirements. Keep a standalone preview within explicitly approved prototype scope.
## 1. Inspect before planning
Inspect the smallest useful slice of the repository that proves how the feature should fit.
Typical evidence includes:
- neighboring models and migrations;
- route registration and existing endpoints;
- authorization/authentication helpers;
- serializers/schema/validation conventions;
- service/domain modules when present;
- React routing and neighboring pages/components;
- shared API/client/state/context hooks;
- form/error/loading-state conventions;
- relevant tests and fixtures;
- configuration/environment examples when the feature depends on them.
Do not read every file in a large repository merely to appear thorough. Trace the feature through the existing architecture.
Before changing a public or shared contract, search for its consumers.
## 2. Form a minimal implementation plan
Plan the change in dependency order. A typical cross-stack feature may be:
1. durable business/data rule;
2. model/schema change and migration;
3. backend/domain behavior;
4. API validation, authorization, and response contract;
5. frontend data integration/state;
6. UI and user-visible states;
7. targeted tests;
8. broader validation;
9. context/documentation update.
Not every feature needs every layer. Do not create abstractions, services, endpoints, state stores, or components merely to match this list.
If implementation reveals a decision that would materially change scope or architecture, stop and resolve/record that decision before proceeding.
## 3. Database and migration work
When persistence changes:
- follow the repository's ORM/schema conventions;
- encode important integrity rules in the strongest appropriate layer rather than relying only on UI checks;
- consider uniqueness, nullability, foreign keys, deletion behavior, indexes, defaults, and concurrency where relevant;
- generate/write a migration using the project's established migration tooling;
- review generated migrations rather than trusting them blindly;
- avoid destructive operations unless they are explicitly required and safely planned;
- keep migrations forward-compatible with the repository's supported deployment process;
- add migration/schema tests when the project convention requires them.
For race-sensitive behavior such as booking, inventory, quotas, or one-time claims, do not assume a frontend availability check prevents concurrent writes. Use database/application guarantees appropriate to the architecture.
## 4. Backend and API work
For backend behavior:
- enforce authentication and authorization server-side;
- validate untrusted input at the backend boundary;
- keep business invariants out of the frontend-only layer;
- reuse established error and response conventions;
- return deliberate HTTP status codes and safe error bodies;
- avoid leaking internal exceptions, secrets, or sensitive data;
- preserve existing endpoint behavior unless the task explicitly changes it;
- update API consumers/tests when a contract intentionally changes.
Prefer the project's existing structure. Do not introduce a repository/service/domain layer solely because another project uses one.
## 5. Frontend work
For React/frontend behavior:
- follow existing routing, component, state, styling, and API-client conventions;
- preserve established visual/design-system authority when the repository defines one;
- implement the complete user-visible state, not only the happy path;
- handle loading, empty, success, validation, authorization, and failure states where relevant;
- prevent obvious duplicate submissions or stale UI when the existing architecture supports it;
- keep client-side validation aligned with, but never a substitute for, backend validation;
- avoid redesigning neighboring screens unless required by the accepted feature.
If a requested visual treatment conflicts with a documented canonical design, surface the conflict instead of silently redesigning it.
## 6. Tests while implementing
Add or update tests close to the behavior being changed.
Prefer tests that prove observable requirements rather than implementation details. Depending on the feature, cover:
- authorized and unauthorized paths;
- valid and invalid input;
- important domain constraints;
- success and failure responses;
- database integrity/concurrency-sensitive behavior where practical;
- frontend rendering and interaction states;
- regression cases for the bug/behavior motivating the change.
Do not delete or weaken a valid test merely to make the new implementation pass unless the accepted behavior intentionally changed; in that case update the test and durable decision/task context accordingly.
## 7. Validate in layers
Use the repository's own commands as authority. A sensible order is:
1. targeted test(s) for changed behavior;
2. relevant backend/frontend test suite;
3. lint/type/static checks used by the project;
4. production build when frontend/build configuration changed;
5. migration/configuration validation when applicable;
6. browser/visual/runtime verification when the feature has user-facing behavior and the environment/tools support it;
7. repository-specific completion gates.
Do not install unrelated tools or change runtime versions merely to force validation. If a check cannot run, report the exact blocker and distinguish fresh validation from historical evidence.
Warnings are not automatically failures, but report material pre-existing or newly introduced warnings honestly. Do not claim the feature is fully verified if a required layer remains untested.
Use `references/validation-matrix.md` as a checklist when the feature crosses several layers.
## 8. Scope-control checkpoints
Stop and surface the issue instead of continuing when:
- the requested behavior conflicts with a durable decision;
- implementing the feature requires choosing an unresolved product/business rule;
- a migration would be destructive or require production-data assumptions;
- the apparent fix requires a broad architectural refactor not accepted by the task;
- a security/authorization requirement is unclear;
- an external dependency/credential/infrastructure change is required but not authorized;
- repository evidence contradicts the task enough that acceptance criteria are no longer trustworthy.
A discovered unrelated defect should normally be documented according to the project's context rules, not fixed opportunistically.
## 9. Finish the feature
Before declaring completion:
- compare the implementation against every acceptance criterion;
- inspect the final diff for unrelated changes, debug artifacts, secrets, generated junk, or accidental dependency churn;
- run `git diff --check` when Git is available;
- update the maintained records according to the repository workflow;
- do not mark a task Complete when repository-specific rules require manual/user confirmation that has not happened;
- leave the repository ready for the next session, but do not start the next task.
## Completion report
Give a concise engineering report containing:
1. feature/task implemented;
2. important behavior added or changed;
3. files/areas materially changed;
4. migration/API/UI implications when relevant;
5. tests and validation actually run, with results;
6. anything not verified and why;
7. context/task/decision updates made;
8. remaining blocker or required manual verification, if any.
Do not pad the report with every file touched when a short area-level summary is clearer.
## When not to use this skill
Do not use this workflow for:
- choosing the next task without implementation — use `bortstack-context` in BortStack or the repository’s own planning workflow;
- creating a new application — use `roborto-new-project` as the temporary scaffolding route;
- diagnosis where the root cause is unknown — use `webapp-debug` first;
- broad behavior-preserving restructuring — use `safe-refactor`;
- a review-only request — use `code-review` or `production-readiness-review` as appropriate;
- deployment-only work — use `deployment-check`.
## Resources
- `references/validation-matrix.md` — layer-by-layer validation prompts for common feature shapes.
- `references/feature-checklist.md` — concise implementation and scope-control checklist.
+17
View File
@@ -0,0 +1,17 @@
interface:
display_name: webapp feature
short_description: Use when Codex needs to implement one scoped web-application
feature or accepted task end-to-end in an existing project, especially across
React/frontend, Flask/backend, relational database/migrations, API contracts,
tests, and documentation; when the goal is to preserve the existing architecture
and behavior outside the requested feature; or when a feature should be delivered
as a small validated change rather than a broad refactor.
icon_small: assets/icon.svg
icon_large: assets/icon.svg
policy:
products:
- chatgpt
- codex
- api
- atlas
allow_implicit_invocation: true
+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 20.4524C6.225 20.4524 5.53333 20.2857 4.925 19.9524C4.31667 19.6107 3.84167 19.1357 3.5 18.5274C3.16667 17.9191 3 17.2274 3 16.4524V6.45239C3 5.67739 3.16667 4.98573 3.5 4.37739C3.84167 3.76906 4.31667 3.29823 4.925 2.96489C5.53333 2.62323 6.225 2.45239 7 2.45239H17C17.775 2.45239 18.4667 2.62323 19.075 2.96489C19.6833 3.29823 20.1542 3.76906 20.4875 4.37739C20.8292 4.98573 21 5.67739 21 6.45239V16.4524C21 17.2274 20.8292 17.9191 20.4875 18.5274C20.1542 19.1357 19.6833 19.6107 19.075 19.9524C18.4667 20.2857 17.775 20.4524 17 20.4524H7Z" fill="#4D4D4D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.95981 8.77245C8.22487 8.41907 8.72648 8.34735 9.07992 8.6123C9.43319 8.87741 9.50509 9.37903 9.24008 9.73241L7.79965 11.6523L9.24008 13.5723C9.50496 13.9257 9.43325 14.4273 9.07992 14.6924C8.72654 14.9573 8.22491 14.8854 7.95981 14.5322L6.16 12.1328C5.94667 11.8484 5.94667 11.4563 6.16 11.1719L7.95981 8.77245Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6844 8.89452C12.882 8.49943 13.3625 8.33957 13.7577 8.5371C14.1526 8.73474 14.3136 9.21526 14.1161 9.61034L11.7157 14.4101C11.5181 14.8051 11.0375 14.9649 10.6424 14.7676C10.2473 14.57 10.0865 14.0895 10.284 13.6943L12.6844 8.89452Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3202 8.6123C15.6736 8.34741 16.1752 8.41908 16.4403 8.77245L18.2401 11.1719C18.4533 11.4563 18.4534 11.8484 18.2401 12.1328L16.4403 14.5322C16.1753 14.8855 15.6736 14.9571 15.3202 14.6924C14.9667 14.4273 14.8949 13.9257 15.16 13.5723L16.5995 11.6523L15.16 9.73241C14.8949 9.37896 14.9667 8.87738 15.3202 8.6123Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,25 @@
# Feature checklist
## Before edits
- Read repository instructions/context.
- Confirm one scoped outcome and acceptance criteria.
- Inspect neighboring implementation and tests.
- Identify affected layers and durable decisions.
- Identify unresolved business/security/data rules before coding.
## During implementation
- Make the smallest coherent change.
- Follow existing architecture and conventions.
- Enforce validation/authorization/invariants on the server/database where appropriate.
- Keep frontend/backend contracts aligned.
- Add targeted tests with the behavior.
- Avoid unrelated cleanup and speculative improvements.
## Before completion
- Check every acceptance criterion.
- Run targeted then broader required validation.
- Review migrations and API contract changes.
- Inspect diff for unrelated changes/secrets/debug artifacts.
- Run `git diff --check` when available.
- Update project context/task/decision/handoff according to the context system.
- Stop; do not begin the next task.
@@ -0,0 +1,19 @@
# Feature validation matrix
Use only the rows relevant to the feature and the repository. Repository-specific commands and completion gates take precedence.
| Surface changed | Minimum useful evidence | Common additional validation |
|---|---|---|
| Domain/business rule | focused unit/integration test proving invariant | invalid/boundary/concurrency cases |
| ORM/model/schema | model/schema test or migration review | upgrade on disposable DB, constraint/index verification |
| API endpoint | authorized success + validation/error tests | unauthorized/forbidden/not-found/conflict cases |
| Authentication/authorization | server-side access-control test | role boundaries, token/session edge cases |
| React component/page | focused render/interaction test | loading/empty/error/disabled states |
| Frontend API integration | mocked/integration request behavior | stale/failed response and retry/submission behavior |
| Routing/navigation | route/render test | protected-route/404/back-navigation behavior |
| Styling/layout | relevant component/page render | browser widths, overflow, keyboard/focus checks |
| Build/config | config-specific test/check | production build, safe env-example review |
| Cross-stack feature | targeted backend + frontend tests | local smoke/browser flow when available |
| Migration/deployment-sensitive change | migration review + repository migration check | disposable upgrade/rollback only when supported and safe |
Always report the actual environment used when it materially differs from the repository-supported environment.
+14 -2
View File
@@ -1,3 +1,15 @@
# Flask/React template reservation # Flask/React template
Initial migration source: `/home/rob/projects/flask-react-auth-base` in the current development environment. Its `scripts/create-project.sh` generates a clean project copy and optionally initializes Git. This source has not been moved, copied, or rewritten here. The path is discovery evidence, not a portable dependency. See the [template contract](../../docs/specifications/template-contract.md). This independently maintained Forge template migrates the tracked source of `flask-react-auth-base` at commit `ff139bf5f28f4604b4a7108f4ee26608dea9924e`. The external source repository remains unchanged. The copied `source/` holds Flask authentication, SQLAlchemy migrations, React/Vite, Docker/nginx, and their tests. `boilerplate/` supplies fresh project context and neutral setup documentation. `template.json` is the descriptor consumed by future Forge orchestration.
Generate a project in a new directory:
```sh
python3 templates/flask-react/generate.py "My Application" /tmp/my-application
```
Add `--git-init` to initialize a local `main` branch. GitHub is not required. The generator refuses existing destinations and destinations inside Forge. It installs no packages, contacts no provider, and performs no deployment. It leaves profile selection to `bortstack-context`/F007; F005 will later orchestrate template and profile selection together.
The generated project has safe local/example configuration: SQLite is the development and default Compose database, email is disabled, branding and project name are neutral, and Compose has no mandatory external database or SWAG network. PostgreSQL, MySQL, and MariaDB are selectable through `ops/databases/` overlays. Resend code, Docker/nginx, an optional SWAG sample, and a GitHub CI/deployment example remain available. The GitHub workflow stays under `optional/github/` in Forge and is not generated as an active workflow. Enabling external services requires separate project decisions and configuration. See `boilerplate/docs/OPTIONAL_SERVICES.md`.
Linux generation was exercised. The Python generator is platform-neutral, but Windows generation and the full generated-project runtime matrix remain to be verified on Windows. The source package is a migration snapshot, not a live dependency on `/home/rob/projects/flask-react-auth-base`.
@@ -0,0 +1,22 @@
{
"version": 1,
"manual": {
"kind": "compose",
"environment": "development",
"file": "docker-compose.yml",
"env_file": ".env.example",
"project": "__APP_SLUG__",
"ports": {"BORTSTACK_API_PORT": 5001, "BORTSTACK_WEB_PORT": 8081},
"readiness": ["http://127.0.0.1:5001/api/health/ready", "http://127.0.0.1:8081/"],
"urls": ["http://127.0.0.1:8081/"],
"authentication": {"required": true, "provision": ["python3", "scripts/provision-test-user.py"]}
},
"automated": {
"default": ["unit"],
"suites": {
"unit": {"command": ["./scripts/run-unit-tests.sh"], "cwd": "."},
"integration": {"command": ["./scripts/run-integration-tests.sh"], "cwd": "."}
},
"act": []
}
}
@@ -0,0 +1,3 @@
# Project instructions
Read `docs/PROJECT_OVERVIEW.md`, `docs/CURRENT_STATE.md`, `docs/DECISIONS.md`, `docs/TASKS.md`, and `docs/HANDOFF.md` before task work. Inspect Git status and relevant code. Record accepted decisions and task scope in this repository. Preserve unrelated work and never commit secrets. The project owner defines branch, review, deployment, and contributor permissions; no Forge runtime is required.
@@ -0,0 +1,65 @@
# __PROJECT_NAME__
This independent project was generated from Forge's Flask/React template. Define product requirements and choose a project profile before implementation. No GitHub account, production host, email provider, or Forge runtime is required for local development.
## Local development
```sh
python3 -m venv api/.venv
api/.venv/bin/python -m pip install -r api/config/requirements-dev.txt
cd api && .venv/bin/flask --app api.py db upgrade && .venv/bin/flask --app api.py run
```
In another terminal:
```sh
cd react && npm ci && npm run dev
```
Windows PowerShell: create the virtual environment with `py -3 -m venv api/.venv`, then use `api/.venv/Scripts/python.exe` and `api/.venv/Scripts/flask.exe` in place of the Unix paths. Run Node commands from `react/` on either platform.
## Validation
The generated testing toolkit is available without Forge at runtime:
```sh
./scripts/testtask.sh --start # Compose development services and local account
./scripts/testtask.sh --status
./scripts/testtask.sh --stop # stops only this worktree's Compose project
./scripts/testrunner.sh --unit
./scripts/testrunner.sh --integration
```
The toolkit uses Git worktree metadata. Generate with `--git-init` or initialise
Git locally before using the commands; an initial commit is not required for
the current worktree. Explicit branch targets require a local branch ref and
an existing checkout.
Configure a private local test account in `~/.config/bortstack/testing.env`
with `BORTSTACK_TEST_EMAIL` and `BORTSTACK_TEST_PASSWORD`, then `chmod 600`
that file. `testtask.sh` asks before using it and permits a one-session hidden
password override. Non-interactive use requires `--use-default-credentials`.
The generated development hook creates a verified account only in this
worktree's Compose development database; an existing account is accepted only
when its password matches. Compose uses ports 5001 and 8081 by default;
adjust `.bortstack/testing.json` if they are occupied. Keep the same file's
URLs in sync. The toolkit never removes the persistent SQLite volume.
`testrunner.sh` requires the documented Python virtual environment and
`react/node_modules`; it does not install dependencies. `--act` is unavailable
until a reviewed local-safe GitHub workflow/job is explicitly allowlisted in
`.bortstack/testing.json`. The optional deployment workflow is not allowlisted.
See the generated config and Forge's toolkit README for the schema and Windows
requirements.
```sh
cd api && .venv/bin/pytest
cd react && npm run lint && npm test && npm run build
docker compose --env-file .env.example config --quiet
```
Playwright browser tests are optional and require `npx playwright install chromium` followed by `npm run test:e2e`. Docker is optional for local development. Default Compose uses a persistent SQLite volume; PostgreSQL, MySQL, and MariaDB are opt-in through `ops/databases/` overlays. `.env.example` contains local/example values only; do not use database example passwords in production or commit a populated `.env`.
## Project context
Read `AGENTS.md` and `docs/` before changing this project. The profile is deliberately unset; select business or personal and record owner, brand, contributor, testing, and deployment choices separately. Email delivery is disabled until a sender/provider is configured. See `docs/OPTIONAL_SERVICES.md` for optional hosting and email foundations.
@@ -0,0 +1,3 @@
# Current state
__PROJECT_NAME__ was generated from the Forge Flask/React template. Generation copied the files; dependency installation, tests, migrations, runtime health, and external services are unverified for this project. Inspect actual code/configuration and update this record after validation.
@@ -0,0 +1,3 @@
# Decisions
No product profile, owner, brand, email provider, repository provider, or hosting decision has been recorded yet. Preserve accepted decisions here with date, rationale, and consequences.
@@ -0,0 +1,3 @@
# Handoff
__PROJECT_NAME__ was generated from a Flask/React foundation. No product decisions or runtime validation are implied by generation. Read `AGENTS.md` and the context files, select a profile explicitly, then run the commands in `README.md` and record actual results. Keep secrets outside Git.
@@ -0,0 +1,7 @@
# Optional services
Local development needs no GitHub, production host, SWAG network, Resend account, or Cloudflare routing. Email delivery starts disabled. To enable it, choose and verify a project-specific sender/domain and contact destination, set `RESEND_API_KEY`, `EMAIL_FROM`, `CONTACT_EMAIL`, and `EMAIL_DELIVERY_ENABLED=true` in an untracked environment, then test account and contact flows. The code currently implements Resend outbound delivery; inbound routing is a separate operator choice.
`docker-compose.yml` provides API and nginx services with loopback diagnostic ports and a persistent SQLite volume. It does not require an external database or reverse-proxy network. `ops/databases/` contains separate PostgreSQL, MySQL, and MariaDB Compose overlays plus safe example environment files. Select one engine per deployment; set `SQLALCHEMY_DATABASE_URI` explicitly outside Compose, or let the chosen overlay supply it. Replace example passwords in an untracked private env file and URL-encode reserved password characters in any database URL. Apply migrations against the selected engine before starting the API. `ops/swag/` includes an optional Compose overlay and proxy sample; adapt networking and TLS separately before hosting. The Forge package retains a GitHub Actions CI/deployment example under `optional/github/`, but generation does not install an active workflow. Copying or enabling any deployment workflow is a separate project decision. Never use example passwords or secrets in production.
Before production, choose a host and repository provider, configure external secrets, verify migrations/backup/rollback, review authentication and email policy, and run the project's required tests. Generation performs none of these actions.

Some files were not shown because too many files have changed in this diff Show More