agentleFS
MrCipherSmithMrCipherSmith/goodai-base/skills/gproject-spec-writer/SKILL.md

gproject-spec-writer

Skill0 starsChanged 5 months agoMITView on GitHub

Generates PRD or Implementation Plan constrained by decisions registry, architecture doc, and best practices. Does NOT invent new architectural decisions. Use when: dispatched by gproject-orchestrator Phase 4. NOT for: direct user invocation.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write a comprehensive PRD (new project) or Implementation Plan (task in project) that is fully constrained by the decisions made in Phases …

    line 15
  2. Distinctive:

    Before writing anything, verify:

    line 72
  3. Very specific:

    If validation fails → return STATUS: BLOCKED with specific issues.

    line 78
  4. Very specific:

    If self-validation finds issues → fix them.

    line 238

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

gproject-spec-writer

Purpose

Write a comprehensive PRD (new project) or Implementation Plan (task in project) that is fully constrained by the decisions made in Phases 0-3. This agent does NOT make architectural or stack decisions — it translates existing decisions into actionable requirements and user stories.

Iron Laws

#Law
1NEVER introduce a technology not in stack-decision.md
2NEVER propose an architecture pattern not in architecture.md
3EVERY technical requirement MUST reference a constraint from tech-bestpractices.md
4EVERY user story MUST trace back to a goal in problem-statement.md
5Non-goals from problem-statement.md MUST NOT appear as features
6If a requirement conflicts with a constraint, return BLOCKED — don't resolve silently
7User stories MUST have testable acceptance criteria

Red Flags

FlagWhat's happeningAction
Writing "we'll use X" where X is not in stack decisionsIntroducing undecided techSTOP → check stack-decision.md
User story without acceptance criteriaUntestable requirementSTOP → add criteria or flag as incomplete
Feature that contradicts a non-goalScope creepSTOP → remove or flag as conflict
Technical spec section with no BP constraint referenceUnconstrained decisionSTOP → find applicable constraint or flag gap

Input Contract

task: "Generate PRD / Implementation Plan"
mode: "new_project" | "task_in_project"
input_artifacts:
  - jobs/<job>/artifacts/problem-statement.md
  - jobs/<job>/artifacts/architecture.md
  - jobs/<job>/artifacts/tech-bestpractices.md
  - jobs/<job>/decisions.md
decisions_so_far: <all decisions from D1 through D_arch_pattern>

Output Contract

status: "DONE" | "DONE_WITH_CONCERNS" | "BLOCKED"
summary: "<3-5 sentences: document type, user story count, key scope decisions>"
new_decisions: {}  # PRD does NOT add architectural decisions
concerns: ["<if DONE_WITH_CONCERNS — gaps or ambiguities found>"]
artifact_path: "jobs/<job>/artifacts/prd.md"

Workflow

Step 1: Validate Inputs

Before writing anything, verify:

  • All referenced decisions exist in decisions.md
  • No contradictions between problem-statement and architecture
  • Best practices constraints are internally consistent
  • Scope (goals + non-goals) is clear

If validation fails → return STATUS: BLOCKED with specific issues.

Step 2: Determine Document Type

IF mode == "new_project":
  → Write full PRD (template A below)
ELSE IF mode == "task_in_project":
  → Write Implementation Plan (template B below)

Step 3: Write User Stories

For each goal in problem-statement.md, generate user stories:

Format:

### US-<NNN>: <Title>
**As a** <user type from D_target_users>
**I want to** <action>
**So that** <benefit tied to goal G_N>

**Acceptance Criteria:**
- [ ] <specific, testable criterion>
- [ ] <specific, testable criterion>
- [ ] <specific, testable criterion>

**Technical Notes:**
- Constraint ref: <reference to tech-bestpractices.md constraint>
- Architecture ref: <reference to architecture.md section>

**Priority:** P0 (must-have) | P1 (should-have) | P2 (nice-to-have)

Prioritization rules:

  • P0: directly solves a core problem (P1/P2 in problem-statement)
  • P1: supports a goal but not critical for launch
  • P2: enhances experience, can be deferred

Step 4: Write Document

Template A: Full PRD (new_project)

# PRD: <Project Name>

## Document Metadata
- **Based on**: problem-statement.md, architecture.md, tech-bestpractices.md
- **Decisions referenced**: <list of D_* IDs>
- **Generated by**: gproject-spec-writer v1.0.0

## Executive Summary
<2-3 paragraphs: what, why, for whom, high-level how>

## Goals & Success Metrics
<from problem-statement.md — reference, don't duplicate>
| Goal ID | Goal | Success Metric | Target |
|---------|------|---------------|--------|
| G1 | <goal> | <metric> | <target> |

## Non-Goals
<from problem-statement.md — reference explicitly>

## Technical Foundation
**Stack**: <from stack-decision.md — summarize, don't duplicate>
**Architecture**: <from architecture.md — summarize>
**Key Constraints**: <from tech-bestpractices.md — list MUST constraints>

## User Stories

### Epic 1: <Epic Name>
<Group of related user stories>

#### US-001: <Title>
...

### Epic 2: <Epic Name>
...

## Data Model (High-Level)
<Key entities and relationships — aligned with DB constraints from BP>

## API Surface (High-Level)
<Key endpoints/operations — aligned with API constraints from BP>

## Security Requirements
<Aligned with security constraints from BP>

## Testing Requirements
<Aligned with testing constraints from BP — reference test pyramid targets>

## Out of Scope
<Explicit reference to non-goals + any additional scope exclusions>

## Open Questions
<Any remaining ambiguities — flagged for orchestrator>

## Traceability Matrix
| User Story | Goal | Problem | BP Constraint | Architecture Section |
|-----------|------|---------|---------------|---------------------|
| US-001 | G1 | P1 | Frontend.MUST.1 | Layer: API |
| US-002 | G1 | P1 | Backend.MUST.3 | Layer: Service |

Template B: Implementation Plan (task_in_project)

# Implementation Plan: <Task Name>

## Document Metadata
- **Based on**: discovery-brief.md, architecture.md, tech-bestpractices.md
- **Existing project context**: ai/context.md
- **Decisions referenced**: <list of D_* IDs>

## Summary
<What needs to be done, why, and how it fits into existing architecture>

## Impact Analysis
### Files Affected
| File/Module | Change Type | Risk |
|------------|------------|------|
| <path> | modify / create / delete | low / medium / high |

### Dependencies
- <component X depends on this change>
- <this change requires Y to be done first>

## Implementation Steps

### Step 1: <Title>
**What**: <specific change>
**Where**: <file paths>
**Pattern to follow**: <reference existing project patterns>
**BP constraint**: <reference tech-bestpractices.md>
**Acceptance criteria**:
- [ ] <testable criterion>

### Step 2: ...

## Testing Plan
<Aligned with testing constraints — what tests to write, what coverage>

## Migration / Rollback Plan (if applicable)
<How to roll back if something goes wrong>

## Traceability Matrix
| Step | Goal | BP Constraint | Existing Pattern |
|------|------|---------------|-----------------|
| Step 1 | G1 | Backend.MUST.2 | existing-service.ts pattern |

Step 5: Self-Validate

Before returning, check:

  • Every user story traces to a goal
  • No features from non-goals list
  • Every technical note references a BP constraint
  • All acceptance criteria are testable (no "should work well")
  • Traceability matrix is complete

If self-validation finds issues → fix them. If unfixable → return DONE_WITH_CONCERNS.

Step 6: Return Summary

Compact summary: document type, total user stories / steps, P0 count, any concerns or gaps found during self-validation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.