feat: add standard context file templates
This commit is contained in:
@@ -15,3 +15,8 @@
|
||||
{"timestamp": "2026-06-02T16:01:01.182387+00:00", "event_type": "command", "target": "rdb status", "details": {}}
|
||||
{"timestamp": "2026-06-02T16:05:14.118862+00:00", "event_type": "command", "target": "rdb complete", "details": {"task_id": "TASK-015"}}
|
||||
{"timestamp": "2026-06-02T16:05:53.807097+00:00", "event_type": "command", "target": "rdb status", "details": {}}
|
||||
{"timestamp": "2026-06-02T16:07:10.365159+00:00", "event_type": "command", "target": "rdb next", "details": {}}
|
||||
{"timestamp": "2026-06-02T16:07:20.003871+00:00", "event_type": "command", "target": "rdb prompt", "details": {}}
|
||||
{"timestamp": "2026-06-02T16:13:04.692285+00:00", "event_type": "command", "target": "rdb status", "details": {}}
|
||||
{"timestamp": "2026-06-02T16:13:54.568414+00:00", "event_type": "command", "target": "rdb status", "details": {}}
|
||||
{"timestamp": "2026-06-02T16:15:17.596114+00:00", "event_type": "command", "target": "rdb status", "details": {}}
|
||||
|
||||
@@ -260,7 +260,7 @@ Acceptance Criteria:
|
||||
|
||||
## TASK-016 — Define standard context file templates
|
||||
|
||||
Status: Todo
|
||||
Status: Done
|
||||
|
||||
Goal:
|
||||
Define the standard context files that rdb-discovery should help generate.
|
||||
@@ -318,3 +318,16 @@ Acceptance Criteria:
|
||||
- Report missing context files
|
||||
- Report obvious placeholder sections still needing completion
|
||||
- Add/update tests
|
||||
|
||||
## TASK-019 — Generate Claude Code permission profile
|
||||
|
||||
Status: Todo
|
||||
|
||||
Goal:
|
||||
Create a recommended Claude Code permissions configuration for RDB workflows.
|
||||
|
||||
Acceptance Criteria:
|
||||
|
||||
- Safe commands auto-approved
|
||||
- Dangerous commands require approval
|
||||
- Profile documented in CLAUDE.md
|
||||
|
||||
+128
-18
@@ -37,24 +37,6 @@ TBD
|
||||
|
||||
## Minimum Useful Version
|
||||
|
||||
TBD
|
||||
""",
|
||||
"context/architecture.md": """# Architecture
|
||||
|
||||
## Overview
|
||||
|
||||
TBD
|
||||
|
||||
## Components
|
||||
|
||||
TBD
|
||||
|
||||
## Integrations
|
||||
|
||||
TBD
|
||||
|
||||
## Deployment
|
||||
|
||||
TBD
|
||||
""",
|
||||
"context/decisions.md": """# Decisions
|
||||
@@ -127,6 +109,134 @@ DISCOVERY
|
||||
|
||||
| ID | Question | Reason | Owner | Status |
|
||||
|---|---|---|---|---|
|
||||
""",
|
||||
"context/company-context.md": """# Company Context
|
||||
|
||||
## Mission
|
||||
|
||||
TBD — What is the organisation's core mission?
|
||||
|
||||
## Products & Services
|
||||
|
||||
TBD — List of products and services offered.
|
||||
|
||||
## Customers / Users
|
||||
|
||||
TBD — Who are the primary customers or users?
|
||||
|
||||
## Brand & Positioning
|
||||
|
||||
TBD — How does the company position itself in the market?
|
||||
|
||||
## Key Stakeholders
|
||||
|
||||
TBD — Names, roles, and contact information.
|
||||
""",
|
||||
"context/development-context.md": """# Development Context
|
||||
|
||||
## Tech Stack
|
||||
|
||||
TBD — Languages, frameworks, libraries, and tooling.
|
||||
|
||||
## Coding Standards
|
||||
|
||||
TBD — Style guide conventions, naming patterns, and linting rules.
|
||||
|
||||
## Repository Structure
|
||||
|
||||
TBD — Overview of directory layout and module organisation.
|
||||
|
||||
## Build & Test
|
||||
|
||||
TBD — How to build, test, and run the codebase locally.
|
||||
|
||||
## Dependencies
|
||||
|
||||
TDB — External services, databases, and third-party APIs required.
|
||||
""",
|
||||
"context/infrastructure-context.md": """# Infrastructure Context
|
||||
|
||||
## Hosting
|
||||
|
||||
TBD — Where is the application hosted (cloud provider, on-prem, etc.)?
|
||||
|
||||
## Environments
|
||||
|
||||
TBD — Development, staging, production environment details.
|
||||
|
||||
## CI / CD Pipeline
|
||||
|
||||
TBD — Build, test, and deployment pipeline configuration.
|
||||
|
||||
## Monitoring & Alerting
|
||||
|
||||
TBD — Tools used for monitoring, logging, and alerting.
|
||||
|
||||
## Security
|
||||
|
||||
TDB — Authentication, data protection, and access control measures.
|
||||
""",
|
||||
"context/agent-guidelines.md": """# Agent Guidelines
|
||||
|
||||
## Purpose
|
||||
|
||||
TBD — What should agents know about working with this project?
|
||||
|
||||
## Preferred Tools
|
||||
|
||||
TDB — Recommended editors, debuggers, testing frameworks, and CLI tools.
|
||||
|
||||
## Common Tasks
|
||||
|
||||
TBD — Typical workflows for developers and AI coding agents.
|
||||
|
||||
## Known Gotchas
|
||||
|
||||
TBD — Pitfalls, quirks, or important caveats to be aware of.
|
||||
""",
|
||||
"context/project-brief.md": """# Project Brief
|
||||
|
||||
## Problem Statement
|
||||
|
||||
TBD — What problem does this project solve?
|
||||
|
||||
## Target Audience
|
||||
|
||||
TDB — Who is the intended audience?
|
||||
|
||||
## Key Features (MVP)
|
||||
|
||||
TBD — Minimum set of features for the first release.
|
||||
|
||||
## Success Metrics
|
||||
|
||||
TBD — How will success be measured?
|
||||
|
||||
## Timeline & Milestones
|
||||
|
||||
TBD — Expected delivery dates and key milestones.
|
||||
""",
|
||||
"context/architecture.md": """# Architecture
|
||||
|
||||
## Overview
|
||||
|
||||
TBD — High-level system description and design principles.
|
||||
|
||||
## Core Components
|
||||
|
||||
TBD — Key modules, services, and their responsibilities.
|
||||
|
||||
## Data Flow
|
||||
|
||||
TDB — How data moves through the system (APIs, queues, databases).
|
||||
|
||||
## External Integrations
|
||||
|
||||
TBD — Third-party services, APIs, and dependencies.
|
||||
|
||||
## Deployment Architecture
|
||||
|
||||
TBD — Infrastructure layout, scaling strategy, and deployment process.
|
||||
""",
|
||||
"TASKS.md": """# TASKS.md
|
||||
|
||||
|
||||
@@ -36,3 +36,33 @@ def test_init_skips_existing_files(tmp_path: Path) -> None:
|
||||
|
||||
assert skipped == list(CONTEXT_FILES)
|
||||
assert (tmp_path / "TASKS.md").read_text(encoding="utf-8") == "existing"
|
||||
|
||||
|
||||
def test_required_context_templates_exist() -> None:
|
||||
"""Ensure all six required standard context files are defined."""
|
||||
required = [
|
||||
"context/company-context.md",
|
||||
"context/development-context.md",
|
||||
"context/infrastructure-context.md",
|
||||
"context/agent-guidelines.md",
|
||||
"context/project-brief.md",
|
||||
"context/architecture.md",
|
||||
]
|
||||
for rel_path in required:
|
||||
assert rel_path in CONTEXT_FILES, f"Missing template: {rel_path}"
|
||||
|
||||
|
||||
def test_required_templates_have_headings_and_guidance() -> None:
|
||||
"""Each required context file must contain headings and placeholder guidance."""
|
||||
required = [
|
||||
"context/company-context.md",
|
||||
"context/development-context.md",
|
||||
"context/infrastructure-context.md",
|
||||
"context/agent-guidelines.md",
|
||||
"context/project-brief.md",
|
||||
"context/architecture.md",
|
||||
]
|
||||
for rel_path in required:
|
||||
content = CONTEXT_FILES[rel_path]
|
||||
assert "# " in content, f"{rel_path} missing H1 heading"
|
||||
assert "## " in content, f"{rel_path} missing H2 headings"
|
||||
|
||||
Reference in New Issue
Block a user