arey-pi 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/templates/adr.md CHANGED
@@ -4,6 +4,16 @@
4
4
 
5
5
  Proposed
6
6
 
7
+ Accepted values:
8
+ Proposed,
9
+ Accepted,
10
+ Superseded,
11
+ Deprecated.
12
+
13
+ ## Date
14
+
15
+ YYYY-MM-DD
16
+
7
17
  ## Context
8
18
 
9
19
  Describe the forces,
@@ -11,13 +21,27 @@ constraints,
11
21
  requirements,
12
22
  and tradeoffs that make this decision necessary.
13
23
 
14
- ## Decision
24
+ Include:
25
+
26
+ - the problem being solved;
27
+ - relevant canonical specs or ADRs;
28
+ - operational constraints;
29
+ - security,
30
+ privacy,
31
+ performance,
32
+ reliability,
33
+ or maintainability concerns;
34
+ - what happens if no decision is made.
15
35
 
16
- State the decision clearly.
36
+ ## Decision Drivers
37
+
38
+ - Driver 1
39
+ - Driver 2
40
+ - Driver 3
17
41
 
18
42
  ## Options Considered
19
43
 
20
- ### Option 1
44
+ ### Option 1: Name
21
45
 
22
46
  Summary.
23
47
 
@@ -29,7 +53,7 @@ Cons:
29
53
 
30
54
  - ...
31
55
 
32
- ### Option 2
56
+ ### Option 2: Name
33
57
 
34
58
  Summary.
35
59
 
@@ -41,20 +65,65 @@ Cons:
41
65
 
42
66
  - ...
43
67
 
68
+ ## Decision
69
+
70
+ State the chosen option clearly.
71
+
72
+ Explain why it best satisfies the decision drivers.
73
+
44
74
  ## Consequences
45
75
 
46
- Describe expected consequences,
47
- including risks,
48
- costs,
49
- follow-up work,
50
- and operational impact.
76
+ Expected positive consequences:
77
+
78
+ - ...
79
+
80
+ Expected negative consequences or costs:
81
+
82
+ - ...
83
+
84
+ Operational impact:
85
+
86
+ - ...
87
+
88
+ Follow-up work:
89
+
90
+ - ...
91
+
92
+ ## Validation
93
+
94
+ Describe how the decision will be validated.
95
+
96
+ Examples:
97
+
98
+ - tests;
99
+ - operational metrics;
100
+ - migration checks;
101
+ - architecture review;
102
+ - project readiness assessment.
51
103
 
52
104
  ## Supersession and Relationships
53
105
 
54
- Record whether this ADR supersedes,
55
- is superseded by,
56
- or overlaps with other ADRs.
106
+ Supersedes:
107
+
108
+ - None
109
+
110
+ Superseded by:
111
+
112
+ - None
113
+
114
+ Related ADRs:
115
+
116
+ - None
117
+
118
+ Overlapping decisions:
119
+
120
+ - None
57
121
 
58
122
  ## Revisit Conditions
59
123
 
60
- List conditions that should trigger review of this decision.
124
+ Revisit this decision if:
125
+
126
+ - a listed constraint changes;
127
+ - implementation cost differs materially from expectations;
128
+ - operational evidence contradicts assumptions;
129
+ - a simpler option becomes viable.
@@ -1,14 +1,57 @@
1
1
  // Canonical database specification.
2
- // Keep this DBML synchronised with migrations, ORM models, SQL DDL, constraints, indexes, and relationships.
2
+ // Keep this DBML synchronised with migrations,
3
+ // ORM models,
4
+ // SQL DDL,
5
+ // constraints,
6
+ // indexes,
7
+ // relationships,
8
+ // and persistence tests.
3
9
 
4
10
  Project project_name {
5
11
  database_type: 'PostgreSQL'
6
- Note: 'Replace this starter DBML with the canonical project schema.'
12
+ Note: '''
13
+ Replace this starter DBML with the canonical project schema.
14
+ Document the database engine,
15
+ important extensions,
16
+ ownership boundaries,
17
+ and migration constraints here.
18
+ '''
19
+ }
20
+
21
+ Enum example_status {
22
+ active
23
+ archived
7
24
  }
8
25
 
9
26
  Table example_entities {
10
27
  id uuid [pk, note: 'Primary identifier']
11
- name varchar [not null]
28
+ name varchar [not null, unique, note: 'Human-readable unique name']
29
+ status example_status [not null, default: 'active']
12
30
  created_at timestamptz [not null]
13
31
  updated_at timestamptz [not null]
32
+
33
+ indexes {
34
+ name [unique, name: 'idx_example_entities_name_unique']
35
+ status [name: 'idx_example_entities_status']
36
+ }
37
+
38
+ Note: '''
39
+ Replace this example table with canonical project tables.
40
+ Include constraints,
41
+ indexes,
42
+ relationship intent,
43
+ and relevant domain notes.
44
+ '''
45
+ }
46
+
47
+ Table example_events {
48
+ id uuid [pk]
49
+ entity_id uuid [not null, ref: > example_entities.id]
50
+ event_type varchar [not null]
51
+ occurred_at timestamptz [not null]
52
+ payload jsonb [not null, default: '{}']
53
+
54
+ indexes {
55
+ (entity_id, occurred_at) [name: 'idx_example_events_entity_time']
56
+ }
14
57
  }
@@ -1,17 +1,38 @@
1
- Feature: Feature name
2
- As a stakeholder
3
- I want a capability
4
- So that an outcome is achieved
1
+ @arey-pi @replace-me
2
+ Feature: Replace with capability name
3
+ This feature is a canonical behaviour spec.
4
+ It should describe externally observable behaviour,
5
+ not implementation details.
5
6
 
6
- Background:
7
- Given relevant starting context
7
+ As a named actor or stakeholder
8
+ I want a concrete capability
9
+ So that a valuable outcome is achieved
8
10
 
9
- Scenario: Observable behaviour
10
- Given preconditions
11
- When an action occurs
12
- Then the expected outcome is observable
11
+ Rule: Replace with the business rule being protected
13
12
 
14
- Scenario: Important edge case
15
- Given edge-case preconditions
16
- When an action occurs
17
- Then the system handles the case explicitly
13
+ Background:
14
+ Given relevant starting context
15
+ And any shared preconditions that every scenario needs
16
+
17
+ @happy-path
18
+ Scenario: Primary successful behaviour
19
+ Given a meaningful initial state
20
+ When the actor performs the behaviour
21
+ Then the expected outcome is observable
22
+ And important side effects are visible
23
+
24
+ @validation @edge-case
25
+ Scenario Outline: Important validation or boundary behaviour
26
+ Given <precondition>
27
+ When the actor performs the behaviour with <input>
28
+ Then <outcome> is reported
29
+
30
+ Examples:
31
+ | precondition | input | outcome |
32
+ | valid setup | value | result |
33
+
34
+ @regression
35
+ Scenario: Regression behaviour
36
+ Given the historical failure condition
37
+ When the triggering action occurs
38
+ Then the regression is prevented