diff --git a/keywords.config.yaml b/keywords.config.yaml index 8dcffbbe4..47bc6beb6 100644 --- a/keywords.config.yaml +++ b/keywords.config.yaml @@ -49,7 +49,7 @@ metadata_rules: required: true multiple: true min: 1 - max: 5 + max: 8 validation_rules: - no_duplicates: true description: "Categories must not repeat" @@ -62,19 +62,41 @@ metadata_rules: - alt-da - permissionless-batch-submission - block-times - + - data-availability + - data-availability-layer + # Sequencing Layer - sequencer - sequencer-pbs - sequencer-decentralization - sequencer-in-a-box - op-batcher + - outages + - downtime + - optimism-portal + - transaction-submission + - transaction-inclusion + - censorship-resistance + - disaster-recovery + - forced-transactions + - sequencing-layer # Derivation Layer - rollup-node - fault-proofs - fp-contracts + - dispute-game + - dispute-resolution + - fault-tolerance + - fault-proof-system + - contests + - virtual-machine - op-challenger + - safe-head + - derivation + - derivation-pipeline + - derivation-layer + - batch-submission - cannon - zk - op-workbench # Tool: derivation testing & simulation @@ -90,39 +112,120 @@ metadata_rules: - preinstalls - custom-gas-token - gas + - gas-configuration + - rpc + - mempool + - block-production + - block-execution - transactions + - conditional-transactions - l2-contracts - account-abstraction - paymasters + - l1-data-fee + - execution-gas-fee + - eip-1559 + - sequencer-fee-vault - dev-console # Tool: execution layer interaction - + - execution-layer + # Settlement Layer - l1-contracts + - superchain-contracts - standard-bridge + - custom-bridge - superchain-erc20 + - deposits + - withdrawals - teleportr + - bridging + - token-standard + - token-bridge + - eth-bridging + - superchain-weth + - superchain-token-bridge + - token-deployment + - event-reading + - block-safety + - dependency-set - interoperability - cross-chain-messaging + - cross-domain-messenger + - message-relaying + - message-passing + - message-validation + - transaction-flow + - l1-l2-communication + - message-proving + - message-finalization + - l2-to-l1 + - token-transfers - interoperable-assets + - reorgs - op-deployer # Tool: contract deployment - op-supervisor + - transaction-finality + - ethereum-consensus + - finality-guarantees + - transaction-lifecycle + - rollup-transactions + - state-commitment + - contract-addresses + - settlement-layer # Governance Layer - security-council + - guardian + - multisig + - governance + - optimism-collective + - superchain-ecosystem + - token-house + - citizens-house + - delegates + - voting + - audits + - security-policy + - security-model + - security-reviews + - vulnerability-assessment + - bug-bounty-program + - responsible-disclosure + - vulnerability-reporting + - safety-mechanisms + - pause + - emergency-response - op-token - blockspace-charters - retro-funding - revshare-enshrinement + - superchain - superchain-registry + - security-council + - blockspace-charters + - contract-upgrades + - governance-layer # Cross-layer Development Tools + - architecture + - op-stack - supersim # Tests across multiple layers - - devnets # Full-stack local environment + - devnet # Full-stack local environment - performance-tooling # Stack-wide performance testing - - superchain-registry # Chain management across layers - l1-deployment-upgrade-tooling # Cross-layer deployment - l2-deployment-upgrade-tooling # Cross-layer deployment - testnet-tooling # testnet-specific tools like faucets, block explorers, etc + - deployment-tooling # deployment-specific tools like OPCM + - testing-environment + - testing + - alphanets + - betanets + - chain-deployment + - layer2-scaling + - smart-contracts + - local-development-environment + - kurtosis + - docker # Chain Management (Cross-layer) - protocol @@ -165,6 +268,16 @@ metadata_rules: - security-monitoring-response - stability-monitoring - security + - research + - beta-features + - experimental + - feature-testing + - decentralization + - modularity + - system-design + - system-configuration + - development-networks + - network-upgrades # Development Languages & SDKs - solidity @@ -187,11 +300,6 @@ metadata_rules: - testnet - mainnet - # Superchain Categories - - superchain-registry - - security-council - - blockspace-charters - # Test Networks - sepolia # Ethereum L1 testnet - op-sepolia # OP Stack L2 testnet diff --git a/notes/metadata-update.md b/notes/metadata-update.md index 7982755ec..3340b4c9c 100644 --- a/notes/metadata-update.md +++ b/notes/metadata-update.md @@ -85,7 +85,7 @@ metadata_rules: - tokens - standard-bridge - interoperable-message-passing - - devnets + - devnet - infrastructure ``` @@ -159,7 +159,7 @@ Detected categories: ```yaml categories: - protocol - - devnets + - devnet - governance - security ``` diff --git a/pages/app-developers/tools/supersim.mdx b/pages/app-developers/tools/supersim.mdx index 7c0a93aad..0bb1ce1a1 100644 --- a/pages/app-developers/tools/supersim.mdx +++ b/pages/app-developers/tools/supersim.mdx @@ -6,10 +6,15 @@ content_type: guide topic: tools personas: - app-developer + - protocol-developer categories: - - protocol - - devops-tooling + - devnet + - local-devnet + - testing + - interoperability + - cross-chain-messaging - supersim + - protocol is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/bridging.mdx b/pages/app-developers/tutorials/bridging.mdx index e251c3d1b..acf857249 100644 --- a/pages/app-developers/tutorials/bridging.mdx +++ b/pages/app-developers/tutorials/bridging.mdx @@ -9,7 +9,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx b/pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx index 9871a793f..777d2b4a7 100644 --- a/pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx +++ b/pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx @@ -11,7 +11,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - mainnet - testnet is_imported_content: 'false' diff --git a/pages/app-developers/tutorials/bridging/cross-dom-bridge-eth.mdx b/pages/app-developers/tutorials/bridging/cross-dom-bridge-eth.mdx index df97cccb9..d6a7b5520 100644 --- a/pages/app-developers/tutorials/bridging/cross-dom-bridge-eth.mdx +++ b/pages/app-developers/tutorials/bridging/cross-dom-bridge-eth.mdx @@ -11,7 +11,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - mainnet - testnet - viem diff --git a/pages/app-developers/tutorials/bridging/cross-dom-solidity.mdx b/pages/app-developers/tutorials/bridging/cross-dom-solidity.mdx index 315fcb927..a9c7cbde4 100644 --- a/pages/app-developers/tutorials/bridging/cross-dom-solidity.mdx +++ b/pages/app-developers/tutorials/bridging/cross-dom-solidity.mdx @@ -11,7 +11,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - mainnet - testnet - viem diff --git a/pages/app-developers/tutorials/bridging/standard-bridge-custom-token.mdx b/pages/app-developers/tutorials/bridging/standard-bridge-custom-token.mdx index e39da6b2a..beeb2ae45 100644 --- a/pages/app-developers/tutorials/bridging/standard-bridge-custom-token.mdx +++ b/pages/app-developers/tutorials/bridging/standard-bridge-custom-token.mdx @@ -9,7 +9,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - mainnet - testnet is_imported_content: 'false' diff --git a/pages/app-developers/tutorials/bridging/standard-bridge-standard-token.mdx b/pages/app-developers/tutorials/bridging/standard-bridge-standard-token.mdx index 58e92cf0c..3c99150b2 100644 --- a/pages/app-developers/tutorials/bridging/standard-bridge-standard-token.mdx +++ b/pages/app-developers/tutorials/bridging/standard-bridge-standard-token.mdx @@ -9,7 +9,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - mainnet - testnet is_imported_content: 'false' diff --git a/pages/app-developers/tutorials/interop.mdx b/pages/app-developers/tutorials/interop.mdx index 28bf1231c..0db9f863e 100644 --- a/pages/app-developers/tutorials/interop.mdx +++ b/pages/app-developers/tutorials/interop.mdx @@ -9,7 +9,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx b/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx index 8aac86ee1..774d9fcba 100644 --- a/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx +++ b/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx @@ -9,7 +9,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/contract-calls.mdx b/pages/app-developers/tutorials/interop/contract-calls.mdx index 7c246886b..2532bc9f0 100644 --- a/pages/app-developers/tutorials/interop/contract-calls.mdx +++ b/pages/app-developers/tutorials/interop/contract-calls.mdx @@ -10,7 +10,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx b/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx index 4734c5e09..38d9be2dc 100644 --- a/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx +++ b/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx @@ -10,7 +10,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet - standard-bridge is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/event-contests.mdx b/pages/app-developers/tutorials/interop/event-contests.mdx index 253cbd067..48a8bab50 100644 --- a/pages/app-developers/tutorials/interop/event-contests.mdx +++ b/pages/app-developers/tutorials/interop/event-contests.mdx @@ -10,7 +10,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/event-reads.mdx b/pages/app-developers/tutorials/interop/event-reads.mdx index 4db6264f5..ee38b979f 100644 --- a/pages/app-developers/tutorials/interop/event-reads.mdx +++ b/pages/app-developers/tutorials/interop/event-reads.mdx @@ -10,7 +10,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/relay-messages-cast.mdx b/pages/app-developers/tutorials/interop/relay-messages-cast.mdx index 451456a19..7f8fbb3a5 100644 --- a/pages/app-developers/tutorials/interop/relay-messages-cast.mdx +++ b/pages/app-developers/tutorials/interop/relay-messages-cast.mdx @@ -10,7 +10,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet - foundry is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/relay-messages-viem.mdx b/pages/app-developers/tutorials/interop/relay-messages-viem.mdx index 29fa88876..5654bf696 100644 --- a/pages/app-developers/tutorials/interop/relay-messages-viem.mdx +++ b/pages/app-developers/tutorials/interop/relay-messages-viem.mdx @@ -10,7 +10,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet - viem is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx b/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx index 45a8f97ec..a641e7b18 100644 --- a/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx +++ b/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx @@ -12,7 +12,7 @@ personas: categories: - cross-chain-messaging - infrastructure - - devnets + - devnet - standard-bridge is_imported_content: 'true' --- diff --git a/pages/app-developers/tutorials/supersim.mdx b/pages/app-developers/tutorials/supersim.mdx index d48fa17b4..87448518a 100644 --- a/pages/app-developers/tutorials/supersim.mdx +++ b/pages/app-developers/tutorials/supersim.mdx @@ -5,7 +5,7 @@ lang: en-US content_type: tutorial topic: supersim-guides-and-tutorials personas: app-developer -categories: ['supersim', 'devnets', 'cli'] +categories: ['supersim', 'devnet', 'cli'] is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/chain-env.mdx b/pages/app-developers/tutorials/supersim/chain-env.mdx index 77d49dc39..233012ed4 100644 --- a/pages/app-developers/tutorials/supersim/chain-env.mdx +++ b/pages/app-developers/tutorials/supersim/chain-env.mdx @@ -10,7 +10,7 @@ personas: - app-developer categories: - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/chain-env/chain-a.mdx b/pages/app-developers/tutorials/supersim/chain-env/chain-a.mdx index 7c964e927..f91b83002 100644 --- a/pages/app-developers/tutorials/supersim/chain-env/chain-a.mdx +++ b/pages/app-developers/tutorials/supersim/chain-env/chain-a.mdx @@ -10,7 +10,7 @@ categories: - cross-chain-messaging - standard-bridge - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/chain-env/chain-b.mdx b/pages/app-developers/tutorials/supersim/chain-env/chain-b.mdx index e6ea7e13f..6eece6ba9 100644 --- a/pages/app-developers/tutorials/supersim/chain-env/chain-b.mdx +++ b/pages/app-developers/tutorials/supersim/chain-env/chain-b.mdx @@ -10,7 +10,7 @@ categories: - cross-chain-messaging - standard-bridge - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/chain-env/included-contracts.mdx b/pages/app-developers/tutorials/supersim/chain-env/included-contracts.mdx index 137fe275b..68401fa1a 100644 --- a/pages/app-developers/tutorials/supersim/chain-env/included-contracts.mdx +++ b/pages/app-developers/tutorials/supersim/chain-env/included-contracts.mdx @@ -10,7 +10,7 @@ categories: - cross-chain-messaging - standard-bridge - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/deposit-transactions.mdx b/pages/app-developers/tutorials/supersim/deposit-transactions.mdx index 6c8a35607..48485a621 100644 --- a/pages/app-developers/tutorials/supersim/deposit-transactions.mdx +++ b/pages/app-developers/tutorials/supersim/deposit-transactions.mdx @@ -10,7 +10,7 @@ categories: - cross-chain-messaging - standard-bridge - supersim - - devnets + - devnet - mainnet - transactions is_imported_content: 'false' diff --git a/pages/app-developers/tutorials/supersim/getting-started.mdx b/pages/app-developers/tutorials/supersim/getting-started.mdx index 53604732b..5c03b4b65 100644 --- a/pages/app-developers/tutorials/supersim/getting-started.mdx +++ b/pages/app-developers/tutorials/supersim/getting-started.mdx @@ -10,7 +10,7 @@ personas: - app-developer categories: - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/getting-started/first-steps.mdx b/pages/app-developers/tutorials/supersim/getting-started/first-steps.mdx index e6c402f16..c6164e0bc 100644 --- a/pages/app-developers/tutorials/supersim/getting-started/first-steps.mdx +++ b/pages/app-developers/tutorials/supersim/getting-started/first-steps.mdx @@ -10,7 +10,7 @@ categories: - cross-chain-messaging - standard-bridge - supersim - - devnets + - devnet - testnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/getting-started/installation.mdx b/pages/app-developers/tutorials/supersim/getting-started/installation.mdx index d1d0ebbc5..0895a6260 100644 --- a/pages/app-developers/tutorials/supersim/getting-started/installation.mdx +++ b/pages/app-developers/tutorials/supersim/getting-started/installation.mdx @@ -8,7 +8,7 @@ personas: - app-developer categories: - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/reference.mdx b/pages/app-developers/tutorials/supersim/reference.mdx index c31b7a550..4fd1aca07 100644 --- a/pages/app-developers/tutorials/supersim/reference.mdx +++ b/pages/app-developers/tutorials/supersim/reference.mdx @@ -8,7 +8,7 @@ personas: - app-developer categories: - supersim - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/supersim/reference/fork.mdx b/pages/app-developers/tutorials/supersim/reference/fork.mdx index c42cdb2fc..d2d21b3ed 100644 --- a/pages/app-developers/tutorials/supersim/reference/fork.mdx +++ b/pages/app-developers/tutorials/supersim/reference/fork.mdx @@ -8,7 +8,7 @@ personas: - app-developer categories: - supersim - - devnets + - devnet - mainnet - testnet - cli diff --git a/pages/app-developers/tutorials/supersim/reference/vanilla.mdx b/pages/app-developers/tutorials/supersim/reference/vanilla.mdx index 6ca562938..46b40aa26 100644 --- a/pages/app-developers/tutorials/supersim/reference/vanilla.mdx +++ b/pages/app-developers/tutorials/supersim/reference/vanilla.mdx @@ -8,7 +8,7 @@ personas: - app-developer categories: - supersim - - devnets + - devnet - cli is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/transactions.mdx b/pages/app-developers/tutorials/transactions.mdx index cc14d04a5..549e1a3af 100644 --- a/pages/app-developers/tutorials/transactions.mdx +++ b/pages/app-developers/tutorials/transactions.mdx @@ -10,7 +10,7 @@ categories: - transactions - mainnet - testnet - - devnets + - devnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/transactions/sdk-estimate-costs.mdx b/pages/app-developers/tutorials/transactions/sdk-estimate-costs.mdx index 01f441420..39e5226d2 100644 --- a/pages/app-developers/tutorials/transactions/sdk-estimate-costs.mdx +++ b/pages/app-developers/tutorials/transactions/sdk-estimate-costs.mdx @@ -9,7 +9,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - mainnet - testnet is_imported_content: 'false' diff --git a/pages/app-developers/tutorials/transactions/sdk-trace-txns.mdx b/pages/app-developers/tutorials/transactions/sdk-trace-txns.mdx index f87b0d276..5f18e147b 100644 --- a/pages/app-developers/tutorials/transactions/sdk-trace-txns.mdx +++ b/pages/app-developers/tutorials/transactions/sdk-trace-txns.mdx @@ -11,7 +11,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - testnet is_imported_content: 'false' --- diff --git a/pages/app-developers/tutorials/transactions/send-tx-from-eth.mdx b/pages/app-developers/tutorials/transactions/send-tx-from-eth.mdx index 42bbc1f5b..76ce769c3 100644 --- a/pages/app-developers/tutorials/transactions/send-tx-from-eth.mdx +++ b/pages/app-developers/tutorials/transactions/send-tx-from-eth.mdx @@ -11,7 +11,7 @@ personas: categories: - cross-chain-messaging - standard-bridge - - devnets + - devnet - testnet is_imported_content: 'false' --- diff --git a/pages/stack/beta-features.mdx b/pages/stack/beta-features.mdx index f5bfe50be..1189d1b04 100644 --- a/pages/stack/beta-features.mdx +++ b/pages/stack/beta-features.mdx @@ -1,7 +1,19 @@ --- title: Beta Features -description: Learn how beta features in the OP Stack work, their benefits, and how to provide feedback. +description: >- + Learn how beta features in the OP Stack work, their benefits, and how to + provide feedback. lang: en-US +content_type: guide +topic: beta-features +personas: + - protocol-developer + - app-developer +categories: + - protocol + - feature-testing + - experimental +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/beta-features/alt-da-mode.mdx b/pages/stack/beta-features/alt-da-mode.mdx index a72c26e02..5ab767e7f 100644 --- a/pages/stack/beta-features/alt-da-mode.mdx +++ b/pages/stack/beta-features/alt-da-mode.mdx @@ -1,7 +1,21 @@ --- -title: Alt-DA Mode explainer +title: Alt-DA Mode Explainer +description: >- + Learn the basic process, benefits, and considerations for running an Alt-DA + mode chain. lang: en-US -description: Learn the basic process, benefits, and considerations for running an Alt-DA mode chain. +content_type: guide +topic: alt-da-mode-explainer +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - alt-da + - data-availability + - sequencer +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/components.mdx b/pages/stack/components.mdx index 2c879bbef..2d850436e 100644 --- a/pages/stack/components.mdx +++ b/pages/stack/components.mdx @@ -1,7 +1,23 @@ --- title: OP Stack components +description: >- + Learn about OP Stack components including the different layers and modules + available for development. lang: en-US -description: Learn about OP Stack components including the different layers and modules available for development. +content_type: guide +topic: op-stack-components +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - mainnet + - protocol + - architecture + - system-design + - modularity + - settlement-layer +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/design-principles.mdx b/pages/stack/design-principles.mdx index e765a1809..10d0c2858 100644 --- a/pages/stack/design-principles.mdx +++ b/pages/stack/design-principles.mdx @@ -1,7 +1,18 @@ --- title: Design philosophy & design principles +description: >- + Learn the design philosophy and design principles for contributing to the OP + Stack. lang: en-US -description: Learn the design philosophy and design principles for contributing to the OP Stack. +content_type: guide +topic: design-philosophy-design-principles +personas: + - protocol-developer + - app-developer +categories: + - protocol + - design-philosophy +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/dev-net.mdx b/pages/stack/dev-net.mdx index a7e1c3bef..9595bfa4a 100644 --- a/pages/stack/dev-net.mdx +++ b/pages/stack/dev-net.mdx @@ -1,7 +1,21 @@ --- -title: Running a Local Development Environment -lang: en-US +title: Running a local development environment description: This tutorial walks you through spinning up an OP Stack devnet chain. +lang: en-US +content_type: guide +topic: running-a-local-development-environment +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - testnet + - protocol + - local-development-environment + - chain-deployment + - kurtosis + - docker +is_imported_content: 'false' --- import {Callout, Steps} from 'nextra/components' diff --git a/pages/stack/differences.mdx b/pages/stack/differences.mdx index 5bbbba9df..efbb41252 100644 --- a/pages/stack/differences.mdx +++ b/pages/stack/differences.mdx @@ -1,8 +1,22 @@ --- title: Differences between Ethereum and OP Stack Chains +description: >- + Learn the minor differences between the behavior of Ethereum and OP Stack + chains. lang: en-US -tags: ["eng-protocol"] -description: Learn the minor differences between the behavior of Ethereum and OP Stack chains. +content_type: guide +topic: differences-between-ethereum-and-op-stack-chains +personas: + - protocol-developer + - app-developer +categories: + - protocol + - evm-equivalence + - address-aliasing + - transaction-fees + - mempool + - chain-finality +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/fact-sheet.mdx b/pages/stack/fact-sheet.mdx index 3f3e59026..ac118c4eb 100644 --- a/pages/stack/fact-sheet.mdx +++ b/pages/stack/fact-sheet.mdx @@ -1,7 +1,18 @@ --- -title: OP Stack Fact Sheet -lang: en-US +title: Overview description: Get an overview of features associated with an OP Stack chain +lang: en-US +content_type: guide +topic: overview +personas: + - protocol-developer + - chain-operator +categories: + - protocol + - gas-configuration + - data-availability + - architecture +is_imported_content: 'false' --- # Overview diff --git a/pages/stack/fault-proofs.mdx b/pages/stack/fault-proofs.mdx index 5f4b994f1..420d72704 100644 --- a/pages/stack/fault-proofs.mdx +++ b/pages/stack/fault-proofs.mdx @@ -1,7 +1,21 @@ --- title: Fault Proofs -description: Documentation covering Cannon, Challenger, Explainer, Fp Components, Fp Security, Mips in the Fault Proofs section of the OP Stack ecosystem. +description: >- + Documentation covering Cannon, Challenger, Explainer, Fp Components, Fp + Security, Mips in the Fault Proofs section of the OP Stack ecosystem. lang: en-US +content_type: landing-page +topic: fault-proofs +personas: + - protocol-developer +categories: + - mainnet + - protocol + - security-model + - dispute-resolution + - cannon + - security +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/fault-proofs/cannon.mdx b/pages/stack/fault-proofs/cannon.mdx index 0a60d138a..bdecf2bb4 100644 --- a/pages/stack/fault-proofs/cannon.mdx +++ b/pages/stack/fault-proofs/cannon.mdx @@ -1,7 +1,19 @@ --- -title: Fault proof VM - Cannon +title: 'Fault proof VM: Cannon' +description: >- + Learn about Cannon and its default operation as part of Optimism's Fault Proof + Virtual Machine. lang: en-US -description: Learn about Cannon and its default operation as part of Optimism's Fault Proof Virtual Machine. +content_type: guide +topic: fault-proof-vm-cannon +personas: + - protocol-developer +categories: + - protocol + - fault-proofs + - dispute-game + - virtual-machine +is_imported_content: 'false' --- import Image from 'next/image' diff --git a/pages/stack/fault-proofs/challenger.mdx b/pages/stack/fault-proofs/challenger.mdx index d1d9b4480..ed5a9bb2b 100644 --- a/pages/stack/fault-proofs/challenger.mdx +++ b/pages/stack/fault-proofs/challenger.mdx @@ -1,7 +1,24 @@ --- title: OP-Challenger explainer +description: >- + Learn about OP-Challenger and how it operates within the OP Stack's Fault + Proof System. lang: en-US -description: Learn about OP-Challenger and how it operates within the OP Stack's Fault Proof System. +content_type: guide +topic: op-challenger-explainer +personas: + - protocol-developer + - chain-operator + - app-developer + - node-operator +categories: + - protocol + - fault-proofs + - security + - dispute-game + - infrastructure + - op-challenger +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/fault-proofs/explainer.mdx b/pages/stack/fault-proofs/explainer.mdx index 73a648af1..74a311e3b 100644 --- a/pages/stack/fault-proofs/explainer.mdx +++ b/pages/stack/fault-proofs/explainer.mdx @@ -1,7 +1,21 @@ --- title: Fault proofs explainer -lang: en-US description: Learn about the OP Stack's Fault Proof System. +lang: en-US +content_type: guide +topic: fault-proofs-explainer +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - mainnet + - protocol + - fault-proofs + - security + - dispute-game + - withdrawals +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/fault-proofs/fp-components.mdx b/pages/stack/fault-proofs/fp-components.mdx index 6cb238e0b..a443ef1d5 100644 --- a/pages/stack/fault-proofs/fp-components.mdx +++ b/pages/stack/fault-proofs/fp-components.mdx @@ -1,7 +1,22 @@ --- -title: FP System components +title: FP system components +description: >- + Learn about Fault Proof System components and how they work together to + enhance decentralization in the Optimism ecosystem. lang: en-US -description: Learn about Fault Proof System components and how they work together to enhance decentralization in the Optimism ecosystem. +content_type: guide +topic: fp-system-components +personas: + - protocol-developer + - app-developer +categories: + - mainnet + - protocol + - fault-proofs + - architecture + - dispute-game + - virtual-machine +is_imported_content: 'false' --- import Image from 'next/image' diff --git a/pages/stack/fault-proofs/fp-security.mdx b/pages/stack/fault-proofs/fp-security.mdx index 4efaaeb1d..89607f4d0 100644 --- a/pages/stack/fault-proofs/fp-security.mdx +++ b/pages/stack/fault-proofs/fp-security.mdx @@ -1,7 +1,19 @@ --- title: Fault proofs Mainnet security -lang: en-US description: Learn about changes to the security model for the Fault Proofs Mainnet System. +lang: en-US +content_type: guide +topic: fault-proofs-mainnet-security +personas: + - protocol-developer +categories: + - mainnet + - protocol + - fault-proofs + - security + - guardian + - governance +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/fault-proofs/mips.mdx b/pages/stack/fault-proofs/mips.mdx index b84a2b493..83ea28474 100644 --- a/pages/stack/fault-proofs/mips.mdx +++ b/pages/stack/fault-proofs/mips.mdx @@ -1,7 +1,21 @@ --- -title: Fault proof VM - MIPS.sol +title: 'Fault proof VM: MIPS.sol' +description: >- + Learn about the `MIPS.sol` smart contract that works as part of Optimism's + Fault Proof Virtual Machine. lang: en-US -description: Learn about the `MIPS.sol` smart contract that works as part of Optimism's Fault Proof Virtual Machine. +content_type: reference +topic: fault-proof-vm-mips +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - fault-proofs + - virtual-machine + - smart-contracts +is_imported_content: 'false' --- import Image from 'next/image' diff --git a/pages/stack/features.mdx b/pages/stack/features.mdx index 84cad55a4..b90d0d29b 100644 --- a/pages/stack/features.mdx +++ b/pages/stack/features.mdx @@ -1,7 +1,18 @@ --- title: Features -description: Documentation covering Send Raw Transaction Conditional in the Features section of the OP Stack ecosystem. +description: >- + Documentation covering Send Raw Transaction Conditional in the Features + section of the OP Stack ecosystem. lang: en-US +content_type: landing-page +topic: features +personas: + - protocol-developer +categories: + - protocol + - conditional-transactions + - mempool +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/features/send-raw-transaction-conditional.mdx b/pages/stack/features/send-raw-transaction-conditional.mdx index 1d0e6bf3b..e07487c90 100644 --- a/pages/stack/features/send-raw-transaction-conditional.mdx +++ b/pages/stack/features/send-raw-transaction-conditional.mdx @@ -1,7 +1,22 @@ --- title: SendRawTransactionConditional explainer +description: >- + Learn about the eth_sendRawTransactionConditional RPC method for conditional + transaction inclusion on the OP Stack. lang: en-US -description: Learn about the eth_sendRawTransactionConditional RPC method for conditional transaction inclusion on the OP Stack. +content_type: guide +topic: send-raw-transaction-conditional +personas: + - protocol-developer + - chain-operator +categories: + - protocol + - sequencer + - transactions + - rpc-methods + - mempool + - api +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/getting-started.mdx b/pages/stack/getting-started.mdx index 5a5fd2daf..1defbe14f 100644 --- a/pages/stack/getting-started.mdx +++ b/pages/stack/getting-started.mdx @@ -1,7 +1,21 @@ --- title: Getting started with the OP Stack -lang: en-US description: Learn the basics of OP Stack development. +lang: en-US +content_type: guide +topic: getting-started-with-the-op-stack +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - mainnet + - protocol + - superchain + - chain-deployment + - superchain-ecosystem + - op-stack +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop.mdx b/pages/stack/interop.mdx index 58220489f..d4fd2586e 100644 --- a/pages/stack/interop.mdx +++ b/pages/stack/interop.mdx @@ -1,7 +1,24 @@ --- -title: Superchain interop -description: Documentation covering Cross Chain Message, Explainer, Message Passing, Op Supervisor, Superchain Erc20, Superchain Weth, Supersim, Transfer Superchainerc20 in the Interop section of the OP Stack ecosystem. +title: Interop +description: >- + Documentation covering Cross Chain Message, Explainer, Message Passing, Op + Supervisor, Superchain Erc20, Superchain Weth, Supersim, Transfer + Superchainerc20 in the Interop section of the OP Stack ecosystem. lang: en-US +content_type: landing-page +topic: interop +personas: + - protocol-developer + - app-developer +categories: + - testnet + - protocol + - cross-chain-messaging + - interoperability + - superchain-ecosystem + - token-standard + - message-passing +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/interop/compatible-tokens.mdx b/pages/stack/interop/compatible-tokens.mdx index dbb9c1418..5ffcf9897 100644 --- a/pages/stack/interop/compatible-tokens.mdx +++ b/pages/stack/interop/compatible-tokens.mdx @@ -1,11 +1,25 @@ --- title: Superchain interop compatible tokens +description: >- + Learn how different tokens can use Superchain interop to benefit from secure, + low-latency, cross-chain composability. lang: en-US -description: Learn how different tokens can use Superchain interop to benefit from secure, low-latency, cross-chain composability. -topic: Superchain Interoperability -personas: ["Developer", "Architect"] -categories: ["Interoperability", "Token"] content_type: guide +topic: superchain-interop-compatible-tokens +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain-erc20 + - token-standard + - interoperable-assets + - token-bridge + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/explainer.mdx b/pages/stack/interop/explainer.mdx index 386e7e983..10226ea49 100644 --- a/pages/stack/interop/explainer.mdx +++ b/pages/stack/interop/explainer.mdx @@ -1,7 +1,23 @@ --- title: Superchain interoperability explainer -lang: en-US description: Learn the basics of Superchain interoperability. +lang: en-US +content_type: guide +topic: superchain-interoperability-explainer +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain + - architecture + - message-passing + - block-safety + - dependency-set +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/interop-security.mdx b/pages/stack/interop/interop-security.mdx index eb179905a..f249d964d 100644 --- a/pages/stack/interop/interop-security.mdx +++ b/pages/stack/interop/interop-security.mdx @@ -1,7 +1,23 @@ --- title: Crosschain security measures for safe interoperability -lang: en-US description: Learn more about crosschain security measures for safe interoperability +lang: en-US +content_type: guide +topic: crosschain-security-measures-for-safe-interoperability +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - security + - block-safety + - message-passing + - reorgs + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/message-passing.mdx b/pages/stack/interop/message-passing.mdx index 2332c69f5..32cbc56b2 100644 --- a/pages/stack/interop/message-passing.mdx +++ b/pages/stack/interop/message-passing.mdx @@ -1,7 +1,22 @@ --- title: Interop message passing overview -lang: en-US description: Learn about cross-chain message passing in the Superchain. +lang: en-US +content_type: guide +topic: interop-message-passing-overview +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - message-passing + - cross-domain-messenger + - architecture + - block-safety + - superchain +is_imported_content: 'false' --- import { Callout, Steps } from 'nextra/components' diff --git a/pages/stack/interop/op-supervisor.mdx b/pages/stack/interop/op-supervisor.mdx index 3e0925192..6ae585b64 100644 --- a/pages/stack/interop/op-supervisor.mdx +++ b/pages/stack/interop/op-supervisor.mdx @@ -1,7 +1,22 @@ --- title: OP-Supervisor -lang: en-US description: Learn the basics of OP-Supervisor. +lang: en-US +content_type: guide +topic: op-supervisor +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - infrastructure + - architecture + - op-supervisor + - message-validation + - superchain +is_imported_content: 'false' --- import { Callout, Tabs, Steps } from 'nextra/components' diff --git a/pages/stack/interop/predeploy.mdx b/pages/stack/interop/predeploy.mdx index 087dc9d08..1c6d9e5d6 100644 --- a/pages/stack/interop/predeploy.mdx +++ b/pages/stack/interop/predeploy.mdx @@ -1,7 +1,22 @@ --- title: Interoperability predeploys -lang: en-US description: How it works. +lang: en-US +content_type: guide +topic: interoperability-predeploys +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - predeploys + - smart-contracts + - cross-domain-messenger + - superchain-token-bridge + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/reorg.mdx b/pages/stack/interop/reorg.mdx index caff773f2..ba94642d2 100644 --- a/pages/stack/interop/reorg.mdx +++ b/pages/stack/interop/reorg.mdx @@ -1,7 +1,23 @@ --- title: Interop reorg awareness +description: >- + How Superchain interop enables low-latency interop and avoids the double-spend + problem. lang: en-US -description: How Superchain interop enables low-latency interop and avoids the double-spend problem. +content_type: guide +topic: interop-reorg-awareness +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - reorgs + - block-safety + - security + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/superchain-erc20.mdx b/pages/stack/interop/superchain-erc20.mdx index b65ca2852..51e862938 100644 --- a/pages/stack/interop/superchain-erc20.mdx +++ b/pages/stack/interop/superchain-erc20.mdx @@ -1,7 +1,23 @@ --- title: SuperchainERC20 -lang: en-US description: Learn about the basic details of the SuperchainERC20 implementation. +lang: en-US +content_type: guide +topic: superchainerc20 +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain-erc20 + - token-standard + - interoperable-assets + - token-bridge + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/superchain-weth.mdx b/pages/stack/interop/superchain-weth.mdx index d569db857..4b6e86b34 100644 --- a/pages/stack/interop/superchain-weth.mdx +++ b/pages/stack/interop/superchain-weth.mdx @@ -1,7 +1,22 @@ --- title: Superchain ETH -lang: en-US description: Learn basic details about Interoperable ETH. +lang: en-US +content_type: guide +topic: superchain-eth +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain-weth + - eth-bridging + - interoperable-assets + - cross-domain-messenger + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tools.mdx b/pages/stack/interop/tools.mdx index 35159cb34..2a9f6d3c6 100644 --- a/pages/stack/interop/tools.mdx +++ b/pages/stack/interop/tools.mdx @@ -1,7 +1,18 @@ --- -title: Tools -description: Documentation covering Interop devnet, Supersim in the Interop section of the OP Stack ecosystem. +title: Interop +description: >- + Documentation covering Interop devnet, Supersim in the Interop section of the + OP Stack ecosystem. lang: en-US +content_type: landing-page +topic: interop +personas: + - protocol-developer +categories: + - testnet + - protocol + - interoperability +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/interop/tools/devnet.mdx b/pages/stack/interop/tools/devnet.mdx index 736b1770c..af24346a1 100644 --- a/pages/stack/interop/tools/devnet.mdx +++ b/pages/stack/interop/tools/devnet.mdx @@ -1,7 +1,21 @@ --- -title: Interop Devnet -lang: en-US +title: Interop devnet description: Details on the public interoperability devnet +lang: en-US +content_type: guide +topic: interop-devnet +personas: + - protocol-developer + - app-developer +categories: + - testnet + - protocol + - interoperability + - cross-chain-messaging + - devnet + - standard-bridge + - superchain-registry +is_imported_content: 'false' --- import { Callout, Tabs, Steps } from 'nextra/components' diff --git a/pages/stack/interop/tools/supersim.mdx b/pages/stack/interop/tools/supersim.mdx index fb0a2fc44..f5706793c 100644 --- a/pages/stack/interop/tools/supersim.mdx +++ b/pages/stack/interop/tools/supersim.mdx @@ -1,8 +1,23 @@ --- -title: Supersim multichain development environment -lang: en-US +title: Supersim description: >- - Learn how to use the Supersim local dev environment tool designed to simulate the Optimism Superchain. + Learn how to use the Supersim local dev environment tool designed to simulate + the Optimism Superchain. +lang: en-US +content_type: guide +topic: supersim +personas: + - protocol-developer + - app-developer +categories: + - devnet + - local-devnet + - testing + - interoperability + - cross-chain-messaging + - supersim + - protocol +is_imported_content: 'true' --- import Supersim from '@/pages/app-developers/tools/supersim.mdx' diff --git a/pages/stack/interop/tutorials.mdx b/pages/stack/interop/tutorials.mdx index ebf3c52bf..c98c3c4d7 100644 --- a/pages/stack/interop/tutorials.mdx +++ b/pages/stack/interop/tutorials.mdx @@ -2,6 +2,17 @@ title: Interop tutorials description: Documentation covering Interop related tutorials. lang: en-US +content_type: landing-page +topic: interop-tutorials +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - tutorial +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx b/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx index 28d00fc58..0df289828 100644 --- a/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx +++ b/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx @@ -1,7 +1,22 @@ --- title: Bridging native cross-chain ETH transfers -lang: en-US description: Learn how to bridge native cross-chain ETH transfers. +lang: en-US +content_type: tutorial +topic: bridging-native-cross-chain-eth-transfers +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - standard-bridge + - eth-bridging + - message-relaying + - cross-domain-messenger + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/contract-calls.mdx b/pages/stack/interop/tutorials/contract-calls.mdx index 3418f11d5..a46291ba6 100644 --- a/pages/stack/interop/tutorials/contract-calls.mdx +++ b/pages/stack/interop/tutorials/contract-calls.mdx @@ -1,7 +1,19 @@ --- title: Making crosschain contract calls (ping pong) -lang: en-US description: Learn how to make crosschain contract calls using ping pong. +lang: en-US +content_type: tutorial +topic: making-crosschain-contract-calls-ping-pong +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain +is_imported_content: 'false' --- import { Callout, Steps } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/custom-superchain-erc20.mdx b/pages/stack/interop/tutorials/custom-superchain-erc20.mdx index 56f7417e1..ba8d5f6e9 100644 --- a/pages/stack/interop/tutorials/custom-superchain-erc20.mdx +++ b/pages/stack/interop/tutorials/custom-superchain-erc20.mdx @@ -1,7 +1,21 @@ --- -title: Creating custom SuperchainERC20 tokens -lang: en-US +title: Custom SuperchainERC20 tokens description: Create SuperchainERC20 tokens with custom behaviors +lang: en-US +content_type: tutorial +topic: custom-superchainerc20-tokens +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain-erc20 + - token-standard + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx b/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx index 44865d216..e1f51ac67 100644 --- a/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx +++ b/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx @@ -1,7 +1,23 @@ --- title: Deploying a SuperchainERC20 -lang: en-US description: Learn about the basic details of deploying assets on SuperchainERC20 +lang: en-US +content_type: tutorial +topic: deploying-a-superchainerc20 +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - interoperable-assets + - interoperability + - cross-chain-messaging + - superchain-erc20 + - token-standard + - token-deployment + - smart-contracts + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/event-contests.mdx b/pages/stack/interop/tutorials/event-contests.mdx index 9e1cc9fa4..b15df8eea 100644 --- a/pages/stack/interop/tutorials/event-contests.mdx +++ b/pages/stack/interop/tutorials/event-contests.mdx @@ -1,7 +1,20 @@ --- title: Deploying crosschain event composability (contests) -lang: en-US description: Learn how to deploy crosschain event composability using contests. +lang: en-US +content_type: tutorial +topic: deploying-crosschain-event-composability-contests +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - event-reading + - contests + - superchain +is_imported_content: 'false' --- import { Callout, Steps } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/event-reads.mdx b/pages/stack/interop/tutorials/event-reads.mdx index 13e248ad2..2c833572e 100644 --- a/pages/stack/interop/tutorials/event-reads.mdx +++ b/pages/stack/interop/tutorials/event-reads.mdx @@ -1,7 +1,20 @@ --- title: Making crosschain event reads (tic-tac-toe) -lang: en-US description: Learn how to make crosschain event reads using tic-tac-toe. +lang: en-US +content_type: tutorial +topic: making-crosschain-event-reads-tic-tac-toe +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - event-reading + - superchain +is_imported_content: 'false' --- import { Callout, Steps } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/message-passing.mdx b/pages/stack/interop/tutorials/message-passing.mdx index 555f5e9e4..4c461a248 100644 --- a/pages/stack/interop/tutorials/message-passing.mdx +++ b/pages/stack/interop/tutorials/message-passing.mdx @@ -1,7 +1,25 @@ --- title: Interop message passing tutorial +description: >- + Learn to implement cross-chain communication in the Superchain by building a + message passing system using the L2ToL2CrossDomainMessenger contract. lang: en-US -description: Learn to implement cross-chain communication in the Superchain by building a message passing system using the L2ToL2CrossDomainMessenger contract. +content_type: tutorial +topic: interop-message-passing-tutorial +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - message-relaying + - cross-domain-messenger + - smart-contracts + - testnet + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/relay-messages-cast.mdx b/pages/stack/interop/tutorials/relay-messages-cast.mdx index 9f427f1a9..0c9a0dcf6 100644 --- a/pages/stack/interop/tutorials/relay-messages-cast.mdx +++ b/pages/stack/interop/tutorials/relay-messages-cast.mdx @@ -1,7 +1,23 @@ --- title: Relaying interop messages using `cast` -lang: en-US description: Learn how to relay interop messages using `cast` commands. +lang: en-US +content_type: tutorial +topic: relaying-interop-messages-using-cast +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - message-relaying + - cross-domain-messenger + - smart-contracts + - supersim + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/relay-messages-viem.mdx b/pages/stack/interop/tutorials/relay-messages-viem.mdx index 3fdc627b0..5c850d7bb 100644 --- a/pages/stack/interop/tutorials/relay-messages-viem.mdx +++ b/pages/stack/interop/tutorials/relay-messages-viem.mdx @@ -1,7 +1,23 @@ --- title: Relaying interop messages using `viem` -lang: en-US description: Learn how to relay interop messages using `viem`. +lang: en-US +content_type: tutorial +topic: relaying-interop-messages-using-viem +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - javascript + - message-relaying + - cross-domain-messenger + - viem + - superchain +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/interop/tutorials/transfer-superchainERC20.mdx b/pages/stack/interop/tutorials/transfer-superchainERC20.mdx index f7e574556..b2d156845 100644 --- a/pages/stack/interop/tutorials/transfer-superchainERC20.mdx +++ b/pages/stack/interop/tutorials/transfer-superchainERC20.mdx @@ -1,7 +1,24 @@ --- title: Transferring a SuperchainERC20 +description: >- + Learn how to transfer a SuperchainERC20 between chains using + L2ToL2CrossDomainMessenger. lang: en-US -description: Learn how to transfer a SuperchainERC20 between chains using L2ToL2CrossDomainMessenger. +content_type: tutorial +topic: transferring-a-superchainerc20 +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - superchain-erc20 + - token-transfers + - message-relaying + - superchain +is_imported_content: 'false' --- import { Callout, Steps } from 'nextra/components' diff --git a/pages/stack/opcm.mdx b/pages/stack/opcm.mdx index aa4bac0c5..c936be50e 100644 --- a/pages/stack/opcm.mdx +++ b/pages/stack/opcm.mdx @@ -1,8 +1,21 @@ --- title: OP Contracts Manager -lang: en-US -tags: ["opcm","eng-security"] description: Learn how OP Contracts Manager deploys of the OP Stack with one transaction. +lang: en-US +content_type: guide +topic: op-contracts-manager +personas: + - protocol-developer + - chain-operator +categories: + - protocol + - chain-deployment + - smart-contracts + - infrastructure + - superchain-contracts + - system-configuration + - deployment-tooling +is_imported_content: 'false' --- import { Callout, Tabs, Steps } from 'nextra/components' diff --git a/pages/stack/public-devnets.mdx b/pages/stack/public-devnets.mdx index 5e2cc8733..85acc82c0 100644 --- a/pages/stack/public-devnets.mdx +++ b/pages/stack/public-devnets.mdx @@ -1,7 +1,24 @@ --- -title: Public Devnets +title: Overview +description: >- + Learn about alphanets and betanets - the development networks for testing + upcoming OP Stack releases. lang: en-US -description: Learn about alphanets and betanets - the development networks for testing upcoming OP Stack releases. +content_type: guide +topic: overview +personas: + - protocol-developer + - chain-operator +categories: + - mainnet + - testnet + - protocol + - development-networks + - alphanets + - betanets + - testing-environment + - network-upgrades +is_imported_content: 'false' --- # Overview diff --git a/pages/stack/research.mdx b/pages/stack/research.mdx index 1a485ee0f..f447c9236 100644 --- a/pages/stack/research.mdx +++ b/pages/stack/research.mdx @@ -1,7 +1,17 @@ --- title: Research -description: Documentation covering Block Time Research in the Research section of the OP Stack ecosystem. +description: >- + Documentation covering Block Time Research in the Research section of the OP + Stack ecosystem. lang: en-US +content_type: landing-page +topic: research +personas: + - protocol-developer +categories: + - protocol + - block-time +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/research/block-time-research.mdx b/pages/stack/research/block-time-research.mdx index a5832a82b..85de6b079 100644 --- a/pages/stack/research/block-time-research.mdx +++ b/pages/stack/research/block-time-research.mdx @@ -1,8 +1,22 @@ --- -title: Block time research +title: Block time research +description: >- + Sunnyside Labs' (formerly Test in Prod) and OP Labs 1 second block time + research. lang: en-US -tags: ["op-geth", "op-reth", "eng-platforms"] -description: Sunnyside Labs' (formerly Test in Prod) and OP Labs 1 second block time research. +content_type: guide +topic: block-time-research +personas: + - protocol-developer + - chain-operator +categories: + - mainnet + - protocol + - research + - block-time + - op-geth + - op-reth +is_imported_content: 'false' --- # Block time research diff --git a/pages/stack/rollup.mdx b/pages/stack/rollup.mdx index 09d75273b..8052236f2 100644 --- a/pages/stack/rollup.mdx +++ b/pages/stack/rollup.mdx @@ -1,7 +1,22 @@ --- title: Rollup -description: The big idea that makes Optimism possible is the Optimistic Rollup. We'll go through a brief explainer of *how* Optimistic Rollups work at a high l... +description: >- + The big idea that makes Optimism possible is the Optimistic Rollup. We'll go + through a brief explainer of *how* Optimistic Rollups work at a high l... lang: en-US +content_type: guide +topic: rollup +personas: + - protocol-developer +categories: + - protocol + - layer2-scaling + - derivation-pipeline + - sequencer + - data-availability + - state-commitment + - fault-tolerance +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/rollup/derivation-pipeline.mdx b/pages/stack/rollup/derivation-pipeline.mdx index 2f0995104..691130825 100644 --- a/pages/stack/rollup/derivation-pipeline.mdx +++ b/pages/stack/rollup/derivation-pipeline.mdx @@ -1,7 +1,22 @@ --- title: Derivation pipeline -lang: en-US description: Overview of the derivation pipeline in the OP Stack protocol. +lang: en-US +content_type: guide +topic: derivation-pipeline +personas: + - protocol-developer + - chain-operator +categories: + - protocol + - rollup-node + - derivation + - sequencer + - batch-submission + - safe-head + - reorgs + - architecture +is_imported_content: 'false' --- # Derivation pipeline diff --git a/pages/stack/rollup/outages.mdx b/pages/stack/rollup/outages.mdx index 4523bfc69..5ad61abc5 100644 --- a/pages/stack/rollup/outages.mdx +++ b/pages/stack/rollup/outages.mdx @@ -1,7 +1,22 @@ --- title: Sequencer outages -lang: en-US description: Learn what happens if the Sequencer goes down and how you can be prepared. +lang: en-US +content_type: guide +topic: sequencer-outages +personas: + - protocol-developer + - chain-operator +categories: + - protocol + - sequencer + - outages + - downtime + - optimism-portal + - transaction-submission + - censorship-resistance + - disaster-recovery +is_imported_content: 'false' --- # Sequencer outages diff --git a/pages/stack/rollup/overview.mdx b/pages/stack/rollup/overview.mdx index e07ec94f6..e8720475e 100644 --- a/pages/stack/rollup/overview.mdx +++ b/pages/stack/rollup/overview.mdx @@ -1,7 +1,21 @@ --- title: Rollup protocol overview -lang: en-US description: Learn how Optimistic Rollups work at a high level. +lang: en-US +content_type: guide +topic: rollup-protocol-overview +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - mainnet + - protocol + - block-production + - block-execution + - bridging + - fault-proofs +is_imported_content: 'false' --- # Rollup protocol overview diff --git a/pages/stack/security.mdx b/pages/stack/security.mdx index eae398963..9b4aef542 100644 --- a/pages/stack/security.mdx +++ b/pages/stack/security.mdx @@ -1,7 +1,21 @@ --- title: Security -description: Documentation covering Faq, Pause in the Security section of the OP Stack ecosystem. +description: >- + Documentation covering Faq, Pause in the Security section of the OP Stack + ecosystem. lang: en-US +content_type: landing-page +topic: security +personas: + - protocol-developer +categories: + - protocol + - security-model + - pause + - audits + - bug-bounty-program + - security-policy +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/security/audits-report.mdx b/pages/stack/security/audits-report.mdx index 8cbe62311..698619e98 100644 --- a/pages/stack/security/audits-report.mdx +++ b/pages/stack/security/audits-report.mdx @@ -1,7 +1,23 @@ --- title: Audit reports +description: >- + A comprehensive list of security reviews for the OP Stack, including links to + detailed audit reports and descriptions of their scope. lang: en-US -description: A comprehensive list of security reviews for the OP Stack, including links to detailed audit reports and descriptions of their scope. +content_type: guide +topic: audit-reports +personas: + - protocol-developer + - chain-operator +categories: + - security + - protocol + - audits + - security-reviews + - vulnerability-assessment + - smart-contracts + - research +is_imported_content: 'false' --- import Link from "next/link" diff --git a/pages/stack/security/faq-sec-model.mdx b/pages/stack/security/faq-sec-model.mdx index ad05d298e..5a04855a6 100644 --- a/pages/stack/security/faq-sec-model.mdx +++ b/pages/stack/security/faq-sec-model.mdx @@ -1,7 +1,22 @@ --- title: OP Stack security model -lang: en-US description: Learn about the OP Stack security model and answers to common questions. +lang: en-US +content_type: guide +topic: op-stack-security-model +personas: + - protocol-developer + - chain-operator +categories: + - security + - protocol + - security-model + - multisig + - fault-proofs + - security-council + - governance + - decentralization +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/security/faq.mdx b/pages/stack/security/faq.mdx index 0b08dbe7f..a3af376f9 100644 --- a/pages/stack/security/faq.mdx +++ b/pages/stack/security/faq.mdx @@ -1,7 +1,22 @@ --- title: OP Stack security FAQs -lang: en-US description: Learn answers to common questions about OP Stack security. +lang: en-US +content_type: guide +topic: op-stack-security-faqs +personas: + - protocol-developer + - chain-operator +categories: + - mainnet + - security + - protocol + - security-model + - bug-bounty-program + - fault-proofs + - vulnerability-reporting + - decentralization +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/security/pause.mdx b/pages/stack/security/pause.mdx index 2491195e7..4b96ea249 100644 --- a/pages/stack/security/pause.mdx +++ b/pages/stack/security/pause.mdx @@ -1,7 +1,21 @@ --- title: Pausing the bridge -lang: en-US description: Learn how the OP Stack bridge can be paused as backup safety mechanism. +lang: en-US +content_type: guide +topic: pausing-the-bridge +personas: + - protocol-developer + - chain-operator +categories: + - security + - protocol + - optimism-portal + - guardian + - emergency-response + - withdrawals + - safety-mechanisms +is_imported_content: 'false' --- # Pausing the bridge diff --git a/pages/stack/security/security-policy.mdx b/pages/stack/security/security-policy.mdx index b68cf0be5..936ad3957 100644 --- a/pages/stack/security/security-policy.mdx +++ b/pages/stack/security/security-policy.mdx @@ -1,7 +1,24 @@ --- title: Security policy and bug bounty program +description: >- + Learn about the bug bounty program and best practices for reporting bugs in + the OP Stack codebase. lang: en-US -description: Learn about the bug bounty program and best practices for reporting bugs in the OP Stack codebase. +content_type: guide +topic: security-policy-and-bug-bounty-program +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - security + - protocol + - bug-bounty + - vulnerability-reporting + - research + - bug-bounty-program + - responsible-disclosure +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/smart-contracts.mdx b/pages/stack/smart-contracts.mdx index 35759d155..8634563ca 100644 --- a/pages/stack/smart-contracts.mdx +++ b/pages/stack/smart-contracts.mdx @@ -1,7 +1,23 @@ --- title: Smart Contract overview -lang: en-US description: Learn about the smart contracts that make up the OP Stack. +lang: en-US +content_type: guide +topic: smart-contract-overview +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - mainnet + - protocol + - l1-contracts + - predeploys + - contract-addresses + - contract-upgrades + - architecture + - fault-proofs +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/transactions.mdx b/pages/stack/transactions.mdx index c5749c781..545af0980 100644 --- a/pages/stack/transactions.mdx +++ b/pages/stack/transactions.mdx @@ -1,7 +1,24 @@ --- title: Transactions -description: Documentation covering Cross Domain, Deposit Flow, Fees, Forced Transaction, Transaction Flow, Transactions, Withdrawal Flow in the Transactions section of the OP Stack ecosystem. +description: >- + Documentation covering Cross Domain, Deposit Flow, Fees, Forced Transaction, + Transaction Flow, Transactions, Withdrawal Flow in the Transactions section of + the OP Stack ecosystem. lang: en-US +content_type: landing-page +topic: transactions +personas: + - protocol-developer +categories: + - protocol + - transaction-flow + - cross-domain-messaging + - deposit-flow + - withdrawal-flow + - transaction-fees + - transaction-finality + - forced-transactions +is_imported_content: 'false' --- import { Card, Cards } from 'nextra/components' diff --git a/pages/stack/transactions/cross-domain.mdx b/pages/stack/transactions/cross-domain.mdx index 846141f22..a6f1b9ee3 100644 --- a/pages/stack/transactions/cross-domain.mdx +++ b/pages/stack/transactions/cross-domain.mdx @@ -1,7 +1,24 @@ --- -title: Cross-Domain +title: Cross-Domain Overview +description: >- + An overview of the lifecycle of an OP Stack cross-chain transaction, detailing + the flow of transactions between Layer 2 and Layer 1. lang: en-US -description: An overview of the lifecycle of an OP Stack cross-chain transaction, detailing the flow of transactions between Layer 2 and Layer 1. +content_type: guide +topic: cross-domain-overview +personas: + - protocol-developer + - chain-operator +categories: + - protocol + - cross-domain-messaging + - deposits + - withdrawals + - bridging + - transaction-flow + - l1-l2-communication + - message-passing +is_imported_content: 'false' --- import { Callout, Steps } from 'nextra/components' diff --git a/pages/stack/transactions/deposit-flow.mdx b/pages/stack/transactions/deposit-flow.mdx index d7353394a..9408ada37 100644 --- a/pages/stack/transactions/deposit-flow.mdx +++ b/pages/stack/transactions/deposit-flow.mdx @@ -1,7 +1,24 @@ --- title: Deposit flow +description: >- + Learn the deposit flow process for L2 deposit transactions, triggered by + events on L1. lang: en-US -description: Learn the deposit flow process for L2 deposit transactions, triggered by events on L1. +content_type: guide +topic: deposit-flow +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - deposits + - cross-domain-messaging + - l1-l2-communication + - transaction-flow + - optimism-portal + - message-relay +is_imported_content: 'false' --- import Image from 'next/image' diff --git a/pages/stack/transactions/fees.mdx b/pages/stack/transactions/fees.mdx index ed669c52c..29eaf5850 100644 --- a/pages/stack/transactions/fees.mdx +++ b/pages/stack/transactions/fees.mdx @@ -1,7 +1,23 @@ --- title: Transaction fees on OP Mainnet -lang: en-US description: Learn how transaction fees work on OP Mainnet. +lang: en-US +content_type: guide +topic: transaction-fees-on-op-mainnet +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - mainnet + - protocol + - transaction-fees + - gas + - l1-data-fee + - execution-gas-fee + - eip-1559 + - sequencer-fee-vault +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/transactions/forced-transaction.mdx b/pages/stack/transactions/forced-transaction.mdx index bc293fd09..83801f738 100644 --- a/pages/stack/transactions/forced-transaction.mdx +++ b/pages/stack/transactions/forced-transaction.mdx @@ -1,7 +1,23 @@ --- -title: Forced transaction -lang: en-US +title: Forced Transaction description: Learn the forced transaction flow during sequencer downtime. +lang: en-US +content_type: guide +topic: forced-transaction +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - sequencer + - downtime + - forced-transactions + - deposits + - censorship-resistance + - transaction-inclusion + - disaster-recovery +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/transactions/transaction-finality.mdx b/pages/stack/transactions/transaction-finality.mdx index 2d7eb6272..a82785f4c 100644 --- a/pages/stack/transactions/transaction-finality.mdx +++ b/pages/stack/transactions/transaction-finality.mdx @@ -1,7 +1,22 @@ --- title: Transaction finality -lang: en-US description: Learn when transactions on OP Stack chains can be considered finalized. +lang: en-US +content_type: guide +topic: transaction-finality +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - sequencer + - ethereum-consensus + - block-safety + - security-model + - finality-guarantees + - transaction-lifecycle +is_imported_content: 'false' --- import Image from 'next/image' diff --git a/pages/stack/transactions/transaction-flow.mdx b/pages/stack/transactions/transaction-flow.mdx index fb0af08f5..af55a19bf 100644 --- a/pages/stack/transactions/transaction-flow.mdx +++ b/pages/stack/transactions/transaction-flow.mdx @@ -1,7 +1,23 @@ --- -title: Transaction Flow -lang: en-US +title: Transaction flow description: Learn the transaction flow process for rollup transactions. +lang: en-US +content_type: guide +topic: transaction-flow +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - transaction-flow + - rollup-transactions + - op-batcher + - op-proposer + - state-commitment + - transaction-lifecycle + - data-availability +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/pages/stack/transactions/withdrawal-flow.mdx b/pages/stack/transactions/withdrawal-flow.mdx index f74db2ff7..76a215339 100644 --- a/pages/stack/transactions/withdrawal-flow.mdx +++ b/pages/stack/transactions/withdrawal-flow.mdx @@ -1,7 +1,23 @@ --- title: Withdrawal flow -lang: en-US description: Learn the withdrawal flow process for transactions sent from L2 to L1. +lang: en-US +content_type: guide +topic: withdrawal-flow +personas: + - protocol-developer + - chain-operator + - app-developer +categories: + - protocol + - withdrawals + - cross-domain-messaging + - l2-to-l1 + - transaction-flow + - optimism-portal + - message-proving + - message-finalization +is_imported_content: 'false' --- import { Callout } from 'nextra/components' diff --git a/utils/metadata-analyzer.ts b/utils/metadata-analyzer.ts index 0a36fcbfd..74f15f1f9 100644 --- a/utils/metadata-analyzer.ts +++ b/utils/metadata-analyzer.ts @@ -56,7 +56,7 @@ const DEFAULT_CONFIG: AnalyzerConfig = { 'ethers', 'viem', 'supersim', - 'devnets', + 'devnet', 'mainnet', 'testnet' ] @@ -96,9 +96,46 @@ function detectTitle(content: string, filepath: string): string { } /** - * Returns default personas based on content location + * Returns default personas based on content location and content analysis */ -export function getDefaultPersonas(filepath: string): string[] { +export function getDefaultPersonas(filepath: string, content: string = ''): string[] { + const contentLower = content.toLowerCase() + + // Stack documentation is primarily for protocol developers and chain operators + if (filepath.includes('/stack/')) { + const personas = new Set(['protocol-developer']) + + // Add chain-operator for operational content + if ( + filepath.includes('/security/') || + filepath.includes('/rollup/') || + filepath.includes('/transactions/') || + contentLower.includes('operator') || + contentLower.includes('deployment') || + contentLower.includes('configuration') || + contentLower.includes('monitoring') || + contentLower.includes('maintenance') + ) { + personas.add('chain-operator') + } + + // Add app-developer only for specific integration content + if ( + filepath.includes('/interop/tutorials/') || + filepath.includes('/interop/tools/') || + filepath.includes('/getting-started') || + contentLower.includes('tutorial') || + contentLower.includes('guide') || + contentLower.includes('sdk') || + contentLower.includes('api') + ) { + personas.add('app-developer') + } + + // Remove debug logging + return Array.from(personas) + } + // Superchain content if (filepath.includes('/superchain/')) { const filename = path.basename(filepath); @@ -134,7 +171,7 @@ export function getDefaultPersonas(filepath: string): string[] { return ['node-operator']; } - // Default to app developer + // Default to app developer for other content return ['app-developer']; } @@ -205,10 +242,10 @@ function getLandingPageCategories(filepath: string, content: string): Set !arg.startsWith('--')) + // Get files from command line patterns or use default + const patterns = process.argv + .slice(2) + .filter(arg => !arg.startsWith('--')) - if (patterns.length > 0) { - // Direct command: use provided patterns - mdxFiles = await globby(patterns) - } else if (process.env.CHANGED_FILES) { - // PR validation: use changed files - mdxFiles = process.env.CHANGED_FILES.split('\n').filter(Boolean) - } + // Use default pattern if none provided + const patternsToUse = patterns.length > 0 ? patterns : ['pages/stack/**/*.mdx'] + + console.log(`Using patterns: ${patternsToUse.join(', ')}`) - mdxFiles = mdxFiles.filter(file => file.endsWith('.mdx')) + // Use globby to find files + let mdxFiles = await globby(patternsToUse, { + ignore: ['pages/_*.mdx'], + gitignore: true, + onlyFiles: true + }) + + mdxFiles = Array.from(new Set(mdxFiles.filter(file => file.endsWith('.mdx')))) if (mdxFiles.length === 0) { console.log('✓ No MDX files to check') process.exit(0) } + console.log(`Processing ${mdxFiles.length} files...\n`) + const stats = { total: mdxFiles.length, successful: 0, @@ -251,13 +284,23 @@ async function main() { failed: 0 } - console.log(`Found ${mdxFiles.length} valid files to check\n`) - + // Process each file for (const file of mdxFiles) { try { + console.log(`\nProcessing file: ${file}`) const content = await fs.readFile(file, 'utf8') const { data: frontmatter } = matter(content) + + // Check if metadata is missing + const isMissingMetadata = !frontmatter.content_type || + !frontmatter.topic || + !frontmatter.personas || + !frontmatter.categories || + (Array.isArray(frontmatter.personas) && frontmatter.personas.length === 0) || + (Array.isArray(frontmatter.categories) && frontmatter.categories.length === 0) + const analysis = analyzeContent(content, file, isVerbose) + const result = await updateMetadataFile(file, { dryRun: isDryRun, verbose: isVerbose, @@ -266,37 +309,61 @@ async function main() { prMode: false }) - console.log(`File: ${file}`) - - if (!result.isValid) { + if (isMissingMetadata || !result.isValid) { stats.needsReview++ const filename = file.split('/').pop()?.replace('.mdx', '') - // Use the analyzer's detected categories instead of hardcoding - const suggestedCategories = analysis.suggestions?.categories || ['protocol'] - - console.log(`${colors.yellow}⚠️ Missing: ${result.errors.join(', ')}${colors.reset}`) - console.log(`Suggested: content_type: guide, topic: ${filename}, personas: [${VALID_PERSONAS[0]}], categories: ${JSON.stringify(suggestedCategories)}\n`) + console.log(`${colors.yellow}⚠️ Missing: missing required metadata${colors.reset}`) + if (analysis.suggestions) { + const suggestion = { + content_type: analysis.suggestions.content_type || 'guide', + topic: filename, + personas: analysis.suggestions.personas || [], + categories: analysis.suggestions.categories || [] + } + + // Format personas and categories on same line + const formattedSuggestion = { + content_type: suggestion.content_type, + topic: suggestion.topic, + personas: JSON.stringify(suggestion.personas), + categories: JSON.stringify(suggestion.categories) + } + + if (isDryRun) { + console.log(`${colors.blue}Suggested metadata:${colors.reset}`) + console.log(` content_type: ${formattedSuggestion.content_type}`) + console.log(` topic: ${formattedSuggestion.topic}`) + console.log(` personas: ${formattedSuggestion.personas}`) + console.log(` categories: ${formattedSuggestion.categories}`) + } else { + console.log(`${colors.green}Applying metadata:${colors.reset}`) + console.log(` content_type: ${formattedSuggestion.content_type}`) + console.log(` topic: ${formattedSuggestion.topic}`) + console.log(` personas: ${formattedSuggestion.personas}`) + console.log(` categories: ${formattedSuggestion.categories}`) + } + } } else { if (!isDryRun) { - console.log(' ✓ Updates applied\n') + console.log(`${colors.green}✓ Updates applied${colors.reset}`) } else { - console.log(' ✓ Validation passed (dry run)\n') + console.log(`${colors.green}✓ Validation passed (dry run)${colors.reset}`) } stats.successful++ } } catch (error) { stats.failed++ - console.error(`Error processing ${file}:`, error) + console.error(`${colors.red}Error processing ${file}:${colors.reset}`, error) } } - console.log(`${stats.total} files processed`) + console.log(`\n${stats.total} files processed`) if (stats.needsReview > 0) { console.log(`${colors.yellow}⚠️ ${stats.needsReview} files need review${colors.reset}`) } } catch (error) { - console.error('\x1b[31mError:\x1b[0m', error) + console.error(`${colors.red}Error:${colors.reset}`, error) process.exit(1) } } diff --git a/utils/metadata-manager.ts b/utils/metadata-manager.ts index 4de0a5bec..52d9500ec 100644 --- a/utils/metadata-manager.ts +++ b/utils/metadata-manager.ts @@ -4,6 +4,7 @@ import matter from 'gray-matter' import yaml from 'js-yaml' import { analyzeContent } from './metadata-analyzer' import { MetadataResult, MetadataOptions, ValidationResult } from './types/metadata-types' +import * as fsStandard from 'fs' // Add the interfaces at the top of the file interface ValidationOptions { @@ -20,77 +21,82 @@ interface UpdateOptions { analysis?: MetadataResult } +// Load the config file +const configPath = path.resolve(process.cwd(), 'keywords.config.yaml') +const yamlConfig = yaml.load(fsStandard.readFileSync(configPath, 'utf8')) as { + metadata_rules?: { + categories?: { + values?: string[] + } + } +} || { + metadata_rules: { + categories: { + values: [] + } + } +} + // Validation functions -async function validateMetadata( - metadata: MetadataResult, - filepath: string, - options: { - dryRun?: boolean; - verbose?: boolean; - validateOnly?: boolean; - prMode?: boolean; - } = {} -): Promise { - const errors = [] as string[] - const config = await loadConfig('keywords.config.yaml') +function validateMetadata(metadata: any, filepath: string): ValidationResult { + const errors: string[] = [] + const config = yamlConfig - // Required field checks based on config - if (!metadata.topic) { - errors.push('topic') + // Check for required fields + if (!metadata.title) { + errors.push('title is required') } - // Check personas - if (config.metadata_rules.persona.required) { - if (!metadata.personas || metadata.personas.length === 0) { - errors.push('personas') - } else if (metadata.personas.length < config.metadata_rules.persona.min) { - errors.push(`personas (min ${config.metadata_rules.persona.min})`) - } + if (!metadata.description) { + errors.push('description is required') } - // Check content_type - if (config.metadata_rules.content_type.required && !metadata.content_type) { - errors.push('content_type') + if (!metadata.lang) { + errors.push('lang is required') } - // Check categories - if (config.metadata_rules.categories.required) { - if (!metadata.categories || metadata.categories.length === 0) { - errors.push('categories') - } else if (metadata.categories.length < config.metadata_rules.categories.min) { - errors.push(`categories (min ${config.metadata_rules.categories.min})`) + // Check if this is a landing page (index.mdx) + const isLandingPage = filepath.endsWith('index.mdx') + + if (!isLandingPage) { + // Additional checks for non-landing pages + if (!metadata.content_type) { + errors.push('content_type is required') } - } - - // Validate enum values if present - if (metadata.personas?.length > 0) { - const validPersonas = config.metadata_rules.persona.validation_rules[0].enum - metadata.personas.forEach(p => { - if (!validPersonas.includes(p)) { - errors.push(`invalid persona: ${p}`) - } - }) - } - - if (metadata.content_type) { - const validTypes = config.metadata_rules.content_type.validation_rules[0].enum - if (!validTypes.includes(metadata.content_type)) { - errors.push(`invalid content_type: ${metadata.content_type}`) + + if (!metadata.topic) { + errors.push('topic is required') } - } - - if (metadata.categories?.length > 0) { - const validCategories = config.metadata_rules.categories.values - metadata.categories.forEach(c => { - if (!validCategories.includes(c)) { - errors.push(`invalid category: ${c}`) + + // Check personas + if (!metadata.personas || metadata.personas.length === 0) { + errors.push('personas is required') + } + + // Check categories + let categories = metadata.categories || [] + if (typeof categories === 'string') { + categories = categories.split(',').map(c => c.trim()) + } + + if (categories.length === 0) { + errors.push('categories is required') + } else { + // Validate categories against allowed values + const validCategories = config.metadata_rules?.categories?.values || [] + if (validCategories.length > 0) { + const invalidCategories = categories.filter(c => !validCategories.includes(c)) + if (invalidCategories.length > 0) { + errors.push(`Invalid categories: ${invalidCategories.join(', ')}`) + } } - }) + } } - + return { isValid: errors.length === 0, - errors + errors, + suggestions: {} } } @@ -145,26 +151,19 @@ export async function updateMetadata( title: safeAnalysis.title || frontmatter.title || '', description: frontmatter.description || safeAnalysis.description || '', lang: frontmatter.lang || safeAnalysis.lang || 'en-US', - content_type: safeAnalysis.content_type, - topic: safeAnalysis.topic || '', - personas: safeAnalysis.personas || [], - categories: safeAnalysis.categories || [], + content_type: safeAnalysis.suggestions?.content_type || safeAnalysis.content_type || '', + topic: safeAnalysis.suggestions?.topic || safeAnalysis.topic || '', + personas: safeAnalysis.suggestions?.personas || safeAnalysis.personas || [], + categories: safeAnalysis.suggestions?.categories || safeAnalysis.categories || [], is_imported_content: safeAnalysis.is_imported_content || 'false' } // Validate metadata in all cases - const validationResult = await validateMetadata(newMetadata, filepath, options) + const validationResult = validateMetadata(newMetadata, filepath) - // Check validation mode + // Check validation mode - don't log here, let the batch CLI handle it if (options.validateOnly || options.prMode) { - return { - isValid: validationResult.isValid, - errors: validationResult.errors, - suggestions: { - categories: safeAnalysis.categories, - content_type: safeAnalysis.content_type - } - } + return validationResult } // Only write if not in dry run mode and validation passed @@ -173,14 +172,7 @@ export async function updateMetadata( await fs.writeFile(filepath, updatedContent, 'utf8') } - return { - isValid: validationResult.isValid, - errors: validationResult.errors, - suggestions: { - categories: safeAnalysis.categories, - content_type: safeAnalysis.content_type - } - } + return validationResult } catch (error) { return { isValid: false, @@ -309,32 +301,98 @@ async function validateConfig(configPath: string): Promise { // Silently validate - no console output at all } +/** + * Updates the metadata in a markdown file + * @param filepath Path to the markdown file + * @param options Options for updating the metadata + * @returns Validation result + */ export async function updateMetadataFile( filepath: string, options: { dryRun?: boolean; verbose?: boolean; analysis: MetadataResult; - validateOnly: boolean; - prMode: boolean; + validateOnly?: boolean; + prMode?: boolean; } -): Promise<{ isValid: boolean; errors: string[]; metadata: MetadataResult }> { +): Promise { try { const content = await fs.readFile(filepath, 'utf8') - const { data: frontmatter } = matter(content) - const result = await validateMetadata(options.analysis, filepath, options) + const { data: frontmatter, content: docContent } = matter(content) - // Return early if validation failed - if (!result.isValid) { - return { - isValid: false, - errors: result.errors, - metadata: options.analysis + // Create new metadata object with all fields + const newMetadata = { + title: options.analysis.title || frontmatter.title || '', + description: frontmatter.description || options.analysis.description || '', + lang: frontmatter.lang || options.analysis.lang || 'en-US', + content_type: options.analysis.suggestions?.content_type || options.analysis.content_type || '', + topic: options.analysis.suggestions?.topic || options.analysis.topic || '', + personas: options.analysis.suggestions?.personas || options.analysis.personas || [], + categories: options.analysis.suggestions?.categories || options.analysis.categories || [], + is_imported_content: frontmatter.is_imported_content !== undefined + ? frontmatter.is_imported_content + : options.analysis.is_imported_content || false + } + + // Validate the metadata + const validationResult = validateMetadata(newMetadata, filepath) + + if (options.validateOnly) { + return validationResult + } + + if (!validationResult.isValid && options.prMode) { + if (options.verbose) { + console.log(`Skipping ${filepath} due to validation errors in PR mode`) + } + return validationResult + } + + // If dry run, just return the validation result + if (options.dryRun) { + if (options.verbose) { + console.log(`Would update ${filepath} with:`, newMetadata) } + return validationResult } - // ... rest of function + // Create the new file content with updated frontmatter + const updatedFileContent = matter.stringify(docContent, newMetadata) + + try { + // Write to a temporary file first + const tempFilePath = `${filepath}.tmp` + await fs.writeFile(tempFilePath, updatedFileContent, 'utf8') + + // Verify the temp file was written successfully + const tempFileStats = await fs.stat(tempFilePath) + if (tempFileStats.size === 0) { + throw new Error(`Failed to write to temporary file ${tempFilePath}`) + } + + // Rename the temp file to the original file + await fs.rename(tempFilePath, filepath) + + if (options.verbose) { + console.log(`✅ Successfully wrote metadata to ${filepath}`); + } + + return { + isValid: true, + errors: [], + suggestions: {} + } + } catch (writeError) { + console.error(`❌ Failed to write to ${filepath}:`, writeError); + throw writeError; + } } catch (error) { - throw new Error(`Failed to update metadata for ${filepath}: ${error.message}`) + console.error(`Error processing ${filepath}:`, error); + return { + isValid: false, + errors: [`Failed to update metadata for ${filepath}: ${error.message}`], + suggestions: {} + } } } \ No newline at end of file diff --git a/utils/types/metadata-types.ts b/utils/types/metadata-types.ts index 8f2f5fd71..1f70dec1a 100644 --- a/utils/types/metadata-types.ts +++ b/utils/types/metadata-types.ts @@ -23,37 +23,7 @@ if (!isValidConfig(yamlContent)) { export const VALID_PERSONAS = yamlContent.metadata_rules.persona.validation_rules[0].enum as readonly string[] export const VALID_CONTENT_TYPES = yamlContent.metadata_rules.content_type.validation_rules[0].enum as readonly string[] -export const VALID_CATEGORIES = [ - 'protocol', - 'infrastructure', - 'sequencer', - 'op-batcher', - 'rollup-node', - 'op-geth', - 'fault-proofs', - 'op-challenger', - 'cannon', - 'l1-deployment-upgrade-tooling', - 'l2-deployment-upgrade-tooling', - 'monitorism', - 'security', - 'automated-pause', - 'kubernetes-infrastructure', - 'cross-chain-messaging', - 'standard-bridge', - 'interoperable-message-passing', - 'hardhat', - 'foundry', - 'ethers', - 'viem', - 'supersim', - 'devnets', - 'mainnet', - 'testnet', - 'superchain-registry', - 'security-council', - 'blockspace-charters' -] as const; +export const VALID_CATEGORIES = yamlContent.metadata_rules.categories.values as readonly string[] export interface ValidationRule { pattern?: string