Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
441d7f6
chore(decispher): update .decispher/decisions.md
decispher[bot] May 5, 2026
54b13f2
chore(decispher): update .cursorrules
decispher[bot] May 5, 2026
d54749b
chore(decispher): update CLAUDE.md
decispher[bot] May 5, 2026
97e7cd6
chore(decispher): update .github/copilot-instructions.md
decispher[bot] May 5, 2026
aebd017
chore(decispher): update AGENTS.md
decispher[bot] May 5, 2026
a62b8cc
chore(decispher): update .decispher/context-rules.json
decispher[bot] May 5, 2026
fc8b72d
chore(decispher): update .windsurfrules
decispher[bot] May 5, 2026
65756e4
chore(decispher): update .clinerules
decispher[bot] May 5, 2026
abb422f
chore(decispher): update .aider/conventions.md
decispher[bot] May 5, 2026
a8d91c9
chore(decispher): update .devin/rules.md
decispher[bot] May 5, 2026
0897aa0
chore(decispher): update .roo/rules.md
decispher[bot] May 5, 2026
2863567
chore(decispher): update .decispher/decisions.md
decispher[bot] May 5, 2026
3a5786b
chore(decispher): update .cursorrules
decispher[bot] May 5, 2026
66abef3
chore(decispher): update CLAUDE.md
decispher[bot] May 5, 2026
8b5da2f
chore(decispher): update .github/copilot-instructions.md
decispher[bot] May 5, 2026
ec60661
chore(decispher): update AGENTS.md
decispher[bot] May 5, 2026
ba5c5a4
chore(decispher): update .decispher/context-rules.json
decispher[bot] May 5, 2026
3b6f203
chore(decispher): update .windsurfrules
decispher[bot] May 5, 2026
dbb7c81
chore(decispher): update .clinerules
decispher[bot] May 5, 2026
d8156b3
chore(decispher): update .aider/conventions.md
decispher[bot] May 5, 2026
44fdfa1
chore(decispher): update .devin/rules.md
decispher[bot] May 5, 2026
89205f6
chore(decispher): update .roo/rules.md
decispher[bot] May 5, 2026
4e9d1ab
chore(decispher): update .decispher/decisions.md
decispher[bot] May 5, 2026
2d5fdd9
chore(decispher): update .cursorrules
decispher[bot] May 5, 2026
f384da5
chore(decispher): update CLAUDE.md
decispher[bot] May 5, 2026
80fc666
chore(decispher): update .github/copilot-instructions.md
decispher[bot] May 5, 2026
9279900
chore(decispher): update AGENTS.md
decispher[bot] May 5, 2026
9d66d61
chore(decispher): update .decispher/context-rules.json
decispher[bot] May 5, 2026
9f5ee3d
chore(decispher): update .windsurfrules
decispher[bot] May 5, 2026
ea2d103
chore(decispher): update .clinerules
decispher[bot] May 5, 2026
03f5a68
chore(decispher): update .aider/conventions.md
decispher[bot] May 5, 2026
c2f5266
chore(decispher): update .devin/rules.md
decispher[bot] May 5, 2026
3c9a51d
chore(decispher): update .roo/rules.md
decispher[bot] May 5, 2026
726c519
chore(decispher): update .decispher/decisions.md
decispher[bot] May 5, 2026
1100829
chore(decispher): update .cursorrules
decispher[bot] May 5, 2026
171be16
chore(decispher): update CLAUDE.md
decispher[bot] May 5, 2026
601f22c
chore(decispher): update .github/copilot-instructions.md
decispher[bot] May 5, 2026
e673b9d
chore(decispher): update AGENTS.md
decispher[bot] May 5, 2026
f7cc61f
chore(decispher): update .decispher/context-rules.json
decispher[bot] May 5, 2026
20f4474
chore(decispher): update .windsurfrules
decispher[bot] May 5, 2026
7876a27
chore(decispher): update .clinerules
decispher[bot] May 5, 2026
a320564
chore(decispher): update .aider/conventions.md
decispher[bot] May 5, 2026
69c94db
chore(decispher): update .devin/rules.md
decispher[bot] May 5, 2026
ba675d0
chore(decispher): update .roo/rules.md
decispher[bot] May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions .aider/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
These are the active engineering decisions for this repository.
Aider should follow all of these conventions when making changes.

## Performance

### Replace awk with sed in src/payment.ts bash scripts

**Convention:** Remove all awk commands from the bash script in src/payment.ts and replace them with functionally equivalent sed commands.

**Why:** The team identified that the existing awk implementations are causing unnecessary performance bottlenecks; transitioning to sed is expected to resolve these latency issues.

**Relevant files:** `src/payment.ts`

## Mobile

### Standardization on iPhones for mobile communication

**Convention:** The team will use iPhones to perform mobile calls.

**Why:** The team aligned on a single mobile device platform for communication consistency.

## Validation

### Use RFC 307895 for JSON theme validation
Expand Down Expand Up @@ -122,19 +140,19 @@ Aider should follow all of these conventions when making changes.

### Establish ownership and modification constraints for credits and billing system

**Convention:** Sara is the primary owner of the billing module; all changes to the credit_ledger schema, DrizzleCreditRepository, and the EFFORT_MODE_CONFIGS require specific approvals from Sara and Ali. Furthermore, the system must strictly adhere to the append-only ledger constraint per ADR-019 and maintain SERIALIZABLE transaction requirements.
**Convention:** Replace all usage of the double type for money representations with the string type in src/billing.ts.

**Why:** To ensure accountability and maintain architectural integrity of the financial ledger and billing configuration, specific code ownership and structural constraints have been formalized.
**Why:** Using floating-point numbers (doubles) for currency leads to rounding errors and precision issues due to IEEE 754 binary representation. Using strings ensures that exact decimal precision is maintained during financial calculations.

> ⚠️ This is a **HIGH** priority rule — do not violate it.

**Relevant files:** `packages/api/src/routes/credits.ts`, `packages/decision-store/src/repositories/credit-repository.ts`, `packages/common/src/types/credits.ts`

### Ownership of Billing Module

**Convention:** The billing module, including Stripe integration, credit ledger, credit deduction logic, and Stripe webhook handlers, is owned by U05F9P78LTG. All changes to billing flows require their review.
**Convention:** Replace all usages of double with string to represent money transactions in src/billing.ts.

**Why:** This statement clarifies responsibility for the billing module and its components to ensure proper review and maintenance.
**Why:** Using string types for monetary values prevents floating-point arithmetic errors inherent in the double type, ensuring accuracy for financial calculations.

**Relevant files:** `packages/api/src/billing/`

Expand Down Expand Up @@ -277,13 +295,3 @@ Aider should follow all of these conventions when making changes.
**Why:** Automating the verification of architectural decisions during the review process helps maintain consistency and ensures that developers adhere to established guidelines.

> ⚠️ This is a **HIGH** priority rule — do not violate it.

## Database

### Standardize on PostgreSQL and Redis; Prohibit MongoDB

**Convention:** MongoDB is strictly prohibited in this stack due to its lack of ACID compliance. PostgreSQL will be used as the primary datastore for all persistent data, especially critical billing and user data. Redis will be used exclusively for caching purposes.

**Why:** ACID compliance is a non-negotiable requirement for billing and user data to guarantee data integrity and consistency. PostgreSQL provides robust ACID transaction support. Adopting a standardized approach with PostgreSQL and Redis simplifies the technology stack and enforces critical data integrity requirements.

> ⚠️ This is a **CRITICAL** priority rule — do not violate it.
64 changes: 34 additions & 30 deletions .clinerules

Large diffs are not rendered by default.

26 changes: 16 additions & 10 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Project Decisions & Conventions
# Auto-generated by Decispher — Do not edit manually

## Performance

- Remove all awk commands from the bash script in src/payment.ts and replace them with functionally equivalent sed commands.
Rationale: The team identified that the existing awk implementations are causing unnecessary performance bottlenecks; transitioning to sed is expected to resolve these latency issues.
Files: src/payment.ts

## Mobile

- The team will use iPhones to perform mobile calls.
Rationale: The team aligned on a single mobile device platform for communication consistency.
Files: *

## Validation

- Use RFC 307895 as the standard for validating user input when adding custom themes through the form at /addCustomTheme.
Expand Down Expand Up @@ -61,12 +73,12 @@

## Billing

- Sara is the primary owner of the billing module; all changes to the credit_ledger schema, DrizzleCreditRepository, and the EFFORT_MODE_CONFIGS require specific approvals from Sara and Ali. Furthermore, the system must strictly adhere to the append-only ledger constraint per ADR-019 and maintain SERIALIZABLE transaction requirements.
Rationale: To ensure accountability and maintain architectural integrity of the financial ledger and billing configuration, specific code ownership and structural constraints have been formalized.
- Replace all usage of the double type for money representations with the string type in src/billing.ts.
Rationale: Using floating-point numbers (doubles) for currency leads to rounding errors and precision issues due to IEEE 754 binary representation. Using strings ensures that exact decimal precision is maintained during financial calculations.
Files: packages/api/src/routes/credits.ts, packages/decision-store/src/repositories/credit-repository.ts, packages/common/src/types/credits.ts

- The billing module, including Stripe integration, credit ledger, credit deduction logic, and Stripe webhook handlers, is owned by U05F9P78LTG. All changes to billing flows require their review.
Rationale: This statement clarifies responsibility for the billing module and its components to ensure proper review and maintenance.
- Replace all usages of double with string to represent money transactions in src/billing.ts.
Rationale: Using string types for monetary values prevents floating-point arithmetic errors inherent in the double type, ensuring accuracy for financial calculations.
Files: packages/api/src/billing/

## Llm
Expand Down Expand Up @@ -148,9 +160,3 @@
- We will integrate decision-guardian into our PR pipeline to enforce and track architectural decisions.
Rationale: Automating the verification of architectural decisions during the review process helps maintain consistency and ensures that developers adhere to established guidelines.
Files: *

## Database

- MongoDB is strictly prohibited in this stack due to its lack of ACID compliance. PostgreSQL will be used as the primary datastore for all persistent data, especially critical billing and user data. Redis will be used exclusively for caching purposes.
Rationale: ACID compliance is a non-negotiable requirement for billing and user data to guarantee data integrity and consistency. PostgreSQL provides robust ACID transaction support. Adopting a standardized approach with PostgreSQL and Redis simplifies the technology stack and enforces critical data integrity requirements.
Files: *
210 changes: 143 additions & 67 deletions .decispher/context-rules.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,124 @@
{
"$schema": "https://decispher.dev/schemas/context-rules/v1.json",
"specVersion": "1.0.0",
"generatedAt": "2026-05-05T10:03:57.578Z",
"generatedAt": "2026-05-05T12:33:53.121Z",
"companyId": "1489dcdc-ef7f-4cc5-b0cb-b453efa059f4",
"meta": {
"totalRules": 28,
"totalRules": 29,
"rulesByType": {
"decision": 19,
"decision": 21,
"convention": 2,
"constraint": 3,
"constraint": 2,
"rationale": 0,
"ownership": 2,
"history": 1,
"plan": 1
},
"rulesBySeverity": {
"CRITICAL": 3,
"CRITICAL": 2,
"HIGH": 15,
"MEDIUM": 10,
"LOW": 0
"LOW": 2
},
"generator": "decispher-ai-blocker@1.0.0"
},
"rules": [
{
"id": "0170331f-f276-46d6-a601-54093718039f",
"type": "decision",
"title": "Replace awk with sed in src/payment.ts bash scripts",
"problem": "Current awk commands used within the bash script in src/payment.ts are causing performance delays.",
"decision": "Remove all awk commands from the bash script in src/payment.ts and replace them with functionally equivalent sed commands.",
"rationale": "The team identified that the existing awk implementations are causing unnecessary performance bottlenecks; transitioning to sed is expected to resolve these latency issues.",
"severity": "LOW",
"status": "active",
"confidence": 0.48,
"affectedFiles": [
"src/payment.ts"
],
"tags": [
"performance",
"bash",
"refactoring",
"scripting"
],
"alternatives": [],
"sources": [
{
"type": "slack",
"confidence": 0.48,
"ref": {
"priority": "high",
"threadTs": "1777983539.585479",
"channelId": "C0ALKBAGZQS",
"sourceUrl": "https://newworkspace-zdx9462.slack.com/archives/C0ALKBAGZQS/p1777983539585479?thread_ts=1777983539.585479&cid=C0ALKBAGZQS",
"channelName": "bot-test-1",
"slackTeamId": null,
"triggeredBy": "U05F9P78LTG",
"detectionMethod": "explicit",
"triggeredByName": "Ali Abbas"
},
"snippet": "Remove all awk commands from the bash script in src/payment.ts and replace them with functionally equivalent sed commands."
}
],
"supersededBy": null,
"enforcement": {
"blockOnViolation": false,
"requiresExplicitOverride": false,
"filePatterns": [
"src/payment.ts"
],
"exemptPatterns": []
},
"createdAt": "2026-05-05T12:19:32.050Z",
"updatedAt": "2026-05-05T12:20:51.371Z",
"version": 1,
"createdBy": "U05F9P78LTG",
"reviewedBy": "U05F9P78LTG"
},
{
"id": "606e27a4-4b72-485e-94dd-7a2008e80874",
"type": "decision",
"title": "Standardization on iPhones for mobile communication",
"problem": null,
"decision": "The team will use iPhones to perform mobile calls.",
"rationale": "The team aligned on a single mobile device platform for communication consistency.",
"severity": "LOW",
"status": "active",
"confidence": 0.45,
"affectedFiles": [],
"tags": [
"mobile",
"iphone",
"communication"
],
"alternatives": [],
"sources": [
{
"type": "slack",
"confidence": 0.45,
"ref": {
"priority": "high",
"threadTs": "1777983344.187829",
"channelId": "C0ALKBAGZQS",
"sourceUrl": "https://newworkspace-zdx9462.slack.com/archives/C0ALKBAGZQS/p1777983344187829?thread_ts=1777983344.187829&cid=C0ALKBAGZQS",
"channelName": "bot-test-1",
"slackTeamId": null,
"triggeredBy": "U05F9P78LTG",
"detectionMethod": "explicit",
"triggeredByName": "Ali Abbas"
},
"snippet": "The team will use iPhones to perform mobile calls."
}
],
"supersededBy": null,
"enforcement": null,
"createdAt": "2026-05-05T12:16:07.372Z",
"updatedAt": "2026-05-05T12:17:28.718Z",
"version": 1,
"createdBy": "U05F9P78LTG",
"reviewedBy": "U05F9P78LTG"
},
{
"id": "1fbd69ae-f638-48bd-869d-cd54a993f0b0",
"type": "decision",
Expand Down Expand Up @@ -443,8 +539,8 @@
"type": "ownership",
"title": "Establish ownership and modification constraints for credits and billing system",
"problem": "Uncertainty regarding ownership of the billing module and the requirements for implementing new effort modes.",
"decision": "Sara is the primary owner of the billing module; all changes to the credit_ledger schema, DrizzleCreditRepository, and the EFFORT_MODE_CONFIGS require specific approvals from Sara and Ali. Furthermore, the system must strictly adhere to the append-only ledger constraint per ADR-019 and maintain SERIALIZABLE transaction requirements.",
"rationale": "To ensure accountability and maintain architectural integrity of the financial ledger and billing configuration, specific code ownership and structural constraints have been formalized.",
"decision": "Replace all usage of the double type for money representations with the string type in src/billing.ts.",
"rationale": "Using floating-point numbers (doubles) for currency leads to rounding errors and precision issues due to IEEE 754 binary representation. Using strings ensures that exact decimal precision is maintained during financial calculations.",
"severity": "HIGH",
"status": "active",
"confidence": 0.43,
Expand Down Expand Up @@ -479,6 +575,22 @@
"triggeredByName": null
},
"snippet": "Sara is the primary owner of the billing module; all changes to the credit_ledger schema, DrizzleCreditRepository, and the EFFORT_MODE_CONFIGS require specific approvals from Sara and Ali. Furthermore, the system must st…"
},
{
"type": "slack",
"confidence": 0.48,
"ref": {
"priority": "high",
"threadTs": "1777984088.950089",
"channelId": "C0ALKBAGZQS",
"sourceUrl": "https://newworkspace-zdx9462.slack.com/archives/C0ALKBAGZQS/p1777984088950089?thread_ts=1777984088.950089&cid=C0ALKBAGZQS",
"channelName": "bot-test-1",
"slackTeamId": null,
"triggeredBy": "U05F9P78LTG",
"detectionMethod": "explicit",
"triggeredByName": "Ali Abbas"
},
"snippet": "Replace all usage of the double type for money representations with the string type in src/billing.ts."
}
],
"supersededBy": null,
Expand All @@ -493,8 +605,8 @@
"exemptPatterns": []
},
"createdAt": "2026-04-22T06:14:04.546Z",
"updatedAt": "2026-04-22T11:43:40.979Z",
"version": 1,
"updatedAt": "2026-05-05T12:33:12.799Z",
"version": 2,
"createdBy": "U_SARA",
"reviewedBy": "df51fb32-47a2-48b2-ac32-3887a582a966"
},
Expand Down Expand Up @@ -1408,8 +1520,8 @@
"type": "ownership",
"title": "Ownership of Billing Module",
"problem": null,
"decision": "The billing module, including Stripe integration, credit ledger, credit deduction logic, and Stripe webhook handlers, is owned by U05F9P78LTG. All changes to billing flows require their review.",
"rationale": "This statement clarifies responsibility for the billing module and its components to ensure proper review and maintenance.",
"decision": "Replace all usages of double with string to represent money transactions in src/billing.ts.",
"rationale": "Using string types for monetary values prevents floating-point arithmetic errors inherent in the double type, ensuring accuracy for financial calculations.",
"severity": "MEDIUM",
"status": "active",
"confidence": 0.38,
Expand All @@ -1434,74 +1546,38 @@
"triggeredBy": "U05F9P78LTG",
"detectionMethod": "explicit"
}
}
],
"supersededBy": null,
"enforcement": {
"blockOnViolation": false,
"requiresExplicitOverride": false,
"filePatterns": [
"packages/api/src/billing/"
],
"exemptPatterns": []
},
"createdAt": "2026-04-18T13:24:50.857Z",
"updatedAt": "2026-04-18T13:25:43.024Z",
"version": 1,
"createdBy": "U05F9P78LTG",
"reviewedBy": "U05F9P78LTG"
},
{
"id": "3998d8e6-48a3-4161-860b-be094e4feb87",
"type": "constraint",
"title": "Standardize on PostgreSQL and Redis; Prohibit MongoDB",
"problem": "Ensure ACID compliance for critical billing and user data, and standardize data storage technologies to maintain data integrity and consistency.",
"decision": "MongoDB is strictly prohibited in this stack due to its lack of ACID compliance. PostgreSQL will be used as the primary datastore for all persistent data, especially critical billing and user data. Redis will be used exclusively for caching purposes.",
"rationale": "ACID compliance is a non-negotiable requirement for billing and user data to guarantee data integrity and consistency. PostgreSQL provides robust ACID transaction support. Adopting a standardized approach with PostgreSQL and Redis simplifies the technology stack and enforces critical data integrity requirements.",
"severity": "CRITICAL",
"status": "active",
"confidence": 0.74,
"affectedFiles": [],
"tags": [
"database",
"postgresql",
"redis",
"mongodb",
"data-storage",
"acid"
],
"alternatives": [
{
"option": "MongoDB",
"reasonRejected": "MongoDB was rejected because it does not provide the necessary ACID compliance required for critical billing and user data, which is a non-negotiable architectural requirement for data integrity."
}
],
"sources": [
},
{
"type": "slack",
"confidence": 0.5,
"confidence": 0.48,
"ref": {
"priority": "high",
"threadTs": "1776518248.102319",
"channelId": "C0ANM3QAQMN",
"channelName": "decispher-live-test",
"triggeredBy": "U05F9P78LTG",
"detectionMethod": "explicit"
}
"threadTs": "1777984088.950089",
"channelId": "C0ALKBAGZQS",
"sourceUrl": null,
"channelName": null,
"slackTeamId": null,
"triggeredBy": null,
"detectionMethod": "explicit",
"triggeredByName": null
},
"snippet": "Replace all usages of double with string to represent money transactions in src/billing.ts."
}
],
"supersededBy": null,
"enforcement": {
"blockOnViolation": false,
"requiresExplicitOverride": false,
"filePatterns": [],
"filePatterns": [
"packages/api/src/billing/"
],
"exemptPatterns": []
},
"createdAt": "2026-04-18T13:17:48.935Z",
"updatedAt": "2026-04-18T23:32:02.232Z",
"version": 1,
"createdAt": "2026-04-18T13:24:50.857Z",
"updatedAt": "2026-05-05T12:33:52.890Z",
"version": 2,
"createdBy": "U05F9P78LTG",
"reviewedBy": "U05F9P78LTG"
"reviewedBy": "df51fb32-47a2-48b2-ac32-3887a582a966"
},
{
"id": "b6869b8c-7d43-47d4-9cd6-dddb0f9f92b9",
Expand Down
Loading