Staging Ticket & Knowledge Base (KB) Design System & Layout Specification¶
- Owner & Publisher: CPL Real Rewards Team
- Technical Maintenance: Systems Developer
Target Environment: Staging (
cpl_real_rewards_stagingonhttps://angry-mad-smile.cpl.com.pg) Standard Version: v1.0 Effective Date: October 2026 Document Status: Approved & Standardized
Document Control Log¶
| Revision | Date | Author / Publisher | Description of Changes | Target Modules / Impact |
|---|---|---|---|---|
| v1.0 | 2026-10-04 | Flavius Narokobi | Standardized visual layout, 5W1H semantic structure, step cards, terminal formatting, and documentation URL rules for all Staging Tickets and KB Articles. | real.rewards.staging.ticketreal.rewards.staging.kb |
1. Purpose & Guiding Principles¶
This specification establishes the standardized design system and semantic layout for all future Staging Helpdesk Tickets (STG-TICK-xxx) and Knowledge Base Articles (KB-xxx) in Odoo 17 Real Rewards.
Core Design Principles¶
- Human-Centered Readability First:
- Zero Unformatted Text Blobs: Never paste raw multiline plain text with newline characters into HTML fields. Plain text newlines collapse in HTML rendering, producing dense, unreadable walls of text.
- Structured Cards with Visual Hierarchy: Chunk information into distinct, bite-sized cards with subtle borders (
#e2e8f0), generous line spacing (line-height: 1.7to1.8), rounded corners (8pxto10px), and ample whitespace. -
Color-Coded Semantic Accents: Use color intentionally to guide the human eye—blue for context/audit, red for root cause, emerald green for successful steps, purple for database backfills, amber for UI modifications, and dark slate for terminal commands.
-
Strict 5W1H Framework:
-
Every ticket rationale and every KB article must explicitly answer all six dimensions:
- WHO: Originating user, investigating engineer, impacted stakeholders.
- WHAT: Concrete functional requirement, bug fix, or architecture enhancement.
- WHERE: Environments, Odoo menu routes, database tables, and code files.
- WHEN: Timestamps, release dates, and sprint milestones.
- WHY: Operational business justification, compliance need, or system failure impact.
- HOW: Technical implementation steps, SQL queries, UI views, and testing methodology.
-
100% Live Documentation Links (Zero 404s):
- Every
doc_urlfield MUST resolve to an active, verified HTTP200 OKpage onhttps://docs.cpl.com.pg/. - Never link to uppercase drafts or missing pages (
/manuals/ODOO_ADMIN_MANUAL/,/manuals/SYSADMIN_MANUAL/, etc.). Always use the canonical live route matrix defined in Section 5.
2. Visual Component & Badge Library¶
2.1 5W1H Semantic Pill Badges¶
When rendering 5W1H dimensions in problem_statement, root_cause_analysis, or ticket text, wrap each dimension in a distinct badge:
| Dimension | Badge Label | Background | Text Color | Border |
|---|---|---|---|---|
| WHO | WHO |
#dbeafe |
#1e40af |
1px solid #bfdbfe |
| WHAT | WHAT |
#d1fae5 |
#065f46 |
1px solid #a7f3d0 |
| WHERE | WHERE |
#ede9fe |
#5b21b6 |
1px solid #ddd6fe |
| WHEN | WHEN |
#fef3c7 |
#92400e |
1px solid #fde68a |
| WHY | WHY |
#ffe4e6 |
#9f1239 |
1px solid #fecdd3 |
| HOW | HOW |
#cffafe |
#155e75 |
1px solid #a5f3fc |
Badge HTML Snippet:¶
<span style="display: inline-block; background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; margin-right: 6px; letter-spacing: 0.5px;">WHO</span>
2.2 Numbered Step Cards (step_by_step_resolution)¶
Each step in a Standard Operating Procedure (SOP) or implementation walkthrough must be wrapped in its own independent card with a colored left-accent border:
Card Container Wrapper:¶
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 14.5px; line-height: 1.7; color: #1e293b;">
<!-- Step cards go here -->
</div>
Step Card Template:¶
<div style="background: #ffffff; border: 1px solid #e2e8f0; border-left: 4px solid #10b981; border-radius: 8px; padding: 14px 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);">
<div style="display: flex; align-items: center; margin-bottom: 8px;">
<span style="background: #10b981; color: #ffffff; font-weight: 700; font-size: 12px; padding: 2px 10px; border-radius: 12px; margin-right: 10px; letter-spacing: 0.5px;">STEP 1</span>
<strong style="font-size: 15px; color: #0f172a;">Step Title Here</strong>
</div>
<ul style="margin: 0; padding-left: 20px; color: #334155;">
<li style="margin-bottom: 6px;">Detailed action item with <code style="background: #f1f5f9; padding: 2px 6px; border-radius: 4px;">inline_code</code> for parameters.</li>
<li>Second sub-bullet point with <strong>emphasized text</strong>.</li>
</ul>
</div>
Accent Border Color Guidelines:¶
- Green (
#10b981): Architecture, initial setup, or base configuration. - Blue (
#3b82f6): Business logic, de-duplication, and consolidation rules. - Purple (
#8b5cf6): Database migrations, SQL backfills, and schema indexing. - Amber (
#f59e0b): Front-end UI views, XML templates, and CSV exports. - Cyan (
#06b6d4): Verification, automated testing, and visual evidence.
2.3 Dark IDE Terminal Window (verification_cmd)¶
The verification command box simulates a developer terminal with a Mac-style titlebar and high-contrast monospace font:
<div style="background: #0f172a; border-radius: 8px; overflow: hidden; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);">
<div style="background: #1e293b; padding: 8px 14px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #334155;">
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ef4444;"></span>
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #f59e0b;"></span>
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #10b981;"></span>
<span style="margin-left: 10px; font-size: 12px; color: #94a3b8; font-weight: 500;">Terminal • Automated Playwright Verification</span>
</div>
<div style="padding: 14px 18px; color: #f8fafc; font-size: 13.5px; line-height: 1.6;">
<span style="color: #64748b;"># Execute automated Playwright UAT and integrity audit suite</span><br/>
<span style="color: #38bdf8; font-weight: 600;">$ python3 scratch/base_check.py</span>
</div>
</div>
3. Ticket Layout Specification (real.rewards.staging.ticket)¶
3.1 Field Schema Reference¶
| Field Name | Type | Options / Constraints | Default Value | Description |
|---|---|---|---|---|
ticket_code |
Char |
Readonly, Sequence | STG-TICK-xxx |
Unique sequential identifier. |
name |
Char |
Required, Tracking | None | Clear functional summary of change. |
category |
Selection |
15 categories (see below) | feature |
Affected functional domain. |
priority |
Selection |
0 (Low) to 3 (Urgent) |
1 (Normal) |
Business urgency. |
stage |
Selection |
draft, in_progress, review, resolved, closed |
resolved |
Current workflow state. |
assigned_user_id |
Many2one |
res.users |
Admin (2) |
Assigned engineer / admin. |
doc_url |
Char |
Verified Live URL | https://docs.cpl.com.pg/uat/staging_e2e_uat_run/ |
Live technical manual. |
kb_article_id |
Many2one |
real.rewards.staging.kb |
None | Associated KB Article. |
change_reason |
Text / Html |
5W1H Framework | None | Comprehensive problem audit. |
resolution_summary |
Text / Html |
5W1H Framework | None | Resolution deliverables & evidence. |
3.2 Category Selection Reference¶
pos_importer- POS Importer & Enginecard_replacements- Pronto Card Replacementsreadonly_security- Read-Only Loyalty Ledgersmart_search- Multi-Token Smart Searchquarantined_queue- Quarantined Cards Queuemaker_checker- Maker-Checker Workflowexecutive_dashboard- Executive Dashboarddaily_accounting- Daily Points Accountinguser_admin- User Admin & Access Controldocumentation- Documentation & Knowledge Baseconfiguration- System Configuration & Cutoversop- Standard Operating Procedure (SOP)feature- Feature Architecture & Brand Taxonomystore_operations- Store Operations & Locationsprimary_store- Primary Retail Store Intelligence
4. KB Article Layout Specification (real.rewards.staging.kb)¶
4.1 Field Schema Reference¶
| Field Name | Type | Widget | Description |
|---|---|---|---|
kb_code |
Char |
readonly |
Unique identifier (e.g. KB-018). |
name |
Char |
Default | Descriptive title prefixed with SOP: or Guide:. |
category |
Selection |
Default | Matches ticket category. |
ticket_id |
Many2one |
no_create |
Originating ticket (STG-TICK-xxx). |
doc_url |
Char |
url |
Verified HTTP 200 documentation link. |
problem_statement |
Html |
html |
5W1H problem breakdown in card. |
root_cause_analysis |
Html |
html |
5W1H technical root cause in card. |
step_by_step_resolution |
Html |
html |
Itemized step cards with colored left borders. |
verification_cmd |
Html |
html |
Dark IDE terminal box. |
5. Live Documentation URL Canonical Routing Matrix¶
To prevent broken links (404 errors), all agents and engineers must link exclusively to the following verified live routes on https://docs.cpl.com.pg/:
| Functional Topic | Target Ticket / KB | Deprecated 404 URL | Canonical Live Working URL (200 OK) |
|---|---|---|---|
| POS Importer & Parsing | STG-TICK-001KB-001 |
/manuals/ODOO_ADMIN_MANUAL/ |
https://docs.cpl.com.pg/manuals/pos_transaction_importer_and_deduplication/ |
| Pronto Card Replacement | STG-TICK-002KB-002 |
/manuals/store_staff_guide/ |
https://docs.cpl.com.pg/manuals/pronto_card_replacement/ |
| Ledger Immutability & Security | STG-TICK-003KB-003 |
/manuals/SYSADMIN_MANUAL/ |
https://docs.cpl.com.pg/technical/security_and_sso/ |
| Smart Search Engine | STG-TICK-004KB-004 |
/manuals/store_staff_guide/ |
https://docs.cpl.com.pg/manuals/store_staff_guide/ |
| Quarantined Cards Queue | STG-TICK-005KB-005 |
/manuals/store_staff_guide/ |
https://docs.cpl.com.pg/manuals/quarantined_cards_queue_manual/ |
| Maker-Checker Workflow | STG-TICK-006KB-006 |
/manuals/ODOO_MAKER_MANUAL/ |
https://docs.cpl.com.pg/manuals/maker_checker_workflow/ |
| Executive Dashboard KPIs | STG-TICK-007, 016KB-007, 016 |
/manuals/ODOO_ADMIN_MANUAL/ |
https://docs.cpl.com.pg/uat/staging_e2e_uat_run/ |
| Daily Points Accounting | STG-TICK-008KB-008 |
/manuals/ODOO_ADMIN_MANUAL/ |
https://docs.cpl.com.pg/audit/pos_data_audit_summary/ |
| User Administration & RBAC | STG-TICK-009KB-009 |
/manuals/SYSADMIN_MANUAL/ |
https://docs.cpl.com.pg/manuals/account_lifecycle_and_deactivation/ |
| Docs Hub & Document Control | STG-TICK-010KB-010 |
None | https://docs.cpl.com.pg/ |
| UAT Runs & Change Audit | STG-TICK-011 to 015 |
None | https://docs.cpl.com.pg/uat/staging_e2e_uat_run/ |
| Retail Shop Standardization | STG-TICK-017KB-017 |
/staging_change_log_and_kb/ |
https://docs.cpl.com.pg/uat/staging_e2e_uat_run/ |
| Primary Retail Store Badge | STG-TICK-018KB-018 |
/staging_change_log_and_kb/ |
https://docs.cpl.com.pg/uat/staging_e2e_uat_run/ |
6. AI Agent Implementation Checklist¶
When tasked with creating or updating tickets and KB articles, the AI agent must execute these steps in order:
- 1. Assign Next Code: Check sequence or query
MAX(ticket_code)/MAX(kb_code). - 2. Draft 5W1H Matrix: Ensure all 6 dimensions (
WHO,WHAT,WHERE,WHEN,WHY,HOW) are documented. - 3. Validate Documentation URL: Verify target
doc_urlagainst the Canonical Matrix (Section 5) and confirm HTTP 200. - 4. Build Step Cards: Structure
step_by_step_resolutioninto individual HTML step cards with color-coded left borders. - 5. Build Terminal Box: Structure
verification_cmdinto a dark IDE terminal window. - 6. Persist to PostgreSQL: Execute SQL upsert on
cpl_real_rewards_stagingwith proper character escaping. - 7. Verify via Playwright: Launch headless browser, navigate to the newly created ticket and KB form views, and capture full-page screenshot evidence.