AGENT SKILL

inspire-code-ios

iOS stack conventions: layering, tests, forbidden patterns, quality gates, build commands and seed conventions. Use when writing or testing code in a iOS package.

License 许可
MIT
所属仓库
Genomcore/inspire
最近更新
2026-11-13
Stars
★ 0
Forks
1

01 前言 Front Matter

name
inspire-code-ios
layer
frontend
stack
ios
description
iOS stack conventions: layering, tests, forbidden patterns, quality gates, build commands and seed conventions. Use when writing or testing code in a iOS package.

03 SKILL.md 正文

Layering

Not yet formulated for this stack — deliberately deferred to an iOS iteration that exercises real module boundaries, rather than transcribed untested from another stack's rules. The contract in _references/stack-skills.md still applies; this line is the deferral, not the answer.

Test conventions

  • Swift Testing (import Testing), not XCTest, for new suites: @Suite per feature, @Test("behavior description") per case.

  • #expect for assertions, #require for unwrapping optionals — a failed #require ends the test instead of cascading nil crashes.

  • Arrange-Act-Assert structure; test behavior, never implementation.

  • Parameterized cases via @Test(arguments:) instead of copy-pasted bodies:

    @Test("Item count formats correctly", arguments: [
        (0, "No items"),
        (1, "1 item"),
        (5, "5 items")
    ])
    func testPluralization(count: Int, expected: String) {
        let result = formatItemCount(count)
        #expect(result == expected)
    }
    
  • Edge cases are part of the derived list: empty strings, nil, boundaries, and — specific to this stack — different locales.

  • Keep tests fast (< 1 second each); slowness here is a design smell, not a fixture cost.

Forbidden patterns

Not yet formulated for this stack — same deferral as Layering.

Review focus

Not yet formulated for this stack — same deferral as Layering.

Quality gates

Not yet formulated for this stack — the backend profile's gates were measured on a real codebase and this stack has had no equivalent iteration (quality-gates.md Rule 2 forbids transcribing untested). The rules themselves still bind: a project on this stack derives its own gates (SwiftLint rule set, coverage floor) from an iteration that exercises each rule before writing it down. This section is the deferral, not the answer.

Build & verify

tests: swift test · one test: swift test --filter <testName> · coverage: swift test --enable-code-coverage · parallel: swift test --parallel

04 同仓库更多 Skills

Genomcore
Genomcore/inspire

update

Update this project's INSPIRE runtime to the installed plugin's version: report drift, re-materialize unchanged files, and refuse to clobber local edits. Use after /plugin update inspire reports a newer base.

★ 0
Genomcore
Genomcore/inspire

migrate

Move this project's knowledge base from the layered layout (01_adr, 02_modules, 03_features, 04_domain, 05_screens and the surface roster) to the concept layout under inspire_kb/01_spec/, where every artifact has a typed extension, and convert its [[wikilinks]] to relative Markdown links. Run once, on purpose, after /inspire:update reports the layered layout or counts wikilinks. Rebuilds nothing that is already built.

★ 0
Genomcore
Genomcore/inspire

init

Install the INSPIRE runtime into this repository: materialize the skills, validators, hooks and knowledge-base skeleton, register the hooks, and freeze the runtime version. Run once per project. Use when setting up INSPIRE in a new or existing repo.

★ 0
Genomcore
Genomcore/inspire

inspire-workspace

Workspace-level validation: the global pre-PR review (orchestrating module + cross-module checks) and vault-structure validation. Use for the required pre-merge gate and top-level structure checks. ADR lifecycle lives in /inspire-adr; the task tracker in /inspire-task.

★ 0
Genomcore
Genomcore/inspire

inspire-task

Task tracker: create / update / close / list / show tickets in inspire_kb/99_tracker/. A plain-file kanban (one Markdown file per ticket, no external tool) for tracking work, drift, and skill-feedback. Use to open, advance, close, or query tickets.

★ 0
Genomcore
Genomcore/inspire

inspire-spike

Vertical spikes: register and harvest external functional-prototype repos. A spike is a narrow, deep, throwaway build in its OWN repo that answers 'can we build it as we think?'. Use to register such a repo (name/reference it, set up its learnings hygiene) and to capture its learnings into the vault as a gap analysis against the current project.

★ 0