tegwick
e6840fe696
feat(prompts): implement Phase 2 - Templates & Macros (FR-2)
Implement PromptTemplate models with ContentMacro parsing and analysis.
Core Features:
- PromptTemplate extending Artifact for template-specific operations
- ContentMacro model supporting REQUIRED, OPTIONAL, GENERATE kinds
- MacroParser for extracting macros from template content
- TemplateAnalyzer for dependency extraction and validation
- TemplateService for high-level template operations
- Template metadata for model hints and expected inputs
Macro Syntax:
- {{require:artifact-name}} - Required dependency
- {{optional:artifact-name}} - Optional dependency
- {{generate:template-name|param=value}} - Nested generation
Tests (38 passing):
- 18 template model tests (macros, templates, metadata)
- 20 parser tests (parsing, validation, parameters, aliases)
Implements:
- FR-2.1: PromptTemplate as content artifact with macros
- FR-2.2: ContentMacro detection and extraction
- FR-2.3: Required/Optional/Generate macro kinds
Files Created:
- markitect/prompts/templates/models.py
- markitect/prompts/templates/parser.py
- markitect/prompts/templates/analyzer.py
- markitect/prompts/services/template_service.py
- tests/unit/prompts/test_template_models.py
- tests/unit/prompts/test_macro_parser.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:34:22 +01:00
..
2025-10-02 00:45:06 +02:00
2025-09-29 12:18:25 +02:00
2025-10-02 09:32:16 +02:00
2026-02-08 07:41:47 +01:00
2026-02-08 22:34:22 +01:00
2025-10-06 02:11:28 +02:00
2025-11-09 09:22:26 +01:00
2025-09-26 22:36:35 +02:00
2025-10-02 15:33:32 +02:00
2025-10-02 09:14:24 +02:00
2025-11-09 09:22:26 +01:00
2025-10-01 21:05:36 +02:00
2025-09-22 02:04:19 +02:00
2025-10-02 09:14:24 +02:00
2025-10-01 21:05:36 +02:00
2025-09-30 03:31:48 +02:00
2025-09-30 03:31:48 +02:00
2025-10-01 21:05:36 +02:00
2025-10-01 21:05:36 +02:00
2025-09-22 02:04:19 +02:00
2025-10-03 10:45:43 +02:00
2025-10-03 10:53:44 +02:00
2025-10-06 18:04:05 +02:00
2025-10-06 17:46:54 +02:00
2025-10-06 17:46:54 +02:00
2025-10-01 21:05:36 +02:00
2025-09-30 23:33:43 +02:00
2025-09-30 13:09:37 +02:00
2025-10-01 12:48:48 +02:00
2025-10-01 02:59:40 +02:00
2025-10-01 08:03:11 +02:00
2025-10-02 15:33:32 +02:00
2025-10-02 15:33:32 +02:00
2025-10-02 15:33:32 +02:00
2025-10-27 21:31:08 +01:00
2025-10-07 01:22:09 +02:00
2025-10-07 01:32:47 +02:00
2025-10-07 12:47:59 +02:00
2025-10-28 03:50:21 +01:00
2025-10-07 15:44:30 +02:00
2025-10-07 15:44:30 +02:00
2025-10-07 15:44:30 +02:00
2025-10-12 19:57:31 +02:00
2025-10-07 22:47:05 +02:00
2025-10-12 19:57:31 +02:00
2025-10-07 22:47:05 +02:00
2025-10-12 19:57:31 +02:00
2025-10-07 22:47:05 +02:00
2025-10-07 23:11:33 +02:00
2025-10-12 19:57:31 +02:00
2025-11-09 09:22:26 +01:00
2025-10-12 19:57:31 +02:00
2025-10-12 19:57:31 +02:00
2025-10-14 19:29:08 +02:00
2025-11-09 09:22:26 +01:00
2025-11-09 10:41:28 +01:00
2025-11-09 10:41:28 +01:00
2025-10-14 23:42:42 +02:00
2025-10-15 00:19:52 +02:00
2025-10-15 20:00:25 +02:00
2025-10-15 20:00:25 +02:00
2025-10-15 20:00:25 +02:00
2025-10-15 20:00:25 +02:00
2025-12-17 12:10:25 +01:00
2025-11-04 21:59:22 +01:00
2025-10-12 20:17:41 +02:00
2025-10-12 22:30:06 +02:00
2025-10-13 20:26:08 +02:00
2025-10-13 23:09:18 +02:00
2025-10-13 23:09:18 +02:00
2025-10-13 23:09:18 +02:00
2025-10-14 07:53:38 +02:00
2025-11-10 11:04:51 +01:00
2025-11-10 10:53:37 +01:00
2025-09-29 12:18:25 +02:00
2025-11-09 10:41:28 +01:00
2025-09-29 12:18:25 +02:00
2025-09-30 23:33:43 +02:00
2025-10-06 16:46:26 +02:00
2025-10-13 20:26:08 +02:00
2025-09-30 23:33:43 +02:00
2025-10-01 21:05:36 +02:00
2025-09-29 12:18:25 +02:00
2025-10-03 05:37:17 +02:00
2025-09-30 22:13:07 +02:00
2025-09-30 23:33:43 +02:00
2025-11-09 10:41:28 +01:00
2025-09-29 12:18:25 +02:00
2025-09-29 12:18:25 +02:00
2025-10-29 23:12:44 +01:00
2025-11-10 11:43:25 +01:00
2025-10-04 01:53:31 +02:00
2025-10-04 01:53:31 +02:00
2025-10-13 20:26:08 +02:00
2026-01-04 21:33:37 +01:00
2026-01-05 00:02:15 +01:00
2026-01-05 03:10:49 +01:00
2026-01-04 23:51:29 +01:00
2026-01-04 21:33:37 +01:00
2025-10-03 05:37:17 +02:00
2026-01-06 03:41:03 +01:00
2025-12-17 12:10:25 +01:00