AI prompts
base on weather.gov 2.0 # Welcome to Weather.gov 2.0
## Background and core problem
**Weather.gov is owned by the National Weather Service (NWS).** Weather.gov and associated applications are frequently in the Top-10 list of most-visited federal websites with 1.5 billion visits per year. They are a major source of life and property-saving weather/water/climate information for the public and partners. Often they are the only source for on-demand, detailed weather/water/climate information from 122 Weather Forecast Offices.
**The fundamental problem that we’ve observed** is that weather.gov reflects its organizational silos (Conway's Law) more than its users’ needs. A lack of overall strategy, feedback/monitoring, and tools have perpetuated this problem.
This has led to a disorganized repository of valuable information that external users struggle to use and internal users struggle to manage.
We will know that we are progressing forward on this problem if people find the information faster, understand it better, continue to see NWS as the authoritative source, and maintain that progress.
## Vision
Anyone can understand the impact of impending weather, especially when it comes to making decisions to save life and property – every word and every minute matters.
## Mission
Rebuild weather.gov to reflect the integrity and care NWS has for the people they serve.
Weather.gov 2.0 will only succeed if everyone with NWS sees the site reflect their values, much like the agency. Because the mission and culture at NWS is built around serving, preparing, and protecting people, the site must do the same.
## Plan
![5 steps as an analogy of the Weather.gov 2.0 phases. We are on the Minimal Viable Product phase and entering the Initial Operating Capability (IOC) phase in 2025 then after that in 2026 is Additional Capability and Training phase and lastly in 2027-2028 is the Fully Operational and Decommission "Legacy" weather.gov phase](/docs/img/Weather.gov-2.0-stairs.png)
## Product Roadmap
- [Summary](https://github.com/weather-gov/weather.gov/blob/main/docs/product/roadmap.md)
- [Milestone planning chart](https://github.com/orgs/weather-gov/projects/2/views/18)
## Goals for the next two years
- **By the end of Sept 2025**:
- The new weather.gov is “experimental” to NWS standards and ready for public release
- Partner needs are being met (county, state, regional, national) through automated content
- A governance policy for content and tools exists
- Model for 24x7 support is defined and tested
- Acquisition for longer-term support is completed
- A strategy for complementary sites (tools and centers) exists
- Feature and user experience development continues
- **By the end of Sept 2026**:
- The new weather.gov is “operational” to NWS standards and ready for public and partner usage
- Majority of public, partner, and other user needs are met
- The site is supported 24x7
- All WFOs and Forecasters are trained and onboarded
- A governance policy for content and tools is implemented
- Long-term support is established, transition is ongoing
- ATO has been attained
- Feature and user experience development continues
## Public domain
This project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):
> This project is in the public domain within the United States, and copyright and related
> rights in the work worldwide are waived through the
> [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
>
> All contributions to this project will be released under the CC0 dedication. By submitting a pull
> request, you are agreeing to comply with this waiver of copyright interest.
## Tech Stack
Type: Traditional CMS (aka Legacy, United, Headful :laugh:)
Stack: Docker Drupal Image (Apache, PHP, Composer, MySQL)
Languages and frameworks: PHP, Symfony, Twig
## Vulnerability Disclosure Policy
*.weather.gov sites are covered by the [Department of Commerce Vulnerability Disclosure Policy](https://www.commerce.gov/vulnerability-disclosure-policy). If you would like to disclose a vulnerability with our Beta site or any of the testing sites, there are two options:
- Use the [DOC VDP Portal](https://doc.responsibledisclosure.com/hc/en-us/requests/new) to submit your vulnerability
- Report a new vulnerability as a [Github security advisory](https://github.com/weather-gov/weather.gov/security/advisories/new)
## Getting Drupal 10 running in Docker
Docker does all the heavy lifting for set up and configurations. It's a cinch to get up and running. Make sure you have Docker installed locally.
1. Clone this repository into a new directory and `cd` into it.
1. Run `make zap-init` from the command line. (Run `make zap` later on to restore to a clean state.)
1. Browse to [http://localhost:8080](http://localhost:8080) in your broswer. You
should see the home page of beta.weather.gov. That's okay.
1. Browse to [http://localhost:8080/user/login](http://localhost:8080/user/login)
to log in. Your username is `admin` and your password is `root`. Then you can
do stuff!
1. (optional) Install the node modules (`npm install`) into your node environment of choice.
## Editing and adding themes
We [bind-mount](https://docs.docker.com/storage/bind-mounts/) the **themes**
folder so we can test adding a new theme. So changes made in the themes folder
are reflected in the host folder.
1. Navigate to the Drupal Appearance page `http://localhost:8080/admin/appearance`
2. Notice the Hello World theme already there.
3. To create a new theme, run the following commands:
- `make shell` to get a shell in the container
- `cd web` to get to the Drupal root folder
- `php core/scripts/drupal generate-theme new_weather_theme`
> [!WARNING]
> Make sure your new theme has **underscores** (\_) as a delimiter. Dashes
> and spaces WILL NOT WORK.
- `exit` to leave the container
4. Refresh the Appearance page and notice new_weather_theme is now installed.
5. Change title of the theme in `themes/new_weather_theme/new_weather_theme.info.yml`
file to a reader-friendly one, such as `New Weather`.
That's it! Now when you make changes to theme files, they will sync to the
Docker instance. Whenever you make a change to a .twig template, make sure
to **rebuild the cache** using the `make clear-cache` command.
## Installing Drupal core updates
### Development
When a new version of Drupal core is available, use Composer to intall the latest updates. See [Updating core](https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-composer#s-update-drupal-core-code) docs.
Run `composer show drupal/core-recommended` to see the latest Drupal core version. Then run:
```
composer update "drupal/core-*" --with-all-dependencies
```
This will update the required projects: `drupal/core-recommended drupal/core-composer-scaffold drupal/core-project-message`
The update the db using drush
```
make shell
drush updatedb
drush cache:rebuild
```
### Production
1. Push the changed composer.json and composer.lock files to production.
1. run `composer install --no-dev` on production, rather than composer update.
1. run `drush updatedb` or visit update.php
", Assign "at most 3 tags" to the expected json: {"id":"8285","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"