Skip to content

Commit 0b6bdd2

Browse files
Add specify! (#195)
## Description This pull request makes significant improvements to the documentation and prompt instructions for project workflows, especially around constitution management and implementation processes. The changes clarify modes of operation, add detailed step-by-step instructions, and ensure consistency and traceability across related files and workflows. **Key changes:** ### Constitution Management Enhancements * Expanded and clarified the instructions in `.github/prompts/constitution.prompt.md` to support both initial creation and iterative updating of the constitution, with detailed operating modes, placeholder handling, and replacement analysis for overlapping principles or rules. Added a Replacement Analysis Table, heuristics for overlap detection, and clear handling for ambiguous or destructive changes. [[1]](diffhunk://#diff-317e4feb1f303dde8c033746a25f6abd240d78d6fdb1ae80df86cfdf3c9cd8c5L2-R2) [[2]](diffhunk://#diff-317e4feb1f303dde8c033746a25f6abd240d78d6fdb1ae80df86cfdf3c9cd8c5L13-R55) * Improved the propagation and validation checklist for syncing changes across related templates and prompt files, using relative links and clarifying which files to update. Added explicit instructions for updating deprecated or pending sections and handling deferred actions. * Updated the description in `.github/prompts/constitution.prompt.md` to clarify the iterative nature of constitution updates. ### Implementation Workflow Improvements * Enhanced `.github/prompts/implement.prompt.md` with explicit support for both local and forked repository workflows, including detection of `.fork-info.json`, validation of fork configuration, and branch/PR management logic. [[1]](diffhunk://#diff-c7d6853d6175b556ba7b64b7764e390cbbb6e49f9b76e9102e979225f4910d4dL13-R19) [[2]](diffhunk://#diff-c7d6853d6175b556ba7b64b7764e390cbbb6e49f9b76e9102e979225f4910d4dR70-R151) * Added detailed instructions for iterative implementation: tracking task completion state in `tasks.md`, skipping completed tasks, resuming from the last incomplete task, and supporting multiple runs for refinement. * Added comprehensive steps for automated Pull Request creation/updating, including PR title/description formatting, label management, linking to issues, and fallback GitHub CLI commands for both local and fork workflows. * Included steps for updating issue labels and ensuring the constitution is updated to reflect implemented changes, with clear guidance on how to keep documentation in sync with codebase state. ### Documentation Consistency * Added a new `.github/instructions/md.instructions.md` file defining markdown style guidelines for consistent documentation across the repository, covering headings, lists, code blocks, links, tables, emphasis, whitespace, and more. These changes together provide clearer, more robust, and more maintainable workflows for both constitution management and implementation, ensuring consistency and traceability across documentation and project artifacts. - Constitution Management Enhancements: [[1]](diffhunk://#diff-317e4feb1f303dde8c033746a25f6abd240d78d6fdb1ae80df86cfdf3c9cd8c5L2-R2) [[2]](diffhunk://#diff-317e4feb1f303dde8c033746a25f6abd240d78d6fdb1ae80df86cfdf3c9cd8c5L13-R55) [[3]](diffhunk://#diff-317e4feb1f303dde8c033746a25f6abd240d78d6fdb1ae80df86cfdf3c9cd8c5L31-R97) - Implementation Workflow Improvements: [[1]](diffhunk://#diff-c7d6853d6175b556ba7b64b7764e390cbbb6e49f9b76e9102e979225f4910d4dL13-R19) [[2]](diffhunk://#diff-c7d6853d6175b556ba7b64b7764e390cbbb6e49f9b76e9102e979225f4910d4dR30-R41) [[3]](diffhunk://#diff-c7d6853d6175b556ba7b64b7764e390cbbb6e49f9b76e9102e979225f4910d4dR70-R151) - Documentation Consistency: ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent de4f7a9 commit 0b6bdd2

File tree

11 files changed

+1751
-90
lines changed

11 files changed

+1751
-90
lines changed
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
---
2+
applyTo: '**/*.md'
3+
description: Markdown style guidelines for consistency across documentation.
4+
---
5+
6+
# Markdown Style Guidelines
7+
8+
This document defines the markdown style guidelines for all markdown files in this repository. These rules follow common markdown linter best practices and ensure consistency across documentation.
9+
10+
## Headings
11+
12+
- Use ATX-style headings (`#`) instead of Setext-style (underlines)
13+
- Include a space after the hash marks: `# Heading` not `#Heading`
14+
- Use only one top-level heading (`#`) per document
15+
- Do not skip heading levels (e.g., don't go from `#` to `###`)
16+
- Surround headings with blank lines (one before, one after, excluding the first heading in the document unless preceded by frontmatter)
17+
- Do not use trailing punctuation in headings (no periods, colons, etc.)
18+
- Use sentence case for headings unless referring to proper nouns or code identifiers
19+
20+
**Good:**
21+
22+
```markdown
23+
# Main heading
24+
25+
## Subsection
26+
27+
### Details
28+
```
29+
30+
**Bad:**
31+
32+
```markdown
33+
#No space after hash
34+
### Skipped level 2
35+
## Heading with period.
36+
```
37+
38+
## Lists
39+
40+
- Use consistent list markers throughout the document (`-` for unordered, `1.` for ordered)
41+
- Do not add blank lines between list items (unless item contains multiple paragraphs)
42+
- Indent nested lists by 2 spaces for unordered, 3 spaces for ordered
43+
- Use `1.` for all ordered list items (auto-numbering) or number them sequentially
44+
- Surround lists with blank lines (one before, one after)
45+
- Use `-` for unordered lists (not `*` or `+`)
46+
47+
**Good:**
48+
49+
```markdown
50+
Here is a list:
51+
52+
- First item
53+
- Second item
54+
- Third item
55+
56+
Another list:
57+
58+
1. First step
59+
1. Second step
60+
1. Third step
61+
```
62+
63+
**Bad:**
64+
65+
```markdown
66+
No blank line before list:
67+
- Item one
68+
69+
- Blank lines between items
70+
- Not needed
71+
72+
* Wrong marker
73+
+ Mixed markers
74+
```
75+
76+
## Code Blocks
77+
78+
- Always use fenced code blocks (triple backticks) with language identifiers
79+
- Always include a blank line before and after code blocks
80+
- Specify the language for syntax highlighting (`bash`, `python`, `markdown`, `json`, etc.)
81+
- Use `plaintext` or `text` if no specific language applies
82+
- Indent code blocks at the same level as surrounding content
83+
84+
**Good:**
85+
86+
```markdown
87+
Here is an example:
88+
89+
\`\`\`bash
90+
echo "Hello, world!"
91+
\`\`\`
92+
93+
The command prints a message.
94+
```
95+
96+
**Bad:**
97+
98+
```markdown
99+
No language identifier:
100+
\`\`\`
101+
code here
102+
\`\`\`
103+
No blank lines before/after code blocks.
104+
```
105+
106+
## Links
107+
108+
- Use reference-style links for repeated URLs
109+
- Use relative paths for internal links (relative to the current file)
110+
- Always provide link text in square brackets: `[text](url)`
111+
- Do not use bare URLs (wrap them: `<https://example.com>`)
112+
- For internal repository links, use relative paths starting with `./` or `../`
113+
- Use `.md` extension for links to markdown files
114+
115+
**Good:**
116+
117+
```markdown
118+
See the [installation guide](../docs/installation.md) for details.
119+
120+
Check out [GitHub][gh] and [GitLab][gl] for hosting.
121+
122+
[gh]: https://github.com
123+
[gl]: https://gitlab.com
124+
```
125+
126+
**Bad:**
127+
128+
```markdown
129+
Absolute path: [guide](/docs/installation.md)
130+
Missing extension: [guide](../docs/installation)
131+
Bare URL: Visit https://example.com
132+
```
133+
134+
## Tables
135+
136+
- Use tables when content follows a consistent structure (instead of lists)
137+
- Align columns using hyphens for readability
138+
- Include header row separator with at least 3 hyphens per column
139+
- Surround tables with blank lines (one before, one after)
140+
- Use pipes (`|`) to separate columns
141+
- Align content within columns for readability (optional but recommended)
142+
143+
**Good:**
144+
145+
```markdown
146+
Here is a comparison:
147+
148+
| Feature | Supported | Notes |
149+
|---------|-----------|-------|
150+
| Feature A | Yes | Fully supported |
151+
| Feature B | No | Planned for v2 |
152+
| Feature C | Partial | Beta feature |
153+
154+
The table shows current status.
155+
```
156+
157+
**Bad:**
158+
159+
```markdown
160+
Using list when table is better:
161+
- Feature A: Yes - Fully supported
162+
- Feature B: No - Planned for v2
163+
- Feature C: Partial - Beta feature
164+
```
165+
166+
## Emphasis
167+
168+
- Use `*` or `_` for emphasis (italic), `**` or `__` for strong emphasis (bold)
169+
- Be consistent within a document (prefer `*` and `**`)
170+
- Do not use emphasis for headings
171+
- Use backticks for code/technical terms, not emphasis
172+
173+
**Good:**
174+
175+
```markdown
176+
This is *emphasized* text.
177+
This is **strong** text.
178+
Use the `--verbose` flag for details.
179+
```
180+
181+
**Bad:**
182+
183+
```markdown
184+
This is _emphasized_ text with **strong** mixed styles.
185+
Use the *--verbose* flag (should be backticks).
186+
```
187+
188+
## Line Length
189+
190+
- Wrap prose at 80-120 characters per line
191+
- Do not wrap code blocks, tables, or URLs
192+
- Break after sentences or at natural phrase boundaries
193+
- Empty lines do not count toward line length
194+
195+
## Whitespace
196+
197+
- Use a single blank line to separate blocks of content
198+
- Do not use multiple consecutive blank lines
199+
- End files with a single newline character
200+
- Do not use trailing whitespace at the end of lines
201+
- Use spaces (not tabs) for indentation
202+
203+
## Other Rules
204+
205+
### Horizontal Rules
206+
207+
- Use three hyphens (`---`) for horizontal rules
208+
- Surround horizontal rules with blank lines
209+
210+
**Good:**
211+
212+
```markdown
213+
Section one content.
214+
215+
---
216+
217+
Section two content.
218+
```
219+
220+
### Blockquotes
221+
222+
- Use `>` for blockquotes with a space after
223+
- Surround blockquotes with blank lines
224+
- Use multiple `>` for nested quotes
225+
226+
**Good:**
227+
228+
```markdown
229+
As the docs state:
230+
231+
> This is an important note.
232+
> It spans multiple lines.
233+
234+
Back to regular text.
235+
```
236+
237+
### Images
238+
239+
- Use alt text for all images: `![alt text](path/to/image.png)`
240+
- Use relative paths for repository images
241+
- Prefer reference-style for repeated images
242+
243+
**Good:**
244+
245+
```markdown
246+
![Architecture diagram](../media/architecture.png)
247+
248+
See the [logo][logo-img] above.
249+
250+
[logo-img]: ./images/logo.png
251+
```
252+
253+
### HTML
254+
255+
- Avoid HTML in markdown when possible
256+
- Use HTML only for features not supported by markdown
257+
- Close all HTML tags properly
258+
259+
### File Names
260+
261+
- Use lowercase for markdown file names
262+
- Use hyphens (`-`) not underscores (`_`) to separate words
263+
- Use `.md` extension (not `.markdown`)
264+
265+
**Examples:**
266+
267+
- `installation-guide.md`
268+
- `Installation_Guide.markdown`
269+
270+
## Linting
271+
272+
To validate markdown files against these guidelines, use a markdown linter such as:
273+
274+
- [markdownlint](https://github.com/DavidAnson/markdownlint)
275+
- [remark-lint](https://github.com/remarkjs/remark-lint)
276+
- [superlinter](https://github.com/super-linter/super-linter)
277+
278+
Configure the linter to enforce these rules in your CI/CD pipeline.

0 commit comments

Comments
 (0)