Skip to content

Commit 1ec4fd7

Browse files
authored
chore(docs, rfd): Implement the JP RFD process and tooling (#397)
Introduce the Request for Discussion (RFD) process to formalize design proposals and architectural decisions. This change adds the initial set of process documents, templates, and automation to manage the lifecycle of design documents from draft to implementation. The process is built around a Git-based workflow where proposals are submitted as markdown files in `docs/rfd/`, reviewed via pull requests, and tracked through a defined set of statuses. New documentation: - `001-jp-rfd-process.md`: Core process definition and lifecycle. - `002-using-llms.md`: Guidelines for responsible LLM usage. - `003-jp-assisted-rfds.md`: Design for JP-assisted RFD writing. Automation and Tooling: - Added `just rfd-draft` to create new proposals from templates. - Added `just rfd-supersede` to manage document relationships. - Introduced the `rfd` skill for JP to act as a drafting partner. The `rfd` skill enables JP to assist contributors by suggesting structure, researching codebase context, and proposing targeted edits while maintaining the principle of human authorship and responsibility. --------- Signed-off-by: Jean Mertz <git@jeanmertz.com>
1 parent 080975a commit 1ec4fd7

File tree

10 files changed

+1307
-0
lines changed

10 files changed

+1307
-0
lines changed

.jp/config/knowledge/conventional-commit.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ items = [
162162
For the `jp_llm` crate, add an additional provider-specific scope when relevant (e.g. `ollama` \
163163
or `anthropic`).\
164164
""",
165+
"""\
166+
For any RFD/ADR-related changes, add the scope `rfd`.\
167+
""",
165168
]
166169

167170
[[assistant.instructions]]

.jp/config/skill/rfd.toml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
extends = [
2+
"../skill/read-files.toml",
3+
"../skill/project-discourse.toml",
4+
]
5+
6+
[conversation]
7+
attachments = [
8+
"file://docs/rfd/001-jp-rfd-process.md",
9+
]
10+
11+
[conversation.tools]
12+
rfd_draft = { enable = true, run = "ask" }
13+
fs_modify_file = { enable = true, run = "ask" }
14+
15+
[[assistant.system_prompt_sections]]
16+
tag = "rfd_skill"
17+
title = "Skill: RFD Writing"
18+
content = """\
19+
You have been given the RFD writing skill. You are an expert at helping \
20+
contributors write Requests for Discussion (RFDs) for the JP project.
21+
22+
Your role is **collaborator, not author**. The user writes the RFD. You \
23+
help them write a better one. This means:
24+
25+
- Pointing out gaps in reasoning or missing sections
26+
- Suggesting structure when asked
27+
- Finding relevant code, docs, or prior RFDs to reference
28+
- Drafting sections that the user will rewrite in their own voice
29+
- Asking clarifying questions to sharpen the proposal
30+
31+
You do NOT:
32+
33+
- Write entire RFDs from scratch unprompted
34+
- Generate filler prose to pad out sections
35+
- Add sections the user hasn't asked about without flagging them first
36+
- Use sycophantic language about the quality of the draft
37+
38+
**RFD 001** is attached to this conversation. It describes the RFD \
39+
process, templates, lifecycle, and writing style guidelines. Treat it \
40+
as the authoritative reference for all RFD conventions.
41+
42+
`rfd_draft` is available to create new RFD drafts of the specified \
43+
variant (rfd or adr) and the given title.
44+
45+
`fs_modify_file` is available but runs in confirmation mode — the user \
46+
sees a diff and approves or rejects each edit. Make targeted, minimal \
47+
changes rather than rewriting entire sections.\
48+
"""
49+
50+
[[assistant.system_prompt_sections]]
51+
tag = "rfd_skill"
52+
title = "RFD Collaboration Workflow"
53+
content = """\
54+
1. **Understand intent**: Before suggesting structure, ask what the \
55+
contributor is trying to propose. Understand the problem before jumping \
56+
to solutions.
57+
58+
2. **Research context**: Use `fs_grep_files`, `fs_read_file`, and \
59+
`fs_list_files` to find relevant code, existing architecture docs, and \
60+
prior RFDs. Use `github_issues` and `github_pulls` to find related \
61+
discussions.
62+
63+
3. **Suggest structure**: Based on the topic, suggest which RFD style \
64+
(rfd or adr) fits best, and which sections are most important. Not \
65+
every RFD needs every section.
66+
67+
4. **Review drafts**: When reviewing draft text, focus on clarity, \
68+
completeness, and consistency with the project's conventions. Flag \
69+
missing sections, unclear motivation, or unsupported claims.
70+
71+
5. **Draft on request**: When asked to draft a section, produce content \
72+
the contributor can edit. Keep the voice direct and factual. Avoid \
73+
hedging language and filler.
74+
75+
6. **Apply edits**: When the contributor asks you to apply changes to \
76+
an RFD, use `fs_modify_file` to make targeted edits. The user will be \
77+
asked to confirm each modification before it is applied.\
78+
"""
79+
80+
[[assistant.system_prompt_sections]]
81+
tag = "rfd_skill"
82+
title = "RFD Quality Checks"
83+
content = """\
84+
When reviewing an RFD draft, evaluate against these questions:
85+
86+
- Does the Summary convey the proposal in 1-3 sentences?
87+
- Does the Motivation explain why, not just what?
88+
- Does the Design start with user-facing behavior before internals?
89+
- Are Alternatives actually explored, or just listed?
90+
- Are Non-Goals explicitly stated where readers might have wrong expectations?
91+
- Are Risks honest about what could go wrong?
92+
- Is the Implementation Plan broken into mergeable phases?\
93+
"""
94+
95+
[[assistant.system_prompt_sections]]
96+
tag = "rfd_skill"
97+
title = "RFD Writing Style"
98+
content = """\
99+
- Use present tense: "This RFD describes..." not "This RFD was created \
100+
to describe..."
101+
- Be direct. No hedging: "it seems", "probably", "it might be worth \
102+
considering."
103+
- Keep it short. If an RFD exceeds ~2000 words, suggest splitting into \
104+
smaller proposals.
105+
- Use concrete examples. A code snippet or data flow diagram is worth a \
106+
paragraph of abstraction.\
107+
"""

.jp/mcp/tools/rfd/draft.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[conversation.tools.rfd_draft]
2+
enable = false
3+
run = "ask"
4+
source = "local"
5+
command = "just rfd-draft {{tool.arguments.variant}} {{tool.arguments.title}}"
6+
description = "Create a new RFD document."
7+
8+
[conversation.tools.rfd_draft.style]
9+
inline_results = "full"
10+
results_file_link = "off"
11+
parameters = "function_call"
12+
13+
[conversation.tools.rfd_draft.parameters.variant]
14+
description = "RFD variant to create."
15+
required = true
16+
type = "string"
17+
enum = [
18+
"rfd",
19+
"adr",
20+
]
21+
22+
[conversation.tools.rfd_draft.parameters.title]
23+
description = "Title of the RFD."
24+
required = true
25+
type = "string"

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default defineConfig({
88
title: "Jean-Pierre",
99
description: "An LLM-based Programming Assistant",
1010
cleanUrls: true,
11+
srcExclude: ['rfd/**/*'],
1112
themeConfig: {
1213
outline: {
1314
level: [2, 3]

docs/rfd/000-adr-template.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!--
2+
This template is a starting point, not a constraint. Delete sections that
3+
don't apply, add sections that do, or restructure entirely. The only
4+
requirement is the metadata header (Status, Authors, Date).
5+
-->
6+
7+
# RFD NNN: TITLE
8+
9+
- **Status**: Draft
10+
- **Authors**: AUTHOR
11+
- **Date**: DATE
12+
13+
## Summary
14+
15+
One to three sentences stating the decision. A reader should understand what
16+
was decided without reading further.
17+
18+
## Context
19+
20+
The forces at play: technical constraints, project needs, team experience,
21+
existing patterns. State facts, not opinions. What makes this decision
22+
necessary now?
23+
24+
## Decision
25+
26+
State the decision clearly. "We will use X" or "We will adopt Y." Be
27+
specific enough to act on.
28+
29+
## Consequences
30+
31+
What follows from this decision — positive, negative, and neutral. What
32+
becomes easier? What becomes harder? What trade-offs are we accepting?
33+
34+
## References
35+
36+
Links to related RFDs, issues, documentation, or external resources.

docs/rfd/000-rfd-template.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!--
2+
This template is a starting point, not a constraint. Delete sections that
3+
don't apply, add sections that do, or restructure entirely. The only
4+
requirement is the metadata header (Status, Authors, Date).
5+
-->
6+
7+
# RFD NNN: TITLE
8+
9+
- **Status**: Draft
10+
- **Authors**: AUTHOR
11+
- **Date**: DATE
12+
13+
## Summary
14+
15+
One to three sentences describing what this RFD proposes. A reader should be
16+
able to understand the gist without reading further.
17+
18+
## Motivation
19+
20+
Why is this change needed? What problem does it solve? What happens if we do
21+
nothing? Start with "why" before "how."
22+
23+
## Design
24+
25+
The core of the RFD. Describe the proposed solution in enough detail that
26+
someone familiar with the codebase could implement it. Use diagrams, code
27+
snippets, and examples where they help.
28+
29+
Start with what the user or caller sees — the external behavior, API, or
30+
experience — before describing internals.
31+
32+
Structure this section however makes sense for the topic. Common subsections
33+
include: Overview, Design Goals, Architecture, Data Flow, API Changes,
34+
Configuration Changes.
35+
36+
Every section can be brief. A one-sentence Alternatives section is better than
37+
no Alternatives section.
38+
39+
## Drawbacks
40+
41+
What are the known costs of this approach? What does the project give up by
42+
adopting it? Argue honestly against your own proposal.
43+
44+
## Alternatives
45+
46+
What other approaches were considered? Why were they rejected? This section is
47+
important — it shows the reader that the solution space was explored and gives
48+
future readers context for the decision.
49+
50+
## Non-Goals
51+
52+
What this RFD explicitly does not aim to achieve, even though a reader might
53+
expect it to. This keeps the discussion focused and signals awareness of the
54+
broader picture.
55+
56+
## Risks and Open Questions
57+
58+
What could go wrong? What don't we know yet? What needs to be validated during
59+
implementation? It's better to surface uncertainty explicitly than to pretend it
60+
doesn't exist.
61+
62+
## Implementation Plan
63+
64+
How will this be implemented? Break the work into phases or steps. This section
65+
bridges the gap between design and execution.
66+
67+
For each phase, briefly describe:
68+
69+
- What it includes
70+
- What it depends on
71+
- Whether it can be reviewed and merged independently
72+
73+
## References
74+
75+
Links to related RFDs, issues, documentation, or external resources.

0 commit comments

Comments
 (0)