feat: prepare ARR for controlled public deployment
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# ADR-001: Automatic Monthly Trigger And TOTAL PRICE Formula
|
||||
|
||||
- Status: Accepted
|
||||
- Date: 2026-07-29
|
||||
- Source: User correction in the current session
|
||||
|
||||
## Context
|
||||
|
||||
Earlier discussion incorrectly treated monthly-report generation as a separate user action and described year, month, or cutoff date as user-submitted values. An earlier report specification also treated generated price cells as static values.
|
||||
|
||||
## Decision
|
||||
|
||||
1. The user's workflow begins and ends with uploading the XML.
|
||||
2. The Agent processes the XML and returns structured data for validation and database persistence.
|
||||
3. Only after that structured result is successfully committed does the business system automatically trigger the monthly-report processing program.
|
||||
4. `report_year`, `report_month`, `as_of_date`, or equivalent values may remain as internal execution and audit fields, but the backend must derive them. They are not user inputs in the primary workflow.
|
||||
5. The report keeps the `TOTAL PRICE` dimension/field. Each XLSX data-row cell must contain a formula with the business meaning:
|
||||
|
||||
`TOTAL PRICE = REAL PRICE × NIGHTS × NO_OF_ROOMS`
|
||||
|
||||
With the current 19-column layout, this is equivalent to `=R2*C2*G2` for row 2 and must fill relatively for later rows.
|
||||
|
||||
## Consequences
|
||||
|
||||
- A manual month/as-of form or endpoint is not the primary product flow and must not be presented as a required user step.
|
||||
- The monthly processor may still accept internally supplied month/cutoff arguments from its orchestrator.
|
||||
- Existing manual-trigger UI/API code and static-cell workbook generation are implementation gaps, not the accepted requirement.
|
||||
- The exact internal event/outbox/worker mechanism and cutoff derivation policy remain implementation details to design and verify; they must not be delegated to the user.
|
||||
|
||||
## Supersedes
|
||||
|
||||
- Any conversation or planning note that says the user submits the report year, month, or cutoff date.
|
||||
- The intermediate correction that said the user clicks a monthly-report button while the backend derives those values.
|
||||
- Any report-output rule requiring `TOTAL PRICE` data cells to be static values or requiring a zero-formula workbook.
|
||||
33
.project-docs/10-decisions/adr-template.md
Normal file
33
.project-docs/10-decisions/adr-template.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# ADR-{number}: {decision title}
|
||||
|
||||
## Status
|
||||
|
||||
Proposed
|
||||
|
||||
## Date
|
||||
|
||||
{YYYY-MM-DD}
|
||||
|
||||
## Context
|
||||
|
||||
{context that made the decision necessary}
|
||||
|
||||
## Decision
|
||||
|
||||
{decision made}
|
||||
|
||||
## Rationale
|
||||
|
||||
{why this option was chosen}
|
||||
|
||||
## Consequences
|
||||
|
||||
- {positive or negative consequence}
|
||||
|
||||
## Supersedes
|
||||
|
||||
- {older ADR or decision, if any}
|
||||
|
||||
## Related
|
||||
|
||||
- {related doc or source file}
|
||||
24
.project-docs/10-decisions/decision-index.md
Normal file
24
.project-docs/10-decisions/decision-index.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Decision Index
|
||||
|
||||
## Active Decisions
|
||||
|
||||
| ID | Decision | Status | Date | Applies To | Detail |
|
||||
|---|---|---|---|---|---|
|
||||
| ADR-001 | 月报在 Agent 结构化结果成功入库后由业务系统自动触发;`TOTAL PRICE` 为 Excel 公式字段 | Accepted | 2026-07-29 | 上传链路、月报触发、XLSX 输出 | [ADR-001](ADR-001-automatic-monthly-trigger-and-total-price-formula.md) |
|
||||
|
||||
## Superseded Decisions
|
||||
|
||||
| ID | Decision | Superseded By | Date |
|
||||
|---|---|---|---|
|
||||
| Conversation draft | 用户点击月报按钮并提交或选择年月/截止范围;金额写静态值 | ADR-001 | 2026-07-29 |
|
||||
|
||||
## Decision Criteria
|
||||
|
||||
Create or update an ADR when a choice affects:
|
||||
|
||||
- project positioning
|
||||
- architecture boundaries
|
||||
- public behavior
|
||||
- data model
|
||||
- long-term maintenance
|
||||
- user-facing workflow
|
||||
Reference in New Issue
Block a user