init

Scan codebases for implicit rules and generate draft Cohesive substrate artifacts.

Updated May 7, 2026
One-click install
npx skills add https://github.com/marktoda/cohesive --skill init-marktoda
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: init
Source: https://github.com/marktoda/cohesive/tree/main/skills/init
Command: npx skills add https://github.com/marktoda/cohesive --skill init-marktoda

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of encoding implicit, undocumented codebase knowledge (such as invariants, gotchas, and engineering conventions) into structured, enforceable Cohesive substrate for teams and AI agents adopting Cohesive for the first time.

Core Features & Use Cases

  • Proto-substrate scanning: Automatically detects implicit rules hidden in code comments, test names, and code patterns across your codebase.
  • Rosetta Stone translations: Surfaces draft substrate artifacts with side-by-side definitions of Cohesive's vocabulary to teach your team the substrate categories as they review proposals.
  • Bounded first-pass substrate: Produces a capped set of ≤20 high-signal draft artifacts (named invariants, behavior matrices, gotchas, semantic linter candidates) for user review, plus optional skeletal CLAUDE.md and ARCHITECTURE.md if no equivalent top-level docs exist.
  • Use Case: A team adopting Cohesive on a legacy codebase can run this skill to automatically surface existing implicit rules (like "all external mutations must produce audit events" noted in comments) as draft substrate, instead of manually documenting every rule from scratch.

Quick Start

Run the init skill on your codebase to automatically scan for implicit engineering rules and generate a draft Cohesive substrate directory for your review.

Frequently Asked Questions about init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract implicit engineering rules from existing codebase comments and test names?

Extracting implicit engineering rules from an existing codebase involves scanning comments, test names, and code patterns to surface undocumented invariants and gotchas. This Skill automates that scanning to produce a bounded set of draft substrate artifacts for team review.

What is a Cohesive substrate and when do I need to initialize it for my codebase?

A Cohesive substrate is a structured representation of codebase invariants and engineering rules needed when adopting Cohesive for the first time. You initialize it to translate implicit code knowledge into enforceable draft artifacts like named invariants and behavior matrices.

Can I generate draft invariants and behavior matrices for a legacy codebase automatically?

You can generate draft invariants and behavior matrices for a legacy codebase by scanning for proto-substrate signals in comments and code patterns. This Skill produces a capped set of up to 20 high-signal draft artifacts with side-by-side vocabulary translations for review.

Does codebase initialization for substrate artifacts also create top-level documentation?

Codebase initialization for substrate artifacts does create optional skeletal top-level documentation like CLAUDE.md and ARCHITECTURE.md if no equivalent docs exist. It focuses primarily on producing draft named invariants, gotchas, and semantic linter candidates.

What is the best way to document undocumented codebase conventions for AI agents?

The best way to document undocumented codebase conventions for AI agents is to scan for proto-substrate signals and translate them into structured substrate artifacts. This Skill generates draft invariants and behavior matrices with side-by-side vocabulary translations to teach teams the substrate categories.

What are the limitations of automatic codebase substrate initialization?

Limitations of automatic codebase substrate initialization include a bounded output of 20 or fewer draft artifacts requiring manual team review and commit. It only surfaces implicit rules from proto-substrate signals and cannot enforce them until drafts are reviewed and committed.