# Goga Cell Swift

> Swift CODEMANIFEST contract implementation rules

- **Type:** Skill
- **Install:** `agentstack add skill-qarium-goga-goga-cell-swift`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [qarium](https://agentstack.voostack.com/s/qarium)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** BSD-3-Clause
- **Upstream author:** [qarium](https://github.com/qarium)
- **Source:** https://github.com/qarium/goga/tree/1.1.x/goga/assets/skills/goga-cell-swift

## Install

```sh
agentstack add skill-qarium-goga-goga-cell-swift
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Swift: Contract Implementation Rules

Language skill for Swift.

Apply the specification within the context of the calling skill. Do not restate the content — use it
for decision-making.

Invoked via the `goga-lang-disp` router.

---

## Examples

Complete CODEMANIFEST example for Swift covering all DSL constructs:

```yaml
Imports:
  - Types:
      - NetworkService
      - SessionConfig AS Config
    Usages:
      - authentication
    From: path/to/network_cell

Usages:
  conventions: .goga/usages/swift_conventions.md
  pattern: |
    Use value types (struct) by default. Use reference types (class) only when identity or shared mutation is required.
  testing: |
    Use XCTest. Each public method must have test coverage.

Annotations: |
  Use `conventions` for code style.
  Use `testing` for test requirements.
  Use `authentication` from Imports for auth token handling.

  Prefer `struct` over `class` unless reference semantics are needed.

---

"parseInput(input: String) -> data: Data":
  location: Parser.swift
  annotations: |
    Parse raw input string into structured data.

    `input`: raw string to parse

    Use `pattern` for implementation.

"NetworkManager(baseURL: String)":
  location: NetworkManager.swift
  annotations: |
    Network client for API communication.

    `baseURL`: root URL for all API requests

    Use `authentication` from Imports for request signing.
    Use `conventions` for code style.
  properties:
    "baseURL -> String": |
      Root URL for API requests.
    "isConnected -> Bool": |
      Current connection status.
  methods:
    "fetchData(endpoint: String) -> response: Promise": |
      Fetch data from the specified endpoint.

      `endpoint`: API endpoint path
      `response`: async response data

      Use `pattern` for implementation.
    "cancelPendingRequests()": |
      Cancel all in-flight requests.

"NetworkService::AuthenticatedService(token: String)":
  location: AuthService.swift
  annotations: |
    Authenticated service extending NetworkService with token-based auth.

    `token`: authentication token

    Use `authentication` from Imports for token refresh logic.

->NetworkService: {}

---

Author: Goga
CreatedAt: 22/05/26
Description: |
  Example CODEMANIFEST demonstrating all DSL constructs for Swift.
```

## Cell

A cell is a module:

```
cell/
├── CODEMANIFEST
├── *.swift
```

## Language Features

**Facade**: only declarations with the `public` access modifier constitute the Facade. `internal` (the default access level) and `private` declarations are excluded from the Contract.

**Naming**: camelCase for functions and properties, PascalCase for types.

**Value types**: `struct` defines a Value Type, `class` defines a Reference Type. Select based on entity Semantics.

**Optionals**: `T?` denotes an Optional. Represent as `T?` in CODEMANIFEST.

**Protocol**: protocols define interfaces — map to Entity with methods only, excluding properties.

## Construct Mapping

| Swift                            | CODEMANIFEST     | Note                              |
|----------------------------------|------------------|-----------------------------------|
| `public class` / `public struct` | Entity           | Init parameters → Entity Signature |
| `public func` (top-level)        | Routine          |                                   |
| `public var` / `public let`      | Property         | Type from declaration             |
| `public func` (method)           | Method           |                                   |
| `public protocol`                | Entity           | Methods only, no properties       |
| `init` parameters                | Entity Signature |                                   |

## Implementation

- Public API must use `public`
- Use class/struct depending on semantics

## Signature Rules

Allowed:
```
String, Int, Double, Bool
[T]
[String: T]
T?
```

Forbidden:
```
Any
UnsafePointer
inout
```

---

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [qarium](https://github.com/qarium)
- **Source:** [qarium/goga](https://github.com/qarium/goga)
- **License:** BSD-3-Clause

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-qarium-goga-goga-cell-swift
- Seller: https://agentstack.voostack.com/s/qarium
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
