Skip to content

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_staging on https://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.ticket
real.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

  1. Human-Centered Readability First:
  2. 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.
  3. Structured Cards with Visual Hierarchy: Chunk information into distinct, bite-sized cards with subtle borders (#e2e8f0), generous line spacing (line-height: 1.7 to 1.8), rounded corners (8px to 10px), and ample whitespace.
  4. 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.

  5. Strict 5W1H Framework:

  6. 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.
  7. 100% Live Documentation Links (Zero 404s):

  8. Every doc_url field MUST resolve to an active, verified HTTP 200 OK page on https://docs.cpl.com.pg/.
  9. 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 &bull; 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 & Engine
  • card_replacements - Pronto Card Replacements
  • readonly_security - Read-Only Loyalty Ledger
  • smart_search - Multi-Token Smart Search
  • quarantined_queue - Quarantined Cards Queue
  • maker_checker - Maker-Checker Workflow
  • executive_dashboard - Executive Dashboard
  • daily_accounting - Daily Points Accounting
  • user_admin - User Admin & Access Control
  • documentation - Documentation & Knowledge Base
  • configuration - System Configuration & Cutover
  • sop - Standard Operating Procedure (SOP)
  • feature - Feature Architecture & Brand Taxonomy
  • store_operations - Store Operations & Locations
  • primary_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-001
KB-001
/manuals/ODOO_ADMIN_MANUAL/ https://docs.cpl.com.pg/manuals/pos_transaction_importer_and_deduplication/
Pronto Card Replacement STG-TICK-002
KB-002
/manuals/store_staff_guide/ https://docs.cpl.com.pg/manuals/pronto_card_replacement/
Ledger Immutability & Security STG-TICK-003
KB-003
/manuals/SYSADMIN_MANUAL/ https://docs.cpl.com.pg/technical/security_and_sso/
Smart Search Engine STG-TICK-004
KB-004
/manuals/store_staff_guide/ https://docs.cpl.com.pg/manuals/store_staff_guide/
Quarantined Cards Queue STG-TICK-005
KB-005
/manuals/store_staff_guide/ https://docs.cpl.com.pg/manuals/quarantined_cards_queue_manual/
Maker-Checker Workflow STG-TICK-006
KB-006
/manuals/ODOO_MAKER_MANUAL/ https://docs.cpl.com.pg/manuals/maker_checker_workflow/
Executive Dashboard KPIs STG-TICK-007, 016
KB-007, 016
/manuals/ODOO_ADMIN_MANUAL/ https://docs.cpl.com.pg/uat/staging_e2e_uat_run/
Daily Points Accounting STG-TICK-008
KB-008
/manuals/ODOO_ADMIN_MANUAL/ https://docs.cpl.com.pg/audit/pos_data_audit_summary/
User Administration & RBAC STG-TICK-009
KB-009
/manuals/SYSADMIN_MANUAL/ https://docs.cpl.com.pg/manuals/account_lifecycle_and_deactivation/
Docs Hub & Document Control STG-TICK-010
KB-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-017
KB-017
/staging_change_log_and_kb/ https://docs.cpl.com.pg/uat/staging_e2e_uat_run/
Primary Retail Store Badge STG-TICK-018
KB-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_url against the Canonical Matrix (Section 5) and confirm HTTP 200.
  • 4. Build Step Cards: Structure step_by_step_resolution into individual HTML step cards with color-coded left borders.
  • 5. Build Terminal Box: Structure verification_cmd into a dark IDE terminal window.
  • 6. Persist to PostgreSQL: Execute SQL upsert on cpl_real_rewards_staging with 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.