Skip to content

Commit dd7e00e

Browse files
committed
Add blogdown explanation to constitution
1 parent 290147e commit dd7e00e

1 file changed

Lines changed: 63 additions & 9 deletions

File tree

.specify/memory/constitution.md

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<!--
22
Sync Impact Report:
3-
Version: 1.4.0 → 1.5.0
4-
Modified Principles:
5-
- Quality Standards > Code Organization (added Development Scope Boundaries)
6-
Added Sections: Development Scope Boundaries subsection under Quality Standards
3+
Version: 1.5.0 → 1.6.0
4+
Modified Principles: None
5+
Added Sections: Principle IX - Blogdown Content Format (new principle documenting hybrid Markdown/TT content authoring)
76
Removed Sections: None
87
Renumbered Principles: None
98
Templates Status:
10-
- ✅ .specify/templates/plan-template.md (added Source Code scope guidance)
11-
- ✅ .specify/templates/spec-template.md (no changes needed - already scope-agnostic)
12-
- ✅ .specify/templates/tasks-template.md (added path conventions note about scope)
9+
- ✅ .specify/templates/plan-template.md (no changes needed - content format principle doesn't affect planning)
10+
- ✅ .specify/templates/spec-template.md (no changes needed - content format is orthogonal to spec requirements)
11+
- ✅ .specify/templates/tasks-template.md (no changes needed - content format doesn't affect task categorization)
12+
- ✅ .specify/templates/commands/*.md (no changes needed - command guidance doesn't reference content format)
1313
Follow-up TODOs:
14-
- None - all templates updated
14+
- None - all templates validated, no updates required for this additive principle
15+
Previous Changes (1.4.0 → 1.5.0):
16+
- Added Development Scope Boundaries subsection under Quality Standards
1517
-->
1618

1719
# Ovid's Website Constitution
@@ -129,6 +131,57 @@ AI agents operating on this codebase MUST NOT execute destructive git operations
129131

130132
**Rationale**: AI agents can make mistakes in command construction or context interpretation. Destructive git operations can cause irrecoverable data loss, break collaboration workflows, and violate repository policies. Humans must retain ultimate control over repository history and remote state. Read-only and safe operations enable agents to gather context without risk.
131133

134+
### IX. Blogdown Content Format
135+
136+
All articles and blog posts MUST be authored using the "blogdown" format:
137+
- Template Toolkit files (`.tt` or `.tt2markdown`) with `blogdown=1` parameter in WRAPPER directive
138+
- Content written in Markdown syntax within TT templates
139+
- Template Toolkit directives embedded inline for dynamic functionality
140+
- Processed by `Template::Plugin::Blogdown` which delegates to `Text::Markdown::Blog`
141+
- Supports standard Markdown plus extended features (tables, smart quotes, syntax highlighting)
142+
143+
**Blogdown Extended Syntax**:
144+
- **Code blocks**: Triple-tilde fencing with optional language specifier
145+
```
146+
~~~perl
147+
my $code = "example";
148+
~~~
149+
```
150+
- **Special tokens**: `{{TOC}}` (generates table of contents), `{{TAGS tag1 tag2}}` (declares article tags)
151+
- **TT directives**: Full Template Toolkit syntax available inline (e.g., `[% Ovid.add_note('text') %]`)
152+
- **Smart quotes**: Automatically converts straight quotes to curly quotes outside code blocks
153+
- **External links**: Auto-adds `target="_blank"` and external link icon for URLs with protocols
154+
- **Tables**: MultiMarkdown-style table syntax with alignment support
155+
156+
**File Structure**:
157+
```tt
158+
[%
159+
title = 'Article Title';
160+
type = 'article'; # or 'blog'
161+
slug = 'url-slug';
162+
include_comments = 1;
163+
syntax_highlight = 1;
164+
date = '2025-11-16';
165+
USE Ovid;
166+
%]
167+
[% WRAPPER include/wrapper.tt blogdown=1 -%]
168+
169+
{{TOC}}
170+
{{TAGS programming perl}}
171+
172+
# Article Content in Markdown
173+
174+
Regular Markdown with [TT directives inline].[% Ovid.add_note('Footnote text') %]
175+
176+
~~~perl
177+
my $code = "syntax highlighted";
178+
~~~
179+
180+
[% END %]
181+
```
182+
183+
**Rationale**: Blogdown combines the simplicity of Markdown for prose with the power of Template Toolkit for dynamic features (footnotes, includes, calculations). This hybrid approach enables content authors to write naturally while maintaining full programmatic control. The format separates content (Markdown) from presentation (TT/HTML), follows DRY principles via template includes, and ensures consistent processing through a single, tested pipeline. Static site generators benefit from deterministic, template-based content transformation.
184+
132185
## Quality Standards
133186

134187
### Code Organization
@@ -255,9 +308,10 @@ Deviations from constitution principles require:
255308
- Plan for eventual compliance if temporary deviation
256309
- Review and approval for non-negotiable principles
257310

258-
**Version**: 1.5.0 | **Ratified**: 2025-11-09 | **Last Amended**: 2025-11-16
311+
**Version**: 1.6.0 | **Ratified**: 2025-11-09 | **Last Amended**: 2025-11-16
259312

260313
**Changelog**:
314+
- **1.6.0** (2025-11-16): Added Principle IX - Blogdown Content Format documenting the hybrid Markdown/Template Toolkit authoring system for articles and blog posts
261315
- **1.5.0** (2025-11-16): Added Development Scope Boundaries under Code Organization to explicitly define modifiable directories (lib/, bin/, root/) vs. generated/external content
262316
- **1.4.0** (2025-11-09): Added Principle VI - Production Data Protection to prevent test contamination of production databases and data files
263317
- **1.3.0** (2025-11-09): Added Mock Minimization guidance under Principle III

0 commit comments

Comments
 (0)