Skip to content

docs: Linear integration specs (6 directions, 4 specs)#75

Open
Wescome wants to merge 1 commit into
mainfrom
feat/linear-integration-specs
Open

docs: Linear integration specs (6 directions, 4 specs)#75
Wescome wants to merge 1 commit into
mainfrom
feat/linear-integration-specs

Conversation

@Wescome

@Wescome Wescome commented Jun 6, 2026

Copy link
Copy Markdown
Owner

What

Adds docs/linear-integration/ with four spec documents covering all six Linear integration directions for the Function Factory governance loop.

Direction → Spec mapping

Direction Description Spec
D1 WorkGraph atoms as Linear issues (P1/P2 atom + trace state projections) SPEC-LINEAR-SYNC-SERVICE-001
D2 Linear as We-layer Disposition Event surface (ff-linear-bridge) SPEC-FF-LINEAR-BRIDGE-001
D3 Divergence → Linear issue with A9 elucidation (P3 divergence projection) SPEC-LINEAR-SYNC-SERVICE-001
D4 Linear cycle as governance sprint cadence (CycleAwarenessService) SPEC-FF-CYCLE-HEALTH-001
D5 Factory commit tracing via FACTORY_* env vars → git trailers → SHA back to Linear SPEC-FF-COMMIT-TRACING-001
D6 Factory Health as living Linear document (P4 health document) SPEC-FF-CYCLE-HEALTH-001

Key finding

Linear is already the We-layer during Bootstrap. The bridge (SPEC-FF-LINEAR-BRIDGE-001) is a translation layer; the WeOps Console (SPEC-WEOPS-CONSOLE-001) is the native surface. WEOPS_SIGNING_KEY is shared between bridge and Console — no gateway update required during Phase 1→3 migration.

Implementation order

  1. SPEC-LINEAR-SYNC-SERVICE-001 — P1 atom projection (unblocks WEO-7/8/9)
  2. SPEC-FF-LINEAR-BRIDGE-001 — bridge webhook handler (unblocks human Dispositions)
  3. SPEC-FF-COMMIT-TRACING-001 — commit tracing (closes lineage loop)
  4. SPEC-FF-CYCLE-HEALTH-001 — cycle cadence + health document (observability)

Linear

Related issues: WEO-5 through WEO-22 (Function Factory Agent Infrastructure project)

Adds docs/linear-integration/ with four spec documents covering all six
Linear integration directions for the Function Factory governance loop.

Direction → Spec mapping:
  D1 (atom projection P1/P2)       → SPEC-LINEAR-SYNC-SERVICE-001
  D2 (Disposition Event surface)    → SPEC-FF-LINEAR-BRIDGE-001
  D3 (divergence projection P3)     → SPEC-LINEAR-SYNC-SERVICE-001
  D4 (cycle cadence)                → SPEC-FF-CYCLE-HEALTH-001
  D5 (commit tracing)               → SPEC-FF-COMMIT-TRACING-001
  D6 (health document P4)           → SPEC-FF-CYCLE-HEALTH-001

Key: Linear is the We-layer during Bootstrap. The bridge translates;
the WeOps Console (SPEC-WEOPS-CONSOLE-001) is the native surface.
WEOPS_SIGNING_KEY shared between bridge and Console — no gateway update
required during Phase 1→3 migration.

Linear issues: WEO-5 through WEO-22 (Function Factory Agent Infrastructure)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 719aedbf19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +153 to +155
return command.replace(
/-m\s+(['"])([\s\S]*?)\1/,
`-m "${newMessage}"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve shell quoting when appending trailers

When the original commit uses single quotes to protect shell metacharacters, this rewrite always re-emits the message inside double quotes without escaping. In that case a message like git commit -m 'fix $(...)' is transformed into a command where $(), backticks, embedded ", and newlines are reparsed by the shell before git runs, which can change the committed message or execute unintended command substitutions. The spec should require argument-level parsing/reconstruction or a temporary message file instead of string replacement.

Useful? React with 👍 / 👎.

Comment on lines +7 to +8
`harness/hooks/pre_tool_call.ts`,
`harness/hooks/post_execution.ts`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point the hook changes at the active hook files

The repo's active hooks are under .agent/harness/hooks/ (.agent/harness/hooks/pre_tool_call.ts and .agent/harness/hooks/post_execution.ts); I searched the tree and there is no root harness/hooks directory. Implementing the spec as written would create or edit the wrong files, leaving the actual enforcement/tracing hooks unchanged.

Useful? React with 👍 / 👎.

Comment on lines +146 to +148
projectId: request.projectId,
milestoneId: request.milestoneId,
stateId: BACKLOG_STATE_ID,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use Linear's project milestone field name

Linear's IssueCreateInput does not accept milestoneId; project milestones are assigned with projectMilestoneId. If the atom projection sends this object as specified, every issue creation that includes a WorkGraph milestone will be rejected by the GraphQL API before any atom issue or binding is created.

Useful? React with 👍 / 👎.

Comment on lines +94 to +95
Linear signs webhooks with an HMAC-SHA256 signature in the
`Linear-Signature` header. The bridge verifies this on every request:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add replay protection for Linear webhooks

Verifying the HMAC only proves the body was originally signed by Linear; it does not stop the same signed webhook from being replayed. In the disposition flow here, replaying a prior IssueCommentCreate can write another timestamped ELC artifact and issue/send another gateway token for the same human comment, so the bridge also needs to validate webhookTimestamp freshness and/or store Linear delivery/comment IDs as idempotency keys before processing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant