First deployment
Some checks failed
quality-gates / lint-and-test (push) Has been cancelled
quality-gates / security-scan (push) Has been cancelled

This commit is contained in:
2026-02-13 09:14:04 -05:00
parent 0e21e035f5
commit 679561bcdb
128 changed files with 3479 additions and 120 deletions

View File

@@ -0,0 +1,25 @@
## ADDED Requirements
### Requirement: Each news item exposes a permalink
The system SHALL expose a stable, shareable permalink for each rendered news item.
#### Scenario: Per-item permalink rendering
- **WHEN** a news item is rendered in hero or feed context
- **THEN** the UI provides a permalink target tied to that article context
#### Scenario: Permalink copy/share usability
- **WHEN** a user uses share/copy affordances for an item
- **THEN** the resulting URL contains sufficient information to resolve that article on load
### Requirement: Deep-link loads article modal in open state
The system SHALL open the matching article modal when the page is loaded with a valid article permalink.
#### Scenario: Valid permalink opens modal
- **WHEN** a user lands on homepage with a permalink for an existing article
- **THEN** the corresponding article modal is opened automatically
- **AND** modal content matches the permalink target
#### Scenario: Invalid permalink fails safely
- **WHEN** a permalink references a missing or invalid article identifier
- **THEN** the page remains usable without hard failure
- **AND** modal is not opened with incorrect content

View File

@@ -0,0 +1,20 @@
## ADDED Requirements
### Requirement: Error pages prominently display status code
The system SHALL show prominent HTTP status code display on 404 and 500 pages.
#### Scenario: 404 rendering
- **WHEN** user visits a non-existent route
- **THEN** the page prominently displays `404`
#### Scenario: 500 rendering
- **WHEN** an internal server error page is rendered
- **THEN** the page prominently displays `500`
### Requirement: Error pages include safe playful AI-style messaging
The system SHALL render an "Oh no!" style playful message that is safe and policy-compliant.
#### Scenario: Safe message selection
- **WHEN** an error page is displayed
- **THEN** a playful message is selected from a curated safe message set
- **AND** message excludes profanity and discriminatory/abusive content

View File

@@ -0,0 +1,24 @@
## MODIFIED Requirements
### Requirement: Footer exposes policy navigation links
The system SHALL display footer links for Terms of Use and Attribution on the landing page.
#### Scenario: Footer links visible on landing page
- **WHEN** a user loads the main page
- **THEN** the footer includes links labeled "Terms of Use" and "Attribution"
- **AND** links are visually distinguishable and keyboard focusable
#### Scenario: Footer links navigate correctly
- **WHEN** a user activates either policy link
- **THEN** the browser navigates to the corresponding policy page
- **AND** navigation succeeds without API dependency
#### Scenario: Footer includes back-to-top action
- **WHEN** a user reaches lower sections of the page
- **THEN** footer exposes a "Back to Top" control
- **AND** activating it returns viewport to page top smoothly
#### Scenario: Footer includes optional GitHub and email links
- **WHEN** GitHub repository URL and/or contact email are configured
- **THEN** footer renders corresponding links without replacing policy links
- **AND** absent values do not break footer layout

View File

@@ -0,0 +1,32 @@
## MODIFIED Requirements
### Requirement: API supports language-aware content retrieval
The system SHALL support language-aware content delivery for hero and feed reads using selected language input.
#### Scenario: Language-specific latest article response
- **WHEN** a client requests latest article data with a supported language selection
- **THEN** the system returns headline and summary in the selected language when available
- **AND** includes the corresponding base article metadata and media attribution
#### Scenario: Language-specific paginated feed response
- **WHEN** a client requests paginated feed data with a supported language selection
- **THEN** the system returns each feed item's headline and summary in the selected language when available
- **AND** preserves existing pagination behavior and ordering semantics
#### Scenario: Tamil and Malayalam rendering quality support
- **WHEN** Tamil (`ta`) or Malayalam (`ml`) content is delivered to frontend surfaces
- **THEN** payload text preserves script fidelity and Unicode correctness
- **AND** frontend presentation hooks can apply readability-focused typography adjustments without changing response shape
### Requirement: Language fallback to English is deterministic
The system SHALL return English source content when the requested translation is unavailable.
#### Scenario: Missing translation fallback
- **WHEN** a client requests Tamil or Malayalam content for an article lacking that translation
- **THEN** the system returns the English headline and summary for that article
- **AND** response shape remains consistent with language-aware responses
#### Scenario: Unsupported language handling
- **WHEN** a client requests a language outside supported values (`en`, `ta`, `ml`)
- **THEN** the system applies the defined default language behavior for this phase
- **AND** avoids breaking existing consumers of news endpoints

View File

@@ -0,0 +1,19 @@
## MODIFIED Requirements
### Requirement: Core layout is device-agnostic and responsive
The system SHALL render key surfaces (header, hero, feed, modal, footer) responsively across mobile, tablet, and desktop viewports.
#### Scenario: Mobile layout behavior
- **WHEN** a user opens the site on a mobile viewport
- **THEN** content remains readable without horizontal overflow
- **AND** interactive controls remain reachable and usable
#### Scenario: Desktop and tablet adaptation
- **WHEN** a user opens the site on tablet or desktop viewports
- **THEN** layout reflows according to breakpoint design rules
- **AND** no key content or controls are clipped
#### Scenario: Readability-focused typography and contrast updates
- **WHEN** content is rendered in core reading surfaces
- **THEN** typography and color choices improve baseline readability
- **AND** updates remain compatible with responsive behavior across breakpoints

View File

@@ -0,0 +1,19 @@
## MODIFIED Requirements
### Requirement: Core SEO metadata is present on public pages
The system SHALL expose standards-compliant SEO metadata on the homepage and policy pages, including description, robots, canonical URL, and social preview metadata.
#### Scenario: Homepage metadata baseline exists
- **WHEN** a crawler or browser loads the homepage
- **THEN** the document includes `description`, `robots`, and canonical metadata
- **AND** Open Graph and Twitter card metadata fields are present with non-empty values
#### Scenario: Policy pages include indexable metadata
- **WHEN** a crawler loads `/terms` or `/attribution`
- **THEN** the page includes page-specific `title` and `description` metadata
- **AND** Open Graph and Twitter card metadata are present for link previews
#### Scenario: Homepage title remains stable and brand-oriented
- **WHEN** homepage content updates to newer articles
- **THEN** document title remains a stable brand title (for example `ClawFort AI News`)
- **AND** title does not switch to latest-article headline text

View File

@@ -0,0 +1,28 @@
## ADDED Requirements
### Requirement: Modal/footer exposes minimal icon-based share actions
The system SHALL provide icon-only social share actions for article permalinks on supported providers.
#### Scenario: Supported share providers
- **WHEN** share controls are rendered
- **THEN** icons for `X`, `WhatsApp`, and `LinkedIn` are displayed
- **AND** activating an icon opens provider share flow with the article permalink
### Requirement: Footer supports env-driven GitHub and contact links
The system SHALL conditionally render GitHub and contact-email links from environment-backed configuration.
#### Scenario: Config present
- **WHEN** GitHub URL and contact email are configured
- **THEN** footer renders both links as interactive controls
#### Scenario: Config absent
- **WHEN** either value is missing
- **THEN** corresponding footer control is hidden without breaking layout
### Requirement: Contact affordance provides randomized safe microcopy
The contact link SHALL present randomized, policy-safe helper messages to encourage feedback.
#### Scenario: Randomized helper tooltip
- **WHEN** user hovers or nears the contact affordance
- **THEN** a tooltip-style helper message is shown from a predefined safe message pool
- **AND** message language avoids profanity/offensive/racist/sexist/misogynistic content

View File

@@ -0,0 +1,13 @@
## ADDED Requirements
### Requirement: Site includes AI-themed favicon
The system SHALL include an AI-themed favicon asset and reference it from public pages.
#### Scenario: Favicon linked in document head
- **WHEN** a public page is loaded
- **THEN** a favicon link element resolves to the configured AI-themed icon asset
#### Scenario: Favicon asset is cacheable and valid
- **WHEN** browser requests favicon asset
- **THEN** asset responds successfully with a valid icon format
- **AND** can be cached using standard static-asset policy

View File

@@ -0,0 +1,30 @@
## MODIFIED Requirements
### Requirement: Summary is rendered in a modal dialog using standard template
The system SHALL render article summary content in a modal dialog using the required structure.
#### Scenario: Open summary modal
- **WHEN** a user triggers summary view for an article
- **THEN** a modal dialog opens and displays content in this order: relevant image, TL;DR bullets, summary body, source and citation, and "Powered by Perplexity"
- **AND** modal content corresponds to the selected article
#### Scenario: Close summary modal
- **WHEN** a user closes the modal via close control or backdrop interaction
- **THEN** the modal is dismissed cleanly
- **AND** user returns to previous feed context without page navigation
#### Scenario: Permalink-driven modal open
- **WHEN** page is loaded with a valid article permalink state
- **THEN** the modal opens for the linked article without requiring manual click
### Requirement: Modal content preserves source link-out behavior
The system SHALL provide source link-outs from the summary modal.
#### Scenario: Source link-out from modal
- **WHEN** a user clicks source/citation link in the modal
- **THEN** the original source opens in a new tab/window
- **AND** modal behavior remains stable for continued browsing
#### Scenario: Modal exposes share entry points
- **WHEN** a summary modal is open for an article
- **THEN** share controls for the article permalink are available from modal/footer share area